MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Experts help needed in my REXX Code

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
mask-of-zorro
Beginner


Joined: 19 Nov 2005
Posts: 23
Topics: 10

PostPosted: Thu Jun 29, 2006 9:09 am    Post subject: Experts help needed in my REXX Code Reply with quote

Hi members,

I am given a task, to create an ISPF panel,get values from user & process it in REXX script,substitute the i/p variables in ISPF skeleton & append the skeleton o/p to a existing dataset.I am able to do the above tasks but still i am a novice in REXX & ISPF panel programming that i am learning REXX from my mistakes.I have written a not so good,crude REXX program and am not able to complete the code due to lack of knowledge on this.The timeline given for this is so stringent that i have to do this in 4 days(i am already in day2).Any help on this will be great.I have pasted my ISPF PANEL code,REXX code & ISPF Skeleton here.
Experts please help me in this regard..Atleast give me a sample code u would have written for a similar situation like this. Thanks for your time.


I am able to handle my panel code well but my REXX code & skeleton doesnt work the way i want.

ISPF PANEL CODE:
Code:

 )ATTR DEFAULT(%+_)                                           
     % TYPE(TEXT) INTENS(HIGH) COLOR(YELLOW)                   
     + TYPE(TEXT) INTENS(LOW) SKIP(ON)                         
     _ TYPE(INPUT) INTENS(HIGH) COLOR(GREEN) JUST(LEFT)       
     * TYPE(TEXT) INTENS(HIGH) COLOR(PINK)                     
     ~ TYPE(TEXT) INTENS(HIGH) COLOR(RED)                     
     # TYPE(TEXT) INTENS(HIGH) COLOR(WHITE)                   
 )BODY expand (//)                                             

 %         Name                : _Z          +                         
 %         Short Name          : _Z      +                     
 %         Code                : _Z                     +     
 %         Language            : _Z+         *

 % Do you wish to add more records? _Z#(~Y#or~N)
 +                                                 
 +                                                 
 +                                                 
 *       ENTER= capture              F3 = Exit +   

 )INIT                                         
    .ZVARS='(NAME SNAME CODE LANG CHCE)'                 
 &CHCE='N' 
)PROC                     
VER(&NAME,NB,MIX)     
VER(&SNAME,NB,MIX)       
VER(&CODE,NB,MIX)       
VER(&LANG,NB,MIX)
VER(&CHCE,NB,LIST,Y,N)       
)END


ISPF SKELETON:

00                                                       
)TB 1 77 78                                               
0001!X!100                                               
)TB 1 54 77                                               
0002A&NAME*A&SNAME*A&CODE!*A&LANG*!X
99


REXX CODE:
[code:1:556945f75a]
/*REXX */

ARG NAME SNAME CODE LANG CHCE
"ISPEXEC LIBDEF ISPPLIB DATASET ID('USERID.CLIST')"
"ISPEXEC LIBDEF ISPSLIB DATASET ID('USERID.SKEL')"


POS1:

"ISPEXEC DISPLAY PANEL(NEWPANE)"

DO WHILE RC
Back to top
View user's profile Send private message
ofer71
Intermediate


Joined: 12 Feb 2003
Posts: 358
Topics: 4
Location: Israel

PostPosted: Thu Jun 29, 2006 2:31 pm    Post subject: Reply with quote

Do the substitution of X in your REXX.
________
Daihatsu Mira Gino


Last edited by ofer71 on Sat Feb 05, 2011 11:36 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Thu Jun 29, 2006 2:33 pm    Post subject: Reply with quote

Shouldn't X have an ampersand in the skeleton?
Back to top
View user's profile Send private message Visit poster's website
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Thu Jun 29, 2006 2:42 pm    Post subject: Reply with quote

I was having a bit of difficuly understanding the logic. If you display a panel, then the user can enter the data and press Enter and process the entry, or enter END and leave. Why bother with the prompt "Do you wish to add more records"? Just return back to the panel each time and let the user decide what to do (add another entry or end).
Back to top
View user's profile Send private message
mask-of-zorro
Beginner


Joined: 19 Nov 2005
Posts: 23
Topics: 10

PostPosted: Fri Jun 30, 2006 3:06 am    Post subject: Reply with quote

Ppl,thanks for your time..

superk:

yes currently my code returns back to panel only,
It works like this cuurently,
the user enters the details on the panel
selects his choice as 'Y' or 'N' and presses enter

If choice is 'Y'
the code appends the skeleton to the output dataset, after substituting values from panel onto skeleton.
and comes back again to the panel for the user to enter his next record.

If choice is 'N'

The code just appends the skeleton to the dataset and comes back to ISPF screen.


Semigeezer & ofer71,

The problem with me is i dont know how to process the variable X(in skeleton) thru REXX code.yeah,it shud be as '&X' in my skeleton.. how can i assign values to X in my REXX code ..like for first record from panel, 'X' in skeleton shud have value A & for second record, X shud have value B and for third, X will be C & so on till the user has his choice as 'N' in the panel. I dont know how can i assign values from alphabet A-Z for X ,till the user presses N..

I dont know how to code the logic..how to increment A to B,B to C etc,..will stem variables logic help me ??? or will i have to code it 26 times redundantly(for alphabets A-Z) in my REXX to assign values to X.

Pls suggest me how to resolve this..



Thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group