IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Panel - Verify whether the field is blank or not


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
som_infotech

New User


Joined: 25 Feb 2006
Posts: 38
Location: chennai-india

PostPosted: Fri Jul 31, 2009 2:08 am
Reply with quote

I've designed the below popup screen and it has 2 fields. Using Ver() we can verify whether the field is blank or not. But my requirement is to check at least anyone of them has values.

Panel:
********* VERIFIER ********

ENTER THE PACKAGE 1 NO: _____
( - OR - )
ENTER THE PACKAGE 2 NO: _____

VER(&SPID,NB)
VER(&IPID,NB)

As per above code in the panel it will check both the fields are not blank but I need to check whether at least one of them is non blank.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Fri Jul 31, 2009 7:11 am
Reply with quote

Hi,

you could try something like this
Code:
 IF (VER(&SPID,NB))     
    ELSE                     
     VER(&IPID,NB)       



Gerry
Back to top
View user's profile Send private message
som_infotech

New User


Joined: 25 Feb 2006
Posts: 38
Location: chennai-india

PostPosted: Tue Aug 04, 2009 9:36 pm
Reply with quote

I tried the above statement but it was giving RC 20 - i.e An ELSE in column '6' did not match a previous IF statement. An ELSE in column '6' did not match a previous IF statement
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Aug 05, 2009 12:24 am
Reply with quote

laziness will take You nowhere,
why not look at the manual for the proper syntax

what about something along the lines of

Code:
IF (&FIELD1 EQ &Z)
   VER(&FIELD2,NONBLANK)

IF (&FIELD2 EQ &Z)
   VER(&FIELD1,NONBLANK) 
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Wed Aug 05, 2009 4:03 am
Reply with quote

Hi,

had I pasted what I had tested, it would have been ok,
instead I re-aligned the ELSE statement, so here we go again


Code:
)PROC                 
 IF (VER(&SPID,NB))   
 ELSE                 
     VER(&IPID,NB)     
)END                   


Gerry
Back to top
View user's profile Send private message
som_infotech

New User


Joined: 25 Feb 2006
Posts: 38
Location: chennai-india

PostPosted: Fri Aug 07, 2009 2:34 am
Reply with quote

Thanks a lot.. but when I press enter its not allowing to get out of the screen.. But the pointer is getting placed at second input...

so to place at first input i gave the below but it didnt work...

&SPID = .CURSOR
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Fri Aug 07, 2009 4:08 am
Reply with quote

What data is on the second input field?
Back to top
View user's profile Send private message
som_infotech

New User


Joined: 25 Feb 2006
Posts: 38
Location: chennai-india

PostPosted: Sat Aug 08, 2009 1:57 am
Reply with quote

I didnt enter any values on the screen, I just pressed enter.
It throwed error message. But the pointer was placed on second field.

Panel Design:
Code:

@ TYPE(TEXT)  SKIP(ON)                         
)BODY WINDOW(49,7)                             
%                                    |DATZ     
%    ¢*********+ LOADZ - VERIFIER ¢********   
%                                             
%     #ENTER THE!SUPER  PACKAGE#NO:=SPID @     
% #               ( - OR - )                   
%     #ENTER THE!SIMPLE PACKAGE#NO:=IPID @     
%                                             
)PROC                                         
 IF (VER(&SPID,NB))                           
 ELSE                                         
      VER(&IPID,NB)                           
 &PFGR  = .PFKEY                               
 &SPID = .CURSOR                               
)END                                           
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Sat Aug 08, 2009 3:45 am
Reply with quote

Quote:
I didnt enter any values on the screen, I just pressed enter.

It is working as designed, I think. By using VER with NB, You explicitly asked that the second field needs data. The user needs to type something there.

If that is not what you want, you need to re-think your logic. Or the user can press PF3 instead of Enter.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Join 2 files according to one key field. JCL & VSAM 3
No new posts Call program, directly from panel CLIST & REXX 9
No new posts How to move the first field of each r... DFSORT/ICETOOL 5
Search our Forums:

Back to Top