Posted: Wed Oct 29, 2003 5:14 pm Post subject: exit rtn with multiple outputs
I have one input that i am splitting into 3 outputs. I would like the put a header and trailer record on each output. I have an exit rtn that does this, but I cannot get it to work with multiple outputs. I have been told this cannot be done. But in the SyncSort manual i am looking at, it says "Use the OUTREC parameter of the OUTFIL statement when an E35 exit must process the records first." So that has given me some hope. Just want to see if anyone knows how this might be accomplished. here is my JCL
Interestingly enough, from the sysout, it appears it may work. If i put in displays, i can see them in the sysout. to further test this, if i make some the financials that the exit rtn looks at invalid, i get a soc7. so this leads me to believe that the exit rtn is being envoked, but the records are just not being written out for some reason.
note: i've been using this exit rtn for a while, so i know it works. up to this point i've just been using it in sorts with one input and one output.
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Wed Oct 29, 2003 5:59 pm Post subject:
Disco_Stu,
Can I dare to ask as to why you can't create the Header and trailer record in the sort parm it self? You can use report features HEADER & TRAILER to generate headers and trailers.
You may dare to ask. I'm not familar with the report features, so I didnt even consider them an option. I'm looking at them now. But i guess in the long term, I see the exit rtn as a more durable solutin as it can handle more situations. For example:
What if the the control record contains a specific piece of data i need to capture. The exit rtn can read this trailer record in an just replace the numeric totals, leave all other data as is.
Exit rtn would allow me to access other pieces of data. For example, i need to get a cycle date to put on the trailer record. I can add a date file DD in my JCL and put in the appropriate code in the exit rtn.
FYI, here is the trailer record layout. It looks like the report option you mention may work here. I'll see. but ultimately, if i could get the exit rtns to work, that would be best. The situation i described above also occurs with other various datasets. Some with more detailed trailer records. For almost all of these, we already have exit rtns created and tested, so it would just be a matter of getting them to work with a multiple file output syncsort.
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Thu Oct 30, 2003 10:46 am Post subject:
Disco_stu,
Can this be due to the fact that all output is directed to SORTOUT unless an inline E35 exit (COBOL output procedure) assumes the full responsibility for output processing?.If a SORTOUT ddname is defined in the JCL and does not appear in any FILES or FNAMES specification, it will be written to without any OUTFIL processing. If an inline
E35 exit has been specified, OUTFIL is ignored.
Kinda lost me here. Are you basically saying that because of the E35 rtn, OUTFIL is ignored, thus it doesnt know where to write the new output from the E35 rtn? So it just ends up nowhere.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum