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

How to search using jcl


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ajaybshukla

New User


Joined: 09 Sep 2008
Posts: 39
Location: india

PostPosted: Wed May 06, 2009 12:22 pm
Reply with quote

Hi All,

My requirement is..
I have 1 value like say 'EXPERT' in any of 100 GDG's.
i want to find in which GDG it is there.
i want to use JCL for this.

Can u please help me how to do it.

Thanks
Ajay
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Wed May 06, 2009 12:37 pm
Reply with quote

100 generations or 100 GDG bases ?
Which program / utility would you like the JCL to process.
Back to top
View user's profile Send private message
ajaybshukla

New User


Joined: 09 Sep 2008
Posts: 39
Location: india

PostPosted: Wed May 06, 2009 12:56 pm
Reply with quote

Hi,

100 generations or more...i tried with file aid..bt it dint work or i mite hv done somethin wrong
So i want to know how to do it and with which utility...

Please help me out

Thanks..
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Wed May 06, 2009 1:13 pm
Reply with quote

3.13 usually helps
Back to top
View user's profile Send private message
ajaybshukla

New User


Joined: 09 Sep 2008
Posts: 39
Location: india

PostPosted: Wed May 06, 2009 1:27 pm
Reply with quote

Thanks expat

But can u please temme how to do it with JCL...please.

Thanks
Back to top
View user's profile Send private message
ajaybshukla

New User


Joined: 09 Sep 2008
Posts: 39
Location: india

PostPosted: Wed May 06, 2009 1:34 pm
Reply with quote

Hi EXPAT,

Thanks i hv done it...

Thanks...i use 3.14 in batch mode i got JCL...
Thank you very much
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Wed May 06, 2009 2:09 pm
Reply with quote

Good news, always when a hint is given and the poster finds the rest out for themselves.

Good work, well done.
Back to top
View user's profile Send private message
rakesha.hg

Active User


Joined: 21 Mar 2008
Posts: 161
Location: bangalore

PostPosted: Thu May 07, 2009 11:14 am
Reply with quote

Well,

There is one jcl which we use to find a particular string in the GENERATIONS of a Particular GDG ... (Courtsey ibmmainframes.com)

Since you have already found some alternate solution ... if anyones interested ... i'll post it.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Thu May 07, 2009 2:44 pm
Reply with quote

Go ahead and post it please. . . lets' see what's in the store . . .
Back to top
View user's profile Send private message
ojdiaz

New User


Joined: 19 Nov 2008
Posts: 98
Location: Spain

PostPosted: Thu May 07, 2009 4:15 pm
Reply with quote

I'm already interested as well icon_cool.gif

I use 3.14 as well for searchs as well and extracted the JCL from it, since then i just submit a job and that's it. Something like

Code:
//SEARCHLI JOB (EEMP,1),'SEARCHLI',CLASS=A,REGION=0M,           
//            TIME=1440,MSGCLASS=X,MSGLEVEL=(1,1),NOTIFY=&SYSUID
//SEARCH  EXEC PGM=ISRSUPC,                                     
//            PARM=(SRCHCMP,                                   
//            'ANYC')                                           
//*NEWDD  DD DSN=MDRE.LIBZ.JCLLIB,DISP=SHR                     
//*NEWDD  DD DSN=SYSNIBM.BMC.V61.CTM.JCL,DISP=SHR               
//*NEWDD  DD DSN=MDTE.LIBZ.PARMLIB,DISP=SHR                     
//*NEWDD  DD DSN=CHGMAN.BSLZ.SOURCE,DISP=SHR                   
//NEWDD  DD DSN=CHGMAN.BSLZ.COPYS,DISP=SHR                     
//*YOU CAN SPECIFY ANY FILE OR LIB TO SEARCH, EVEN SEVERAL OF THEM AT THE SAME TIME
//OUTDD  DD SYSOUT=(A)                                         
//SYSIN  DD *                                                   
SRCHFOR  'LEADING'                                             
//*YOU CAN SPECIFY SEVERAL SEARCH STRINGS AS WELL. ONE PER LINE
Back to top
View user's profile Send private message
rakesha.hg

Active User


Joined: 21 Mar 2008
Posts: 161
Location: bangalore

PostPosted: Mon May 11, 2009 3:49 pm
Reply with quote

hi all,

