Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Your description is not clear. You say you have one input record - is that input record:
12345 123 ASD
or something else? Or do you actually have more than one input record?
If you have one input record, how many output records do you want to create? Do you want to add 1 to field1 for each input record? Do you want to add 1 to field2 for each input record until you have three records and then start over at the initial field2 value in your input record (123)? The first record you show has ASD whereas the other records have ASR. Where did ASR come from?
You need to explain more clearly what you want to do and show input and output records that correspond to that explanation. |
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
You didn't say how many output records you want, so I'll assume it's 9 as shown in your example. Given that, here's a DFSORT job that will do what you asked for. You can change the INTVL symbol to whatever interval you want. I set it to +3 as in your example.
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SYMNAMES DD *
INTVL,+3
/*
//SORTIN DD DSN=... input file (FB - one record)
//SORTOUT DD DSN=... output file
//SYSIN DD *
OPTION COPY
OUTFIL REPEAT=9,
IFTHEN=(WHEN=INIT,OVERLAY=(14:SEQNUM,5,ZD,START=0,
19:14,5,ZD,MOD,INTVL,TO=ZD,LENGTH=3)),
IFTHEN=(WHEN=INIT,BUILD=(1:1,5,ZD,ADD,14,5,ZD,TO=ZD,LENGTH=5,
7:7,3,ZD,ADD,19,3,ZD,TO=ZD,LENGTH=3,11:11,3))
/*
|
|
|