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
 
Is there any utility which can tell about a set of datasets

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

New User


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

PostPosted: Tue May 15, 2007 12:43 pm    Post subject: Is there any utility which can tell about a set of datasets
Reply with quote

Hi,

Is there any utility which can tell about a set of datasets existing or not. as i feel, through LISTCAT we can know only about a specific dataset existing or not but my problem is that i am having 8 datasets and i want to check each dataset existing or not on MVS. i have coded the below programs but it's not working as it return 0 only when all the datasets present and returns 4 if any one of them is missing. i want to make a check for all the datasets if any one of them is present send me a mail so that i can take proper action to stop production abend.

Code:
//JSE10   EXEC PGM=IDCAMS                                     
//SYSPRINT DD SYSOUT=*                                       
//SYSIN    DD *                                               
 LISTCAT ENT(Z918788.TEST.JBB1)                               
 LISTCAT ENT(Z918788.TEST.JBB2)                               
 LISTCAT ENT(Z918788.TEST.JOB1)                               
 LISTCAT ENT(Z918788.TEST.JOB2)                               
 LISTCAT ENT(Z918788.TEST.JOB3)                               
 LISTCAT ENT(Z918788.TEST.JOB7)                               
 LISTCAT ENT(Z918788.TEST.JOB8)                               
 LISTCAT ENT(Z918788.TEST.JOB9)                               
