View previous topic :: View next topic
|
Author |
Message |
HameedAli
Active User
Joined: 16 Apr 2009 Posts: 151 Location: India
|
|
|
|
Hi!
I have the below JCL step
Code: |
//DDIN DD DSN=ABCDEF.GHIJLJG.ETRUR(TEST1),DISP=SHR |
I use the below code to read the contents of the Disk in the DDIN DDNAME.
Code: |
"EXECIO * DISKR DDIN (STEM Code. FINIS "
"FREE FI(DDIN)" |
If I need the data set name 'ABCDEF.GHIJLJG.ETRUR(TEST1)' from which I have read the contents, in a variable. Is there any builtins for that? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
I believe it can be done |
|
Back to top |
|
|
HameedAli
Active User
Joined: 16 Apr 2009 Posts: 151 Location: India
|
|
|
|
Is there any builtins for the same? |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Take a look at the LISTDSI function using the FILE parameter |
|
Back to top |
|
|
HameedAli
Active User
Joined: 16 Apr 2009 Posts: 151 Location: India
|
|
|
|
I tried the below code
Code: |
/* REXX */
RCX = LISTDSI("'"TESTDD1"'" FILE)
SAY ' RC: 'RCX
SAY ' DSN: SYSDSNAME 'SYSDSNAME
SAY ' UNIT: SYSUNIT 'SYSUNIT
SAY ' DSORG: SYSDSORG 'SYSDSORG
SAY ' RECFM: SYSRECFM 'SYSRECFM
SAY ' LRECL: SYSLRECL 'SYSLRECL
SAY ' BLKSIZE: SYSBLKSIZE 'SYSBLKSIZE
SAY ' UNIT: SYSUNITS 'SYSUNITS
SAY ' PRIMARY: SYSPRIMARY 'SYSPRIMARY
SAY ' SECOND: SYSSECONDS 'SYSSECONDS |
Code: |
//VALIDATE EXEC PGM=IKJEFT01,PARM='TEST'
//SYSEXEC DD DSN=MY.LIBRARY,DISP=SHR
//SYSTSIN DD DUMMY
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//TESTDD1 DD DSN=MY DATASET,DISP=SHR |
I get the message as
Code: |
IKJ56701I MISSING DSNAME |
|
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Example #2 from the manual:
To retrieve information about the DD called APPLPAY, you can use LISTDSI as follows:
ddinfo = LISTDSI("applpay" "FILE") |
|
Back to top |
|
|
HameedAli
Active User
Joined: 16 Apr 2009 Posts: 151 Location: India
|
|
|
|
Code: |
/* REXX */
DDINFO = LISTDSI("TESTDD1" "FILE")
SAY ' DSN: SYSDSNAME 'SYSDSNAME |
Even for the above, I get the same message
Code: |
IKJ56701I MISSING DSNAME |
|
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
This works for me
Code: |
X = LISTDSI("DUMPREF FILE")
DUMPDSN = SYSDSNAME
SAY DUMPDSN
|
|
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
I tested and got the
Code: |
IKJ56701I MISSING DSNAME |
message as long as I had
Code: |
//VALIDATE EXEC PGM=IKJEFT01,PARM='TEST' |
when I changed it to
Code: |
//VALIDATE EXEC PGM=IKJEFT01 |
the message went away and the results were precisely as expected from the manual. |
|
Back to top |
|
|
HameedAli
Active User
Joined: 16 Apr 2009 Posts: 151 Location: India
|
|
|
|
Code: |
/* REXX */
X = LISTDSI("DUMPREF FILE")
DUMPDSN = SYSDSNAME
SAY DUMPDSN |
Code: |
//VALIDATE EXEC PGM=IKJEFT01,PARM='TEST'
//SYSEXEC DD DSN=MY LIBRARY,DISP=SHR
//SYSTSIN DD DUMMY
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//DUMPREF DD DSN=MY.DATASET,DISP=SHR |
Code: |
IKJ56701I MISSING DSNAME
READY
END |
I get the same message expat |
|
Back to top |
|
|
Douglas Wilder
Active User
Joined: 28 Nov 2006 Posts: 305 Location: Deerfield IL
|
|
|
|
It works fine for me.
Code: |
/* REXX LISTDSN */
trace OFF
PARSE UPPER ARG DDN REST
IF LENGTH(DDN) > 0 THEN DO
RCX = LISTDSI(DDN "FILE")
SAY ' DSN: SYSDSNAME ' SYSDSNAME
END
ELSE DO
SAY 'PARM DDNAME MISSING'
END
Exit |
Code: |
//STEP02 EXEC PGM=IKJEFT01,PARM='LISTDSN TESTDD1'
//SYSEXEC DD DSN=HLQ.REXX.EXEC,DISP=SHR
//SYSTSIN DD DUMMY
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//*TESTDD1 DD DSN=HLQ.TEST.INPUT,DISP=SHR
//TESTDD1 DD DSN=HLQ.TEST.GDG(+1),
// DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=0),
// DISP=(NEW,CATLG,DELETE),
// UNIT=DISK,SPACE=(CYL,(1,1),RLSE) |
Code: |
DSN: SYSDSNAME HLQ.TEST.GDG.G0007V00
READY
END |
|
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
//VALIDATE EXEC PGM=IKJEFT01,PARM='TEST'
You know, that's a really poor choice of a name to use for a REXX exec, since TEST is a TSO command. Either change the name to something better, or make sure you use an implicit request for the exec named TEST by specifiying %TEST. |
|
Back to top |
|
|
|