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
 

 

SYNCSORT - populate the records in ONE output file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
sankarganga

New User


Joined: 16 Feb 2009
Posts: 3
Location: bangalore

PostPosted: Tue Sep 20, 2011 12:18 pm    Post subject: SYNCSORT - populate the records in ONE output file
Reply with quote

Hi,
I have used following SORT card to get the Matching/Not matching records to FILE01 and FILE02.

Code:
JOINKEYS FILES=F1,FIELDS=(11,12,A,23,2,A)                           
JOINKEYS FILES=F2,FIELDS=(1,12,A,14,2,A)                             
JOIN UNPAIRED,F1,F2                                                 
REFORMAT FIELDS=(F1:1,47,F2:33,10),FILL=X'00'                       
SORT FIELDS=COPY                                                     
OUTFIL FILES=01,INCLUDE=(1,1,BI,NE,X'00',AND,48,1,BI,NE,X'00'),     
OUTREC=(1:1,57)                                                     
OUTFIL FILES=02,INCLUDE=(1,1,BI,NE,X'00',AND,48,1,BI,EQ,X'00'),     
OUTREC=(1:1,47,48:&DATE(4MD-))     

Now, is there any way to populate the records in ONE output file.
Back to top
View user's profile Send private message

kratos86

Active User


Joined: 17 Mar 2008
Posts: 148
Location: Anna NGR

PostPosted: Tue Sep 20, 2011 2:25 pm    Post subject:
Reply with quote

Yes you can.

Collaborate all your include conditions. Use IFTHEN against seperate conditions to build the output file.
Back to top
View user's profile Send private message
sankarganga

New User


Joined: 16 Feb 2009
Posts: 3
Location: bangalore

PostPosted: Tue Sep 20, 2011 4:38 pm    Post subject:
Reply with quote

Thanks for the reply kartos86

i used following code to format the records into single OUTFILE.
JOINKEYS FILES=F1,FIELDS=(11,12,A,23,2,A)
JOINKEYS FILES=F2,FIELDS=(1,12,A,14,2,A)
JOIN UNPAIRED,F1
REFORMAT FIELDS=(F1:1,47,F2:33,10)
SORT FIELDS=COPY
OUTFIL FILES=01,IFTHEN=(WHEN=(48,1,CH,NE,C' '),
BUILD=(1,57)),
IFTHEN=(WHEN=NONE,BUILD=(1,47,&DATE))

But here I am not able to format the DATE to YYYY-MM-DD. its is giving syntax error for &DATE(4MD-)
Back to top
View user's profile Send private message
sankarganga

New User


Joined: 16 Feb 2009
Posts: 3
Location: bangalore

PostPosted: Tue Sep 20, 2011 5:49 pm    Post subject:
Reply with quote

i got the solution.

JOINKEYS FILES=F1,FIELDS=(11,12,A,23,2,A)
JOINKEYS FILES=F2,FIELDS=(1,12,A,14,2,A)
JOIN UNPAIRED,F1
REFORMAT FIELDS=(F1:1,47,F2:33,10)
SORT FIELDS=COPY
OUTFIL FILES=01,IFTHEN=(WHEN=(48,1,CH,NE,C' '),
BUILD=(1,57)),
IFTHEN=(WHEN=NONE,BUILD=(1,47,&DATE(4MD-)))

thanks for the support.
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 -> JCL & VSAM 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 Incorrect output when trying to add n... monica1 PL/I & Assembler 10 Fri Jan 13, 2017 5:02 pm
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
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 Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am


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