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
 

 

How to insert a header record and a trailer record

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

New User


Joined: 22 Apr 2010
Posts: 1
Location: bangalore

PostPosted: Thu Apr 22, 2010 12:12 pm    Post subject: How to insert a header record and a trailer record
Reply with quote

Below is my job.I would like to insert a a header record with the timestamp in it and the trailer record with the toal number of records incl header and trailer.

Please help
Code:
//PS080  EXEC PGM=SORT                                           
//*                                                             
//SORTIN   DD  DSN=oan111.input.file1, 
//             DISP=SHR                                         
//SORTOUT  DD  DSN=Oan111.MODIFY.OPT31,                         
//            DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,               
//            DCB=*.SORTIN,                                     
//            SPACE=(CYL,(1,1),RLSE)                             
//*                                                             
//*                                                             
//SYSPRINT DD  SYSOUT=N                                         
//SYSOUT   DD  SYSOUT=N                                         
//SYSIN    DD  *                                                 
  INREC IFTHEN=(WHEN=(11,1,ZD,EQ,4,AND,                         
        (13,11,ZD,GE,00000100000,AND,13,11,ZD,LE,00000250000)), 
         OVERLAY=(27:C'5')),                                     
        IFTHEN=(WHEN=(11,1,ZD,EQ,4,AND,13,11,ZD,LE,00000100000),
                 OVERLAY=(27:C'6')),                             
        IFTHEN=(WHEN=(11,1,ZD,EQ,5,AND,13,11,ZD,LE,00000100000),       
                 OVERLAY=(27:C'6'))                                   
  SORT FIELDS=COPY                                                     
  OUTREC FIELDS=(1,30)                                                 
                                                                       
/*


Edited: Please use BBcode when You post some code/error, that's rather readable, Thanks... Anuj
Back to top
View user's profile Send private message

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Thu Apr 22, 2010 4:19 pm    Post subject: Re: How to insert a header record and a trailer record
Reply with quote

sreelathakokk wrote:
Below is my job.I would like to insert a a header record with the timestamp in it and the trailer record with the toal number of records incl header and trailer.
Have you looked at a sort manual?
Have you looked at the header and trailer functions?

Oh yea, welcome to the forum.....
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Apr 22, 2010 4:23 pm    Post subject:
Reply with quote

Because the solution for sort related questions may vary from product to product, please ensure that you state clearly which sort product you are using.

If you are not sure, then by running a simple sort step shown below, you will be able to find out for yourself.

If the messages start with ICE then your product is DFSORT and the topic will be moved by a moderator to that forum. Please also post the output of the complete line which has a message code ICE201I, as this will enable our DFSORT experts to determine which release of DFSORT that you have installed. This may also affect the solution offered.

If the messages start with WER or SYT then the product is SYNCSORT and the topic will remain in the JCL forum. Please also post the information telling which version of SYNCSORT is installed, as this may also affect the solution offered.

Thank you for taking your time to ensure that the valuable time of others is not wasted by offering inappropriate solutions which are not relevant due to the sort product being used and/or the release that is installed in your site.

Code:
//SORTSTEP EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD *
ABC
//SORTOUT  DD SYSOUT=*
//SYSIN    DD *
  SORT     FIELDS=COPY
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Apr 22, 2010 7:31 pm    Post subject:
Reply with quote

Hello and welcome to the forum,

As you have not yet posted the requested info about the sort being used on your system, there have not been more replies. . .

In addition to checking the documentation for your sort, you might also use our forum search (above) to find topics that do things very similar to what you want. . .
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 Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
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. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Validating file with multiple header/... mohitsaini DFSORT/ICETOOL 6 Thu Apr 13, 2017 1:53 am
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm


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