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
 

 

Panel - Verify whether the field is blank or not

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: Panel - Verify whether the field is blank or not
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: 1703
Location: Australia

PostPosted: Fri Jul 31, 2009 7:11 am    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Wed Aug 05, 2009 12:24 am    Post subject: Reply to: Panel - Verify whether the field is blank or not
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: 1703
Location: Australia

PostPosted: Wed Aug 05, 2009 4:03 am    Post subject:
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    Post subject:
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

Senior Member


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

PostPosted: Fri Aug 07, 2009 4:08 am    Post subject: Reply to: Panel - Verify whether the field is blank or not
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    Post subject:
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

Senior Member


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

PostPosted: Sat Aug 08, 2009 3:45 am    Post subject: Reply to: Panel - Verify whether the field is blank or not
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    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 READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Alter &DATENS field in HEADER1 Angad DFSORT/ICETOOL 4 Mon Apr 24, 2017 11:49 am
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts outrec field outside range Danielle.Filteau SYNCSORT 10 Sat Mar 04, 2017 2:37 am


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