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
 

 

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 Record Not found in AlX but record re... mukun264 COBOL Programming 5 Fri Mar 24, 2017 9:28 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm


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