IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to include a Header & Trailer In a sort o/p file


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vivekbalokhra
Warnings : 1

New User


Joined: 15 Jul 2005
Posts: 6

PostPosted: Sat Dec 03, 2005 11:15 am
Reply with quote

In a sort o/p file, how to include a Header & Trailer?
Back to top
View user's profile Send private message
radhakrishnan82

Active User


Joined: 31 Mar 2005
Posts: 435
Location: chennai, India

PostPosted: Sat Dec 03, 2005 11:25 am
Reply with quote

Including Header and Trailer was already discussed earlier in this forum.
Please search the previous posts.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Sat Dec 03, 2005 10:07 pm
Reply with quote

You can include a report header and report trailer using DFSORT's HEADER1 and TRAILER1 operands of the OUTFIL statement, respectively. For example:

Code:

//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD DSN=...  output file w/header/trailer
//SYSIN DD *
   OPTION COPY
   OUTFIL REMOVECC,HEADER1=('This is a header'),
      TRAILER1=('This is a trailer')
/*


REMOVECC tells DFSORT not to include ANSI carriage control characters in the output file (e.g. '1' for new page). If you want ANSI carriage control characters, don't specify REMOVECC.

You can use many different options in HEADER1 (e.g. date/time in various forms, character and hexadecimal strings, input fields, etc) and in TRAILER1 (e.g. date/time in various forms, character and hexadecimal strings, input fields, counts, statistics, etc).

There's also HEADER2/TRAILER2 for the page header/trailer and HEADER3/TRAILER3 for the section header/trailer.

If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

Use [URL] BBCode for External Links
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top