Page 1 of 1

Read the input file given by user

PostPosted: Thu Apr 07, 2011 2:48 am
by cooldude14344
I have a screen built on an ISPF panel which gets the input file from user and submits the job using ISPF File-Tailoring skeletons. Now I would like to read the input file given by user. Please let me know which command to use?

the file input stored in variable
inputf = 'xxx.fgg...rtt'

Re: Variable

PostPosted: Thu Apr 07, 2011 5:39 am
by DFSHDC40
ALLOC is good - that makes the file available to your program (script for the kiddies)
EXECIO lets you read (or write the file)
The fine manuals (Rexx Reference and TSO commands , both on the TSO bookshelf ) will tell all
Or Edit Macros (ISPF ) offer another alternative
All depends what you want to achieve

Re: Variable

PostPosted: Thu Apr 07, 2011 11:17 am
by NicC
My reading of your change is that instead of the user keying in the dataset name on a purpose built panel he now puts it into a dataset (using edit?) that dataset is to be read and the filename put into the same variable as it would have done if it had been entered through the panel. After that the code is the same.
DFSHDC40 has pointed to the correct manuals but...if the user is just keying it into the dataset you lose the ability to edit the name at the point of entry the main edit being 'is it a valid dataset name format?' and a check can be made for the dataset existing - using SYSDSN I think - and bugging the user if it does not.