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

How to handle error conditions on date in dev panel


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

Active User


Joined: 26 Nov 2008
Posts: 125
Location: chennai

PostPosted: Tue Dec 30, 2008 8:03 pm
Reply with quote

if you user enter wrong date on the developed screen then how to validate

Code:
                   YEAR   MONTH   DATE 
 ENTER AFCDATE  : _YYYY+  _MM+    _DT+ 


I/P YYYY = 2008, MM=02 & DT=31

how to validate thru pannel and panel must throw message like below example

ex : if 2008 then message should be thrown as "month range from 01 - 29"
if 2009 then message should be thrown as "month range from 01 - 28"
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Dec 30, 2008 8:10 pm
Reply with quote

Have you looked at the VER (verify) statements that can be used in panels ?
Back to top
View user's profile Send private message
nkothako

Active User


Joined: 26 Nov 2008
Posts: 125
Location: chennai

PostPosted: Tue Dec 30, 2008 8:16 pm
Reply with quote

Following VER statements already coded for below reasons
Code:

VER (&YYYY,NB,NUM,MSG=GFCEF000)             
VER (&YYYY,NB,RANGE,2001,2015,MSG=GFCEF001)
                                           
VER (&MM,NB,NUM,MSG=GFCEF002)               
VER (&MM,NB,RANGE,01,12,MSG=GFCEF003)       
                                           
VER (&DT,NB,NUM,MSG=GFCEF004)               
VER (&DT,NB,RANGE,01,31,MSG=GFCEF005)       


message
Code:
GFCEF000   'INVALID YEAR ' .ALARM=YES               
'GFCEF000  YEAR MUST BE NUMERIC'                   
GFCEF001   'INVALID YEAR ' .ALARM=YES               
'GFCEF001  YEAR MUST BE NUMERIC & 2001 - 2015 ONLY'

GFCEF002   'INVALID MONTH' .ALARM=YES               
'GFCEF002  MONTH MUST BE NUMERIC'                   
GFCEF003   'INVALID MONTH' .ALARM=YES               
'GFCEF003  MONTH MUST BE NUMERIC & 01 - 12 ONLY'   
 
GFCEF004   'INVALID DATE' .ALARM=YES               
'GFCEF004  DATE MUST BE NUMERIC'                   
GFCEF005   'INVALID DATE' .ALARM=YES               
'GFCEF005  DATE MUST BE NUMERIC & 01 - 31 ONLY'     


In this case 31 is valid but does not my above req
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Tue Dec 30, 2008 9:45 pm
Reply with quote

Use an IF statement to check if the month is 2 and if true, then use a different VER statement.
Back to top
View user's profile Send private message
nkothako

Active User


Joined: 26 Nov 2008
Posts: 125
Location: chennai

PostPosted: Wed Dec 31, 2008 11:10 am
Reply with quote

Have handled this case through rexx

thanks alot for your help
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 Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
Search our Forums:

Back to Top