Hi,
I am using LISTDSI function to get the data for the PS entered by the user.
It is returning values also.(I tested it by displaying)
But the program is giving error, when i am using the values retrieved in the variables (e.g. say SYSRECFM, SYSLRECL and moving them to the program variables)
"ALLOC FI (F2) DA('"DATASET"') NEW
LRECL (REC_LEN) RECFM (REC_FORMAT) UNIT (UNIT_VALUE)
TRACKS SPACE (5,5) CATALOG"
IKJ56702I INVALID LOGICAL RECORD LENGTH, REC_LEN
IKJ56701I MISSING LOGICAL RECORD LENGTH+
IKJ56712I INVALID KEYWORD, REC_FORMAT
IKJ56701I MISSING A DECIMAL NUMBER FROM 0 TO 32760, A CHARACTER X, OR A NUMBER FROM 1 TO 16384 WITH K MULTIPLIER .
Joined: 12 Sep 2005 Posts: 46 Location: Paris France
Hi Ajay,
I tried a code exclusively for PS dataset :
Code:
******,***************************** Top of Data ******************************
000001,/* REXX */
000002,TRACE r
000003,say 'Enter DS name : '
000004,pull dataset
000005,X = LISTDSI("'"dataset"'" directory)
000006,recf = insert(',',sysrecfm,1,1)
000007,'allocate dataset(your dataset that will be create)',
000008, 'space('sysprimary','sysseconds')',
000009, 'LRECL('syslrecl') blksize('sysblksize')',
000010, 'dsorg('sysdsorg') recfm('recf')'
000011,EXIT
******,**************************** Bottom of Data ****************************
This code works fine in my shop. Caution you must insert a comma in sysrecfm variable. Look at the code on line 6 it's needed or else you will get an error as the one you describe in your message.