I currently do the check manually by doing a list catalog on the
dataset:
LISTC ENT('ACRO.TAPE.DATASET.NAME') HISTORY
NONVSAM ------- ACRO.TAPE.DATASET.NAME
IN-CAT --- UCAT.SYSC.GPWKCAT8
HISTORY
DATASET-OWNER-----(NULL) CREATION--------2009.332
RELEASE----------------2 EXPIRATION------0000.000
I then use a web site to convert the Julian date to a calendar date.
Any ideas on the best way to do this?
From REXX you can internally issue the LISTC and capture and parse the
output, and the REXX DATE function should be able to supply the rest.
JC Ewing
--
Joel C. Ewing, Fort Smith, AR jREMOVEc...@acm.org
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to list...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
Or you can write a clist or rexx or sas or easytrieve that will figure out
if the creation date is within a date range.
There are probably other solutions as well.
You could also do a program in PL/1, ASM, COBOL, and probably others to do
the same thing.
Your solution will vary with what you are comfortable with supporting.
Lizette
>
> On 01/07/2010 02:46 PM, Tim wrote:
> > I'm running a job on JES2 MVS LEVEL 0807.03 z/OS V1R9 and have a job
> > that depends on a tape feed. In my JCL I want to programatically make
> > sure the date on the tape is the current year/month minus 1 month. If
> > it's not then I want to fail the job.
> >
> > I currently do the check manually by doing a list catalog on the
> > dataset:
> > LISTC ENT('ACRO.TAPE.DATASET.NAME') HISTORY
> > NONVSAM ------- ACRO.TAPE.DATASET.NAME
> > IN-CAT --- UCAT.SYSC.GPWKCAT8
> > HISTORY
> > DATASET-OWNER-----(NULL) CREATION--------2009.332
> > RELEASE----------------2 EXPIRATION------0000.000
> >
> > I then use a web site to convert the Julian date to a calendar date.
> >
> > Any ideas on the best way to do this?
>
>
> --
----------------------------------------------------------------------
That should work. But I will put in the obligatory mention that the LISTC output is not GUPI. Using IGGCSI00 is GUPI and less likely to fail in the future.
If the OP wanted a JCL error, then there is not really a way. Well, do the above to set the CC, then execute a different step with a guaranteed JCL error if the CC is set to bypass the real step.
--
John McKown
Systems Engineer IV
IT
Administrative Services Group
HealthMarkets(r)
9151 Boulevard 26 * N. Richland Hills * TX 76010
(817) 255-3225 phone * (817)-961-6183 cell
john....@healthmarkets.com * www.HealthMarkets.com
Confidentiality Notice: This e-mail message may contain confidential or proprietary information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. HealthMarkets(r) is the brand name for products underwritten and issued by the insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance Company(r), Mid-West National Life Insurance Company of TennesseeSM and The MEGA Life and Health Insurance Company.SM
If you have RMM you can just use their REXX/CLIST interface to get the
date. TMS you're out of luck, you'll have to parse the LISTC output. But
REXX should convert the date to whatever format that you want without
going out to a web site, see Mark's RDATE REXX.
Jack Kelly
202-502-2390 (Office)
It would be wonderful if CA would enhance CA-1 to have a REXX interface! Although, come to think of it, CA does document how to interface to CA-1 via an HLL. So some smart person could write an interface for an "ADDRESS CA1" environment in REXX.
--
John McKown
Systems Engineer IV
IT
Administrative Services Group
HealthMarkets(r)
9151 Boulevard 26 * N. Richland Hills * TX 76010
(817) 255-3225 phone * (817)-961-6183 cell
john....@healthmarkets.com * www.HealthMarkets.com
Confidentiality Notice: This e-mail message may contain confidential or proprietary information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. HealthMarkets(r) is the brand name for products underwritten and issued by the insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance Company(r), Mid-West National Life Insurance Company of TennesseeSM and The MEGA Life and Health Insurance Company.SM
----------------------------------------------------------------------
Sometimes this is easily done with address LINKPGM, as with ICSF.
Sometimes this is impractically difficult, as with SMP/E.
-- gil