Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|