MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

exit rtn with multiple outputs

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
Disco_Stu
Beginner


Joined: 04 Feb 2003
Posts: 19
Topics: 7

PostPosted: Wed Oct 29, 2003 5:14 pm    Post subject: exit rtn with multiple outputs Reply with quote

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

Code:


//*********************************************************************
//STEP01   EXEC PGM=SYNCSORT,PARM='NZDPRINT,MSG=AP,VSIO=NONE,E35=COB' 
//*********************************************************************
//MODLIB   DD DSN=T7476BTX.LPM.LOADLIB,DISP=SHR                       
//DATEREC  DD DSN=T7476BTX.CUST.TEST.DATECARD,DISP=SHR                 
//SYSOUT   DD SYSOUT=*                                                 
//SORTIN   DD DSN=N31FAE.SS51U.SSET01.DLYPDINC.G0010V00.DASD,DISP=SHR     
//SORTOF1  DD DSN=T7476BTX.LWCC62U.WCOMP.SPLIT(+1),                   
//            DISP=(NEW,CATLG,UNCATLG),                               
//            SPACE=(CYL,(55,55),RLSE),                               
//            DCB=(SYS2.GDG,RECFM=FB,LRECL=3875,BLKSIZE=0)             
//*                                                                   
//SORTOF2  DD DSN=T7476BTX.LAUT62U.AUTO.SPLIT(+1),                     
//            DISP=(NEW,CATLG,UNCATLG),                               
//            SPACE=(CYL,(55,55),RLSE),                               
//            DCB=(SYS2.GDG,RECFM=FB,LRECL=3875,BLKSIZE=0)     
//*                                                           
//SORTOF3  DD DSN=T7476BTX.LOTH62U.OTHER.SPLIT(+1),           
//            DISP=(NEW,CATLG,UNCATLG),                                 
//            SPACE=(CYL,(55,55),RLSE),                       
//            DCB=(SYS2.GDG,RECFM=FB,LRECL=3875,BLKSIZE=0)     
//*                                                           
//SYSIN    DD *                                                           
 SORT FIELDS=COPY,                                       
         SIZE=E99999999,DYNALLOC=(SYSDA,32)               
 MODS E35=(Z7476501,100,MODLIB,N)                         
 OUTFIL FILES=1,                                         
    INCLUDE=(193,2,CH,EQ,C'CM',OR,193,2,CH,EQ,C'CB')     
 OUTFIL FILES=2,                                         
    INCLUDE=(193,2,CH,EQ,C'AB',OR,193,2,CH,EQ,C'AD',OR,   
             193,2,CH,EQ,C'PP')                           
 OUTFIL FILES=3,                                         
    INCLUDE=(193,2,CH,NE,C'CM',AND,193,2,CH,NE,C'CB',AND,
             193,2,CH,NE,C'AB',AND,193,2,CH,NE,C'AD',AND,
             193,2,CH,NE,C'PP',AND,1,1,CH,NE,X'00',AND,   
             1,1,CH,NE,X'FF')                             


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.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Wed Oct 29, 2003 5:59 pm    Post subject: Reply with quote

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.

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Disco_Stu
Beginner


Joined: 04 Feb 2003
Posts: 19
Topics: 7

PostPosted: Thu Oct 30, 2003 9:24 am    Post subject: Reply with quote

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.
Code:

   1 01  SPD-INC-MCR-REC REDEFINES SSET-PD-INC-REC.               
   1     05  SPD-INC-MCR-REC-KEY                 PIC X(121).      (this is high values) 
 122     05  SPD-INC-MCR-REC-COUNT               PIC S9(11) COMP-3.
 128     05  SPD-INC-MCR-CONTROLS.                                 
 128         10  SPD-INC-MCR-CONTROL-AMT OCCURS 9 TIMES.           
 128             15  SPD-INC-MCR-AMOUNTS     PIC S9(13)V99 COMP-3.
 128     05  SPD-INC-MCR-CONTROL2 REDEFINES SPD-INC-MCR-CONTROLS. 
 128         10  SPD-INC-MCR-CONTROL2 COMP-3.                     
 128             15  SPD-INC-MCR-IFD-LSDB-COI-INDM PIC S9(13)V99. 
 136             15  SPD-INC-MCR-IFD-LSDB-COI-MED  PIC S9(13)V99. 
 144             15  SPD-INC-MCR-IFD-LSDB-COI-EXP  PIC S9(13)V99. 
 152             15  SPD-INC-MCR-IFD-ANTCP-INDM-CHG PIC S9(13)V99.
 160             15  SPD-INC-MCR-IFD-ANTCP-MED-CHG PIC S9(13)V99. 
 168             15  SPD-INC-MCR-IFD-ANTCP-EXP-CHG PIC S9(13)V99. 
 176             15  SPD-INC-MCR-PFD-LSDB-PD-INDM  PIC S9(13)V99. 
 184             15  SPD-INC-MCR-PFD-LSDB-PD-MED   PIC S9(13)V99. 
 192             15  SPD-INC-MCR-PFD-LSDB-PD-EXP   PIC S9(13)V99. 
 200     05  SPD-INC-MCR-FILLER                  PIC X(3676).     
       
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Oct 30, 2003 10:46 am    Post subject: Reply with quote

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.


Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Disco_Stu
Beginner


Joined: 04 Feb 2003
Posts: 19
Topics: 7

PostPosted: Thu Oct 30, 2003 11:01 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group