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 

Outfil header1

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


Joined: 23 May 2005
Posts: 2
Topics: 1
Location: USA

PostPosted: Mon May 23, 2005 2:08 pm    Post subject: Outfil header1 Reply with quote

I am trying to get a syncsort step to output a header into the top of the sortout file. Not having much luck. It is abending but without an error code. I think I have the parms in the wrong order. Anyone help?
Here is my JCL. I need the include, sort and sum commands...can this be done in one step?
Code:

//SORTQMON EXEC PGM=IERRCO00,DYNAMNBR=20,REGION=4M                 
//SORTIN   DD DSN=XXXXXXX.METRICS.RESULTS.ACMOUT.QMON,DISP=SHR     
//SORTOUT  DD DSN=XXXXXXX.METRICS.RESULTS.ACMOUT.QMON.SORTOUT,     
//          LRECL=134,RECFM=FB,DISP=(NEW,CATLG,DELETE)             
//SYSPRINT DD SYSOUT=*                                             
//SYSOUT   DD SYSOUT=*                                             
//SYSUDUMP DD SYSOUT=*                                             
//SYSIN    DD *                                                     
 OUTFIL HEADER1=(1:'TEST HEADER')                                         
 INCLUDE COND=(6,2,CH,EQ,C'1 ',OR,6,2,CH,EQ,C'2 ')                 
 SORT  FIELDS=(6,1,CH,A,45,10,CH,A,10,8,CH,A)                       
 SUM   FIELDS=NONE                                                 
//*
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Mon May 23, 2005 3:19 pm    Post subject: Reply with quote

Uconnputz,

When you are using reporting features, the output dataset will created with ansi carriage control character. So the recfm will be FBA format. However you have hardcoded FB as the Recfm for the SORTOUT dataset. You don't have to code the DCB parameters for SORT. They will be automatically calculated by sort pgm itself.

I am not really sure about the pgm IERRCO00, but here is the JCl which will give you the desired results. I re-arranged the control cards for more readablity


Code:

//STEP0100 EXEC PGM=SORT                         
//SYSOUT   DD SYSOUT=*                           
//SORTIN   DD DSN=XXXXXXX.METRICS.RESULTS.ACMOUT.QMON,
//            DISP=SHR
//SORTOUT  DD DSN=XXXXXXX.METRICS.RESULTS.ACMOUT.QMON.SORTOUT,     
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(CYL,(X,Y),RLSE)
//SYSIN    DD *                     
  INCLUDE COND=(6,2,CH,EQ,C'1 ',OR,
                6,2,CH,EQ,C'2 ')   
  SORT FIELDS=(06,01,CH,A,         
               45,10,CH,A,         
               10,08,CH,A)         
  SUM FIELDS=NONE                   
  OUTFIL HEADER1=(1:'TEST HEADER') 
/*


If you want FB format sortout dataset then change the contol cards as follows

Code:

  OUTFIL REMOVECC,HEADER1=(1:'TEST HEADER') 


The removecc parm will supress the Ansi carriage control character.


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Uconnputz
Beginner


Joined: 23 May 2005
Posts: 2
Topics: 1
Location: USA

PostPosted: Tue May 24, 2005 9:51 am    Post subject: Reply with quote

Kolusu:
Thanks very much...it workeed like a charm.

Thanks again

Peter.
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