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
 

 

Create the multiple record in different files & schedule

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

New User


Joined: 03 Nov 2009
Posts: 14
Location: chennai

PostPosted: Thu Dec 10, 2009 1:05 am    Post subject: Create the multiple record in different files & schedule
Reply with quote

Could help me for the below scenario:

1) How to Create the records into equal parts i.e 5000 records in File A, Next 5000 records in File B,...Last 5000 records in File E. Behalf of creating the multiple records(For Example : 25000) in single file,

2) I need to schedule the jobs Manually(Not using ZEKE Scheduler) i.e First File A will be sending 5000 records to Message Queue. then Second File B should start sending next set of 5000 records to Message Queue only when File A return code = 00, Third File C should start sending next set of 5000 records to message queue only when File B return code = 00, Fourth File D should start sending next set of 5000 records to message queue only when File C return code = 00, Finally File E will start sending the 5000 records to message Queue only when File D return code = 00.
_________________
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Dec 10, 2009 1:08 am    Post subject:
Reply with quote

Hello,

To do what you want, have each "job" submit the next job thru the internal reader (there are many topics in the forum about using the internal reader).

I don't know how a file sets a condition code. . . If you explain, someone may have a suggestion.
Back to top
View user's profile Send private message
viveksurya

New User


Joined: 08 Jun 2009
Posts: 36
Location: Bangalore

PostPosted: Tue Dec 29, 2009 2:06 pm    Post subject:
Reply with quote

Hi Pushpraj,

1) Using SORT, here is the code which will divide the input file into 5 output each having 5000 records

Code:
000009 //SORTIN   DD DSN=NBKOWJN.INSIGHT.FILE1,DISP=SHR
000010 //SORTOF1  DD DSN=NBKOWJN.INSIGHT.CNT1,DISP=(NEW,CATLG,DELETE),
000011 //            SPACE=(TRK,(2,16)),
000012 //            DCB=(RECFM=FB,LRECL=80)
000013 //SORTOF2  DD DSN=NBKOWJN.INSIGHT.CNT2,DISP=(NEW,CATLG,DELETE),
000014 //            SPACE=(TRK,(2,16)),
000015 //            DCB=(RECFM=FB,LRECL=80)
000016 //SORTOF3  DD DSN=NBKOWJN.INSIGHT.CNT3,DISP=(NEW,CATLG,DELETE),
000017 //            SPACE=(TRK,(2,16)),
000018 //            DCB=(RECFM=FB,LRECL=80)
000019 //SORTOF4  DD DSN=NBKOWJN.INSIGHT.CNT4,DISP=(NEW,CATLG,DELETE),
000020 //            SPACE=(TRK,(2,16)),
000021 //            DCB=(RECFM=FB,LRECL=80)
000022 //SORTOF5  DD DSN=NBKOWJN.INSIGHT.CNT5,DISP=(NEW,CATLG,DELETE),
000023 //            SPACE=(TRK,(2,16)),
000024 //            DCB=(RECFM=FB,LRECL=80)
000025 //SYSIN    DD *
000026    SORT FIELDS=COPY
000027    OUTFIL FILES=1,ENDREC=5000
000028    OUTFIL FILES=2,ENDREC=5000
000029    OUTFIL FILES=3,ENDREC=5000
000030    OUTFIL FILES=4,ENDREC=5000
000031    OUTFIL FILES=5,ENDREC=5000
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Dec 29, 2009 2:19 pm    Post subject:
Reply with quote

viveksurya wrote:
1) Using SORT, here is the code which will divide the input file into 5 output each having 5000 records

Surely if you use the same value for ENDREC= then each of the files will contain exactly the same records, the first 5000, rather than the full 25000 records being equally split.

pushparaj v

This can be done using a sort product and has already been asked very frequently, so you should be able to search the forum to find some really good examples on how to do this.

This is a link to the DFSORT smart tricks documentation which has an example of how to achieve your goal.
Please click HERE to access it.

However, the solution for sort related questions may vary from product to product, please ensure that you state clearly which sort product you are using.

If you are not sure, then by running a simple sort step shown below, you will be able to find out for yourself.

If the messages start with ICE then your product is DFSORT. Please also post the output of the complete line which has a message code ICE201I, as this will enable our DFSORT experts to determine which release of DFSORT that you have installed. This may also affect the solution offered.

If the messages start with WER or SYT then the product is SYNCSORT and should be posted in the JCL forum. Please also post the information telling which version of SYNCSORT is installed, as this may also affect the solution offered.

Thank you for taking your time to ensure that the valuable time of others is not wasted by offering inappropriate solutions which are not relevant due to the sort product being used and/or the release that is installed in you site.

Code:
//SORTSTEP EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD *
ABC
//SORTOUT  DD SYSOUT=*
//SYSIN    DD *
  SORT     FIELDS=COPY
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: Tue Dec 29, 2009 10:57 pm    Post subject:
Reply with quote

PRAJ,

For splitting the records, you can use the technique discussed in the "Split a file to n output files dynamically" Smart DFSORT Trick at:

http://www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000094
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 Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 7 Fri Mar 24, 2017 2:24 pm
No new posts Record Not found in AlX but record re... mukun264 COBOL Programming 5 Fri Mar 24, 2017 9:28 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm


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