Posted: Wed Dec 07, 2016 8:40 am Post subject: Passing Dataset name from REXX Panel to REXX EXEC
How can I pass my input dataset name from the REXX Panel to my REXX exec.?
The dataset is a FB File and will be used in the REXX EXEC Program as input file for a DFSORT Step. In the Panel, I have defined the Input File as INPFL and using it in the REXX EXEC in the SORT STEP as follows:
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
Posted: Thu Dec 08, 2016 4:17 am Post subject:
no such thing as a rexx panel - panels are not a part of rexx but ispf. If yu are netering the dta set name into the panel, once you exit the panel then rexx should know the value in INPFL - as long as that is the variable used in the panel. _________________ Utility and Program control cards are NOT, repeat NOT, JCL.
Thank you Kolusu.
I tried the PULL statement.
I am getting 'DATASET NOT FOUND'.
It is not recognizing the dataset from the REXX Panel.
Following is the code I tried:
Code:
GET_INP_FILE:
PARSE UPPER PULL 'INPFL'
SAY SYSDSN('INPFL')
RETURN
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
Posted: Thu Dec 08, 2016 6:28 am Post subject:
Well, your $ attribute specifies an data entry field. Have you entered data into that field? What do you get when you display INPFL? What is the dataset name in your error message? has your user id been pre-pended onto it? If yes then try putting quotes around the name when you enter it. _________________ Utility and Program control cards are NOT, repeat NOT, JCL.
Hi Nic,
Following is what I enter on the ISPF panel:
Code:
FILE SORTING AND REMOVING DUPS
File Name => 'TEST.SORT.INPUT01.DEC0616'
Record Length => 80
Key Position => 14
Key Length => 10
MESSAGE =>
ENTER -> Execute PF3 -> End
where 'TEST.SORT.INPUT01.DEC0616' is an existing file. As suggested, I had given the DS name insed single quotes.
Following is the Trace o/p for the following piece of REXX exec code and the code after that:
Code:
GET_INP_FILE:
PARSE UPPER PULL 'INPFL'
SAY SYSDSN('INPFL')
RETURN
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
Posted: Fri Dec 09, 2016 7:17 am Post subject:
Priya
End your code snippets with [/code].
I do not see your panel being called. Your get_inp_file procedure is being called from somewhere which you do not show. It is also unnecessary if you are entering the data set (not file) name on a panel. Rexx will know about it once you have pressed enter or pf3. You should initialise INPFL before use - at the top of your program. If it is created in a sub-routine then a higher level of code may not know about it.
PULL defaults to UPPER so your PULL statement should be
Code:
Pull inpfl
Say 'INPFL = 'inpfl
Rexx is case insensitive.
However, as noted before, you do not need a pull statement. _________________ Utility and Program control cards are NOT, repeat NOT, JCL.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum