View previous topic :: View next topic
|
Author |
Message |
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2127 Location: USA
|
|
|
|
The manual says:
Quote: |
&JOBNAME
The name of the job. Shown in 1-8 characters. In the special case when the job name is *MASTER*, &JOBNAME resolves to #MASTER# to avoid the error of using the asterisk as part of a data set name.
Under z/OS®, it is valid to define a user ID that is all numeric. Under z/OS UNIX, this all-numeric user ID might be propagated as a job name in the case of a fork() or non-local spawn(); this can lead to allocation failures when &JOBNAME is used in substitution for a data set name.
If you specify the &JOBNAME dynamic system symbol in a START command for a started task, the resolved substitution text for &JOBNAME is the name of the job assigned to the address space that calls the symbolic substitution service, not the address space of the started task. |
But when used with regular JCL submit from ISPF, the result is not the name from the JOB statement, but always as if it was set:
Code: |
// SET JOBNAME='JES2' |
Any idea? |
|
Back to top |
|
|
Leonard Peters
New User
Joined: 08 Aug 2023 Posts: 2 Location: United States
|
|
|
|
I don't know if you have figured it out but, a simple solution would be to have a Set job='abcjob1' you would just create a symbolic called JOB or whatever you wanted. Then you could include it in file names or even //sysin dd *,SYMBOLS=JCLONLY (If you want to pass it to a pgm or utility) |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2127 Location: USA
|
|
|
|
Leonard Peters wrote: |
I don't know if you have figured it out but, a simple solution would be to have a Set job='abcjob1' you would just create a symbolic called JOB or whatever you wanted. Then you could include it in file names or even //sysin dd *,SYMBOLS=JCLONLY (If you want to pass it to a pgm or utility) |
OMG!…
Of course I can set MY OWN variables, as many as I want.
The question is completely different: why the standard dynamic JCL symbol supposed to define the job name, instead of its definition is always set to constant ‘JES2’?
Marie Antoinette wrote: |
Do you have no bread? No problem! You can eat cakes instead! |
|
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1329 Location: Bamberg, Germany
|
|
|
|
Quote: |
If you specify the &JOBNAME dynamic system symbol in a START command for a started task, the resolved substitution text for &JOBNAME is the name of the job assigned to the address space that calls the symbolic substitution service, not the address space of the started task. |
The AS that seems to call the symbolic substitution service will always be JES2 here, hence the result. I have no other explanation, even thou it might not be fully covered by the manuals description yet. |
|
Back to top |
|
|
|