Matching JOIN keys in JCL for PD and ZD



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Matching JOIN keys in JCL for PD and ZD

Postby arya_starc » Fri Aug 13, 2021 3:22 pm

Hi Team,

I have two datasets and in one datasets the type of value is Numeric i.e. Zonal Decimal type and in another dataset the type of value in dataset is Packed Decimal.
I need to match off these values using join keys. I tried by converting into same type but getting the error. Below is the code:


//SORTJNF1 DD DSN=MY.INPUT.SE1,DISP=SHR        
//SORTJNF2 DD DSN=MY.INPUT.SE2,DISP=SHR                  
//SORTMSG  DD SYSOUT=*                                      
//SORTOUT  DD DSN=MY.OUTPUT.SE,DISP=SHR            
//SYSWK01 DD UNIT=SYSDA,SPACE=(CYL,(50,50),RLSE)            
//SYSWK02 DD UNIT=SYSDA,SPACE=(CYL,(50,50),RLSE)            
//SYSIN DD *                                                
000034       JOINKEYS FILES=F1,FIELDS=(6,4,PD,A),TYPE=V                        
000035       JOINKEYS FILES=F2,FIELDS=(7,4,PD,A)                              
000036       REFORMAT FIELDS=(F1:1,90)                                        
000037       OPTION COPY                                                      
000038 //JNF2CNTL DD *                                                        
000039     INREC BUILD=(7,7,ZD,TO=PD)                                          
000040 /*                                                                      
 


Error:

WER146B  64K BYTES OF EMERGENCY SPACE ALLOCATED                                
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                                  
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                                  
WER486A  ERROR IN JNF2 PROCESSING                                              
WER482I  JNF1 STATISTICS                                                      
WER483B  32,780K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,            
WER483B     0 BYTES RESERVE REQUESTED, 988K BYTES USED                        
WER108I  SORTJNF1 : RECFM=VB   ; LRECL=  4684; BLKSIZE= 27998                  
WER073I  SORTJNF1 : DSNAME=PINVPCF.FAS.FBLG.S0.SE.G5545V00                    
WER558I  ZPSORT EXECUTED                                                      
WER482I  JNF2 STATISTICS                                                      
 
arya_starc
 
Posts: 135
Joined: Mon Sep 21, 2015 1:39 pm
Has thanked: 5 times
Been thanked: 0 time

Re: Matching JOIN keys in JCL for PD and ZD

Postby sergeyken » Fri Aug 13, 2021 5:22 pm

For testing purposes, run your JNF2CNTL part as a separate SORT step, to find out what is wrong.
Javas come and go, but JCL stays forever.
User avatar
sergeyken
 
Posts: 216
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 5 times
Been thanked: 19 times

Re: Matching JOIN keys in JCL for PD and ZD

Postby sergeyken » Wed Aug 18, 2021 8:13 pm

It looks like the author is not interested in resolving his own issue, isn’t it?

First of all take a look: what are the strange lines of code following your //SYSIN DD * statement??
That garbage doesn’t look as any valid statement for any known tool!

Besides if that, do you use any // EXEC statement in your JCL?
Do you suppose only // DD statements are enough for your task?
Javas come and go, but JCL stays forever.
User avatar
sergeyken
 
Posts: 216
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 5 times
Been thanked: 19 times

Re: Matching JOIN keys in JCL for PD and ZD

Postby arya_starc » Fri Sep 17, 2021 5:02 pm

sergeyken wrote:It looks like the author is not interested in resolving his own issue, isn’t it?

First of all take a look: what are the strange lines of code following your //SYSIN DD * statement??
That garbage doesn’t look as any valid statement for any known tool!

Besides if that, do you use any // EXEC statement in your JCL?
Do you suppose only // DD statements are enough for your task?


Hi Sergeyken,

Sorry due to some reason I am not able to respond over the post.
I tried with SORT statement. Below is my poc and the sysout error that I am getting.

My input:
File 1 -1234562021241
File 2 - A@#$@ (@#$@ this is in packed decimal for which actual zonal decimal value is 2021241.


000009 //STEP01 EXEC PGM=SORT,COND=(0,NE)                                      
000010 //SYSOUT   DD SYSOUT=*                                                  
000011 //SYSPRINT DD SYSOUT=*                                                  
000012 //SORTJNF1 DD DSN=INPUT.FILE1.SE,DISP=SHR                              
000013 //SORTJNF2 DD DSN=INPUT.FILE2.SE,DISP=SHR                
000014 //SORTMSG  DD SYSOUT=*                                                  
000015 //SORTOUT  DD DSN=OUTPUT.FILE.SE,                        
000016 //             DISP=(NEW,CATLG,DELETE),                                
000017 //             UNIT=(SYSDA,10),                                        
000018 //             SPACE=(TRK,(9975,9975),RLSE),                            
000019 //             DCB=(,RECFM=FB,LRECL=400,BLKSIZE=0)                      
000020 //SYSWK01 DD UNIT=SYSDA,SPACE=(CYL,(50,50),RLSE)                        
000021 //SYSWK02 DD UNIT=SYSDA,SPACE=(CYL,(50,50),RLSE)                        
000022 //SYSIN DD *                                                            
000023       JOINKEYS FILES=F1,FIELDS=(7,7,A)                                  
000024       JOINKEYS FILES=F2,FIELDS=(2,7,A)                                  
000025       JOIN UNPAIRED,F2,ONLY                                            
000026       SORT FIELDS=COPY                                                  
000027 //JNF2CNTL DD *                                                        
000028       INREC BUILD=(2,4,ZD,TO=PD)                                        
000029 /*                                                                      

 


Error:

SYSIN :                                                                        
      JOINKEYS FILES=F1,FIELDS=(7,7,A)                                        
      JOINKEYS FILES=F2,FIELDS=(2,7,A)                                        
      JOIN UNPAIRED,F2,ONLY                                                    
      SORT FIELDS=COPY                                                        
WER813I  INSTALLATION OPTIONS IN MFX LOAD LIBRARY WILL BE USED                
WER550I  ZPCOPY EXECUTED - TYPICAL SAVINGS ARE UP TO 95% TCB TIME AND 20% ELAPS
WER276B  SYSDIAG= 902583, 3645929, 3645929, 50627445                          
WER164B  348,168K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,          
WER164B     0 BYTES RESERVE REQUESTED, 956K BYTES USED                        
WER146B  64K BYTES OF EMERGENCY SPACE ALLOCATED                                
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                                  
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                                  
WER486A  ERROR IN JNF2 PROCESSING                                              
WER482I  JNF1 STATISTICS                                                      
WER483B  24,596K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,            
WER483B     0 BYTES RESERVE REQUESTED, 988K BYTES USED                        
WER108I  SORTJNF1 : RECFM=F    ; LRECL=    40; BLKSIZE=    40                  
WER073I  SORTJNF1 : DSNAME=INPUT.FILE1.SE                                    
WER558I  ZPSORT EXECUTED                                                      
WER482I  JNF2 STATISTICS                                                      
WER483B  24,596K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,            
WER483B     0 BYTES RESERVE REQUESTED, 988K BYTES USED                        
WER108I  SORTJNF2 : RECFM=FB   ; LRECL=   400; BLKSIZE= 27600                  
WER073I  SORTJNF2 : DSNAME=INPUT.FILE2.SE              
WER027A  CONTROL FIELD BEYOND RECORD                                          
 
arya_starc
 
Posts: 135
Joined: Mon Sep 21, 2015 1:39 pm
Has thanked: 5 times
Been thanked: 0 time

Re: Matching JOIN keys in JCL for PD and ZD

Postby sergeyken » Sat Sep 18, 2021 1:09 am

I have to repeat again, in larger font:
First of all - run your statement under //JNF2CNTL as a separate step, and verify carefully: what has been produced?
This is called: debugging of your code. This is your own job, and you are paid for doing this, not for asking for solution from other people.
Javas come and go, but JCL stays forever.
User avatar
sergeyken
 
Posts: 216
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 5 times
Been thanked: 19 times

Re: Matching JOIN keys in JCL for PD and ZD

Postby arya_starc » Thu Sep 23, 2021 4:37 pm

Thanks sergeyken for your guidance.
Desired output is coming.
arya_starc
 
Posts: 135
Joined: Mon Sep 21, 2015 1:39 pm
Has thanked: 5 times
Been thanked: 0 time


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post