Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Write records to output file pulling from panels

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
rikdeb

New User


Joined: 19 Jan 2009
Posts: 59
Location: hyderabad

PostPosted: Sun Nov 23, 2014 2:00 am    Post subject: Write records to output file pulling from panels
Reply with quote

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
View user's profile Send private message

Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1712
Location: UK

PostPosted: Sun Nov 23, 2014 4:51 am    Post subject: Reply to: Write records to output file pulling from panels
Reply with quote

allocate file as mod
Use EXCIO to write the data (Rexx variable is the same as the panel variable)
Back to top
View user's profile Send private message
rikdeb

New User


Joined: 19 Jan 2009
Posts: 59
Location: hyderabad

PostPosted: Sun Nov 23, 2014 3:54 pm    Post subject:
Reply with quote

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
View user's profile Send private message
rikdeb

New User


Joined: 19 Jan 2009
Posts: 59
Location: hyderabad

PostPosted: Sun Nov 23, 2014 11:40 pm    Post subject:
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Nov 24, 2014 2:57 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us