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
 

 

Needs to find DSNs that are catlg from PDS members(jobs)

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
bhim_s

New User


Joined: 19 Sep 2006
Posts: 46
Location: New Delhi

PostPosted: Thu Aug 23, 2007 6:21 pm    Post subject: Needs to find DSNs that are catlg from PDS members(jobs)
Reply with quote

Hi,

i have a pds contains the jobs. my requirement is here to pick one member name and browse it to find all the datasets that are catlg and write those dsn in a sequential file. PDS contains approx. 20,000 jobs. and i need to do for all the jobs. Hope you can understand what i want. Can any one please suggest the rexx solution for this.

Thanks in advance

Bhim
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: Fri Aug 24, 2007 1:20 pm    Post subject:
Reply with quote

If you can tell us the requirement for this task, then maybe we can come up with some suggestions.

When you say jobs in your PDS, do you mean the JCL to execute these jobs ?
Back to top
View user's profile Send private message
bhim_s

New User


Joined: 19 Sep 2006
Posts: 46
Location: New Delhi

PostPosted: Fri Aug 24, 2007 6:08 pm    Post subject:
Reply with quote

Thanks for your response ... Now i have copied all the jobs(JCLs) in a sequential dataset by running a JCL. I am able to pick the job name. Below is my rexx..

Code:

/* REXX STP999*/                                 
dsndd = 'IN1' /*input dd name */                 
records.0 = 0                                     
rrc = 0                                           
rrc=read_list(dsndd)                             
mbr1=space(records.1,0) 
say mbr1                         
Read_List:                                       
  Arg wdd                                         
  "EXECIO * DISKR "wdd" (STEM records. FINIS"                                     
  If records.0 = 0 Then Do                       
   Say 'Input DSN base file (DDNAME 'wdd') is empty'
     Say 'Aborting.'                             
     Return 151                                   
  End                                             
Return 0                                         


I am getting member name mbr1 in the output. Member is JCL. Now I want to browse it to read its record to find DSN's that are CATLG like..

Code:
//INOUTDS3 DD   DSN=XXXX.ABC002.XYZ,DISP=(,CATLG),


and then want to write XXXX.ABC002.XYZ in another sequential dataset.
[/code]
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Fri Aug 24, 2007 7:03 pm    Post subject:
Reply with quote

It is not going to be simple, DSN and DISP may not always be on the same line. You also need to handle PROCs, overrides, and symbolic parameters. And there is always dynamic allocations. Have fun, you have along ways to go.
Back to top
View user's profile Send private message
bhim_s

New User


Joined: 19 Sep 2006
Posts: 46
Location: New Delhi

PostPosted: Fri Aug 24, 2007 7:40 pm    Post subject:
Reply with quote

I have done that in PL1 now I am trying to submit JCL through REXX. below is my code ...

Code:
/* REXX STP999*/                                                       
/* ****************************************************************** */
dsndd = 'IN1' /*input dd name */                                       
records.0 = 0                                                           
rrc = 0                                                                 
rrc=read_list(dsndd)                                                   
mbr1=space(records.1,0)                                                 
say mbr1                                                               
say length(mbr1)                                                       
call call_jcl                                                           
/* display list of the files existing on MVS */                         
Read_List:                                                             
  Arg wdd                                                               
  "EXECIO * DISKR "wdd" (STEM records. FINIS"                           
  SAY RECORDS.0                                                         
  If records.0 = 0 Then Do     
   Say 'Input DSN base file (DDNAME 'wdd') is emp'             
     Say 'Aborting.'                                           
     Return 151                                               
  End                                                         
call_jcl:                                                     
address tso                                                   
"SUBMIT *"                                                     
//XXXXXXA JOB (ACCOUNT),'PGMR ',MSGCLASS=V,                 
//         CLASS=H,NOTIFY=ZID, MSGLEVEL=1                   
//JOBLIB   DD   DSN=ZID.TEST.LOADLIB,DISP=SHR             
//         DD   DSN=ABC.COMMON.XXX.LOADLIB,DISP=SHR           
//         DD   DSN=ABC.XXX.COMMON.PRDA.LOADLIB,DISP=SHR     
//STEP1    EXEC PGM=STEP1,REGION=2M                           
//INFILE   DD   DSN=ZID.TEST.CNTLLIB(member),DISP=SHR     
//OUTFILE  DD   DSN=ZID.GDG.CATLG,DISP=(MOD,CATLG),       
//             DATACLAS=TINY,RECFM=FB,LRECL=40,               
//             STORCLAS=SCPRIME                               
//PLIDUMP  DD   SYSOUT=*,                                     
//PLIDUMP  DD   SYSOUT=*,                               
//             RECFM=FBA,LRECL=133                       
//SYSOUT   DD   SYSOUT=*,                               
//             RECFM=FBA,LRECL=133                       
//SYSPRINT DD   SYSOUT=*,                               
//             RECFM=FBA,LRECL=133                       
//SYSUDUMP DD   SYSOUT=*,                               
//             RECFM=FBA,LRECL=133                       
//FAIL002  EXEC PGM=STEPFAIL,REGION=2M,COND=(0,EQ,STEP1)
return rc                                               
Return 0   


But I am getting the error in the ouput :
Code:

READY                                                                           
 EX 'ZID.CLISTLIB.CLIST(STP99)'                                             
21526                                                                           
IN1                                                                             
IKJ56274A ENTER INPUT JOB STREAM:                                               
    28 +++  //XXXXXXA JOB (ACCOUNT),'PGMR ',MSGCLASS=V,                 
//         CLASS=H,NOTIFY
     8 +++ rrc=read_list(dsndd)                                                 
IRX0035I Error running STP99, line 28: Invalid expression                       
READY                                                                           
END     


I searched the forum to submit the JCL through rexx but yet have not got the proper solution for this. Please suggest.
Back to top
View user's profile Send private message
bhim_s

New User


Joined: 19 Sep 2006
Posts: 46
Location: New Delhi

PostPosted: Fri Aug 24, 2007 7:47 pm    Post subject:
Reply with quote

sorry ... i frogt to change
Code:
DSN=ZID.TEST.CNTLLIB(member),DISP=SHR

with
Code:
DSN=ZID.TEST.CNTLLIB(mbr1),DISP=SHR
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
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 show message using batch jobs madprasy TSO/ISPF 7 Fri Sep 09, 2016 6:55 pm


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