Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Panel edit question...

68 views
Skip to first unread message

Hill, Rick

unread,
Aug 5, 2004, 12:58:14 PM8/5/04
to
Greetings,

I've having some problems with edits on my panel. Seems to me that I read
someone's opinion that putting as many edits in the panel itself is better
than worrying about it in code.

The scenario: Typing a Y to release the files will write the table entries
to a flat file and submit a job. The job reads the file and creates JCL
(via Skeletons) to process the files. The date is used in the JCL as a
symbolic value. If the Override Date is keyed in, it must be (1) a
legitimate date, and (2) less than the Create Date.

Is there an easy way to code these edits directly in the panel? It would be
much easier to process the screen with out having to worry about validity
checks...


Row 1 to 10 of
10
Command ====> ________________________________________ Scroll ===> CSR_

File Link Input File Selection for RTMS Batch Cycle

Release All files to CHIPC1A _ (Y or N)

Account Input file to be transmitted to CHIPC1A Create Dt
Override
-------- -------------------------------------------- CCYYMMDD
CCYYMMDD
AMCASTLE FES.ABF.PREPROC.DATA.AMCASTLE.G0201V00 20040428
________
AMCASTLE FES.ABF.PREPROC.DATA.AMCASTLE.G0202V00 20040505
________
AMCASTLE FES.ABF.PREPROC.DATA.AMCASTLE.G0203V00 20040512
________
AMCASTLE FES.ABF.PREPROC.DATA.AMCASTLE.G0204V00 20040519
________
AMCASTLE FES.ABF.PREPROC.DATA.AMCASTLE.G0205V00 20040526
________
AMCASTLE FES.ABF.PREPROC.DATA.AMCASTLE.G0206V00 20040602
________
AMCASTLE FES.ABF.PREPROC.DATA.AMCASTLE.G0207V00 20040609
________
AMCASTLE FES.ABF.PREPROC.DATA.AMCASTLE.G0208V00 20040616
________
AMCASTLE FES.ABF.PREPROC.DATA.AMCASTLE.G0209V00 20040623
________
AMCASTLE FES.ABF.PREPROC.DATA.AMCASTLE.G0210V00 20040630
________
========================== End of File Selection
List==========================

The problem I'm having within my REXX is that I want to show the invalid
date and require it to be corrected. Zdtsels only works the first time for
me - once I get the error, I am not programmatically obliged to correct it.
If I don't touch the field again, the invalid date is accepted. There could
be multiple screens, which is why I need to show the invalid date - If I
clear it, they might miss the error message and presume the entry was valid
when releasing the files and, subsequently, pass the wrong date to the
JCL...

Thanks,
Rick

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LIST...@VM.MARIST.EDU with the message: INFO TSO-REXX

Dave Salt

unread,
Aug 5, 2004, 2:14:01 PM8/5/04
to
Hi Rick,

It was probably me who you remember saying to put as many edits in a panel
as possible so I feel somewhat obligated to respond to your question :-)

Dealing with tables is a lot more complicated than dealing with regular
panels. This is especially true if (as in my case) you design your tables to
work in a somewhat similar fashion to ISPF member lists. For example, if you
support the use of multiple line commands and the ability to execute line
commands from the primary command line (e.g. "S *" to select every row) and
the ability to sort the table by any column using point-and-shoot column
headings (etc. etc.).

Given the above, imagine a scenario where someone enters a valid (or
invalid) primary command, and also enters a combination of valid and invalid
line commands, and also points the cursor at a point-and-shoot column
heading, and also presses a function key to scroll! If all of these are done
at once, controlling events in the proper sequence can be pretty
challenging. Through trial and error I've found different things that help
make life a little easier, two of which are as follows:

