Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

To find if a GDG has any generations, RC4

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
GaganGarg

Active User


Joined: 31 Mar 2010
Posts: 132
Location: India

PostPosted: Mon Apr 19, 2010 5:16 pm    Post subject: To find if a GDG has any generations, RC4
Reply with quote

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
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Apr 19, 2010 5:30 pm    Post subject:
Reply with quote

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
View user's profile Send private message
GaganGarg

Active User


Joined: 31 Mar 2010
Posts: 132
Location: India

PostPosted: Mon Apr 19, 2010 6:04 pm    Post subject:
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Apr 19, 2010 6:24 pm    Post subject:
Reply with quote

And what is the RECFM of the file ?
Back to top
View user's profile Send private message
GaganGarg

Active User


Joined: 31 Mar 2010
Posts: 132
Location: India

PostPosted: Mon Apr 19, 2010 6:49 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon Apr 19, 2010 7:53 pm    Post subject:
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Apr 19, 2010 7:57 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon Apr 19, 2010 8:20 pm    Post subject:
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Apr 19, 2010 8:25 pm    Post subject:
Reply with quote

Unfortunately if the GDG base exists then the LISTCAT RC will be 0.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon Apr 19, 2010 8:37 pm    Post subject: Reply to: How to find in JCL, whether a GDG has any generati
Reply with quote

oh Martin, looks like Beer you offered me is still showing its effect icon_smile.gif. 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
View user's profile Send private message
GaganGarg

Active User


Joined: 31 Mar 2010
Posts: 132
Location: India

PostPosted: Tue Apr 20, 2010 8:59 am    Post subject:
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Apr 20, 2010 5:51 pm    Post subject:
Reply with quote

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
View user's profile Send private message
GaganGarg

Active User


Joined: 31 Mar 2010
Posts: 132
Location: India

PostPosted: Tue Apr 20, 2010 5:57 pm    Post subject:
Reply with quote

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 ) icon_biggrin.gif
Thanks
Back to top
View user's profile Send private message
GaganGarg

Active User


Joined: 31 Mar 2010
Posts: 132
Location: India

PostPosted: Tue Apr 20, 2010 6:16 pm    Post subject:
Reply with quote

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. icon_biggrin.gif
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Apr 20, 2010 6:45 pm    Post subject:
Reply with quote

Good, thanks for the follow up.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to find the first monday of the w... abdulrafi COBOL Programming 10 Fri Nov 25, 2016 3:24 pm
No new posts Find out a active PGM jpsager JCL & VSAM 10 Fri Oct 07, 2016 4:32 pm
No new posts How to find a CICS resource used in C... Arunkumar Chandrasekaran CICS 8 Thu Sep 29, 2016 1:45 pm
No new posts how to find clist's or view library Andrew Hsia CLIST & REXX 4 Tue Jun 28, 2016 6:07 pm
No new posts Compare each GDG Generations to other... Ayyappa1 JCL & VSAM 13 Tue Jun 28, 2016 1:48 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us