Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to force PULL to read user-input instead of Stack

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
Andi1982

New User


Joined: 27 Mar 2008
Posts: 42
Location: Karlsruhe / Germany

PostPosted: Thu May 09, 2019 6:27 pm    Post subject: How to force PULL to read user-input instead of Stack
Reply with quote

Hey,

I have a REXX that reads LISTFILE into program stack. So there are 1000 items in the stack and I am iterating and pulling from it until it is empty. But now i have some items where I need user feedback. So I tried to do

Code:
Say 'You need to keep this file?' filename
pull answer
...


But instead of reading user Input from Terminal it takes the next item from the program stack. How can I force to read user Input from terminal even that there are items in program stack?

Best regards
Andi[/code]
Back to top
View user's profile Send private message

enrico-sorichetti

Senior Member


Joined: 14 Mar 2007
Posts: 10691
Location: italy

PostPosted: Thu May 09, 2019 6:32 pm    Post subject: Reply to: How to force PULL to read user-input instead of Stack
Reply with quote

just read the stack into a stem .
Back to top
View user's profile Send private message
Andi1982

New User


Joined: 27 Mar 2008
Posts: 42
Location: Karlsruhe / Germany

PostPosted: Thu May 09, 2019 6:33 pm    Post subject:
Reply with quote

You mean i should read all stack into stem and then push it back after i got my input?
Back to top
View user's profile Send private message
enrico-sorichetti

Senior Member


Joined: 14 Mar 2007
Posts: 10691
Location: italy

PostPosted: Thu May 09, 2019 7:00 pm    Post subject: Reply to: How to force PULL to read user-input instead of Stack
Reply with quote

why would You want to push it back ...

just process the stem
Back to top
View user's profile Send private message
Andi1982

New User


Joined: 27 Mar 2008
Posts: 42
Location: Karlsruhe / Germany

PostPosted: Thu May 09, 2019 7:01 pm    Post subject:
Reply with quote

icon_rolleyes.gif you are right ... sometimes it can be that easy...

thank you a lot for this hint!
Back to top
View user's profile Send private message
sergeyken

Active Member


Joined: 29 Apr 2008
Posts: 802
Location: Maryland

PostPosted: Thu May 09, 2019 10:23 pm    Post subject:
Reply with quote

Optionally manipulate with stack levels:

Code:
"NEWSTACK"    /* optional; program stack for input records */
"EXECIO * DISKR INPUTDD (FINIS"
Do iRec = 1 by 1 While Queued() > 0
   [Parse] Pull NewRecord
   If NeedToAskUser Then Do
      "NEWSTACK"    /* new program stack to isolate user's answer */
      Say 'You need to keep this file?' filename
      pull answer
      "DELSTACK"   /* return to previous stack level, to continue with data */
   End
End iRec
"DELSTACK"   /* optional; clean-up after reading file */
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts VSAM I/O - Extended Addressability - ... amitsjcntl JCL & VSAM 7 Mon Jul 06, 2020 3:51 pm
No new posts Force a Return Code and print error m... Rick Ryan SYNCSORT 30 Thu Jun 25, 2020 1:18 am
No new posts DITTO/ESA R3 User's Guide and Referen... Yoyok Aditias IBM Tools 2 Wed May 13, 2020 5:28 pm
No new posts Read a file dynamically without the d... Antonio A Negrelli COBOL Programming 4 Wed Apr 29, 2020 10:54 pm
No new posts Unable to download the JDBC driver to... mrayandutta Java & MQSeries 1 Tue Apr 28, 2020 8:59 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us