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
 
JOINKEYS Paired and Unpaired Sort on VB Input

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: JOINKEYS Paired and Unpaired Sort on VB Input
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

Active User


Joined: 29 Apr 2008
Posts: 379
Location: Maryland

PostPosted: Tue Nov 07, 2017 2:51 am    Post subject: Re: JOINKEYS Paired and Unpaired Sort on VB Input
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    Post subject:
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: 31
Location: NY

PostPosted: Tue Nov 07, 2017 8:33 pm    Post subject:
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

Senior Member


Joined: 14 Mar 2007
Posts: 10535
Location: italy

PostPosted: Tue Nov 07, 2017 8:46 pm    Post subject: Reply to: JOINKEYS Paired and Unpaired Sort on VB Input
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
https://www-304.ibm.com/servers/resourcelink/svc00100.nsf/pages/zOSV2R3sc236878/$file/icea100_v2r3.pdf

worth also googling with Smart DFSORT Tricks
http://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: 31
Location: NY

PostPosted: Tue Nov 07, 2017 8:53 pm    Post subject: Re: Reply to: JOINKEYS Paired and Unpaired Sort on VB Input
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
https://www-304.ibm.com/servers/resourcelink/svc00100.nsf/pages/zOSV2R3sc236878/$file/icea100_v2r3.pdf

worth also googling with Smart DFSORT Tricks
http://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

Senior Member


Joined: 14 Mar 2007
Posts: 10535
Location: italy

PostPosted: Tue Nov 07, 2017 8:55 pm    Post subject: Reply to: JOINKEYS Paired and Unpaired Sort on VB Input
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    Post subject:
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    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 Need help on the multiple files refor... wik123 DFSORT/ICETOOL 7 Wed Sep 19, 2018 10:47 am
No new posts Remove selected duplicate rows from t... hnharish DFSORT/ICETOOL 3 Wed Sep 05, 2018 3:11 am
No new posts Sort card to find duplicates, without... anand1204 DFSORT/ICETOOL 15 Fri Aug 31, 2018 12:13 am
No new posts Joinkeys overlay and unmatched with O... ambalam DFSORT/ICETOOL 11 Thu Aug 23, 2018 11:57 am
No new posts Need Help on sending email by includi... wik123 JCL & VSAM 9 Mon Jul 30, 2018 2:59 pm

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