How to test whether the given data set is empty or not

44 views
Skip to first unread message

sivakum...@gmail.com

unread,
Aug 12, 2006, 3:28:43 AM8/12/06
to MFSTUDY
Hi frnds,

How ru , I am Siva Kumar just completed Mainframes course and i have
doubt that how test the given data set is empty or not thru JCL

Thanks if u can help me

Regards,

siva

rayapureddy sudhir

unread,
Aug 13, 2006, 10:12:16 PM8/13/06
to aravapal...@gmail.com, MFSTUDY
Hi siva,

Using this code, you can only

//*
//STEP10 EXEC PGM=CTEMPTDS,
// COND=(4,LT)
//*
//SYSUT1 DD DSN=ABC.ABCD.ABCD.t1,DISP=SHR
//* ABC.ABCD.ABCD.T1 is the file
// IF NOT ( STEP10.RC = 4000 ) THEN
//* The jcl code to be executed after this
//*
//*
//*
// ENDIF

Have a Nice day

bye,
Sudhir R


--- sivakum...@gmail.com wrote:


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

sivakum...@gmail.com

unread,
Aug 14, 2006, 11:32:22 AM8/14/06
to MFSTUDY
Hi sudhir,

Thanks for u r help. I think the following should also work

//SIVAJET JOB NOTIFY=&SYSUID
//STEP001 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//EMPTYDD DD DSN=SSS036.SIVAMAIN.JCL,DISP=SHR
//SYSIN DD *
PRINT INFILE(EMPTYDD) COUNT(1)
/*
//

PLEASE TRY ANY ONE THIS JCL AND TELL ME RESULT

If the maxcc=0 then we can predict that the given dataset is nonempty
If the maxcc=4 then we can predict that the given dataset is empty

It's just a trail if there is anything wrong let me know

waiting for anyone's reply

BYEE
SIVA

Reply all
Reply to author
Forward
0 new messages