1) Try to have no more than one input field in a table row (i.e. a line
command field which can be used to select individual rows). All other fields
displayed on each row should be output only. If someone wants to update a
row, they should select it using a line command (e.g. "U" for Update). At
this point, the REXX program calls a sub-program to handle the update. The
sub-program does no table processing; it simply displays a standard, non
scrollable ISPF panel with values from the table row displayed in individual
input fields. The user updates any fields they wish to change and normal
editing is performed by the panel (if possible) or REXX (if required). When
all editing is complete, control returns to the calling program.

2) Despite the examples given in the ISPF manuals, I strongly recommend that
line command fields are made part of the ISPF table. When the main program
gets control, it should load all the line commands into the ISPF table.
Then, it loops back and starts processing each line command one at a time.
Believe me, once I switched to doing things this way table processing became
MUCH easier!

I'm sorry I haven't answered your question directly but so much of the
answer depends on how you're processing the table; for example, I can't tell
from the screen snapshot you sent whether fields are input or output. But if
you follow the recommendations I just gave, all editing of values in a table
row will be performed by ordinary, non-scrollable ISPF panels and therefore
there's nothing complicated about it. I hope this helps!

Dave Salt
Soft-Center Solutions Inc.
http://www.soft-center.com
1-877-SoftCen
Bringing you SimpList(tm) - The easiest, most powerful way to surf a
mainframe!

_________________________________________________________________
Don t just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/

Hill, Rick

unread,
Aug 6, 2004, 8:34:14 AM8/6/04
to
Thanks Dave,

I ended up with a hybrid of your recommendation.

Rather than having my Customer key in "U" and the date override, I simply
added an display field of "E" when I fail an edit. I also added a count to
keep track of how many "E"s there are. I don't allow the datasets to be
released if the count is > 0. I guess simply isn't a valid word to use in
this context. The wall hurts where I banged my head against it to try and
figure out what to do.

This way, my Customer only keys in override dates and the "Y" to release the
datasets for processing. And, I didn't have to create another panel

As for my screen, everything is output only except for Release datasets
switch and the override date column. The only panel edits I have is on the
release field ('Y', 'N', or ' ') and the override date (PICT 99999999). I
didn't want to make my Customer type in slashes to accommodate the VER IDATE
or SDTDATE options...


Press PF1 for details


Command ====> ________________________________________ Scroll ===> CSR

8 ERROR(S) FOUND

File Link Input File Selection for RTMS Batch Cycle

Release All files to CHIPC1A _ (Y or N)

Account Input file to be transmitted to CHIPC1A Create Dt Override

-------- -------------------------------------------- CCYYMMDD CCYYMMDD

AMCASTLE FES.ABF.PREPROC.DATA.AMCASTLE.G0201V00 20040428 20040400
E
AMCASTLE FES.ABF.PREPROC.DATA.AMCASTLE.G0202V00 20040505 20040004
E
AMCASTLE FES.ABF.PREPROC.DATA.AMCASTLE.G0203V00 20040512 20040000
E
AMCASTLE FES.ABF.PREPROC.DATA.AMCASTLE.G0204V00 20040519 20050518
E
AMCASTLE FES.ABF.PREPROC.DATA.AMCASTLE.G0205V00 20040526 00000525
E
AMCASTLE FES.ABF.PREPROC.DATA.AMCASTLE.G0206V00 20040602 20040603
E
AMCASTLE FES.ABF.PREPROC.DATA.AMCASTLE.G0207V00 20040609 20040609

AMCASTLE FES.ABF.PREPROC.DATA.AMCASTLE.G0208V00 20040616 20040615

AMCASTLE FES.ABF.PREPROC.DATA.AMCASTLE.G0209V00 20040623 20041322
E
AMCASTLE FES.ABF.PREPROC.DATA.AMCASTLE.G0210V00 20040630 20040532
E


========================== End of File Selection
List=========================


Esssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
sN
e One or more override dates is invalid, indicated by "E" on the right. The
e
e override must be a valid date (format CCYYMMDD) and less than the file
e
e creation date.
e
Dsssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
sM

Rick


Hi Rick,

----------------------------------------------------------------------

