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
 

 

How to write two records to the same output DD using DFSORT

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

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Sat Oct 06, 2007 1:37 am    Post subject: How to write two records to the same output DD using DFSORT
Reply with quote

I have a job step that reads a single variable record and writes out a reformatted fixed record.

Code:

//S6SORT EXEC PGM=DFSORT                                             
//SORTIN   DD  DISP=SHR,DSN=Variable.input.file             
//SORTOUT  DD  DSN=Fixed output.file,                           
//             UNIT=SYSDA,DISP=(NEW,CATLG),                         
//             RECFM=FB,LRECL=80,BLKSIZE=27920,                     
//             SPACE=(TRK,(60,15),RLSE)                             
//SYSOUT   DD SYSOUT=*                                               
//SYSIN    DD *                                                     
 OPTION NOVLSCMP,VLSHRT                                             
 SORT FIELDS=COPY                                                   
 INCLUDE COND=((5,4,CH,EQ,C'0500'),AND,                             
             (257,8,CH,NE,C'$IOA    '),AND,                         
             (257,8,CH,NE,C'TCICSTRN'))                             
 OUTFIL OUTREC=(1:C'DATASET  ',10:10,44,54:1C' ',55:1C' *UACC* ',
    55:1C' *UACC* ',63:1C' A ',66:133,8,74:7C' '),CONVERT
/*       


The above JCL runs fine.

I would like to know how to read a single variable input record and write two fixed output records to the same SORTOUT file. The 1st fixed output record is the OUTREC= record define above and the 2nd fixed output record should look like:

Code:

 OUTFIL OUTREC=((1:C'DATASET  ',10:10,44,54:1C' ',       
    55:1C' *LPAR* ',63:1C'   ABCFLNRTUW',74:7C' '),CONVERT


Is this possible in DFSORT?
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: Sat Oct 06, 2007 2:04 am    Post subject:
Reply with quote

You can replace your OUTFIL statement with this one (I corrected a few syntax errors):

Code:

  OUTFIL CONVERT,                                               
    BUILD=(1:C'DATASET  ',10:10,44,54:1C' ',55:1C' *UACC* ',   
      63:1C' A ',66:133,8,74:7C' ',/,                           
    1:C'DATASET  ',10:10,44,54:1C' ',                           
     55:1C' *LPAR* ',63:1C'   ABCFLNRTUW',76:5C' ')             


The / says to start a new record.
Back to top
View user's profile Send private message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Sat Oct 06, 2007 2:12 am    Post subject: Reply to: How to write two records to the same output DD usi
Reply with quote

Outstanding Frank!!!

Worked like a charm.

I searched for BUILD= in the PDF for the DFSORT Application Programming Guide and didn't get a hit, so maybe I have an outdated manual.

Have a great weekend.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Sat Oct 06, 2007 2:25 am    Post subject:
Reply with quote

Frank Yaeger wrote:
The / says to start a new record.
Neat, I was thinking it was only good in trailer type print functions..... icon_lol.gif
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: Sat Oct 06, 2007 3:06 am    Post subject:
Reply with quote

Quote:
I searched for BUILD= in the PDF for the DFSORT Application Programming Guide and didn't get a hit, so maybe I have an outdated manual.


Yes, you must. You can always access all of the latest DFSORT books online from:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html
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 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 Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm


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