Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 8500

CLIST & REXX :: Need help in REXX CALL program

$
0
0
Author: Raje1002
Subject: Need help in REXX CALL program
Posted: Wed Apr 19, 2017 11:18 pm (GMT 5.5)

Hi,

I have an requirement where am having list of datasets mentioned in a file, reading them one by one and passing to CALL program within the REXX to pull the file creation date and last used date.
Below is the code snippet, when am running this, the file name value is not being passed to CALL module. can you please help me

DSN='XXXX.DATASET.REPORT'
"ALLOC DD(INDD) DS('"DSN"') SHR REUSE"
"EXECIO * DISKR INDD(STEM L. FINIS"
"FREE DD(INDD)"
DO I=1 TO L.0
FNAME = SPACE(L.I,0)
SAY FNAME
CALL DATAINFO
END
EXIT 0
DATAINFO:
DSINFO=LISTDSI("'FNAME'")
IF DSINFO == 0 THEN
DO
SAY 'DATA SET CREATED...........:'SYSCREATE
SAY 'DATA SET LAST REFERENCED...:'SYSREFDATE
SAY 'DATA SET EXPIRATION DATE...:'SYSEXDATE
SAY DSINFO
END
ELSE
DO
SAY DSINFO
SAY 'DATA SET NOT FOUND!!'
END
RETURN


Input file:
AAA.BBB.CCC
BBB.CCC.DDD
CCC.DDD.EEE

Result comes as
AAA.BBB.CCC
16
DATA SET NOT FOUND!!
BBB.CCC.DDD
16
DATA SET NOT FOUND!!
CCC.DDD.EEE
16
DATA SET NOT FOUND!!
***
[/u]


Viewing all articles
Browse latest Browse all 8500

Trending Articles