Jeremy C B Nicoll

unread,
Aug 6, 2004, 10:32:18 AM8/6/04
to
In article
<9C79F2D39765D411B189...@USPLM208.txpln.us.eds.com>,
"Hill, Rick" <rick...@EDS.COM> wrote:

[It was me who argued the points with Dave... However I agree with
everything he said in his reply to you.]

> The only panel edits I have is on the release field ('Y', 'N', or '
> ') and the override date (PICT 99999999).

You can go a little further, easily. Suppose an override field is
named 'OVER', then you can do something like:

VER (&OVER PICT 99999999)
IF (.MSG EQ &Z)
&YEAR = TRUNC(&OVER,4) &REST = .TRAIL
&MNTH = TRUNC(&YEAR,2) &DAYS = .TRAIL
VER (&YEAR RANGE 2000 2100)
VER (&MNTH RANGE 01 12)
VER (&DAYS RANGE 01 31)

however this has the disadvantage that if there's an error ispf can't
align the cursor on the right field because it doesn't know what 'year'
etc are. You can get around that eg by temporarily reassigning a test
value into &over and then restoring the original value eg:

VER (&OVER PICT 99999999)
IF (.MSG EQ &Z)
&SAVE = &OVER
&YEAR = TRUNC(&OVER,4) &REST = .TRAIL
&MNTH = TRUNC(&YEAR,2) &DAYS = .TRAIL

&ZEDSMSG = &Z
&ZEDLMSG = 'Year must be 2000 - 2100.'
&OVER = &YEAR VER (&OVER RANGE 2000 2100 MSG=ISRZ001)

IF (.MSG EQ &Z)
&ZEDLMSG = 'Month must be 01-12.'
&OVER = &MNTH VER (&OVER RANGE 01 12 MSG=ISRZ001)

IF (.MSG EQ &Z)
&ZEDLMSG = 'Day must be 01-31.'
&OVER = &DAYS VER (&OVER RANGE 01 31 MSG=ISRZ001)

&OVER = &SAVE

The technique of testing the .MSG control variable is useful because
it's only set non-null if a previous piece of validation has set a
display message up. So if it is null, every field looked at so far has
been fine.

You could go a little further and check day-number based on the month
value, and you could even code an explicit list of leap years and make
the tests dependent on that. However, at least the last time I wrote a
panel for real, which was a while ago, there's no way to do arithmetic
on values (eg determining if an arbitrary year is leap or not using
integer division) unless you get into the realm of panel exits.

Ispf panels traditionally use message texts stored in message libraries
which is great for a vendor product, but cumbersome for local
utilities. I found it a useful compromise to use ISRZ000/001 etc and
set up the texts on the panels. The code above presets each error
message that could be displayed immediately before each test that might
result in a message display.

--
Jeremy C B Nicoll - my opinions are my own.

Mary Smith

unread,
Aug 6, 2004, 11:13:24 AM8/6/04
to
Hi,
Where would I find Manuals to learn about Panel definitions and writing REXX code to create, invoke and add functionality to Panels ? Please advise.

Thanks,

Mary.

"Hill, Rick" wrote:

&OVER = &SAVE


---------------------------------
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!

Robert Zenuk

unread,
Aug 6, 2004, 11:24:46 AM8/6/04
to
Here is the link to the ISPF Bookshelf:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/Shelves/ISPZPM10

The ISPF Dialog Developer's Guide has all the panel stuff (and much more)
The ISPF Service Guide shows how to invoke the ISPF services from within REXX


Hope This Helps,

Rob

Steve Comstock

unread,
Aug 6, 2004, 11:43:55 AM8/6/04
to
In a message dated 8/6/2004 9:13:36 AM Mountain Daylight Time,
mary...@YAHOO.COM writes:

> Hi,
> Where would I find Manuals to learn about Panel definitions and writing
> REXX code to create, invoke and add functionality to Panels ? Please advise.
>
> Thanks,
>
> Mary.

We offer a five day course "Developing Dialog Manager Applications in z/OS"
that pretty much covers the waterfront.

For details, see:

http://www.trainersfriend.com/a810descrpt.htm

Kind regards,

-Steve Comstock
The Trainer's Friend, Inc.
1-800-993-8716
303-393-9716

Dave Salt

unread,
Aug 6, 2004, 2:17:51 PM8/6/04
to
Hi Rick,

I'm glad you have it working. If something got "messed up" would it cause a
lot of damage? If so (and having been burned by this myself in the past), I
strongly suggest you do some INTENSE negative testing to ensure you've
covered all the bases. For example, try various combinations of ALL of the
following:

1) Valid/invalid command entered on the command line
2) Valid/invalid line commands entered
3) Valid/invalid dates entered (where some lines are selected and others are
not selected)
4) Quotes/apostrophes/ampersands/special characters entered as part of the
input
5) When error detected, ignore it and press ENTER/function key again
6) When error detected, ignore it and enter new combination of all of the
above (e.g. enter valid and invalid values both above and below the line
where the current error was detected)
7) When error detected, fix it and enter new combination of all of the above
8) Function key pressed (e.g. "DOWN") instead of ENTER in combination with
all of the above

