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
 
Match and NoMatch using Sort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
raj_mainframe08

New User


Joined: 11 Sep 2007
Posts: 65
Location: Gurgaon

PostPosted: Sat Feb 06, 2016 4:48 pm    Post subject: Match and NoMatch using Sort
Reply with quote

I have 2 files

File 1 = 260 length
File 2 = 70 length

I am trying to join File 1 to File 2 using first 20 bytes. For the records that join from File 1 to File 2 should go in one file (260 bytes from File 1 and 50 bytes from File 2) and records that doesn't match from File 1 should go in another file. Following is JCL I wrote. It was working file only for Match but when I put No Match statements, I am getting error END OF SORTOF01 FIELD BEYOND MAXIMUM RECORD LENGTH


Code:

//STEP05   EXEC PGM=SORT                                     
//SORTJNF1 DD DSN=FILE1,DISP=SHR     
//SORTJNF2 DD DSN=FILE2,DISP=SHR     
//SORTOF01 DD DSN=FILE3,           
//       DISP=(NEW,CATLG,DELETE),SPACE=(CYL,(100,200),RLSE),
//       DCB=(RECFM=FB,BLKSIZE=0,LRECL=310)                 
//*                                                         
//SORTOF02 DD DSN=FILE4,         
//       DISP=(NEW,CATLG,DELETE),SPACE=(CYL,(100,200),RLSE),
//       DCB=(RECFM=FB,BLKSIZE=0,LRECL=310)                 
//SYSIN    DD *                                             
 JOINKEYS FILES=F1,FIELDS=(1,20,A)                           
 JOINKEYS FILES=F2,FIELDS=(1,20,A)                           
 JOIN UNPAIRED,F1                                           
 REFORMAT FIELDS=(F1:1,260,F2:21,50),FILL=X'FF'             
 OUTFIL FILES=01,INCLUDE=(311,1,BI,EQ,X'FF'),               
 OUTREC=(1,310)                                             
 OUTFIL FILES=02,INCLUDE=(311,1,BI,NE,X'FF'),               
 OUTREC=(1,310)                                             
 SORT FIELDS=COPY     
/*                     


I tried changing the length of output files to 311 and also in outrec but no success. Please let me know what I am missing
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Sat Feb 06, 2016 6:34 pm    Post subject: Reply to: Match and NoMatch using Sort
Reply with quote

Check the documentation for FILL=. You have misunderstood its use.

Use the match-marker (?) in the REFORMAT statement and test that for C'B' or C'1'.

You only need one test on one OUTFIL. On the other, use SAVE rather than reversing the condition.
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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts OC4 in SORT Mohan Kothakota DFSORT/ICETOOL 2 Tue Sep 12, 2017 6:30 pm
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