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 Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 1 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 3 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


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