&SYSYEAR
-
- Global moderator
- Posts: 3720
- Joined: Sat Dec 19, 2009 8:32 pm
- Skillset: Systems programming, SAS, COBOL, CICS, JCL, SMS, VSAM, etc.
- Referer: other forum
- Location: Dubuque, Iowa, USA
Re: &SYSYEAR
If your site uses a job scheduler, most of them have a capability to provide the date (or part of it) to the job. The native z/OS system does not have this capability, so if you're not able to use the job scheduler then you will need to use a SET statement in your JCL to manually point to the current year (and manually update it at the beginning of each new year, of course).
-
- Posts: 474
- Joined: Thu Mar 10, 2016 5:03 pm
- Skillset: assembler rexx zOS ispf racf smf
- Referer: saw it in the experts foprum thought I could help here
Re: &SYSYEAR
As of z/OS 2.1 you can use system symbols in JCL, i.e:
See the SYMBOLS parameter in the MVS JCL Reference manual. There are a few gotchas you need to beware of, mostly concerning submitting a job from one lpar to another, or submitting for later execution. See the manual for details.
Code: Select all
//DD1 DD UNIT=SYSDA,SPACE=(TRK,1),
// DSN=WJENSEN.&SYSNAME..&SYSOSLVL..Y&LYR4
IEFC653I SUBSTITUTION JCL - UNIT=SYSDA,SPACE=(TRK,1),DSN=WJENSEN.S0W1.Z1020200.Y2017
See the SYMBOLS parameter in the MVS JCL Reference manual. There are a few gotchas you need to beware of, mostly concerning submitting a job from one lpar to another, or submitting for later execution. See the manual for details.
Re: &SYSYEAR
willy jensen wrote:As of z/OS 2.1 you can use system symbols in JCL, i.e:Code: Select all
//DD1 DD UNIT=SYSDA,SPACE=(TRK,1),
// DSN=WJENSEN.&SYSNAME..&SYSOSLVL..Y&LYR4
IEFC653I SUBSTITUTION JCL - UNIT=SYSDA,SPACE=(TRK,1),DSN=WJENSEN.S0W1.Z1020200.Y2017
See the SYMBOLS parameter in the MVS JCL Reference manual. There are a few gotchas you need to beware of, mostly concerning submitting a job from one lpar to another, or submitting for later execution. See the manual for details.
Both &SYSOSLVL and &LYR4 can not be resolved...How I can check if my current system can support this symbols?
-
- Global moderator
- Posts: 3720
- Joined: Sat Dec 19, 2009 8:32 pm
- Skillset: Systems programming, SAS, COBOL, CICS, JCL, SMS, VSAM, etc.
- Referer: other forum
- Location: Dubuque, Iowa, USA
Re: &SYSYEAR
Contact your site support group. You MUST be running z/OS 2.1 or higher, and your site support group must have added SYSSYM=ALLOW (the default is DISALLOW) to the specific job class you are running your batch job in. The option can be applied to * to cover all job classes, for example, but if not used for class * then it is set on a class by class basis in the JES initialization parameters.Both &SYSOSLVL and &LYR4 can not be resolved...How I can check if my current system can support this symbols?
-
- Global moderator
- Posts: 2105
- Joined: Thu Jun 03, 2010 6:21 pm
- Skillset: Assembler, JCL, utilities
- Referer: zos.efglobe.com
Re: &SYSYEAR
GeorgeQ wrote:...Both &SYSOSLVL and &LYR4 can not be resolved...How I can check if my current system can support this symbols?
You must be running z/OS 2.1 to use system symbols beyond &sysuid.
Try entering and running this little Rexx exec to tell you the OS you're currently using -
/* REXX */
SAY MVSVAR(SYSOPSYS)
Re: &SYSYEAR
z/OS 01.13.00 HBB7780
***
***
-
- Global moderator
- Posts: 3720
- Joined: Sat Dec 19, 2009 8:32 pm
- Skillset: Systems programming, SAS, COBOL, CICS, JCL, SMS, VSAM, etc.
- Referer: other forum
- Location: Dubuque, Iowa, USA
Re: &SYSYEAR
Your site's version of z/OS does not support system symbols like &LYR4. You'll need to consider one of the other solutions that have been mentioned, at least until your site upgrades to z/OS 2.1 or 2.2.