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 Match two files using multiple keys a... santoshks1987 SYNCSORT 10 Fri Aug 18, 2017 10:50 am
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm


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