Jack, here are a few thoughts:
1. Be sure you have a line like this before you SET the variable:
// EXPORT SYMLIST=(*)
2. On the input to the sort, specify it like this:
//SYSIN DD *,SYMBOLS=(JCLONLY,SYMOUT)
3. Add a DD statement for the output:
//SYMOUT DD SYSOUT=*
Then, when you run it, look at the SYMOUT DD statement to see the before
and after image of the statement. Let us know what you see for the
symbol.
Thank you and best regards,
Billy Ashton
------ Original Message ------
From "Jack Zukt" <[email protected]>
To [email protected]
Date 11/3/2022 2:08:46 PM
Subject Re: Using JCL variables with DFSORT
Hi Massimo,
Thank you for your input.
I have tried that approach, that I have used on other JCL without a glitch,
but it has not worked with this particular situation and I have not been
able to figure out why.
Regards
Jack
On Thu, Nov 3, 2022, 17:42 Massimo Biancucci <[email protected]> wrote:
Jack,
I usually use JCLVAR this way (I think you need at least zOS 2.3 or 2.4):
// EXPORT SYMLYST=*
// SET EXTNUM=200
//ST010 EXEC PGM=SORT
//SYSIN DD *,SYMBOLS=JCLONLY
INCLUDE COND=(INP_EXTNTS,GT,&EXTNUM)
/*
JES should change SYSIN before seeding SORT.
Best regards.
Max
Il giorno gio 3 nov 2022 alle ore 18:23 Jack Zukt <[email protected]> ha
scritto:
> Hi,
> I am trying to improve a SORT by using a variable to specify a Include
> variable.
> I defined the variable by means of a
> //SET#EXTN SET EXTNUM=200
> and then I used
> //STEP0100 EXEC PGM=SORT,PARM='JP1"&EXTNUM"'
> and
> INCLUDE=(INP_EXTNTS,GT,JP1),
>
> The problem, I think, is that the "200" is then used as C'200' and the
> INP_EXTNTS is numeric,
>
> INP_EXTNTS,*,04,BI
> and
> SUM FIELDS=(INP_EXTNTS,
>
> so no records are selected.
> Is there a way around this?
>
> Thanks for your help
> Jack
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
>
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN