I have to generate a variable number of records to an output file. In a symnames card I have this number of variable records. Is there a way to do this ?
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
OUTFIL REPEAT= will give you multiple output records per input record. REPEAT= up to DFSORT 2.1 can't use a symbol/SYMNAME. If you have 2.1, you may be lucky. If you don't, you'll have to use the symbol to generate the sort control cards to a dataset and run a second step using that dataset as the SYSIN.
To get your steps-of-nine from your starting point, temporarily extend the record to have a sequence number starting from zero, multiply by the sequence number by nine and add it to 10. Something like that.
//S03 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
RECORD WHITH VALUE ---
/*
//SORTOUT DD SYSOUT=*
//SYSIN DD DISP=SHR,DSN=&SYSUID..REPEAT.T1
Here are the contents of the sysout :
Code:
********************************* TOP OF DATA *******
RECORD WHITH VALUE 010
RECORD WHITH VALUE 019
RECORD WHITH VALUE 028
RECORD WHITH VALUE 037
RECORD WHITH VALUE 046
******************************** BOTTOM OF DATA *****