IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

JOINKEYS Paired and Unpaired Sort on VB Input


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
MFwhiz

New User


Joined: 21 May 2009
Posts: 5
Location: Philadelphia

PostPosted: Tue Nov 07, 2017 2:46 am
Reply with quote

Hello,

The following sort of two fixed width files creates three output files; one with paired file1/file2 records, one with unpaired file1 records, and one with unpaired file2 records. This uses what is known as the "indicator method":

Code:

//JKE5  EXEC  PGM=SORT                                           
//SYSOUT   DD SYSOUT=*                                           
//SORTJNF1 DD DSN=TCK401.INPUT1,DISP=SHR                         
//SORTJNF2 DD DSN=TCK401.INPUT2,DISP=SHR                         
//YESONLY  DD DSN=TCK401.MAS.YESONLY,                           
//            UNIT=(SYSDA,4),SPACE=(CYL,(100,60),RLSE),         
//            DISP=(NEW,CATLG,CATLG),                           
//            DCB=(RECFM=FB,LRECL=4235,BLKSIZE=0)               
//TODONLY DD DSN=TCK401.MAS.TODONLY,                             
//            UNIT=(SYSDA,4),SPACE=(CYL,(100,60),RLSE),         
//            DISP=(NEW,CATLG,CATLG),                           
//            DCB=(RECFM=FB,LRECL=4235,BLKSIZE=0)               
//BOTH DD DSN=TCK401.MAS.BOTH,                                   
//            UNIT=(SYSDA,4),SPACE=(CYL,(100,60),RLSE),         
//            DISP=(NEW,CATLG,CATLG),                           
//            DCB=(RECFM=FB,LRECL=4235,BLKSIZE=0)               
//SYSIN DD *                                                     
* CONTROL STATEMENTS FOR JOINKEYS APPLICATION                   
  JOINKEYS FILE=F1,FIELDS=(1,80,A),SORTED,NOSEQCK               
  JOINKEYS FILE=F2,FIELDS=(1,80,A),SORTED,NOSEQCK               
  JOIN UNPAIRED,F1,F2                                           
  REFORMAT FIELDS=(F1:1,4235,F2:1,4235,?)                       
* CONTROL STATEMENTS FOR MAIN TASK (JOINED RECORDS)             
  OPTION COPY                                                   
  OUTFIL FNAMES=YESONLY,INCLUDE=(8471,1,CH,EQ,C'1'),             
    BUILD=(1,4235)                                               
  OUTFIL FNAMES=TODONLY,INCLUDE=(8471,1,CH,EQ,C'2'),             
    BUILD=(4236,4235)                                           
  OUTFIL FNAMES=BOTH,INCLUDE=(8471,1,CH,EQ,C'B'),               
    BUILD=(1,4235,/,4236,4235)                                   
/*                                                               


My problem now is that the input files have changed to variably blocked. Does anyone know how to convert this sort so that it will work with VB input/output files? Or is there a different sorting method that could be used to produce the same output files (now VB)? The input file keys are still the same. Thank you so much in advance for any help with this.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2019
Location: USA

PostPosted: Tue Nov 07, 2017 2:51 am
Reply with quote

MFwhiz wrote:
My problem now is that the input files have changed to variably blocked. Does anyone know how to convert this sort so that it will work with VB input/output files? Or is there a different sorting method that could be used to produce the same output files (now VB)? The input file keys are still the same. Thank you so much in advance for any help with this.

Based on questions like this one, it looks like the code you submitted has not been written by yourself, but copy-pasted (e.g. "stolen") in full from another person/forum/site. Isn't it?
Back to top
View user's profile Send private message
MFwhiz

New User


Joined: 21 May 2009
Posts: 5
Location: Philadelphia

PostPosted: Tue Nov 07, 2017 7:23 pm
Reply with quote

The code originally came from the IBM knowledge center:

LINK

So yes, I have stolen it from there icon_smile.gif

Is there another sort method I should use or should I just write a program?
Back to top
View user's profile Send private message
John Del

New User


Joined: 27 Apr 2012
Posts: 42
Location: NY

PostPosted: Tue Nov 07, 2017 8:33 pm
Reply with quote

MFwhiz wrote:
The code originally came from the IBM knowledge center:

LINK

So yes, I have stolen it from there icon_smile.gif

Is there another sort method I should use or should I just write a program?



... If only there were a z/OS VxRx.x DFSORT Application Programming Guide freely available on the IBM website that might provide the answer ...
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Nov 07, 2017 8:46 pm
Reply with quote

Quote:
... If only there were a z/OS VxRx.x DFSORT Application Programming Guide freely available on the IBM website that might provide the answer ...



googling with DFSORT Application Programming Guide returned
www-304.ibm.com/servers/resourcelink/svc00100.nsf/pages/zOSV2R3sc236878/$file/icea100_v2r3.pdf

worth also googling with Smart DFSORT Tricks
www-01.ibm.com/support/docview.wss?uid=isg3T7000094
old but still pretty useful
Back to top
View user's profile Send private message
John Del

New User


Joined: 27 Apr 2012
Posts: 42
Location: NY

PostPosted: Tue Nov 07, 2017 8:53 pm
Reply with quote

enrico-sorichetti wrote:
Quote:
... If only there were a z/OS VxRx.x DFSORT Application Programming Guide freely available on the IBM website that might provide the answer ...



googling with DFSORT Application Programming Guide returned
www-304.ibm.com/servers/resourcelink/svc00100.nsf/pages/zOSV2R3sc236878/$file/icea100_v2r3.pdf

worth also googling with Smart DFSORT Tricks
www-01.ibm.com/support/docview.wss?uid=isg3T7000094
old but still pretty useful



icon_smile.gif ........ The LINK that the poster included in their post is to the online DFSORT Application Programming Guide....
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Nov 07, 2017 8:55 pm
Reply with quote

for some odd reason I received an invalid url response
Back to top
View user's profile Send private message
MFwhiz

New User


Joined: 21 May 2009
Posts: 5
Location: Philadelphia

PostPosted: Fri Nov 10, 2017 7:26 pm
Reply with quote

The "Smart DFSORT Tricks" PDF had exactly what I needed. I hadn't seen that before. Thanks John Del and enrico-sorichetti!
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts JCL sort card - get first day and las... JCL & VSAM 9
Search our Forums:

Back to Top