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 it is possible output a SET value fro... Martylin JCL & VSAM 0 Fri Sep 22, 2017 7:08 am
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts Hardcoded negative sign value in output scdinesh SYNCSORT 8 Fri Sep 08, 2017 5:28 am
No new posts SORT Trailer Count - LRECL Output co... amorante DFSORT/ICETOOL 5 Tue Aug 29, 2017 8:57 pm

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