MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

JOINKEYS REFORMAT question

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
Lean
Beginner


Joined: 07 Aug 2012
Posts: 37
Topics: 11

PostPosted: Wed Nov 25, 2015 8:32 pm    Post subject: JOINKEYS REFORMAT question Reply with quote

Purpose : File3 has paired records from file1 and is the same length as file1.
If file1 length is changed from 69 to 70, I have to update REFORMAT FIELDS=(F1:1,70) manually.
I’m wondering if there’s a way ‘NOT to hard code the file3 length, it can be changed automatically’.

Code:

//STEP02B EXEC PGM=SORT,REGION=8M,COND=(4,LT)             
//SORTJNF1 DD DISP=SHR,DSN=file1 –FB file   
//SORTJNF2 DD DISP=SHR,DSN=file2 –FB file
//SORTOUT  DD DSN=file3,  -- FB file     
//     DISP=(NEW,CATLG,DELETE),SPACE=&SPLG,UNIT=SYSDA,     
//     DCB=*.SORTJNF1                                     
//SYSOUT   DD SYSOUT=4                                     
//SYSIN    DD *                                           
  JOINKEYS FILE=F1,FIELDS=(13,20,A)                       
  JOINKEYS FILE=F2,FIELDS=(1,20,A)                         
  REFORMAT FIELDS=(F1:1,69)   F1:1,70 current approach                             
  SORT FIELDS=COPY
Back to top
View user's profile Send private message
William Collins
Supermod


Joined: 03 Jun 2012
Posts: 437
Topics: 0

PostPosted: Thu Nov 26, 2015 9:40 am    Post subject: Reply with quote

For fixed-length records, no.

The best you can do (which is a good thing) is to have symbols for your data. Ensure you have a symbol which defines a field the size of the record, then use that symbol everywhere you need to refer to an entire record on that file. Then you only have one place to change the size, in the definition of the symbol.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group