/*                                                                                                        //*         
//******************************************************     
//* SEND MAIL IF STEP JSE10 RETRUNS CODE 0             *     
//* ****************************************************     
//         IF   (JSE10.RC EQ 0) THEN                         
//*                                                           
//JSE20    EXEC PGM=SYNCGENR                                 
//SYSOUT   DD   SYSOUT=*                                     
//SYSPRINT DD   SYSOUT=*                                     
//SYSUDUMP DD   SYSOUT=*                                     
//SYSUT1   DD   DSN=Z918788.TEST.CNTLLIB(JSEMAL1),DISP=SHR   
//SYSUT2   DD   SYSOUT=(B,SMTP)                               
//FAIL20   EXEC PGM=STEPFAIL,REGION=2M,COND=(0,EQ,JSE20)     
//*                                                           
//         ENDIF                                             
//*         


Waiting for your early reponse...Thanks
Bhim
Back to top
View user's profile Send private message

expat

Global Moderator


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

PostPosted: Tue May 15, 2007 1:50 pm    Post subject:
Reply with quote

If you had read the idcams manual you would know about using LVL instead of ENT
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Tue May 15, 2007 3:00 pm    Post subject:
Reply with quote

You can always use REXX with LISTDSI or SYSDSN.

O.
Back to top
View user's profile Send private message
bhim_s

New User


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

PostPosted: Tue May 15, 2007 3:58 pm    Post subject:
Reply with quote

expat wrote:
If you had read the idcams manual you would know about using LVL instead of ENT


i don't have IDCAMS manual i jst know few commands. I will appreciate if you can send me a link for that or if you can guide by modifying some lines in my code.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Tue May 15, 2007 4:05 pm    Post subject:
Reply with quote

[url]http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/handheld/Connected/BOOKS/dgt1v403/CCONTENTS[/quote]
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Tue May 15, 2007 4:19 pm    Post subject:
Reply with quote

Or even icon_redface.gif

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/handheld/Connected/BOOKS/dgt1v403/CCONTENTS
Back to top
View user's profile Send private message
bhim_s

New User


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

PostPosted: Tue May 15, 2007 4:42 pm    Post subject:
Reply with quote

ofer71 wrote:
You can always use REXX with LISTDSI or SYSDSN.

O.


Hi

I have code the program using Clist but i don't have any idea how can I execute that using JCL & how JCL will take value from CLIST pgm. Please suggest.
Back to top
View user's profile Send private message
Phrzby Phil

Active Member


Joined: 31 Oct 2006
Posts: 967
Location: Richmond, Virginia

PostPosted: Tue May 15, 2007 5:54 pm    Post subject:
Reply with quote

How about eight IDCAMS steps?
Back to top
View user's profile Send private message
bhim_s

New User


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

PostPosted: Wed May 16, 2007 10:14 am    Post subject:
Reply with quote

Phrzby Phil wrote:
How about eight IDCAMS steps?


NO, we can't do that.... i discussed the same as you wrote eight steps with my team leader but he said try to do it in jst two steps. icon_sad.gif
Back to top
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Wed May 16, 2007 11:14 am    Post subject:
Reply with quote

If your team lead has design of what needs to be done then implement that method.

Anyways you can do below IDCAMS LISTC:

Code:
LISTC LVL(Z918788.TEST) HISTORY


And then go thru the IDCAMS output to check what dataset exists
Back to top
View user's profile Send private message
bhim_s

New User


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

PostPosted: Wed May 16, 2007 12:05 pm    Post subject:
Reply with quote

Devzee wrote:
If your team lead has design of what needs to be done then implement that method.

Anyways you can do below IDCAMS LISTC:

Code:
LISTC LVL(Z918788.TEST) HISTORY


And then go thru the IDCAMS output to check what dataset exists


No, he has not designed anything ... he wants me to do it in jst two steps.

i also can not use LVL because there some other datasets are also existing named

Code:
Z918788.TEST.JBB3
Z918788.TEST.JOB4
Z918788.TEST.JOB5

which i do not want to check.

Now I am trying to do it through CLIST. I have coded the following program for that..
Code:
PROC 0                                     
CONTROL NOMSG                             
SET VALUE = OK                             
SET JBB1   = 'Z918788.TEST.JBB1'           
SET JBB2   = 'Z918788.TEST.JBB2'           
SET JOB1   = 'Z918788.TEST.JOB1'           
SET JOB2   = 'Z918788.TEST.JOB2'           
SET JOB3   = 'Z918788.TEST.JOB3'           
SET JOB7   = 'Z918788.TEST.JOB7'           
SET JOB8   = 'Z918788.TEST.JOB8'           
SET JOB9   = 'Z918788.TEST.JOB9'           
SELECT &VALUE                             
WHEN  (&SYSDSN(&JBB1) | &SYSDSN(&JBB2)   +
     | &SYSDSN(&JOB1) | &SYSDSN(&JOB2)   +
     | &SYSDSN(&JOB3) | &SYSDSN(&JOB7)   +
     | &SYSDSN(&JOB8) | &SYSDSN(&JOB9))  +
DO                                         
WRITE DATASET FOUND                               
SET RETURN_CODE = 0                               
WRITE RETURN_CODE &RETURN_CODE                   
END                                               
OTHERWISE +                                       
DO                                               
WRITE ALL THE LISTED DATASETS HAVE BEEN DELETED FROM MVS
SET RETURN_CODE = 4                               
WRITE RETURN_CODE &RETURN_CODE                   
END                                               
END                                               
EXIT CODE(0)       

This program is working fine but i have no idea know how to use it with JCL and how to pass return code(set in code) to JCL

Bhim
Back to top
View user's profile Send private message
bhim_s

New User


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

PostPosted: Thu May 17, 2007 11:17 am    Post subject:
Reply with quote

Any update guys icon_question.gif icon_neutral.gif
Back to top
View user's profile Send private message
bhim_s

New User


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

PostPosted: Thu May 17, 2007 2:29 pm    Post subject:
Reply with quote

Thanks guys icon_smile.gif i have solved the problem i have used REXX Code instead of CLIST
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 Change NULL indicator in UNLOAD utility Khadhar Basha DB2 1 Fri Dec 15, 2017 3:01 pm
No new posts NULLFILE on ICEGENER Utility Ashishpanpaliya DFSORT/ICETOOL 5 Wed Nov 08, 2017 10:45 pm
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts REXX to get the all datasets name parasmalik20 CLIST & REXX 5 Tue Jul 18, 2017 9:10 pm
No new posts How to Use DebugTool CodeCoverage Uti... neo4u IBM Tools 0 Thu Jun 22, 2017 6:38 pm

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