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 with one dummy input file

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


Joined: 02 Dec 2002
Posts: 619
Topics: 172
Location: Stockholm, Sweden

PostPosted: Thu Jan 17, 2019 10:03 am    Post subject: JOINKEYS with one dummy input file Reply with quote

This might (?) seem a strange request, but there's a logic to the madness.

Basically, we'll be running JOINKEYS at regular intervals in production.

Rather than (as I've seen) create one job for the first time step (with only one input file) and another job for the usual day-to-day running, I thought I'd create the one JCL whereby I can simply uncomment the day-to-day input file and delete the init file.

My first attempt was the following
Code:

//SORTJNF1  DD DUMMY
//*                                                             
//SORTJNF2  DD DISP=SHR,DSN=SIMMIC.DIALTELP.X398E.SBF06FC.PS010

but that failed with the following message (which is understandable)
Quote:

ICE043A 3 INVALID DATA SET ATTRIBUTES: SORTJNF1 RECFM - REASON CODE IS 10
ICE023A 0 NO LENGTH OPERAND


After discussing with colleagues, the following works a treat
Code:

//*SORTJNF1  DD DISP=SHR,                                         
//*            DSN=SIMMIC.DIALBN1P.X398E.MSTRFC.PS100(0)         
//SORTJNF1  DD DUMMY,DCB=(RECFM=FB,LRECL=196)                   
//*                                                             
//SORTJNF2  DD DISP=SHR,DSN=SIMMIC.DIALTELP.X398E.SBF06FC.PS010 


I've never had reason to use the DCB parms on a DUMMY allocation before.

Now, all I have to do is request that support delete the DUMMY allocate and decomment the SORTJNF1 allocate above it.

Just thought I'd share
_________________
Michael
Back to top
View user's profile Send private message Send e-mail
expat
Intermediate


Joined: 01 Mar 2007
Posts: 475
Topics: 9
Location: Welsh Wales

PostPosted: Fri Jan 18, 2019 2:29 am    Post subject: Reply with quote

TBH, as far back as I can recall I have always used some DCB parameters on a DD DUMMY, and that's going back to the 1970's Mr. Green
_________________
If it's true that we are here to help others,
then what exactly are the others here for ?
Back to top
View user's profile Send private message
Arun Raj
Sort Forum Moderator
Sort Forum Moderator


Joined: 14 Jun 2017
Posts: 7
Topics: 1

PostPosted: Fri Jan 18, 2019 9:21 am    Post subject: Reply with quote

The DFSORT Application Programming Guide suggests this:
Quote:
Data set characteristics: DFSORT accepts empty and null non-VSAM data sets,
and DUMMY data sets, for sorting and copying (be sure to supply RECFM, LRECL
and BLKSIZE
).
............
DFSORT may set what it considers to be appropriate values for missing attributes
(RECFM, LRECL, BLKSIZE) of input data sets based on other attributes, or may
terminate due to a missing attribute. If a missing attribute results in termination, or
you don't want to use a missing attribute set by DFSORT, specify that attribute
explicitly
(for example, specify RECFM=VB).

Could you not create an empty input generation for the first run, instead of changing the job?
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12367
Topics: 75
Location: San Jose

PostPosted: Fri Jan 18, 2019 5:24 pm    Post subject: Reply with quote

misi01,


This is a JCL 101 question and has got nothing to do with DFSORT.

1.Code a PROC with the JOINKEYS step.

Code:

//JKEYPROC PROC                                     
//STEP0100 EXEC PGM=SORT                             
//SYSOUT   DD SYSOUT=*                               
//SORTJNF1 DD *                                     
//SORTJNF2 DD *                                     
//SORTOUT  DD SYSOUT=*                               
//SYSIN    DD *                                     
  OPTION COPY                                       
  JOINKEYS FILES=F1,FIELDS=(1,1,A)                   
  JOINKEYS FILES=F2,FIELDS=(1,1,A)                   
  REFORMAT FIELDS=(F1:1,80,F2:1,80)                 
//*                                                 
//JKEYPROC PEND                                     


To execute the above you simply it invoke like this
Code:

//RUN      EXEC JKEYPROC                                   


Now you have the option of overriding any of the datasets.(SORTJNF1/SORTJNF2/SORTOUT/SYSIN) like shown below
Code:

//RUN      EXEC JKEYPROC                                   
//STEP0100.SORTJNF1 DD DISP=SHR,DSN=your file to overide
//STEP0100.SYSIN    DD *                                   
  OPTION COPY                                               
  JOINKEYS FILES=F1,FIELDS=(1,15,A)                         
  JOINKEYS FILES=F2,FIELDS=(1,15,A)                         
  JOIN UNPAIRED,F1,ONLY                                     
/*


If you want to override one dataset with DUMMY and other with actual file you can do that too
Code:

//RUN1     EXEC JKEYPROC                                                     
//STEP0100.SORTJNF1 DD DUMMY,DCB=(LRECL=80,RECFM=FB,BLKSIZE=27920)           
//STEP0100.SORTJNF2 DD DISP=SHR,DSN=your file to overide                 
//STEP0100.SYSIN    DD *                                                     
  OPTION COPY                                                               
  JOINKEYS FILES=F1,FIELDS=(1,15,A)                                         
  JOINKEYS FILES=F2,FIELDS=(1,15,A)                                         
  JOIN UNPAIRED,F2,ONLY                                                     
/*


Or if you want to dummy both files you can do that too.

Code:

//RUN2     EXEC JKEYPROC                                           
//STEP0100.SORTJNF1 DD DUMMY,DCB=(LRECL=80,RECFM=FB,BLKSIZE=27920)
//STEP0100.SORTJNF2 DD DUMMY,DCB=(LRECL=80,RECFM=FB,BLKSIZE=27920)

_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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