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
 

 

Adding Header using Sort

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

New User


Joined: 12 Oct 2007
Posts: 11
Location: Chennai

PostPosted: Thu Mar 13, 2008 9:18 pm    Post subject: Adding Header using Sort
Reply with quote

Hi ,

I got confused totally on working with the below two codes.

Code:

//STEP03    EXEC PGM=SORT                                         
//SORTIN  DD   DSN=Q2B3PB.QES.QUERY.STEP2.OUTPUT,DISP=SHR
//SORTOUT DD   DSN=Q2B3PB.QES.QUERY.STEP3.OUTPUT,DISP=SHR
//SYSOUT  DD   SYSOUT=*                                           
//SYSIN   DD *                                                     
     OPTION COPY                                                   
      OUTFIL FNAMES=SORTOUT,                                       
      HEADER1=(1:C'EEID',11:C'CUMBID',30:C'DEPID',132:X,/,132C'-'),
      OUTREC=(1:1,10,                                             
             11:41,9,PD,EDIT=(TTTTTTTTTTTTTTTTTT),                 
             30:50,10,132:X)             
/*                         


is working properly resulting the correcting output.

but the same thing is modified as below and executed which is not working.

Code:

//STEP03    EXEC PGM=SORT                                               
//SORTIN  DD   DSN=Q2B3PB.QES.QUERY.STEP2.OUTPUT,DISP=SHR
//SORTOUT DD   DSN=Q2B3PB.QES.QUERY.STEP3.OUTPUT,DISP=SHR
//SYSOUT  DD   SYSOUT=*                                                 
//SYSIN   DD *                                                         
     OPTION COPY                                                       
      OUTFIL FNAMES=SORTOUT,                                           
      HEADER1=(1:C'EEID',12:C'SUBEFFDT',23:C'SUBCUMBID',               
               38:C'SUBRE',46:C'SUBLAN',54:C'DEPID',65:C'DEPCUMBID',   
               80:C'DEPEFFDT',91:C'DEPRE',99:C'DEPLAN',132:X,/,132C'-'),
       OUTREC=(1:1,10,                                                 
               11:41,9,PD,EDIT=(TTTTTTTTTTTTTTTTTT),                   
               30:50,10,132:X)                                         
/*                                                                     


can you please help me on the same.
Back to top
View user's profile Send private message

Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Thu Mar 13, 2008 9:22 pm    Post subject: Re: Adding Header using Sort
Reply with quote

lenin wrote:
...but the same thing is modified as below and executed which is not working...

What about it is not working? Are you getting a critical error or abend? Are you getting unexpected output? Please be more specific so that we can better assist you.
Back to top
View user's profile Send private message
lenin

New User


Joined: 12 Oct 2007
Posts: 11
Location: Chennai

PostPosted: Thu Mar 13, 2008 9:24 pm    Post subject:
Reply with quote

It results with MAXCC16

Code:

SYSIN :                                                                 
     OPTION COPY                                                       
      OUTFIL FNAMES=SORTOUT,                                           
      HEADER1=(1:C'EEID',12:C'SUBEFFDT',23:C'SUBCUMBID',               
               38:C'SUBRE',46:C'SUBLAN',54:C'DEPID',65:C'DEPCUMBID',   
               80:C'DEPEFFDT',91:C'DEPRE',99:C'DEPLAN',132:X,/,132C'-'),
       OUTREC=(1:1,10,                                                 
       *                                                               
               11:41,9,PD,EDIT=(TTTTTTTTTTTTTTTTTT),                   
               30:50,10,132:X)                                         
WER161B  ALTERNATE PARM USED                                           
WER268A  OUTFIL STATEMENT  : SYNTAX ERROR
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Thu Mar 13, 2008 10:19 pm    Post subject:
Reply with quote

I just ran a test with your exact JCL and it ran fine. Then I ran it slightly modified - I spaced the following line to the right a little:
Code:
               80:C'DEPEFFDT',91:C'DEPRE',99:C'DEPLAN',132:X,/,132C'-'),

and this reproduced the syntax error. I believe you have extended this line of code too far. Try moving it to the left a few columns and resubmit the job.
Back to top
View user's profile Send private message
lenin

New User


Joined: 12 Oct 2007
Posts: 11
Location: Chennai

PostPosted: Fri Mar 14, 2008 11:30 am    Post subject:
Reply with quote

Alissa,

I checked it again, It works. I got it. Thanks a lot!!!

Lenin
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 Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm
No new posts SORT to append Month and YEAR in MMYY... tisamf DFSORT/ICETOOL 1 Wed Mar 08, 2017 4:46 pm
No new posts JCL sort Match and NoMatch rakeshsekar1987 SYNCSORT 2 Thu Feb 02, 2017 10:26 pm


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