Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Creating GDG base similar to another GDG base

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

New User


Joined: 24 Jan 2011
Posts: 21
Location: India

PostPosted: Fri Sep 09, 2011 12:44 pm    Post subject: Creating GDG base similar to another GDG base
Reply with quote

I want to create a GDG base similar to another GDG base.
Is there any JCL to create such GDG base?

I know this is possible through fileaid 3.2 option. But I need a JCL to perform this as there are many files and I am in middle of production fix.
So it would be helpful if some one can provide the JCL
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Fri Sep 09, 2011 2:48 pm    Post subject:
Reply with quote

Quote:
I want to create a GDG base similar to another GDG base.
Do you mean with the same number of generations? If not, what do you want to be similar?

A GDG base is pretty much a catalog entry with the limit and nothing else. Execute IDCAMS and use DEFINE GDG for the new one, just like you would any GDG.
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: Sat Sep 10, 2011 12:11 am    Post subject:
Reply with quote

Gosh Robert, what do you mean nothing else, what about the SCRATCH parameter icon_lol.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Sat Sep 10, 2011 12:22 am    Post subject:
Reply with quote

expat, I forgot about the scratch parameter and the purge / nopurge parameter -- mea culpa?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sat Sep 10, 2011 12:37 am    Post subject: Reply to: Creating GDG base similar to another GDG base
Reply with quote

Mea Maxima Culpa . . .

icon_wink.gif
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1777
Location: Bloomington, IL

PostPosted: Sat Sep 10, 2011 3:03 am    Post subject: Re: Creating GDG base similar to another GDG base
Reply with quote

Vasanthr wrote:
I want to create a GDG base similar to another GDG base.
Is there any JCL to create such GDG base?

I tell you three times, and what I tell you three times is true: JCL only establishes an environment and runs a program. It cannot generate control cards, count records, extract rows from tables, or any of the myriad things that misinformed "software engineers" think that it could if only they knew how to write it.

However, you can use the following Rexx program to generate a set of control cards:
Code:
/* Rexx */                                                         
/* Written Heisei 23.9.9 by Akatsukami-sama */                     
  trace o                                                         
  arg from to where .                                             
  isbase = 0                                                       
  k      = 0                                                       
  drop base. limit. scratch. empty.                               
  "ALLOC FI(TOOLOUT) DA('"where"') SHR"                           
  x = outtrap("LISTC.")                                           
  "LISTCAT LEVEL('"from"') ALL"                                   
  x = outtrap("OFF")                                               
                                                                   
  do i = 1 to listc.0                                             
    if (substr(listc.i,1,1)¬=' ')    then isbase = 0               
    if (pos("GDG BASE",listc.i)¬=0) then do                       
      isbase = 1                                                   
      mp1    = pos(from,listc.i)                                   
      mp2    = length(listc.i)                                     
      llq    = substr(listc.i,mp1+length(from),mp2-mp1-1)         
    end                                                           
    if ((pos("ATTRIBUTES",listc.i)¬=0) & (isbase=1)) then do       
      k       = k + 1                                             
      base.0  = k                                                 
      j       = i + 1                                             
      lp1     = lastpos('-',listc.j)                               
      lp2     = pos(' ',listc.j,lp1)                               
      base.k  = to || llq                                         
      limit.k = substr(listc.j,lp1+1,lp2-lp1-1)                   
                                                                   
      if (pos('NOSCRATCH',listc.j)¬=0) then scratch.k = 'NOSCRATCH'
      else scratch.k = 'SCRATCH'                                   
                                                                   
      if (pos('NOEMPTY',listc.j)¬=0) then empty.k = 'NOEMPTY'     
      else empty.k = 'empty'                                       
    end                                     
  end                                       
                                             
  if (base.0>0) then do i = 1 to base.0     
    card = " DEFINE GDG -"                   
    push card                               
    "EXECIO 1 DISKW TOOLOUT"                 
    card = "        NAME("base.i") -"       
    push card                               
    "EXECIO 1 DISKW TOOLOUT"                 
    card = "        "empty.i" -"             
    push card                               
    "EXECIO 1 DISKW TOOLOUT"                 
    card = "        "scratch.i" -"           
    push card                               
    "EXECIO 1 DISKW TOOLOUT"                 
    card = "        LIMIT("limit.i"))"       
    push card                               
    "EXECIO 1 DISKW TOOLOUT"                 
  end                                       
                                             
  "EXECIO 0 DISKW TOOLOUT (FINIS"           
  "FREE FI(TOOLOUT)"                       
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 Creating ISPF Screens with Scrname vi... Albireo20 TSO/ISPF 9 Tue Sep 05, 2017 4:24 pm
No new posts retrieving envelope information out o... VintageReceiver TSO/ISPF 6 Thu Aug 10, 2017 8:13 pm
No new posts 24x7 online logs using DSN1LOGP (simi... SRICOBSAS DB2 3 Thu Aug 18, 2016 11:52 am
No new posts Creating an 'Enter' event with IMS MF... dileep chirasani Java & MQSeries 1 Sat Aug 06, 2016 2:23 am
No new posts Creating a dynamic sort card in JCL u... ChitraChhabra DFSORT/ICETOOL 4 Wed Aug 03, 2016 6:15 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us