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
 

 

Building SYMNAMES file, two or more records

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

New User


Joined: 06 Jun 2009
Posts: 95
Location: UK

PostPosted: Tue May 13, 2014 9:08 pm    Post subject: Building SYMNAMES file, two or more records
Reply with quote

Hi,

Can you some please how can I write more than one record on my SYMNAMES files.

At the moment..

Code:
//STEP001  EXEC PGM=SORT                                             
//SORTIN   DD *                                                     
140512 120514 14132 130514 14133 14129     010010Y 140505140511140506
//SORTOUT  DD DSN=MY OUTPUT.....,                                   
//            DISP=(,CATLG),SPACE=(TRK,(1,1))                       
//SYSIN    DD *                                                     
  OPTION COPY                                                       
  INREC BUILD=(C'MYDATE,''',15,5,C'''',80:X)                         
//SYSOUT   DD SYSOUT=*                                               
//SYSUDUMP DD SYSOUT=*


Output comes out:
Code:
MYDATE,'14132'


I would like to write two lines:
Code:
MYDATE,'14132'
FILEDT,'140512'


Do I need to use HEADER1 and TRAILER1?

Thanks,
zhlad
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7254

PostPosted: Tue May 13, 2014 9:27 pm    Post subject: Reply to: Building SYMNAMES file, two or more records
Reply with quote

Depends on what you want to do.

HEADER1 and TRAILER1 support the slash operator (/), so you can create multiple lines, but with hard-coded literal values only.

OUTFIL BUILD also supports the slash operator, so you can BUILD multiple records from input and literal values.

OUTFIL REPEAT replicates input, allowing you to use input for multiple, amended, values.

You can also simply have multiple input records on SORTIN, and treat them differently depending on an identifying value with IFTHEN=(WHEN=(logical expression).

I've used JOINKEYS for generating symbols, INREC, OUTREC, OUTFIL then also ICETOOL has some operators which I've found useful for this.

All depends on the actual task. The simpler the symbol, the less code. Easiest is multiple input records, with one-to-one mapping for output.

You should also look at system symbols (as in sticky post in the first page of the DFSORT forum) and JPn symbols, which allow data to be taken from PARM values and used in SORT statements.

Symbols are a whole heap of fun, and help in many ways. There are examples here, though not as many as there could be, as people tend to want the spoon-fed answer they can just do in one copy/paste.
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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm


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