IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Create the multiple record in different files & schedule


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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

Moderator Emeritus


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

PostPosted: Thu Dec 10, 2009 1:08 am
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
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: 8797
Location: Welsh Wales

PostPosted: Tue Dec 29, 2009 2:19 pm
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 Developer


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

PostPosted: Tue Dec 29, 2009 10:57 pm
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:

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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 7
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
Search our Forums:

Back to Top