× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: CHGJOB from a CL pgm.
  • From: "Al Barsa, Jr." <barsa2@xxxxxxx>
  • Date: Fri, 11 Aug 2000 15:13:20 -0400

At 02:36 PM 8/11/00 -0400, you wrote:

HI -
There is a way in CL to display to the user, the command CHGJOB, and the program can prefill in certain values, pertaining to the user. However, it seems to only show the first screen only of the CHGJOB command, and not everything ( does not allow F10, which would bring up more). Is this a limitation, or am I missing something?
There is a technique in the command prompter called "selective prompting".  The CL Programming Book says:


6.5.2 Selective Prompting for CL Commands




You can request to prompt for selected parameters within a command. This is especially helpful when you are using some of the longer commands and do not want to
be prompted for certain parameters.

Selective prompting can be used during interactive prompting or entered as source (in SEU) for use within a CL procedure or program. You can enter the source for
selective prompting with SEU but you cannot use selective prompting while entering commands in SEU.

You can use selective prompting to:

     Select the parameters for which prompting is needed.

     Determine which parameters are protected.

     Omit parameters from the prompt.




The following restrictions apply to selective prompting:

     The command name or label must be preceded by a ? (question mark):

          When one or more of the selective prompt options is ?- (question mark, minus).

          To avoid getting a CPF6805 message (a message that indicates a diagnostic problem on the command although compilation is successful)




     Parameters can be specified by position but they cannot be preceded by selective prompt characters.

     A parameter must be in keyword form to be selectively prompted for.

     Blanks cannot be entered between the selective prompt characters and the keyword.

     Selective prompting is only applicable at a parameter level; that is, you cannot specify particular keyword values within a list of values.

     ?- is not allowed in prompt override programs.

     If a parameter is required, the ?? selective prompt must be used.

     You can tell that a parameter is required because the input slot is highlighted when the command is prompted.




User-specified values are marked with a special symbol (>) in front of the values in both selective and regular prompting. If a user-specified value on the parameter
prompt is not preceded by this symbol, the command default is passed to the command processing program.

If PASSATR(*YES) is specified on the PARM, ELEM, or QUAL command definition statement, and the default value is changed using the CHGCMDDFT
command, the default value is shown as a user-specified value (using the > symbol) and not a default value. If a default value of a changed PARM, ELEM, or QUAL
command definition statement is changed back to its original default value, the > symbol is removed.

You can press F5 while you are using selective prompting to again display those values initially shown on the display.

If a CL variable is used to specify a value for a parameter which is to be displayed through selective prompting, you can change the value on the prompt, and the
changed value is used when the command is run. The value of the variable in the procedure or program is not changed. If a CL procedure contains the following:

     OVRDBF ?*FILE(FILEA) ??TOFILE(&FILENAME) ??MBR(MBR1)



the three parameters, FILE, TOFILE, and MBR is shown on the prompt display. The value specified for the FILE parameter cannot be changed by you, but the values
for the TOFILE and MBR parameters can be changed. Assume that the CL variable &FILENAME has a value of FILE1, and you change it to FILE2. When the
command is run, the value of FILE2 is used, but the value of &FILENAME is not changed in the procedure. The following tables list the various selective prompting
characters and the resulting action.

    _____________ ______________ ______________ ______________ _____________ 
   |             |              |              | Value Passed |             |
   |             |              |              | to CPP if    |             |
   |             | Value        |              | Nothing      | Marked with |
   | You Enter   | Displayed    | Protected    | Specified    | > Symbol    |
   |_____________|______________|______________|______________|_____________|
   | ??KEYWORD() | Default      | No           | Default      | No          |
   |_____________|______________|______________|______________|_____________|
   | ??KEYWORD(VA|UValue        | No           | Value        | Yes         |
   |_____________|______________|______________|______________|_____________|
   | ?*KEYWORD() | Default      | Yes          | Default      | No          |
   |_____________|______________|______________|______________|_____________|
   | ?*KEYWORD(VA|UValue        | Yes          | Value        | Yes         |
   |_____________|______________|______________|______________|_____________|
   | ?<KEYWORD() | Default      | No           | Default      | No          |
   |_____________|______________|______________|______________|_____________|
   | ?<KEYWORD(VA|UValue        | No           | Default      | No          |
   |_____________|______________|______________|______________|_____________|
   | ?/KEYWORD() | Default      | Yes          | Default      | No          |
   |_____________|______________|______________|______________|_____________|
   | ?/KEYWORD(VA|UValue        | Yes          | Default      | No          |
   |_____________|______________|______________|______________|_____________|
   | ?-KEYWORD() | None         | N/A          | Default      | N/A         |
   |_____________|______________|______________|______________|_____________|
   | ?-KEYWORD(VA|UNone         | N/A          | Value        | N/A         |
   |_____________|______________|______________|______________|_____________|
   | ?&KEYWORD() | Default      | No           | Default      | No          |
   |_____________|______________|______________|______________|_____________|
   | ?&KEYWORD(VA|UValue        | No           | Default      | No          |
   |_____________|______________|______________|______________|_____________|
   | ?%KEYWORD() | Default      | Yes          | Default      | No          |
   |_____________|______________|______________|______________|_____________|
   | ?%KEYWORD(VA|UValue        | Yes          | Default      | No          |
   |_____________|______________|______________|______________|_____________|



+--------------------------------------------------+
| Please do not send private mail to this address. |
| Private mail should go to barsa@ibm.net.         |
+--------------------------------------------------+

Al Barsa, Jr. - Account for Midrange-L
Barsa Consulting, LLC.  
400 > 390

Phone:          914-251-1234
Fax:            914-251-9406
http://www.barsaconsulting.com
http://www.taatool.com

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.