On Mon, 20 Jun 2011 15:36:34 -0400, Dan D <mvs-j...@sympatico.ca> wrote:

>I have an ISPF dialog that needs site specific information.  What the data
>is doesn't really matter, but it is not available in a control block and I
>do not want to maintain it in each users's ISPF profile.  My example below
>it just that, an example, not really the data to be passed.
>
>Rather than having an installation/user specify data by passed it via a
>SYSIN file or specifying it at the time the program is assembled, it was
>easy to create an ISPF panel with an )INIT section.  This also allows for
>expansion of data being passed.
>
>Let's say the dialog wants the the following information...
>)INIT
> &NAME='Walter'
> &DEPT='RACF Guru'
> &PHONE='555-654-3210'
>
>When the dialog issues...
>    ISPLINK CONTROL,'NONDISPL','ENTER '
>    ISPLINK DISPLAY,'USERINFO'
>The variables NAME, DEPT & PHONE will automatically be available to the code
>in an ISPF defined variable.
>
>Let's also say the user uses this dialog quite often and knows they will be
>selecting option 4 when presented with a selection list that is displayed
>AFTER the processing of this panel occurs.
>
>Prior to the addtion of the above code, the user could enter "DIALOG;4".
>Now they have to enter "DIALOG;;;4".
>
>This seems a little odd to me.  I wouln't expect "CONTROL,'NONDISPL'" to
>alter the command stack.

Thanks, Dan. I had missed that you set it up so the installation or user
would alter a different panel. You could, of course, have them alter your
dialog's first actual panel, but I can see the benefit to using a separate one.

I think you'll find that CONTROL NONDISPL is -not- altering the command
stack. Rather, in "DIALOG;4" I think you'll find that the ";4" is the
response to the first panel the dialog does a DISPLAY for, and it does not
matter that you've done a CONTROL NONDISPL. The important thing is you did a
DISPLAY, and the ";4" is returned to that panel.

I have a couple of suggestions:
(1) If USERINFO has a panel body, then the stacked command would be
available in the panel's command field (first input field in the body, or
some other input field named by  )BODY CMD(field-name). Have the )PROC
section return that field value to your dialog.

(2) Or, possibly, if USERINFO's )BODY statement specifies CMD() (indicating
there is no command field) then USERINFO won't capture the stacked command
at all.

-- 
Walt

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to