Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Merging 2 records at multiple rows wi... Bijesh DFSORT/ICETOOL 2 Wed Dec 06, 2017 1:50 am
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm
No new posts Moving a PS file as body of a mail! Vignesh Sid JCL & VSAM 4 Tue Nov 21, 2017 9:23 pm
No new posts unable to set RC = 4 when empty file migusd SYNCSORT 1 Tue Nov 21, 2017 1:21 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us