|
View previous topic :: View next topic
|
| Author |
Message |
MichelleSpeer
New User
Joined: 22 Aug 2020 Posts: 15 Location: United States
|
|
|
|
I wanted to use a symbolic in a include cond in icetool. I normally use symnames DD in the JCL. However, I came across documentation (in USER GUIDE for DFSORT PTFs UK90025 & UK90026) using a parm on ICETOOL exec for JPn then have the JPn in the sort card. However, I get syntax error any suggestions? is the use of this any better than symnames.
The code that works is
| Code: |
//TOOLIN DD *
COPY FROM(INDD01) TO(OUTDD00) USING(SRT1)
//SYMNAMES DD *
// WANTDBU,+128453
//SRT1CNTL DD *
SORT FIELDS=(1514,04,PD,A,
0747,04,PD,A,
0708,02,PD,A,
0003,19,CH,A)
INCLUDE COND=(1514,4,PD,EQ,WANTDBU,AND,
938,19,SS,EQ,C' ',AND,
747,4,PD,GT,+0)
|
Job Output from the code that works:
| Code: |
ICE000I 0 - CONTROL STATEMENTS FOR 5650-ZOS, Z/OS DFSORT V2R4 - 14:49 ON MON F
SORT FIELDS=(1514,04,PD,A,0747,04,PD,A,0708,02,PD,A,0003,19,CH,A)
INCLUDE COND=(1514,4,PD,EQ,+128453,AND,938,19,SS,EQ,C' ',AND,747,4,P
GT,+0)
|
Code that fails with ICE113A
| Code: |
// SET WANTDBU='+128453'
//CG44715Z EXEC PGM=ICETOOL,
// PARM='JP1,"&WANTDBU"'
//SRT1CNTL DD *
SORT FIELDS=(1514,04,PD,A,
0747,04,PD,A,
0708,02,PD,A,
0003,19,CH,A)
INCLUDE COND=(1514,4,PD,EQ,JP1,AND,
938,19,SS,EQ,C' ',AND,
747,4,PD,GT,+0)
|
Job output with error:
| Code: |
ICE200I 0 IDENTIFIER FROM CALLING PROGRAM IS 0001
ICE805I 0 JOBNAME: MXSPEERC , STEPNAME: CG44715Z
ICE802I 0 BLOCKSET TECHNIQUE IN CONTROL
ICE143I 0 BLOCKSET SORT TECHNIQUE SELECTED
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AN
ICE000I 0 - CONTROL STATEMENTS FOR 5650-ZOS, Z/OS DFSORT V2R4 - 21:47 ON MON FE
SORT FIELDS=(1514,04,PD,A,
0747,04,PD,A,
0708,02,PD,A,
0003,19,CH,A)
INCLUDE COND=(1514,4,PD,EQ,JP1,AND,
$
ICE113A E COMPARISON FIELD ERROR
938,19,SS,EQ,C' ',AND,
$
|
[/code] |
|
| Back to top |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1430 Location: Bamberg, Germany
|
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2272 Location: USA
|
|
|
|
| MichelleSpeer wrote: |
The code that works is
| Code: |
//TOOLIN DD *
COPY FROM(INDD01) TO(OUTDD00) USING(SRT1)
//SYMNAMES DD *
// WANTDBU,+128453
//SRT1CNTL DD *
SORT FIELDS=(1514,04,PD,A,
0747,04,PD,A,
0708,02,PD,A,
0003,19,CH,A)
INCLUDE COND=(1514,4,PD,EQ,WANTDBU,AND,
938,19,SS,EQ,C' ',AND,
747,4,PD,GT,+0)
|
|
This code cannot work. I bet it gives a JCL ERROR in those statements
| Code: |
//SYMNAMES DD *
// WANTDBU,+128453 |
P.S.
This question is related to SORT utility, not to JCL/VSAM |
|
| Back to top |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1430 Location: Bamberg, Germany
|
|
|
|
| sergeyken wrote: |
| This code cannot work. I bet it gives a JCL ERROR in those statements.. |
Maybe the reason why it has been posted in JCL/VSAM. *SCNR*  |
|
| Back to top |
|
 |
MichelleSpeer
New User
Joined: 22 Aug 2020 Posts: 15 Location: United States
|
|
|
|
You are correct. The actual code that woks.
I had this //* in testing this PARM='JP1...' tests and forgot remove the "//'
| Code: |
//SYMNAMES DD *
WANTDBU,+128453
|
[/code] |
|
| Back to top |
|
 |
MichelleSpeer
New User
Joined: 22 Aug 2020 Posts: 15 Location: United States
|
|
|
|
| this thread was made in JCL/VSAM by mistake, had multiple tabs open. I did get pass syntax error. I'm moving my thread over to right forum. |
|
| Back to top |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1430 Location: Bamberg, Germany
|
|
|
|
| MichelleSpeer wrote: |
| this thread was made in JCL/VSAM by mistake, had multiple tabs open. I did get pass syntax error. I'm moving my thread over to right forum. |
A Moderator will do that. |
|
| Back to top |
|
 |
MichelleSpeer
New User
Joined: 22 Aug 2020 Posts: 15 Location: United States
|
|
|
|
Found a way to pass in from JCL parms.
| Code: |
// EXPORT SYMLIST=(WANTDBU)
// SET WANTDBU=+128453
//SRT1CNTL DD *,SYMBOLS=JCLONLY
SORT FIELDS=(1514,04,PD,A,
0747,04,PD,A,
0708,02,PD,A,
0003,19,CH,A)
INCLUDE COND=(1514,4,PD,EQ,&WANTDBU.,AND,
938,19,SS,EQ,C' ',AND,
747,4,PD,GT,+0)
|
|
|
| Back to top |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1430 Location: Bamberg, Germany
|
|
|
|
| Jobclass must allow SYSSYM to use this construct. I am not a fan of using JCL symbols in the SYSIN as it will let your code flow in some kind. Worst case is the jobs fails, depending on the setting. |
|
| Back to top |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1430 Location: Bamberg, Germany
|
|
|
|
A better way to implement this is IMHO:
| Code: |
// EXPORT SYMLIST=(WANTDBU)
// SET WANTDBU=+123456789012345123456789012345
:
//SYMNAMES DD *,SYMBOLS=JCLONLY
WANTDBU,&WANTDBU.
*
/*
//SYMNOUT DD SYSOUT=*
:
INCLUDE COND=(1514,4,PD,EQ,WANTDBU,AND,938,19,SS,EQ,C' ',AND,
747,4,PD,GT,+0)
SORT FIELDS=(1514,04,PD,A,
0747,04,PD,A,
0708,02,PD,A,
0003,19,CH,A) |
You will see the difference, an ABEND, when you code it instead as suggested:
| Code: |
INCLUDE COND=(1514,4,PD,EQ,&WANTDBU.,AND,938,19,SS,EQ,C' ',AND,
747,4,PD,GT,+0) |
|
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|