If everything works perfectly in all of the above situations you deserve a
medal! Good luck with it,

Dave Salt
Soft-Center Solutions Inc.
http://www.soft-center.com
1-877-SoftCen
Bringing you SimpList(tm) - The easiest, most powerful way to surf a
mainframe!

>From: "Hill, Rick" <rick...@EDS.COM>


>Reply-To: TSO REXX Discussion List <TSO-...@VM.MARIST.EDU>

>----------------------------------------------------------------------
>For TSO-REXX subscribe / signoff / archive access instructions,
>send email to LIST...@VM.MARIST.EDU with the message: INFO TSO-REXX

_________________________________________________________________
Take advantage of powerful junk e-mail filters built on patented Microsoft.
SmartScreen Technology.
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines
Start enjoying all the benefits of MSN. Premium right now and get the
first two months FREE*.

Jeremy C B Nicoll

unread,
Aug 6, 2004, 7:11:38 PM8/6/04
to
In article <2004080615131...@web90002.mail.scd.yahoo.com>,

Mary Smith <mary...@YAHOO.COM> wrote:
> Hi, Where would I find Manuals to learn about Panel definitions and
> writing REXX code to create, invoke and add functionality to
> Panels ? Please advise.

I'm sorry I don't know what the current manual set is called, but they
used to be called "ispf dialog management".

The code I suggested was based on stuff I developed by experimentation
quite a few yeas ago. Things have undoubtedly got more versatile, but
I'm no longer at work so can't try them out.

Hill, Rick

unread,
Aug 9, 2004, 8:58:20 AM8/9/04
to
Dave,

Thank you for your testing suggestions. As luck would have it, I'm 8 for 8.
I'm going to invite a couple other people to pound on it today, just to see
what they might try... Then, it'll be time to introduce the panel to my
Customer.

Rick


-----Original Message-----
From: Dave Salt [mailto:ds...@HOTMAIL.COM]
Sent: Friday, August 06, 2004 1:18 PM
To: TSO-...@VM.MARIST.EDU
Subject: Re: Panel edit question...


Hi Rick,

I'm glad you have it working. If something got "messed up" would it cause a

>----------------------------------------------------------------------
>For TSO-REXX subscribe / signoff / archive access instructions, send
>email to LIST...@VM.MARIST.EDU with the message: INFO TSO-REXX

_________________________________________________________________


Take advantage of powerful junk e-mail filters built on patented Microsoft.
SmartScreen Technology.
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=htt
p://hotmail.com/enca&HL=Market_MSNIS_Taglines
Start enjoying all the benefits of MSN. Premium right now and get the
first two months FREE*.

----------------------------------------------------------------------

0 new messages