View previous topic :: View next topic
|
Author |
Message |
rikdeb
New User
Joined: 19 Jan 2009 Posts: 63 Location: hyderabad
|
|
|
|
Hi All..
Not much familiar with REXX. I am trying to design a rexx module where i will be using a panel(panel is there already built) to accept user input (say IDno) and write this IDno to a file.When multiple users through out the day uses the tool, IDnos will be appended to the file.
Could you please provide ur help and suggestions to proceed. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
allocate file as mod
Use EXCIO to write the data (Rexx variable is the same as the panel variable) |
|
Back to top |
|
|
rikdeb
New User
Joined: 19 Jan 2009 Posts: 63 Location: hyderabad
|
|
|
|
Hi..
Tried using the execio syntax , but could not find a proper solution.This is what i am trying. V3 is my pannel variable
Code: |
/* REXX TESTREXX */
START:
"DISPLAY PANEL(TST)"
IF PFPRSD = 'PF03' THEN
EXIT
ADDRESS "TSO"
"ALLOC FILE(OUT) DA('IXXXX.SORT.OUTPUT') MOD "
"EXECIO "V3.0" DISKW OUT (FINIS STEM V3"
"FREE F(OUT)"
EXIT
|
I want to append the IDnos
Using the above code, if i give the inpjut 2121..its giving wrong OP.
V2.1
...
V3.2118
V3.2119
V3.2120
V3.2121 |
|
Back to top |
|
|
rikdeb
New User
Joined: 19 Jan 2009 Posts: 63 Location: hyderabad
|
|
|
|
After several trials..i reached to a solution which i am sharing below..
But more enhanced/optimized solution if any , please provide. m just beginner in rexx
Code: |
/* REXX TESTREXX */
ADDRESS "ISPEXEC"
"LIBDEF ISPPLIB DATASET ID('I1XXX.REXX.PANEL')"
START:
"DISPLAY PANEL(TST)"
IF PFPRSD = 'PF03' THEN
EXIT
ADDRESS "TSO"
"ALLOC FILE(OUT) DA('IXXXX.REXX.OUTPUT') MOD "
"EXECIO 1 DISKW OUT (STEM "V3" FINIS)"
"FREE F(OUT)"
EXIT |
|
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Questions
If V3 is the panel defined variable, why are you using it as a stem ?
Why do you NOT check the return code from the allocation ?
Will this be used by concurrent users ? If yes then you really do need to check if the allocation worked or not.
Will there be multiple entries from one user - if so then that looks like they will need to re execute the REXX every time |
|
Back to top |
|
|
|