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 How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am
No new posts SORT JSON type of data maxsubrat DFSORT/ICETOOL 8 Wed Apr 19, 2017 6:01 pm
No new posts Validating file with multiple header/... mohitsaini DFSORT/ICETOOL 6 Thu Apr 13, 2017 1:53 am


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