swapnilkumar


{ City } mumbai
< Country > india
* Profession *
User No # 36504
Total Questions Posted # 0
Total Answers Posted # 2

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 11
Users Marked my Answers as Wrong # 4
Questions / { swapnilkumar }
Questions Answers Category Views Company eMail




Answers / { swapnilkumar }

Question { CTS, 19253 }

How to identify where file is empty or not? How many ways are
there to identifying?


Answer

There are two ways to check for the file empty or not.
1) With FILEAID
2) With IEBPTPCH

//STEPXX EXEC PGM=FILEAID
//DD01 DD DSN=P1.SEQUEN.INPUT.FILE,DISP=SHR
//DD01O DD DUMMY
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD DUMMY
other is

//STEPXX EXEC PGM=IEBPTPCH
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=P1.SEQUEN.INPUT.FILE,DISP=SHR
//SYSUT2 DD DUMMY
//SYSIN DD DSN=SYS1.CTLLIB(P1CTL),DISP=SHR

where CTL card has
PRINT TYPORG=PS,CNTRL=1

The either of above step gets RC=04 then the file is empty
else if its zero then file has some data in it.

Is This Answer Correct ?    5 Yes 2 No

Question { UST, 8716 }

If i have defined an temperory dataset in step2, how can i
call back or use the same dataset in step5 of the same job


Answer

Temporary data set can be accessed as mentioned below.

//STEP02 EXEC PGM=PGM1
//SYSOUT DD
SYSOUT=*
//SYSUDUMP DD
SYSOUT=*
//INPCTL DD DSN=SYS1.PROD.CTLLIB(P89CTL),DISP=SHR
//DATEFILE DD DSN=P1.DATEFILE,DISP=SHR
//OUTCTL DD DSN=&&TMP01,DISP=
(NEW,PASS,DELETE),
// UNIT=PROD,SPACE=(TRK,
(10,10),RLSE),
// DCB=
(RECFM=FB,LRECL=80,BLKSIZE=0)

This can be reffered in step 05 as:

//STEP05 EXEC PGM=FTP,PARM='(EXIT TIMEOUT 300'
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//OUTPUT DD SYSOUT=*
//INPUT DD DISP=SHR,DSN=SYS1.PROD.CTLLIB(P89CLT2)
// DD DSN=&&TMP01,DISP=SHR

Check for the &&TMP01 named temporary data set

Is This Answer Correct ?    6 Yes 2 No