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
 

 

How to check the dataset availability?

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

New User


Joined: 19 Apr 2007
Posts: 3
Location: india

PostPosted: Mon Apr 23, 2007 11:27 am    Post subject: How to check the dataset availability?
Reply with quote

Hi , If in the prior step, if the dataset is not existing(Goes down with Jcl error),I want to send email notification about the failure of the job in the next step, My query is how to check the dataset availability?I want to do it for catalog procedure.
Thanks
Back to top
View user's profile Send private message

murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Mon Apr 23, 2007 11:49 am    Post subject:
Reply with quote

Viresh,


Code:
//CHKDS  EXEC PGM=IKJEFT01
//SYSTSPRT  DD SYSOUT=*
//SYSTSIN DD *
  LISTDS 'ISTEST.MURALI#'
/*


The above step throws maxcc 8, if the dataset is a non existent one.
Back to top
View user's profile Send private message
cvadlamudi

New User


Joined: 19 Apr 2007
Posts: 68
Location: India

PostPosted: Mon Apr 23, 2007 11:55 am    Post subject: Re: How to check the dataset availability?
Reply with quote

Hi,

u can also use IDCAMS utility with LISTCAT if there is no file then the RC will be 8.
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: Mon Apr 23, 2007 12:41 pm    Post subject:
Reply with quote

Hello,

Keep in mind that you can do nothing after the jcl error occurs - the job is already terminated. One of the above suggestions could be placed in the step immediately before the problem step and the job could proceed accordingly.

Please clarify this
Quote:
I want to do it for catalog procedure.
as i am unclear on what it means. . .

I'd suggest resolving the issue with the "missing" dataset. Why is it missing?
Back to top
View user's profile Send private message
viresh johri

New User


Joined: 19 Apr 2007
Posts: 3
Location: india

PostPosted: Mon Apr 23, 2007 1:08 pm    Post subject: Re: How to check the dataset availability?
Reply with quote

Its for Catalog procedure,As symbolica paramerters cant be use in catalog procedure.As my Dtaset name will change according to the TDate varibale(Daily).

The options are working for instream procedure , but not catalog procedure.
Is there any way to check in catalog procedures.?

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

Active User


Joined: 23 May 2006
Posts: 166
Location: chennai

PostPosted: Mon Apr 23, 2007 1:08 pm    Post subject:
Reply with quote

hey,

Quote:
u can also use IDCAMS utility with LISTCAT if there is no file then the RC will be 8.


Shouldn't it be an RC of 4 for non-existing files and ) for existing ones ?..
[/quote]
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: Mon Apr 23, 2007 1:38 pm    Post subject:
Reply with quote

Hello,

Symbolic parameters can be used in cataloged procedures. Who said that they cannot?

By "instream", do you mean proc&pend?

This
Quote:
The options are working for instream procedure , but not catalog procedure.
Is there any way to check in catalog procedures.?
is inconsistent. If it really is an instream proc, it will work like a cataloged proc.

Please post "both" sets of jcl and any error messages you received.
Back to top
View user's profile Send private message
viresh johri

New User


Joined: 19 Apr 2007
Posts: 3
Location: india

PostPosted: Mon Apr 23, 2007 2:32 pm    Post subject: Re: How to check the dataset availability?
Reply with quote

I have one proc , that 3 steps are there.I want to check the dataset availability for the 1st step , and according to it, I want to send email notification.I can't use symbolic parameters in the Proc , say i have proc 'x' in that i need to check the dataset availability.I cant give
//SYSIN DD *
LISTCAT ENTRIES('dataset name')
IF MAXCC=8 THEN SET MAXCC=4


My Query, how to give in catalog procedure, as i f create another member and give the LISTCAT ENTRIES('dataset name')
IF MAXCC=8 THEN SET MAXCC=4
, I t will trow error as my dataset name is everyday changing accordign to the date.
Back to top
View user's profile Send private message
raak

Active User


Joined: 23 May 2006
Posts: 166
Location: chennai

PostPosted: Mon Apr 23, 2007 2:34 pm    Post subject:
Reply with quote

Hi Dick,

one doubt in what u said..

My JCL for dataset checking is this..

Code:
//STEP1    EXEC PGM=IDCAMS           
//SYSIN    DD *                       
 LISTCAT ENT(XXXXX.YYYYYY.ZZZZZZ.DDMM)
/*                                   
//SYSOUT   DD SYSOUT=*               
//SYSMSG   DD SYSOUT=*               
//SYSPRINT DD SYSOUT=*               
//*   


So if i am getting this dataset
" XXXXX.YYYYYY.ZZZZZZ.DDMM " from the previous step and
in the previous step this DDMM is given as a symbolic parameter which changes everyday, then how do i code my IDCAMS step ?

Hope I am clear with my question...
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: Mon Apr 23, 2007 2:46 pm    Post subject:
Reply with quote

Raak, a very good question.

If you can get the variable dataset name into a dataset with a couple of spaces and close bracket, then you can use this with IDCAMS.

The example below is creating the dataset in the same job, but will hopefully show the principle of the idea. Give it a try.

Code:

//IEBGENER EXEC PGM=IEBGENER                                     
//SYSOUT   DD SYSOUT=*                                           
//SYSPRINT DD SYSOUT=*                                           
//SYSUT2   DD DSN=&&TEMP,DISP=(,PASS),                           
//            SPACE=(TRK,(2,2),RLSE),                             
//            RECFM=FB,LRECL=80                                   
//SYSUT1   DD *                                                   
         your dataset name    )                                   
/*                                                               
//*                                                               
//IDCAMS01 EXEC PGM=IDCAMS                                       
//SYSOUT   DD SYSOUT=*                                           
//SYSPRINT DD SYSOUT=*                                           
//SYSIN    DD *                                                   
 LISTC ENT(                                                     -
//         DD DSN=&&TEMP,DISP=(OLD,DELETE)                       
 )                                                               
/*                                                               
Back to top
View user's profile Send private message
cvadlamudi

New User


Joined: 19 Apr 2007
Posts: 68
Location: India

PostPosted: Mon Apr 23, 2007 3:32 pm    Post subject:
Reply with quote

We can send the Instream Data thru a Dataset rite...
i.e
Code:

  //STEP1 EXEC PGM=IDCAMS
  //SYSPRINT DD SYSOUT=*
  //SYSIN DD DSN=TESTHLQ.TESTLLQ.TLLQ1,DISP=SHR
  //SYSOUT DD SYSOUT=*


File TESTHLQ.TESTLLQ.TLLQ1 will contain
Code:

LISTCAT ENT(XXXXX.YYYYYY.ZZZZZZ.DDMM)


The file will get updated every time the job gets submitted and the parm file need to be updated with the sort utility or wat ever u like.. with the Dataset name created with DDMM...

If i am wrong correct me....
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 Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 4 Fri Mar 24, 2017 2:24 pm
No new posts Want to pull the job log into a Mainf... Jishu Mukherjee Compuware & Other Tools 9 Tue Mar 21, 2017 4:48 pm
No new posts Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am
No new posts JCL to get submitted once dataset has... vinu78 JCL & VSAM 17 Thu Feb 16, 2017 7:32 am
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm


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