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 Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm


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