IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Searching for the GDG version


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rakesha.hg

Active User


Joined: 21 Mar 2008
Posts: 161
Location: bangalore

PostPosted: Mon Jul 14, 2008 4:50 pm
Reply with quote

Hi all,

I have a GDG base with 100+ generations which i'm giving in a jcl to search for a particular word in the files using the following condition,

Code:
//SYSIN    DD *                                                 
 INCLUDE COND=(1,9,CH,EQ,C'NC2816570',OR,1,9,CH,EQ,C'NC2835210')
 SORT FIELDS=COPY                                               
/* 


The word i'm searching starts from the first column & 9 bytes long.

from the above sort step i'll only get to know whether the word is present in the GDG's or not.

I need to get the version in which it was there? is there anyway we can do this?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Jul 14, 2008 4:55 pm
Reply with quote

try a batch 3.13 (generate your JCL for the jobstep using 2 as the execution mode, also requesting that you be allowed to edit the jcl before execution.

then concatenate the 100 gdg gens (using the full name).

that will indicate the concatenation number.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Jul 14, 2008 4:56 pm
Reply with quote

I believe that you wish to find the generation rather than the version. The two terms are both valid but have totally different meanings. Please make sure that you use the correct terminology to elicit the best replies.

This topic has been recently discussed on the forum, and there is a search button at the top of this page.
Back to top
View user's profile Send private message
rakesha.hg

Active User


Joined: 21 Mar 2008
Posts: 161
Location: bangalore

PostPosted: Mon Jul 14, 2008 5:06 pm
Reply with quote

hi expat,

i know this rule, i searched the forum with keywords Generation,version,generation searching,gdg generation searching none i could match with what i needed.....thats why i went on to post .

please can you suggest me the recent topic that was discussed.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Mon Jul 14, 2008 6:04 pm
Reply with quote

Hi,

if you are after the generation number and have FILEAID you can try the following:-
Code:
//FILEAID  EXEC PGM=FILEAID                                       
//SYSPRINT DD SYSOUT=*                                             
//SYSLIST  DD SYSOUT=*                                             
//DD01     DD DSN=CSCSGLC.FILE01,  * GDG NAME*                               
//            DISP=SHR                                             
//SYSIN    DD *                                                   
$$DD01 LIST OUT=0,                                                 
            IF=(001,EQ,C'NC2816570',C'NC2835210')                 
/*                                                                 



Gerry
Back to top
View user's profile Send private message
rakesha.hg

Active User


Joined: 21 Mar 2008
Posts: 161
Location: bangalore

PostPosted: Mon Jul 14, 2008 6:31 pm
Reply with quote

hi ,

we dont have fileaid option in our shop.

cant we do this in sort/icetool?
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Mon Jul 14, 2008 11:02 pm
Reply with quote

Rakesh.hg,

The following DFSORT/ICETOOL JCl will give you the desired results.

Code:

//STEP0100 EXEC PGM=IKJEFT01                           
//SYSTSPRT DD DSN=&L,                                   
//            DISP=(,PASS),                             
//            SPACE=(CYL,(1,1),RLSE),                   
//            DCB=(LRECL=80,RECFM=FB,BLKSIZE=0)         
//SYSTSIN  DD *                                         
  LISTCAT ENT('your gdg base name') NAME                   
//*                             
//STEP0200 EXEC  PGM=ICETOOL                                     
//TOOLMSG  DD SYSOUT=*                                           
//DFSMSG   DD SYSOUT=*                                           
//IN       DD DSN=&L,DISP=(OLD,DELETE)                           
//TOOL     DD DSN=&T,DISP=(,PASS),SPACE=(CYL,(5,5),RLSE),RECFM=FB
//INDD     DD DSN=&I,DISP=(,PASS),SPACE=(CYL,(5,5),RLSE),RECFM=FB
//CTLDD    DD DSN=&C,DISP=(,PASS),SPACE=(CYL,(5,5),RLSE),RECFM=FB
//TOOLIN   DD *                                                   
  COPY FROM(IN) USING(CTL1)                                       
//CTL1CNTL DD *                                     
  INCLUDE COND=(4,7,CH,EQ,C'NONVSAM')               
  OUTFIL FNAMES=TOOL,                               
  OUTREC=(C' COPY FROM(GDG',SEQNUM,3,ZD,           
          C') TO(OUT) USING(C',SEQNUM,3,ZD,         
          C')',80:X)                               
  OUTFIL FNAMES=INDD,                               
  OUTREC=(C'//GDG',                                 
         SEQNUM,3,ZD,3X,                           
         C'DD',X,                                   
         C'DISP=SHR,',                             
         C'DSN=',17,44,                             
         80:X)                                     
  OUTFIL FNAMES=CTLDD,                             
  OUTREC=(C'//C',SEQNUM,3,ZD,C'CNTL DD *',/,       
          C'  INCLUDE COND=(1,9,SS,EQ,C''',         
          C'NC2816570,NC2835210',C'''',C')',/,     
          C'  OUTFIL FNAMES=OUT,REMOVECC,',/,       
          C'  HEADER1=(',C'''',C'STRING IN ',       
          17,44,C'''',C')',80:X)                   
                                                   
/*                                                 
//STEP0300 EXEC  PGM=ICEMAN       
//SYSOUT   DD SYSOUT=*           
//SYSIN    DD *                   
   OPTION COPY                   
/*                               
//SORTOUT  DD SYSOUT=*           
//SORTIN   DD DATA,DLM=$$ 
//yourtid  JOB 'COPY',                   
//             CLASS=A,                   
//             MSGCLASS=H,               
//             MSGLEVEL=(1,1),           
//             NOTIFY=your tid
//*                                       
//STEP0100 EXEC  PGM=ICETOOL             
//TOOLMSG  DD SYSOUT=*                   
//DFSMSG   DD SYSOUT=*                   
//OUT      DD DSN=yourtid.GDG.SEARCH.INFO,
//            DISP=(MOD,CATLG,DELETE),   
//            UNIT=SYSDA,                 
//            SPACE=(CYL,(10,10),RLSE)     
//TOOLIN   DD *                           
$$                                       
//         DD DSN=&T,DISP=(OLD,PASS)     
//         DD DSN=&C,DISP=(OLD,PASS)     
//         DD DSN=&I,DISP=(OLD,PASS)     


Look at the output created in step0300 and if the generated JCL looks right then change the following statement in step0300
Code:

//SORTOUT  DD SYSOUT=* 


to
Code:

//SORTOUT  DD SYSOUT=(*,INTRDR)


dbzTHEdinosauer wrote:
try a batch 3.13 (generate your JCL for the jobstep using 2 as the execution mode, also requesting that you be allowed to edit the jcl before execution.

then concatenate the 100 gdg gens (using the full name).


dbz,

I guess you meant option 3.15 instead of 3.13 (superc). And ISRSUPC can handle a GDG base in batch mode , you don't have to concatenate all the versions manually and ISRSUPC does not give you the concatenation number , except that it treats all of them as a single dataset and just gives the line #
Back to top
View user's profile Send private message
rakesha.hg

Active User


Joined: 21 Mar 2008
Posts: 161
Location: bangalore

PostPosted: Tue Jul 15, 2008 10:15 am
Reply with quote

hi all,

Thanks,

Thanks in particular to skolusu ..... your solution worked for us!
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts How to copy the -1 version of a membe... TSO/ISPF 4
No new posts Searching for a member but don't know... TSO/ISPF 6
No new posts Copying GDG version(all/few) from pro... CLIST & REXX 13
No new posts XMITIP Latest Version JCL & VSAM 2
Search our Forums:

Back to Top