oucheeeeee
Technical User
- Jul 8, 2008
- 9
Hi,
I'm trying to find out if it is possible to create a DSN allocation dependent on a variable?
I need to backup a VSAM file but want to back it up to it's own GDG not just a generic GDG.
IE
I have a ring of journals that cycle round each day. The files are called,
let's say ABC.P40JRx (where x is 1 - 5)
I also have ABC.A40JRx (alternate file for 40's)
ABC.P99JRx
ABC.A99JRx (alternate file for 99's)
each day, the journal ring rolls round by 1 and when this happens, before DEL/DEF the new journal, I want to create a backup. This is a simple task if I just want to write it to a generic GDG, say ABC.JRNL.BKP(+1).
However, I would like to create the backups and allocate them to the same name (but with .BKP appended)
Unfortunately, there is no way of knowing which of the 20 possible journals will have been used.
When the JCL runs, the program uses (I assume) C++ to create a SYSIN card pointing to the correct IDCAMS library member (P40JR3 will del/def ABC.P40JR3) - This is NOT done via PARM= or by using symbolics (as in a JCL Proc).
How can I take that value (provided in the JCL at runtime) and use it to create an allocation for ABC.P40JR3.BKP(+1)
My current thinking is to create the backup (a seq file from REPRO of VSAM journal) to ABC.JRNL.BKP using either OUTFILE or OUTDATASET and then PASS this new dataset to a second step where it can be written to the correct GDG (IE copy this ABC.JRNL.BKP to ABC.P40JR3.BKP(+1) obv. dependant on which journal is being backed up). To find which journal was used, I was planning to write the SYSPRINT for the first step to a file, then, in the next step, use REXX to strip out the correct journal name. It's fairly easy for me to do a 'say VALUE' where VALUE = the journal name. How can I move that VALUE to a PARM or a DSN?
This would also be simple if you could dynamically allocate a GDG using ALLOCATE or OUTDATASETNAME but you must specify an actual generation number (you can't use +1).
Anyone got any ideas on how I might achieve this?
Many thanks,
Regards,
Rob
I'm trying to find out if it is possible to create a DSN allocation dependent on a variable?
I need to backup a VSAM file but want to back it up to it's own GDG not just a generic GDG.
IE
I have a ring of journals that cycle round each day. The files are called,
let's say ABC.P40JRx (where x is 1 - 5)
I also have ABC.A40JRx (alternate file for 40's)
ABC.P99JRx
ABC.A99JRx (alternate file for 99's)
each day, the journal ring rolls round by 1 and when this happens, before DEL/DEF the new journal, I want to create a backup. This is a simple task if I just want to write it to a generic GDG, say ABC.JRNL.BKP(+1).
However, I would like to create the backups and allocate them to the same name (but with .BKP appended)
Unfortunately, there is no way of knowing which of the 20 possible journals will have been used.
When the JCL runs, the program uses (I assume) C++ to create a SYSIN card pointing to the correct IDCAMS library member (P40JR3 will del/def ABC.P40JR3) - This is NOT done via PARM= or by using symbolics (as in a JCL Proc).
How can I take that value (provided in the JCL at runtime) and use it to create an allocation for ABC.P40JR3.BKP(+1)
My current thinking is to create the backup (a seq file from REPRO of VSAM journal) to ABC.JRNL.BKP using either OUTFILE or OUTDATASET and then PASS this new dataset to a second step where it can be written to the correct GDG (IE copy this ABC.JRNL.BKP to ABC.P40JR3.BKP(+1) obv. dependant on which journal is being backed up). To find which journal was used, I was planning to write the SYSPRINT for the first step to a file, then, in the next step, use REXX to strip out the correct journal name. It's fairly easy for me to do a 'say VALUE' where VALUE = the journal name. How can I move that VALUE to a PARM or a DSN?
This would also be simple if you could dynamically allocate a GDG using ALLOCATE or OUTDATASETNAME but you must specify an actual generation number (you can't use +1).
Anyone got any ideas on how I might achieve this?
Many thanks,
Regards,
Rob