View previous topic :: View next topic
|
Author |
Message |
GaganGarg
Active User
Joined: 31 Mar 2010 Posts: 134 Location: India
|
|
|
|
Hi expat,
I tried to run the JCL from How to find in JCL, whether a GDG has any generations? but each time i am facing the same retun code RC=4. Here my Input GDG base name is OPERA.TEST1.BKUP generations exist which are associated with this GDG base name :
Code: |
Command - Enter "/" to select action Message Volume
-------------------------------------------------------------------------------
OPERA.TEST1.BKUP ??????
OPERA.TEST1.BKUP.G0001V00 TSO913
OPERA.TEST1.BKUP.G0002V00 TSO904
***************************** End of Data Set list **************************** |
and INCLUDE condition i gave as:
INCLUDE COND=(36,2,CH,EQ,C'.G',AND,42,3,CH,EQ,C'V00').
I am not getting why it is giving RC=04. Please tell me if i am making any mistake?
Thanks
Gagan |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
How did you work out that the include should start 1n position 36
Code: |
Your GDG OPERA.TEST1.BKUP.GnnnnV00
My GDG XX.TEST.GDG01.GnnnnV00 |
|
|
Back to top |
|
|
GaganGarg
Active User
Joined: 31 Mar 2010 Posts: 134 Location: India
|
|
|
|
Instead of using the temporary dataset, i used a PS file in which i collected the LISTCAT information. and this PS file i provided as the input.
From this PS file, i come to know about include condition.
Sorry, earlier i gave wrong file names as i had typed the file names, volume etc manually. sorry for inconvenience. Please find below the contents of the PS file:
Code: |
Command ===> Scroll ===> CSR
=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
****** ***************************** Top of Data ******************************
000001 1IDCAMS SYSTEM SERVICES TIME:
000002 0
000003 LISTCAT ENT('OPERA12.TEST1.BKUP') GDG ALL
000004 0GDG BASE ------ OPERA12.TEST1.BKUP
000005 IN-CAT --- CATALOG.HBCPLX02.TSO
000006 HISTORY
000007 DATASET-OWNER-----(NULL) CREATION--------2010.078
000008 RELEASE----------------2 LAST ALTER------2010.078
000009 ATTRIBUTES
000010 LIMIT----------------255 SCRATCH EMPTY
=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
000011 ASSOCIATIONS
000012 NONVSAM--OPERA12.TEST1.BKUP.G0001V00
000013 NONVSAM--OPERA12.TEST1.BKUP.G0002V00
000014 1IDCAMS SYSTEM SERVICES TIME: |
|
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
And what is the RECFM of the file ? |
|
Back to top |
|
|
GaganGarg
Active User
Joined: 31 Mar 2010 Posts: 134 Location: India
|
|
|
|
RECFM is VBA and LRECL is 200.
Actually RECFM is changing after executing the IDCAMS step. Before submitting the JCL, I gave the PS file in IDCAMS step to collect LISTCAT information with LRECL=200 and RECFM=FB.
but after executing the JCL, THis PS file is found to be having the RECFM=VBA. I mean, it is changing after executing the JCL from FB to VBA. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Gagan - In an IDCAMS step SYSPRINT DD is IDCAMS Messages file and is RECFM=VBA. If you check, LRECL should be 125. That's the leagcy of IDCAMS and you can't change it, whatever is happening is normal. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Because the file is VB you need to add 4 to the positions specified to account for the RDW. So pos 36 becomes pos 40. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
I just went through the entire thread, it was quite lengthy to read... just thinking, in the JCL from expat, what if you check the RC from IDCAMS step, if it is RC=0004 don't execute SORT step else execute it - shouldn't this suffice for the original request. Though, I might miss something, as I said it was a lengthy-read. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Unfortunately if the GDG base exists then the LISTCAT RC will be 0. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
oh Martin, looks like Beer you offered me is still showing its effect . However, if what if we use
Code: |
LISTCAT LVL(some.gdg.base.without.generation) ALL |
, RC=0004 could be handy for this thread? |
|
Back to top |
|
|
GaganGarg
Active User
Joined: 31 Mar 2010 Posts: 134 Location: India
|
|
|
|
Hi Expat/Anuj,
Thanks a lot. It is working now. Solution provided by Anuj is aloso handling the RC=4 for GDGs having no generations associated with it.
Thanks all. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
GaganGarg wrote: |
Thanks a lot. It is working now. |
You're welcome, but what did you change to make it working, can you please share? |
|
Back to top |
|
|
GaganGarg
Active User
Joined: 31 Mar 2010 Posts: 134 Location: India
|
|
|
|
Hi Anuj,
RECFM was VBA and i was not considering the 4 additional bytes for VBA format. I added 4 to the starting positions whatever i gave in include cond first i.e. I gave INCLUDE COND=(40,2,CH,EQ,C'.G',AND,46,3,CH,EQ,C'V00'). And i also used solution provided by you incase if there is no generation associated with GDG base. ( i.e. I used LISTCAT LVL(some.gdg.base.without.generation) ALL instead of LISTCAT ENT('OPERA12.TEST1.BKUP') GDG ALL )
Thanks |
|
Back to top |
|
|
GaganGarg
Active User
Joined: 31 Mar 2010 Posts: 134 Location: India
|
|
|
|
or i thought it is better to use INCLUDE COND=(13,7,CH,EQ,C'NONVSAM') as it adds the flexibility to the JCL regardless of changing the INCLUDE COND everytime if GDG base name changes. I mean another GDG base name may by of different length. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Good, thanks for the follow up. |
|
Back to top |
|
|
|