× 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: Getting the jobs subsystem name
  • From: bvining@xxxxxxxxxxxx
  • Date: Thu, 10 Dec 98 12:22:10 CST

You can determine what subsystem a job is running in with the Retrieve
Job Information API.  The following sample CL determines, for the
active job, what subsystem it is active in and sends 'OK' if QCTL and
'NOT OK' if not QCTL.

The API documentation can be found in the Work Management APIs chapter
of the System API Reference.

Bruce

             PGM
             DCL        VAR(&SBS) TYPE(*CHAR) LEN(10)
             DCL        VAR(&RCVVAR) TYPE(*CHAR) LEN(256)
             CALL       PGM(QUSRJOBI) PARM(&RCVVAR X'00000100' +
                          'JOBI0200' '*' ' ')
             CHGVAR     VAR(&SBS) VALUE(%SST(&RCVVAR 63 10))
             IF         COND(&SBS = 'QCTL') THEN(DO)
                SNDPGMMSG  MSG(OK) TOPGMQ(*EXT)
                ENDDO
             ELSE       CMD(DO)
                SNDPGMMSG  MSG('NOT OK') TOPGMQ(*EXT)
                ENDDO
             ENDPGM

>
>Hi to all
>           I am planning to write one small package for backup. (i don't
>want use ibm ready made backup package)
>Inthat i am getting little bit doubt. Assume that i like to run my package
>only in QCTL subsystem. If any one try to
>run in different subsystem (like Qinter.... etc). It has to display error.
>How will i chk that. Pl. update me .
>
>with regards
>
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the RPG/400 Discussion Mailing List!  To submit a new         *
* message, send your mail to "RPG400-L@midrange.com".  To unsubscribe   *
* from this list send email to MAJORDOMO@midrange.com and specify       *
* 'unsubscribe RPG400-L' in the body of your message.  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.