Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

JCL utility for replicating records with condition

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
vivek_elx

New User


Joined: 18 Feb 2009
Posts: 4
Location: India

PostPosted: Wed Feb 18, 2009 4:38 pm    Post subject: JCL utility for replicating records with condition
Reply with quote

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
View user's profile Send private message

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Wed Feb 18, 2009 5:25 pm    Post subject:
Reply with quote

Yes, SORT for one.....
Also look at the IEBDG (Test Data Generator) Program....
Back to top
View user's profile Send private message
ykishor
Currently Banned

New User


Joined: 11 Aug 2007
Posts: 24
Location: my pc

PostPosted: Wed Feb 18, 2009 10:08 pm    Post subject:
Reply with quote

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
View user's profile Send private message
sril.krishy

Active User


Joined: 30 Jul 2005
Posts: 183
Location: hyderabad

PostPosted: Wed Feb 18, 2009 10:32 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Feb 18, 2009 10:55 pm    Post subject:
Reply with quote

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
View user's profile Send private message
vivek_elx

New User


Joined: 18 Feb 2009
Posts: 4
Location: India

PostPosted: Tue Feb 24, 2009 4:29 pm    Post subject:
Reply with quote

Thanks Frank , the DFSORT job provided by you worked fine icon_razz.gif 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 icon_exclaim.gif
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2284
Location: @my desk

PostPosted: Tue Feb 24, 2009 4:44 pm    Post subject:
Reply with quote

vivek_elx,

Dint you notice that you have changed the
Code:
OUTFIL REPEAT
to
Code:
INREC REPEAT

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
View user's profile Send private message
vivek_elx

New User


Joined: 18 Feb 2009
Posts: 4
Location: India

PostPosted: Tue Feb 24, 2009 4:50 pm    Post subject:
Reply with quote

Thanks alot Arun...its working now...
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Tue Feb 24, 2009 8:52 pm    Post subject:
Reply with quote

Also, Vivek, the WER... messages you received indicates you have Syncsort, not DFSORT or CA-SORT or whatever.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to Use DebugTool CodeCoverage Uti... neo4u IBM Tools 0 Thu Jun 22, 2017 6:38 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts DB2 - TERMINATE utility vasanthz DB2 5 Mon May 15, 2017 11:49 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us