Using JP# parameters in the JOINKEYS F1/F2 subtask



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Using JP# parameters in the JOINKEYS F1/F2 subtask

Postby Robert Alford » Tue Mar 27, 2012 4:57 am

I've executed a JOINKEYS statement with a F1 subtask via ICETOOL with PARM='JP6"31122012"'

I've noticed that the JP6 does not translate when it's in the JOINKEYS subtask.

If I run the same control card as a main task via a ICETOOL COPY statement, rather than a subtask, the JP6 translation occurs as expected.

ICE282I 0 PERFORMING SYMBOL SUBSTITUTION AS NEEDED   
           INREC  IFTHEN=(WHEN=INIT,                 
                         BUILD=(WP_DATE:JP6,         
                                        $             
ICE283A 0 SYMBOL, SYNTAX OR DELIMITER ERROR           


Is this a bug, or should I expect JP# parameters to translate when in JOINKEYS subtasks?
Robert Alford
 
Posts: 4
Joined: Thu Oct 06, 2011 8:22 am
Has thanked: 0 time
Been thanked: 0 time

Re: Using JP# parameters in the JOINKEYS F1/F2 subtask

 

Re: Using JP# parameters in the JOINKEYS F1/F2 subtask

Postby Frank Yaeger » Tue Mar 27, 2012 5:54 am

Time to go home. I'll respond to this tomorrow after I check a few things.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1080
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 14 times

Re: Using JP# parameters in the JOINKEYS F1/F2 subtask

Postby BillyBoyo » Tue Mar 27, 2012 8:43 pm

As a work-around, you could generate a sybol onto a dataset which you concatenate to your SYMNAMES dataset.

So, you have a new step which takes the PARM for the joinkeys step. Generate the a symbol from the parm

//STEP0050 EXEC PGM=SORT,PARM='JP6"A"'
//SYSOUT   DD SYSOUT=*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
 OPTION COPY
  INREC BUILD=(C'TEMP-JP6,C''',JP6,C'''')
//SORTIN DD *
 DUMMY LINE
//SYMNOUT DD SYSOUT=*
//SYMNAMES DD *


Change the SORTOUT to a dataset and concatenate with your SYMNAMES dataset on the JOINKEYS step. Remove, for now, the PARM for JP6 on the JOINKEYS step.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Using JP# parameters in the JOINKEYS F1/F2 subtask

Postby BillyBoyo » Tue Mar 27, 2012 9:18 pm

Even better to use the SYMNOUT going to a dataset, but needs another step to drop off the stuff you don't want from the symnout, although a hardly-taxing INCLUDE for (1,4,CH,EQ,C'JP6,') should get it done. I was thinking of SELECT earlier, to get the last, but then changed to the above.

The advantage of using the SYMNOUT is that later only the JCL needs to be amended (drop the two new steps, change the PARM for the step with the JOINKEYS, remove the concatenation. Sort deck would stay unchanged.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Using JP# parameters in the JOINKEYS F1/F2 subtask

Postby Frank Yaeger » Wed Mar 28, 2012 1:52 am

The JOINKEYS subtasks DO NOT have access to the JPn parameters. Only the main task has access. The main tasks and subtasks DO have access to the SYMNAMES data set.

I see it has already been suggested that you set up a SYMNAMES data set with the JPn symbol as a symbol statement and pass that SYMNAMES data set to the JOINKEYS step. You could use a DFSORT/ICETOOL job something like this:

// SET VOL1=SCRTC1
//SUSYM EXEC PGM=SORT,PARM='JP6"&VOL1"'
//SYSOUT DD SYSOUT=*
//SORTIN DD *
RECORD
//SORTOUT DD DSN=&&S1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//SYSIN DD *
  OPTION COPY
  INREC BUILD=(C'JP6,''',JP6,C'''',80:X)
//S1 EXEC PGM=ICETOOL
//SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS)
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=...  input file1
//IN2 DD DSN=...  input file2
//OUT DD DSN=...  output file
//TOOLIN DD *
COPY JKFROM TO(OUT) USING(CTL1)
//CTL1CNTL DD *
  JOINKEYS F1=IN1,FIELDS=(1,5,A)
  JOINKEYS F2=IN2,FIELDS=(1,5,A)
  REFORMAT FIELDS=(F1:11,5,F2:21,5,F1:81,6)
  OPTION COPY
/*
//JNF1CNTL DD *
  INREC  IFTHEN=(WHEN=INIT,
    BUILD=(1,80,JP6))
/*


I would NOT recommend using SYMNOUT for SYMNAMES since it has the wrong attributes (FBA/121 instead of FB/80). But if you do use the SYMNOUT data set, you'll have to copy it and modify it to have the correct attributes as well as the correct symbols.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1080
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 14 times

Re: Using JP# parameters in the JOINKEYS F1/F2 subtask

Postby Robert Alford » Wed Mar 28, 2012 8:41 am

Frank and Billy,

Thanks for the info.

Good to know officially that JPn parameters do not work in JOINKEYS subtasks.

Very comfortable with the convert JPn to Symbols in the likes of a pre-cursor step.

Cheers,
Rob.
Robert Alford
 
Posts: 4
Joined: Thu Oct 06, 2011 8:22 am
Has thanked: 0 time
Been thanked: 0 time


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post