here is the jcl we use for the requirement i stated earlier ...

Code:

//CG56SRCH JOB HNA81622SAEF00,DEVT,CLASS=A,MSGCLASS=T,NOTIFY=&SYSUID           
//*%OPC SCAN                                                                   
//*************************************************                             
//* APPLICATION  = &OADID                                                       
//* OCCURRENCE IA = &ODMY2&OHHMM                                               
//* OPERATION NO = &OOPNO / &OWSID                                             
//* DATE PASSAGE = &CDDMMYY A &CHHMM                                           
//*************************************************                             
//JOBLIB   DD  DSN=RQEN.COMM.DU.LOADLIB,DISP=SHR                               
//CG820100 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('GDG BASE NAME HERE') 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,250,SS,EQ,C''',   /* Search criteria,file length                               
            C'NC2732421'C'''',C')',/,               & field your searching goes here  */                             
            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=(*,INTRDR)                                                 
//SORTIN   DD DATA,DLM=$$                                                       
//CG82XINT JOB HNA81622SAEF00,DEVT,CLASS=A,MSGCLASS=T,NOTIFY=&SYSUID             
//*                                                                             
//STEP0100 EXEC  PGM=ICETOOL                                                     
//TOOLMSG  DD SYSOUT=*                                                           
//DFSMSG   DD SYSOUT=*                                                           
//OUT      DD DSN=CG56.GDG.SEARCH.INFO,          /* place to look for the result */                                     
//            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)                                             



1) This jobs submits internal jcl(totally 2 jobs run if we submit this).
2) It will recall the migrated generations(not recommended ... HRECALL much faster).
3) Search info dataset will have the results of search.basically lists all the Generations it searched &
--> IF string found under particular generation -- Message 'STRING in XXXX'
--> NOT found - no message.

I would take this oppurtunity to thank Skulosu who provided base to develop this. Request some moderator to notify him plz.
Back to top
View user's profile Send private message
rakesha.hg

Active User


Joined: 21 Mar 2008
Posts: 161
Location: bangalore

PostPosted: Mon May 11, 2009 3:52 pm
Reply with quote

hi all,

here is the jcl we use for the requirement i stated earlier ...

Code:

//CG56SRCH JOB HNA81622SAEF00,DEVT,CLASS=A,MSGCLASS=T,NOTIFY=&SYSUID           
//*%OPC SCAN                                                                   
//*************************************************                             
//* APPLICATION  = &OADID                                                       
//* OCCURRENCE IA = &ODMY2&OHHMM                                               
//* OPERATION NO = &OOPNO / &OWSID                                             
//* DATE PASSAGE = &CDDMMYY A &CHHMM                                           
//*************************************************                             
//JOBLIB   DD  DSN=RQEN.COMM.DU.LOADLIB,DISP=SHR                               
//CG820100 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('GDG BASE NAME HERE') 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,250,SS,EQ,C''',   /* Search criteria,file length                               
            C'NC2732421'C'''',C')',/,               & field your searching goes here  */                             
            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=(*,INTRDR)                                                 
//SORTIN   DD DATA,DLM=$$                                                       
//CG82XINT JOB HNA81622SAEF00,DEVT,CLASS=A,MSGCLASS=T,NOTIFY=&SYSUID             
//*                                                                             
//STEP0100 EXEC  PGM=ICETOOL                                                     
//TOOLMSG  DD SYSOUT=*                                                           
//DFSMSG   DD SYSOUT=*                                                           
//OUT      DD DSN=CG56.GDG.SEARCH.INFO,          /* place to look for the result */                                     
//            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)                                             



1) This jobs submits internal jcl(totally 2 jobs run if we submit this).
2) It will recall the migrated generations(not recommended ... HRECALL much faster).
3) Search info dataset will have the results of search.basically lists all the Generations it searched &
--> IF string found under particular generation -- Message 'STRING in XXXX'
--> NOT found - no message.

I would take this oppurtunity to thank Skulosu who provided base to develop this. Request some moderator to notify him plz.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Search two or more word with FILEAID Compuware & Other Tools 15
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts first column truncated in search result IBM Tools 13
No new posts ISRSUPC search utility - using high l... TSO/ISPF 2
No new posts To search DB2 table based on Conditio... DB2 1
Search our Forums:

Back to Top