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
 

 

validate the fields of a mainframe panel using REXX proc

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

New User


Joined: 09 Jun 2007
Posts: 6
Location: bangalore

PostPosted: Tue Feb 01, 2011 5:19 pm    Post subject: validate the fields of a mainframe panel using REXX proc
Reply with quote

Hi,

I have 20 panels with several fields as inputs. In most of them I have similar fields that need to be validated and their validation keeps changing based on my shops requirement.
My question here is, is there way I can write a REXX procedure to validate all the relevant fields and throw message back to panel.

Thanks in advance,
Hemanth
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: Tue Feb 01, 2011 5:23 pm    Post subject:
Reply with quote

Well, a Yes/No question deserves a Yes/No answer.

The answer is Yes

Or you could read the ISPF manuals to find out about VER
Back to top
View user's profile Send private message
Hemanth Kumar Guntupalli

New User


Joined: 09 Jun 2007
Posts: 6
Location: bangalore

PostPosted: Tue Feb 01, 2011 5:33 pm    Post subject: Reply to: validate the fields of a mainframe panel using REX
Reply with quote

Hi Expat,

That is really quick. Thanks. I see that using VER we can validate a variable in a single panel. Can you show some code of how to call a procedure in a panel to validate?

I went through this link http://publib.boulder.ibm.com/infocenter/zos/v1r9/index.jsp?topic=/com.ibm.zos.r9.f54dg00/ispzdg60164.htm

Thanks,
Hemanth [/url]
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: Tue Feb 01, 2011 6:07 pm    Post subject:
Reply with quote

You can build REXX in to an ISPF panel, or you can exit the panel to do the validation from a procedure and then redisplay the panel with the required messages.

AFIK, you can not call procedures from panels
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 641
Location: Whitby, ON, Canada

PostPosted: Tue Feb 01, 2011 6:14 pm    Post subject:
Reply with quote

PANEXIT is another option. The concept is similar to embedded Rexx, but it calls an external function.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 645
Location: Pennsylvania

PostPosted: Tue Feb 01, 2011 6:34 pm    Post subject:
Reply with quote

What I do is use VER with LISTV. Here is an example:
Code:
VER (&PANFLD1,NB,LISTV,&VALFLD1)


I load in all the valid values for FLD1 (with a space between them) into VALFLD1 in the REXX program before displaying the panel.

These valid values can be kept in a sequential file, a pds member or an ISPF Table (which I often use). This is all that needs to change when valid values are added or removed.

This should be enough to get you started.
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: Tue Feb 01, 2011 7:02 pm    Post subject:
Reply with quote

Dave,

Nice tip icon_fU.gif
Back to top
View user's profile Send private message
Hemanth Kumar Guntupalli

New User


Joined: 09 Jun 2007
Posts: 6
Location: bangalore

PostPosted: Wed Feb 02, 2011 10:36 am    Post subject: Reply to: validate the fields of a mainframe panel using REX
Reply with quote

Dave,

That's nice tip. But it doesn't work for me yet. Could you please review my code.

I have tried this way in my REXX program that calls the panel.

VALFLD = 'C E S R'

In the panel, I have given the below way.

VER (&CTY,NB,LISTV,&VALFLD,MSG=HEM00TC)

Please validate.

Thanks in advance,
Hemanth
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Feb 02, 2011 10:42 am    Post subject:
Reply with quote

Hello,

What happens? An abend? Syntax error? Unexpected/unwanted result?

What happens if you remove the MSG=HEM00TC?
Back to top
View user's profile Send private message
Hemanth Kumar Guntupalli

New User


Joined: 09 Jun 2007
Posts: 6
Location: bangalore

PostPosted: Wed Feb 02, 2011 10:52 am    Post subject: Reply to: validate the fields of a mainframe panel using REX
Reply with quote

Hi,

There is no abend. Even for a valid value the message panel is thrown.

My intention is not to remove the MSG panel, because I want this specific panel to be thrown in case of invalid value.

Thanks,
Hemanth
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Wed Feb 02, 2011 8:18 pm    Post subject: Reply to: validate the fields of a mainframe panel using REX
Reply with quote

Where do you put the VER statement? show us the panel.
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 641
Location: Whitby, ON, Canada

PostPosted: Wed Feb 02, 2011 9:09 pm    Post subject:
Reply with quote

You need to separate the values in VALFLD with commas. Just as if you were using LIST rather than LISTV.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 645
Location: Pennsylvania

PostPosted: Wed Feb 02, 2011 9:20 pm    Post subject:
Reply with quote

Don,

It may work with commas, but my experience is with spaces.

I have a dozen panels using spaces in between the values.

That is all I know.
Back to top
View user's profile Send private message
Hemanth Kumar Guntupalli

New User


Joined: 09 Jun 2007
Posts: 6
Location: bangalore

PostPosted: Thu Feb 03, 2011 10:31 am    Post subject: Reply to: validate the fields of a mainframe panel using REX
Reply with quote

Hi All,

Thanks for your time. LISTV is working for me if a program PROG calls PANELA. But, the same if PANELA calls PANELB, PANELB is not able to identify the variables defined my PROG.

How I achieved sofar..
In my PROG I have given
"ISPEXEC VPUT VALFLD PROFILE"

In my Panel in )INIT I have given
VGET (VALFLD) PROFILE

In )PROC I just used as LISTV,&VALFLD. it worked.

Now my question is about passing this global variable to susequent panels.

Please help me.

Thanks in advance,
Hemanth [/u]
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Thu Feb 03, 2011 12:44 pm    Post subject:
Reply with quote

You just need to add a VGET to the second panel....

O.
Back to top
View user's profile Send private message
Hemanth Kumar Guntupalli

New User


Joined: 09 Jun 2007
Posts: 6
Location: bangalore

PostPosted: Thu Feb 03, 2011 1:39 pm    Post subject: Reply to: validate the fields of a mainframe panel using REX
Reply with quote

Hi Guys,

Sorry. there is a mismatch of my variables. Please consider what I mentioned earlier working fine..

Thanks to all.
Hemanth
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Feb 03, 2011 8:26 pm    Post subject: Reply to: validate the fields of a mainframe panel using REX
Reply with quote

Good to hear it is working - thank you for posting the resolution icon_smile.gif

d
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 Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am
This topic is locked: you cannot edit posts or make replies. Urgent Mainframe Requirments (2-10 yr... Shankar779 Mainframe Jobs 0 Sun Nov 27, 2016 1:48 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
No new posts Access SQLCA fields inside a stored p... gangapd DB2 4 Thu Oct 27, 2016 10:20 am
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm


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