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
 

 

REXX pgm not waiting for pull verb

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

Active User


Joined: 11 Apr 2008
Posts: 144
Location: Jamshedpur

PostPosted: Sat Apr 26, 2008 4:34 pm    Post subject: REXX pgm not waiting for pull verb
Reply with quote

I have a loop, where I'm asking the user 3 questions, which he has to answer. Two answers are being asked at top of loop and third one at end of loop.

When it's entering the loop for first time, it's asking two question but then it is not waiting for the third answer to be entered and then loop goes infinite without asking any question (not even the first two).

What might be the error?
Back to top
View user's profile Send private message

saiprasadh

Active User


Joined: 20 Sep 2006
Posts: 154
Location: US

PostPosted: Sat Apr 26, 2008 4:42 pm    Post subject:
Reply with quote

Hi Tushar,

Can you post the code

Thanks
Sai
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10255
Location: italy

PostPosted: Sat Apr 26, 2008 5:04 pm    Post subject: Reply to: REXX pgm not waiting for pull verb
Reply with quote

Quote:
What might be the error?


guess what??

certainly not a REXX interpreter one
how can we tell without seeing the code

http://catb.org/~esr/faqs/smart-questions.html
Back to top
View user's profile Send private message
saurabh39
Warnings : 1

Active User


Joined: 11 Apr 2008
Posts: 144
Location: Jamshedpur

PostPosted: Mon Apr 28, 2008 9:51 am    Post subject: Reply to: REXX pgm not waiting for pull verb
Reply with quote

Hi All,

The code i am using is -
Code:

USERCHOICE="N"                                                     
ENDOFLOOP="N"                                                     
DO WHILE ENDOFLOOP="N"                                             
   SAY 'ENTER THE PDS NAME(IF BASELINE DONT ENTER ANYTHING)'       
   PULL PDS                                                       
   PDSLIB = STRIP(PDS,B," ")                                       
   IF PDSLIB=" " THEN                                             
      PDSLIB=CHGMAN.CARD.DBRMLIB                                   
   ELSE NOP                                                       
   SAY 'ENTER THE MEMBER NAME'                                     
   PULL USERMEM                                                   
   MEMBER = STRIP(USERMEM,B," ")                                   
   QUEUE "//"USERRACF"J JOB (@),'BIND   BQ150',CLASS=0,MSGCLASS=R," 
   QUEUE "//         NOTIFY=&SYSUID"                               
   .........
   .........       
   QUEUE "//*"                                         
   IF USERCOND="Y" THEN                                 
      ENDOFLOOP="Y"                       
   ELSE NOP                               
   SAY "DO YOU WANT TO ENTER MORE MEMBER" 
   PULL CHOICE                             
   USERCOND = STRIP(CHOICE,B," ")         
 END                                       
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Mon Apr 28, 2008 2:06 pm    Post subject: Reply to: REXX pgm not waiting for pull verb
Reply with quote

maybe I'm wrong but at first sight you are asking for a field wich the user has not entered yet:

First:
Code:
IF USERCOND="Y" THEN                                 
   ENDOFLOOP="Y"                       
ELSE NOP                               

Second:
Code:
SAY "DO YOU WANT TO ENTER MORE MEMBER"
PULL CHOICE                             
USERCOND = STRIP(CHOICE,B," ")   
Back to top
View user's profile Send private message
saurabh39
Warnings : 1

Active User


Joined: 11 Apr 2008
Posts: 144
Location: Jamshedpur

PostPosted: Mon Apr 28, 2008 2:17 pm    Post subject: Reply to: REXX pgm not waiting for pull verb
Reply with quote

Hi,

Probably that might be the case.
But whatif i initialize the variable.

Secondly, I went for that because, if user wants to run the loop 4 times, the loop should execute 5 times, thats the reason i went for choice,usercond and end of loop. Is there any simplest way of achieving it.

Laslty, how easier it is to code a panel then use it in program.Actually this program takes input from user quite a few times, so i thought why not use panels/screen but the problem is i haven't use panels till now and i don't have that much time, i have to finish it within 2 days so how easier it is to code panle and use it.
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 Apr 28, 2008 3:47 pm    Post subject:
Reply with quote

Panels are quite easy to design and use.

In your case, maybe one panel with up to 15 entries for one display
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Mon Apr 28, 2008 5:52 pm    Post subject: Reply to: REXX pgm not waiting for pull verb
Reply with quote

It's because of the QUEUE statements. You're entering data into the same stack that you're trying to use for the prompt responses. Try holding that information in a stem variable until you're ready to use it.
Back to top
View user's profile Send private message
saurabh39
Warnings : 1

Active User


Joined: 11 Apr 2008
Posts: 144
Location: Jamshedpur

PostPosted: Mon Apr 28, 2008 9:25 pm    Post subject:
Reply with quote

Hi Kevin,

Can you please be more elaborate on your answer.......i mean.......does the pull verb put the prompt into the same stack which the queue is using...........or whenever rexx finds a pull it searches the stack and that is when it waits but in this case since stack already has values the interpreter doesn't wait and takes it up from stack......

and last what is the solution should i put the queue in stem or the prompt into stem.

Regards,
Tushar
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
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Running an REXX EXEC implicitly sho7hills CLIST & REXX 3 Thu Apr 20, 2017 8:14 am
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm
No new posts Want to pull the job log into a Mainf... Jishu Mukherjee Compuware & Other Tools 9 Tue Mar 21, 2017 4:48 pm
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am


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