Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Add a record to output use DFSORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
lee_issc

New User


Joined: 11 Dec 2008
Posts: 33
Location: China

PostPosted: Tue Dec 23, 2008 3:08 pm    Post subject: Add a record to output use DFSORT
Reply with quote

Hi,

Is there anyway to add a record to a output file using DFSORT? Here I have a file with length 140,FB,I want to add this text in the first and second record:

Code:

                                  Rcms use report           
name                 address             age             wage                       


Use DFSORT please.thx.
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


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

PostPosted: Tue Dec 23, 2008 10:18 pm    Post subject:
Reply with quote

DFSORT allows you to add header and trailer records of various types. HEADER1 is the report header, HEADER2 is the page header and HEADER3 is the section header. Likewise for TRAILERx. In your case, since you want to add the records at the beginning of the file, you could use HEADER1 like this:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (FB/140)
//SORTOUT DD DS=...  output file (FB/140)
//SYSIN    DD    *
  OPTION COPY
  OUTFIL REMOVECC,
    HEADER1=(35:'Rcms use report',/,
     1:'name',22:'address',42:'age',58:'wage')
/*


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:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html
Back to top
View user's profile Send private message
lee_issc

New User


Joined: 11 Dec 2008
Posts: 33
Location: China

PostPosted: Wed Dec 24, 2008 6:37 am    Post subject:
Reply with quote

To Frank Yaeger:

Yes,thanks!As you advise it works now!

BTW,Can u tell me when I use 'lines=100', why there is some '1' and '0' chars in the first row?
Back to top
View user's profile Send private message
lee_issc

New User


Joined: 11 Dec 2008
Posts: 33
Location: China

PostPosted: Wed Dec 24, 2008 6:44 am    Post subject:
Reply with quote

Frank,

What does the 'outfil=removecc' means?Is it use to remove the '0' and '1' the generated by using header?
Back to top
View user's profile Send private message
lee_issc

New User


Joined: 11 Dec 2008
Posts: 33
Location: China

PostPosted: Wed Dec 24, 2008 6:51 am    Post subject:
Reply with quote

Thanks Frank,

I found the answer in 'z/OS DFSORT Getting Started':

For reports, OUTFIL places an ANSI carriage control character in the first byte of each output line to tell a printer what action to take for that line. The ’1’ for Data line 01 and Data line 11 tells the printer that these lines each start on a new page. This is the way DFSORT translates LINES=10 into 10 lines per page for the printer. Other ANSI carriage control characters that DFSORT uses for OUTFIL reports are: blank for single space (no blank lines before the output line), ’0’ for double space (one blank line before the output line), and ’-’ for triple space (two blank lines before the output line).

When you view a report on your display, the ANSI carriage control is not meaningful, and is usually not displayed even though it’s actually in the record. If you don’t want ANSI carriage control characters in your output records, you can use OUTFIL’s REMOVECC parameter to remove them (more on this later).


Thanks a lot,next time before ask I will find in this book first!I don't want to waste your time.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


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

PostPosted: Wed Dec 24, 2008 8:49 pm    Post subject:
Reply with quote

Quote:
I found the answer in 'z/OS DFSORT Getting Started'


Good.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts Where is output from PARM ABEXIT (SNA... packerm CA Products 3 Thu Sep 28, 2017 4:06 pm
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts it is possible output a SET value fro... Martylin JCL & VSAM 5 Fri Sep 22, 2017 7:08 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us