Without (very much
) implied criticism, it would have been better to post this in the TSO & ISPF forum, and to use Code tags to ensure proper alignment of the panel code (particularly important because, unlike most languages, indentation is significant in DMS).
You're missing a right parenthesis and an )END statement at the end of your code. You also haven't defined a command field, so even if you successfully add a "DS" option, the user would have no place to enter it. I think that you omitted, intentionally or otherwise, several lines at both the beginning and the end of your panel.
A new option is added as an additional cause in the TRUNC statement. The general format is:
&ZSEL = TRUNC(command-field option,command[ option,command ...] *,command)
is almost always zcmd
be something else, but I'd want to hear a good explanation why if one of my analysts did use something else). option
is of course "1", "2", "BUCKLE", "MY", "SCHÃœ", and the like. command
, naturally, depends on what you're doing. The terminal splat (*) is "any input not otherwise defined".
Names of panels, execs, etc. may differ between our sites, so what works for me may not for you, and vice versa; but start with this:
@ type(input) hilite(uscore) caps(on)
%Command ===>@ZCMD %
% .* .*
% .* +2 %Edit .*
% .* +3 %Utility .*
% .* +6 %Command .*
% .* +SD %SDSF .*
% .* +DS %Dslist .*
% .* +X %eXit .*
% .* .*
&ZSEL = TRANS ( TRUNC (&ZCMD,'.')
2,'PGM(ISREDIT) PARM(P,ISREDM01) SCRNAME(EDIT)'
DS,'PGM(ISRUDL) PARM(ISRUDLP) SCRNAME(DSLIST)'
SD,'PGM(ISFISP) NOCHECK NEWAPPL(ISF) SCRNAME(SDSF)'
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day