View previous topic :: View next topic
|
Author |
Message |
clickit
New User
Joined: 08 Jul 2005 Posts: 3 Location: Hellas
|
|
|
|
greetings to all,
I have this variable in a jcl
// SET FRMDT='01.01.2010'
why can't i have this
//STEP0300 EXEC PGM=SORT
//SYMNAMES DD *
FROMDATE,&FRMDT
here's the error i get
FROMDATE,&FRMDATE
$
ICE272A 0 SYMBOL, VALUE OR SYNTAX IS INVALID
ICE279A 0 ONE OR MORE ERRORS ENCOUNTERED DURING SYMNAMES PROCESSING
ICE751I 0 C5-K26318 E7-K24705
ICE052I 3 END OF DFSORT
is there any way to have this
p.s.
i did a search before, i found nothing
the reason i want to have this is that i have many references of FROMDATE variable in jcl |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
symbolic variables do not work in instream data.
next time search the jcl manual. |
|
Back to top |
|
|
clickit
New User
Joined: 08 Jul 2005 Posts: 3 Location: Hellas
|
|
|
|
dbzTHEdinosauer wrote: |
symbolic variables do not work in instream data.
next time search the jcl manual. |
i know that this doesn't work
all i asked is for a workaround tip "is there any way to have this" |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
actually, the problem lies in the fact that you are not using a system symbol,
but instead a JCL symbol.
Note: JCL symbols and IPCS symbols are not system symbols and will not be recognized or replaced in a system symbol string
a post by SUPERK provides a workaround:
ibmmainframes.com/viewtopic.php?t=49243
also included are control-m card substitution.
Quote: |
You need a program that can accept the variable FRMDT as a parameter, i.e.:
//STEPNAME EXEC PGM=PGMX,PARM='&FRMDT'
//OUT DD DSN=&&S1,DISP=(,PASS),...
and write that value as a DFSORT symbolic name, referenced in your SORT/ICETOOL step by the SYMNAMES DD statement. something like:
//SYMNAMES DD DSN=&&S1,DISP=(OLD,DELETE),...
where &&S1 contains something like this:
FRMDT,C'20100604'
|
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
With z/OS DFSORT V1R10 PTF UK90025 or z/OS DFSORT V1R12 PTF UK90026 (Oct,2010), you can now use SET and PROC symbols in DFSORT and ICETOOL control statements. For example:
Code: |
...
// SET FRMDT='01.01.2010'
//STEP0300 EXEC PGM=SORT,
// PARM='JP1"&FRMDT"'
...
|
JP1,C'01.01.2010'
will be added to the Symbol table. JP1 can be used in DFSORT and ICETOOL control statements in the same way other Symbols for constants can be used.
For complete details on the new functions for DFSORT and DFSORT's ICETOOL available with the Oct, 2010 PTF, see:
www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000242 |
|
Back to top |
|
|
|