Posted: Thu Jan 11, 2007 11:59 am Post subject: Display error on ISPF Panel but maintain user-entered variab
I'm working with TSO/ISPF in batch mode. my entire apps front end is written in Dialog Manager, and i'm having a problem finishing up a new panel. my panel has 2 date variables that the user can enter. i've defaulted each of these dates in the )INIT section, &BEGDAT to 19960104, and &ENDDAT to the current date. "&BEGDAT" can be changed, but &BEGDAT must be a valid business day.
my CLIST calls a program to verify the date, and i set the error using SETMSG and then DISPLAY the panel for any date that is a weekend or holiday. (since SETMSG hasn't helped, i switched recently to coding ISPEXEC DISPLAY statements for each error, setting the message for each condition. previously, i just set different messages, and then skipped to the end of the CLIST where the ISPEXEC DISPLAY was coded.
the problem i'm having is between the PANEL and the CLIST handling the error properly. i want user's date to redisplay, not my default date i set in )INIT. i want the user to keep giving me dates until they hit on a valid business day. i coded a )REINIT section because SETMSG wasn't getting me anything, and i see the )REINIT executing my statements when i code individual ISPEXEC DISPLAY statements in the CLIST, rather than SETMSG
eg of what i want to happen:
20061202 is a weekend. when the user attempts to use this, the error i set in the CLIST SETMSG command shows up, but my default date redisplays, because the )INIT section of my PANEL is being executed. so, what the user will see is an error but not his date.
then the user will recognize this as a weekend, but maybe not know if it's Saturday or Sunday, so then the user will try 20061203, (which is a Sunday), get the message it's a weekend, and try another date 20061204 until he gets a valid business day.
but, for the case of my example, if 20061204 was a holiday, he should get another error message, and select 20061205, which would finally pass my date edits, and submit a program for batch processing. (the program submit is the goal of the PANEL/CLIST.)
i've been reading a 1985 manual on Dialog Manager, but haven't found the magic combination of PANEL and CLIST commands/settings to be successful. i've tried specifying the DISPLAY in the CLIST without a panel name, but that only gives me the right message on the first error. the second error either kicks me off the panel or produces a different error.
i've tried coding an IF statement in the )INIT section to bypass initializing the BEGDAT variable, if the .MSG is nonblank, but i get a ISPF error on that line.
i've done many things to try to get this to work, and by now you should know that i'm a 'beginner' or newer. this seems like something so simple, and i'm dancing all around the right way, but i'm still coming up short. what is the piece i'm missing?
i have no other examples to look at, none of our other PANELS are coded with default settings, and maybe this is why? nobody can figure this out?
Try to call dislplay without the panel name (i.e DISPLAY instead of DISPLAY PANEL(XYZ)) wen error is encountered. The INIT section is executed every time when you passing the panel name.
yes i did try that. i wrote that in the middle of my original posting, that it only works for the first error condition. subsequent attempts at finding a suitable date result in either kicking me off the panel, or executing the )INIT again, and overlaying my default date but still showing the error message.
i just finished looking at the online manual for Dialog Manager. it looks exactly like my 1985 version, so i'm disappointed by that.
i was hoping i would find a "new" error handling section in the manual, or something like that. so far, i'm surprised by the difficulty i'm having.
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