Hi,
I am new to rexx and using the code snippet given by Escapa in the topic GDG generation creation date.
I am trying to find creation date for gdg generation using LMDLIST command and gdg is on Tape.I am getting proper output if dataset is not on Tape.
If I am passing value "XXXXXX.XXXXX204.N01.GXX00V00" for 'lvl' paramter then on executing the rexx exec,receiving rc=0 under prompt as:
Name Prompt
_______ RXDATE *RC=0
and If I pass lvl = "xxxxxx.xxxxx204.N01(-230) then receiving ouput as :-
*************************************************
* ISRLD006
*
* Invalid data set level
* Qualifiers cannot be longer than 8 characters.
*
*
*
The purpose will be finish if I could get the output by passing value as :
lvl = "xxxxxx.xxxxx204.N01(-230).
Please help....
Hi expat,
I tried to find required thread now and before posting the query as well but didn't get any.It will be great if u can suggest more in this.
Here I had requirement to pass the creation date of GDG generation as a suffix of new dataset and source dataset is on Tape.If I pass the relative generation one time then its absolute value will be changing day by day and I can get the creation date accordingly.
If I use LMDLIST command for dataset on DASD then its reponding fine but not for tape dataset.
Please guide....
Thanks Expat...
I got about absolute generation but still base questin is unanswered(How to find creation date for gdg generation which is on Tape).and will LMDLIST returns the date in julian or gregorian format.i want it in gregorian format(I.e. YYMMDD)
please guide for this as well.
Thanks a lot Expat.....
As I am running short of time this time,I had executed this code and its jcl gave maxcc=0 ,but how can i see the output.(as per my limited knowledge in Rexx,we can see output on tso screen only and I had checked logs as well for this job but didn't find output.Can you help in this as well.
I'll try to learn more about terms used in this code so next time I can use my hand before calling you for help.
Hi,
Sorry posted the query in a diffrent way.I had submitted above stated jcl only and checking the ouput in spool.
I got the output but its not coming with creation date.
Output came as :-
******************************** Top of Data *****************
ABSOLUTE GENERATION FOR -248 IS XXXXXX.XXXXX204.N01.GXXXXV00
READY
END
******************************* Bottom of Data **************
Next query is as I need to pass the gen no only one time and day by day its absolute value will be changing so the creation date accordingly.So by keeping this in mind can we make the code less lenthy......
Hi Expat,
I executed above mentioned code and its working fine to get absolute generation.
I had searched more for required code which can help to find creation date of gdg generation and I got it as well (I'll post it later as complete issue resolved) but in that code LISTCAT command is used for creation date.Now I had query as:-
1. Can we use relative generation with LISTCAT command as I am getting maxcc=12,if tried to use and out put is coming as:
LISTCAT LEVEL(XXXXXX.XXXXX204.N01(-240)) -
IDC3203I ITEM 'XXXXXX.XXXXX204.N01(' DOES NOT ADHERE TO RESTRICTIONS
ALL
IDC3202I ABOVE TEXT BYPASSED UNTIL NEXT COMMAND. CONDITION CODE IS 12
If it can be done,then please suggest required parameters.
Note:- we can't use LISTDSI command as dataset is on Tape. &
With absolute generation,LISTCAT is working fine.
2. Is REXX is only solution to get the absolute generation from relative generation(using above mentioned code from Expat) and then use LISTCAT command to get creation date.
Hi Expat,
I am thankful for your guidance.
Your code is working fine.
I want to take creation date in variable and use that as a suffix in some other dataset (as XXXXXX.XXXXXX.D'Creation date of gdg generation')So I had made changes on 2 places in your code as:
1.
IF CRCENT <> 'FF' & CRJUL <> '00000' THEN DO
CRSTD1 = DATE('S',CRJUL,'J')
CRSTD = SUBSTR(CRSTD1,3,6)
END
2.
ELSE RGEN = CNT - (RGEN * -1)
DATA = SUBSTR(GDGLST.RGEN,46,6)
SAY DATA
Now ouput is coming as :
**************
090809
READY
END
*************
Now requirement is to put this date(only Date as &date) in a variable and use that in JCl for dsn=XXXXXXX.XXXXXX.D&Date.
How it can be done...plz suggest.
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
Dynamic dataset allocation or submit another batch job using the fully qualified dataset name built using the variable but before the job is submitted.
Hi,
I am not getting your words.Please put some more light on your statment.
And
I am going to discuss complete requirement with the intent that you can suggest me better solution as its coding is taking too much time.
Requirement:- Want to take backup of source(say XXXXXX.XXXXX111.N01(-230)) in a object file(XXXXXX.XXXXXX.D&creation date) where both datasets are on tape and &creation date is creation date of particular gdg generation.
So everyday absolute generation for gdg will be different and accordingly object file will be created.
Till now we are able to take creation date in dataset but how it can be taken in temp variable and passed to object file as a suffix(format YYMMDD).
Do we need to write full program in REXX only(I.e 1. take creation date of generation 2. then allocate 2 dataset in rexx to copy source dataset to object dataset where both are on tape)or some better approach to resolve the issue in a simple manner.
Plz Help.....
Thanks in advance...
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
Well, expat, I'm glad you understood this topic since it lost me from the beginning, and only got me more confused as it progressed.
I never did understand, why couldn't a simple job and program have been created to call for a mount of the specified generation, at which time it could've easily performed the task of finding the explicit dataset name for that generation, as well as running LISTCAT or using ISPF Services and finding the creation date. I'm also a bit lost as to concept of copying an existing tape to another tape under a different name.
I'll need to look at that IGGCSI00 program your exec used and see how it does what it did in this case.