View previous topic :: View next topic
|
Author |
Message |
vivek_elx
New User
Joined: 18 Feb 2009 Posts: 4 Location: India
|
|
|
|
Hi..
Is there any utility by which we can replicate records of a file with changing a record field everytime so that the records are not duplicate.
for example
consider a record
aaa001bbbccc....
we want to replicate this record in the file 1000 times with just changing the numerical sequence like
aaa001bbbccc....
aaa002bbbccc....
aaa003bbbccc.... |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
Back to top |
|
|
ykishor Currently Banned New User
Joined: 11 Aug 2007 Posts: 24 Location: my pc
|
|
|
|
yes buddy...
use ICETOOL...sample code is given below:
INREC OVERLAY=(<change pos>:SEQNUM,8,ZD,START=<start value,INCR=<increment value>)
for details look into the ICETOOL guide... |
|
Back to top |
|
|
sril.krishy
Active User
Joined: 30 Jul 2005 Posts: 183 Location: hyderabad
|
|
|
|
Hi,
The SEQUNUM will help to create the sequence number as per your requirement.The same will work if you have SYNCSORT.
Thanks
Krishy |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
If you start at 001 and create 1000 records, the last record will have 000.
That said, you can use a DFSORT job like this:
Code: |
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
aaa001bbbccc....
//SORTOUT DD DSN=... output file
//SYSIN DD *
OPTION COPY
OUTFIL REPEAT=1000,OVERLAY=(4:SEQNUM,3,ZD)
/*
|
If you want to start at 000 instead of 001, you can use:
Code: |
OUTFIL REPEAT=1000,OVERLAY=(4:SEQNUM,3,ZD,START=0)
|
|
|
Back to top |
|
|
vivek_elx
New User
Joined: 18 Feb 2009 Posts: 4 Location: India
|
|
|
|
Thanks Frank , the DFSORT job provided by you worked fine when SORTIN was defined as
//SORTIN DD *
aaa001bbbccc....
when I tried to use a DSN for the same like-
//SORTIN DD DSN=ABC.DEF.XYZ,
// DISP=SHR
it gave an error as
OPTION COPY
*
INREC REPEAT=500,OVERLAY=(4:SEQNUM,3,ZD,START=1,INCR=1)
*
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
...what are the keywords its asking for ..im confused |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
vivek_elx,
Dint you notice that you have changed the
to
Change it back to OUTFIL. Also by default your sequence number starts from 1 and gets incremented by 1; so I think you dont need the "START=1,INCR=1" part. |
|
Back to top |
|
|
vivek_elx
New User
Joined: 18 Feb 2009 Posts: 4 Location: India
|
|
|
|
Thanks alot Arun...its working now... |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
Also, Vivek, the WER... messages you received indicates you have Syncsort, not DFSORT or CA-SORT or whatever. |
|
Back to top |
|
|
|