• Subject: Re: CLP - coding qualified object references
  • From: Carel Teijgeler <teygeler@xxxxxxx>
  • Date: Sun, 01 Oct 2000 13:13:51 +0200

David Keck wrote:

> How can I code a CLP to accept the two parameters Job Description and *JOBD
> Library, such that when they are used as parameters on an embedded SBMJOB
> command they are properly respected ?  The following test program works fine
> with a named *JOBD and Library (Test#1 below).  However the program fails
> when the special value *USRPRF is specified for the *JOBD (Test#2 below), no
> matter how I  specify the *JOBD Library on the call.  -DaveK
>
> /* CLLE or CLP source member named TEST, compiled as a program */
> pgm (&JobD &JobDLib)
> dcl &JobD       *char 10
> dcl &JobDLib    *char 10
>
>              ?          SBMJOB CMD(chgjob runpty(40)) JOB(testjob) +
>                           JOBD(&jobdlib/&jobd)
>                         MONMSG CPF6801  /* user pressed F12 to cancel */
> endpgm
> ---------------------------------------------------------------------
> TEST#1 - successful test with a named *JOBD and Library
> call test (ABC XYZ)
>                                Submit Job (SBMJOB) - partial display
> Job description  . . . . . . . . > ABC           Name, *USRPRF
>   Library  . . . . . . . . . . . >   XYZ         Name, *LIBL, *CURLIB
> ---------------------------------------------------------------------
> TEST#2 - Note the error message at bottom
> call test (*USRPRF ' ')
>                                Submit Job (SBMJOB) - partial display
>   Job description  . . . . . . . . > *USRPRF       Name, *USRPRF
>    Library  . . . . . . . . . . . >   ' '         Name, *LIBL, *CURLIB
>  Value '*USRPRF   ' for parameter JOBD not a valid name.
> ---------------------------------------------------------------------
>
> +---
> | This is the Midrange System Mailing List!
> | To submit a new message, send your mail to MIDRANGE-L@midrange.com.
> | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
> | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator: david@midrange.com
> +---

David,

*USRPRF is not a qualified name, but a single value on the parameter. Therefore
the value of the library may not be changed. The best solution is to test the
value of parameter &jobd before prompting.

Carel Teijgeler



+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.