• Subject: Re: CLP - coding qualified object references
  • From: "Sally White" <salwhite@xxxxxxxxx>
  • Date: Sun, 1 Oct 2000 08:06:16 -0500

Dave:

This reply is w/o benefit of having an AS/400 to test with on a Sunday
morning. However, I believe that if you add one line of code to the program,
checking for a blank *jobd library, and filling in the value '*LIBL', it
should work.  I inserted the line in your program, below.

Regards,
Sallly White
SJSoftware, LLC

/* CLLE or CLP source member named TEST, compiled as a program */
pgm (&JobD &JobDLib)
dcl &JobD       *char 10
dcl &JobDLib    *char 10

If COND(&JobDLib *eq '  ') then(CHGVAR VAR(&JobDLib value('*LIBL'))

             ?          SBMJOB CMD(chgjob runpty(40)) JOB(testjob) +
                          JOBD(&jobdlib/&jobd)
                        MONMSG CPF6801  /* user pressed F12 to cancel */
endpgm

----- Original Message -----
From: "David Keck" <dkeck@idt.net>
To: <MIDRANGE-L@midrange.com>
Sent: Saturday, September 30, 2000 11:55 PM
Subject: CLP - coding qualified object references


> 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
> +---
>

+---
| 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 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.