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



Ken, 

Wrong API.  That API only retrieves from a user space.  You need the ones 
that create the user space, and writes the job information to the user 
space.
Go to infocenter and look up work management api's

On a lighter side, I don't use QUSRTVUS.  I prefer pointers and QUSPTRUS. 
It actually makes for cleaner, easier to understand, and faster code. 
Trust me, I was pointer phobic as the next fellow, but this is about one 
of the dandiest uses of pointers out there.

Rob Berendt
-- 
"They that can give up essential liberty to obtain a little temporary 
safety deserve neither liberty nor safety." 
Benjamin Franklin 




"Graap, Ken" <keg@nwnatural.com>
Sent by: midrange-l-bounces@midrange.com
01/22/2003 01:17 PM
Please respond to Midrange Systems Technical Discussion
 
        To:     "'Midrange Systems Technical Discussion'" 
<midrange-l@midrange.com>
        cc:     "'drasch@mail.win.org'" <drasch@mail.win.org>
        Fax to: 
        Subject:        RE: The order of WRKUSRJOB


Dan - 

Investigate using the QUSRTVUS API instead...

Here is an example:

Kenneth

-----Original Message-----
From: Dan Rasch [mailto:drasch@mail.win.org]
Sent: Wednesday, January 22, 2003 9:02 AM
To: Midrange Systems Technical Discussion
Subject: The order of WRKUSRJOB



We have an application that copies the results of WRKUSRJOB 
to a file and parses the results to see if the user is already running
a job via either SYS REQ or another session somewhere.

We have run into a problem where the WRKUSRJOB sometimes returns 
a blank job name (which for the interactive sessions equates to the 
workstation).  The program logic compares this value to the workstation
value retrieved from the job attributes. 

We are seeing the WRKUSRJOB return (sometimes):

Opt  Job        User      Type    ----Status----  Function
___  COMPYCRT3  USER01    INTER   ACTIVE          PGM-ARST01CL
                          INTER   GROUP           GRP-QEZGRP2

and then, sometimes:

Opt  Job        User      Type    ----Status----  Function
___  COMPYCRT3  USER01    INTER   GROUP           GRP-QEZGRP2
                          INTER   ACTIVE          PGM-ARST01CL
 
The first version works great.  We can link the ARST01CL program to 
workstation COMPYCRT3 and compare it to the workstation value retrieved.
The second version is our problem.  The program is linked to a blank
workstation and throws us a curve.  The different order seems to be linked 

to the user value.  One user consistently gets version one, and the other 
version two.  At least so far.

What controls the order of the WRKUSRJOB panel?

TIA,

Dan Rasch - because if the human species concentrated on the really 
important things in life, there would be a shortage of fishing poles!
IBM Certified twice....... but still a couple PTFs away from Nirvana.

_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing 
list
To post a message email: MIDRANGE-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo.cgi/midrange-l
or email: MIDRANGE-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.

_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing 
list
To post a message email: MIDRANGE-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo.cgi/midrange-l
or email: MIDRANGE-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


  5722WDS V5R1M0  010525                  SEU SOURCE LISTING                    
        01/22/03 10:17:04                 PAGE    1

  SOURCE FILE . . . . . . .  SYSADMSRC/QPGMSRC
  MEMBER  . . . . . . . . .  CHKIPSTS

  SEQNBR*...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 
...+... 8 ...+... 9 ...+... 0
    100 /* ************************************************************** */    
                                        07/18/91
    200 /* PROGRAM DESCRIPTION :                                          */    
                                        07/18/91
    300 /*                                                                */    
                                        01/25/01
    400 /* CHECK TO SEE IF TCP/IP IS ACIVE. IF NOT SEND AN EXCAPE MESSAGE */    
                                        12/04/02
    500 /*                                                                */    
                                        07/18/91
    600 /* SPECIAL COMPILE OPTIONS:                                       */    
                                        07/18/91
    700 /*                                                                */    
                                        07/18/91
    800 /*    COMPILE USER(*OWNER)                                        */    
                                        12/04/02
    900 /*                                                                */    
                                        12/04/02
   1000 /*           WRITTEN BY: KEN GRAAP 11/26/02                       */    
                                        12/04/02
   1100 /*           UPDATED BY:                                          */    
                                        07/18/91
   1200 /*                                                                */    
                                        07/18/91
   1300 /* ************************************************************** */    
                                        07/18/91
   1400              PGM                                                        
                                        07/18/91
   1500 /* ************************************************************** */    
                                        07/18/91
   1600 /*                                                                */    
                                        07/18/91
   1700 /* DECLARE PROGRAM VARIABLES                                      */    
                                        07/18/91
   1800 /*                                                                */    
                                        07/18/91
   1900 /* ************************************************************** */    
                                        07/18/91
   2000              DCL        &ERRORSW *LGL                     /* Std err */
   2100              DCL        &MSGID *CHAR LEN(7)               /* Std err */
   2200              DCL        &MSGDTA *CHAR LEN(100)            /* Std err */
   2300              DCL        &MSGF *CHAR LEN(10)               /* Std err */
   2400              DCL        &MSGFLIB *CHAR LEN(10)            /* Std err */
   2500              DCL        VAR(&INLSIZE) TYPE(*DEC) LEN(6 0) VALUE(1000)   
                                        11/26/02
   2600              DCL        VAR(&SIZE) TYPE(*CHAR) LEN(4)                   
                                        11/26/02
   2700              DCL        VAR(&START) TYPE(*DEC) LEN(6 0) VALUE(133)      
                                        11/26/02
   2800              DCL        VAR(&LEN) TYPE(*DEC) LEN(4 0) VALUE(4)          
                                        11/26/02
   2900              DCL        VAR(&STRPOS) TYPE(*CHAR) LEN(4)                 
                                        11/26/02
   3000              DCL        VAR(&DATALEN) TYPE(*CHAR) LEN(4)                
                                        11/26/02
   3100              DCL        VAR(&RECEIVER) TYPE(*CHAR) LEN(1000)            
                                        11/26/02
   3200              DCL        VAR(&ENTRIES) TYPE(*DEC) LEN(8 0)               
                                        11/26/02
   3300 /* ************************************************************** */    
                                        07/18/91
   3400 /*                                                                */    
                                        07/18/91
   3500 /* GLOBAL MESSAGE MONITOR                                         */    
                                        07/18/91
   3600 /*                                                                */    
                                        07/18/91
   3700 /* ************************************************************** */    
                                        07/18/91
   3800              MONMSG     MSGID(CPF0000) EXEC(GOTO CMDLBL(STDERR1))       
                                        07/18/91
   3900 /* ************************************************************** */    
                                        07/18/91
   4000 /*                                                                */    
                                        07/18/91
   4100 /* USING API'S, CHECK TO SEE IF THE QTCPIP JOB IS ACTIVE.         */    
                                        12/04/02
   4200 /* IF THE JOB IS ACTIVE, THEN TCP/IP IS ACTIVE                    */    
                                        12/04/02
   4300 /* IF IT ISN'T, THEN TCP/IP IS DOWN, SO AN ESCAPE MESSAGE IS SENT */    
                                        12/04/02
   4400 /*                                                                */    
                                        12/04/02
   4500 /* ************************************************************** */    
                                        07/18/91
   4600                                                                         
                                        07/18/91
   4700              SAE        ID(CHKIPSTS) ENTDTA('The CHKIPSTS program +     
                                        11/26/02
   4800                           has been executed.')                          
                                        11/26/02
   4900                                                                         
                                        11/26/02
   5000              CHGVAR     VAR(%BIN(&SIZE)) VALUE(&INLSIZE)                
                                        11/26/02
   5100              CHGVAR     VAR(%BIN(&STRPOS)) VALUE(&START)                
                                        11/26/02
   5200              CHGVAR     VAR(%BIN(&DATALEN)) VALUE(&LEN)                 
                                        11/26/02
   5300                                                                         
                                        11/26/02







  5722WDS V5R1M0  010525                  SEU SOURCE LISTING                    
        01/22/03 10:17:04                 PAGE    2

  SOURCE FILE . . . . . . .  SYSADMSRC/QPGMSRC
  MEMBER  . . . . . . . . .  CHKIPSTS

  SEQNBR*...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 
...+... 8 ...+... 9 ...+... 0
   5400              CALL       PGM(QUSCRTUS) PARM('CHKIPSTS  QTEMP     ' +     
                                        12/04/02
   5500                           'PROD' &SIZE ' ' '*EXCLUDE' 'TCP/IP +         
                                        11/26/02
   5600                           STATUS CHECK')                                
                                        11/26/02
   5700                                                                         
                                        11/26/02
   5800              CALL       PGM(QUSLJOB) PARM('CHKIPSTS  QTEMP     ' +      
                                        11/26/02
   5900                           'JOBL0100' 'QTCPIP    *ALL      *ALL      +   
                                        12/04/02
   6000                           ' '*ACTIVE')                                  
                                        11/26/02
   6100                                                                         
                                        11/26/02
   6200              CALL       PGM(QUSRTVUS) PARM('CHKIPSTS  QTEMP     ' +     
                                        11/26/02
   6300                           &STRPOS &DATALEN &RECEIVER)                   
                                        11/26/02
   6400                                                                         
                                        11/26/02
   6500              CHGVAR     VAR(&ENTRIES) VALUE(%BIN(&RECEIVER 1 4))        
                                        11/26/02
   6600                                                                         
                                        11/26/02
   6700              IF         COND(&ENTRIES *GT 0) THEN(DO)                   
                                        11/26/02
   6800              SNDPGMMSG  MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA('TCP/IP +   
                                        11/26/02
   6900                           is active.')                                  
                                        11/26/02
   7000              DLTUSRSPC  USRSPC(QTEMP/CHKIPSTS)                          
                                        11/26/02
   7100              GOTO       CMDLBL(END)                                     
                                        11/26/02
   7200              ENDDO                                                      
                                        11/26/02
   7300                                                                         
                                        11/26/02
   7400              DLTUSRSPC  USRSPC(QTEMP/CHKIPSTS)                          
                                        12/04/02
   7500              SNDPGMMSG  MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA('TCP/IP +   
                                        12/04/02
   7600                           is NOT active.') MSGTYPE(*ESCAPE)             
                                        12/04/02
   7700                                                                         
                                        07/18/91
   7800 /* ************************************************************** */    
                                        07/18/91
   7900 /*                                                                */    
                                        07/18/91
   8000 /* NORMAL END OF PROGRAM                                          */    
                                        07/18/91
   8100 /*                                                                */    
                                        07/18/91
   8200 /* ************************************************************** */    
                                        07/18/91
   8300  END:        RETURN                                                     
                                        07/18/91
   8400 /* ************************************************************** */    
                                        07/18/91
   8500 /*                                                                */    
                                        07/18/91
   8600 /* STANDARD ERROR PROCESSING                                      */    
                                        07/18/91
   8700 /*                                                                */    
                                        07/18/91
   8800 /* ************************************************************** */    
                                        07/18/91
   8900  STDERR1:               /* Standard error handling routine */
   9000              IF         &ERRORSW SNDPGMMSG MSGID(CPF9999) +
   9100                           MSGF(QCPFMSG) MSGTYPE(*ESCAPE) /* Func chk */
   9200              CHGVAR     &ERRORSW '1' /* Set to fail ir error occurs */
   9300  STDERR2:    RCVMSG     MSGTYPE(*DIAG) MSGDTA(&MSGDTA) MSGID(&MSGID) +
   9400                           MSGF(&MSGF) MSGFLIB(&MSGFLIB)
   9500              IF         (&MSGID *EQ '       ') GOTO STDERR3
   9600              SNDPGMMSG  MSGID(&MSGID) MSGF(&MSGFLIB/&MSGF) +
   9700                           MSGDTA(&MSGDTA) MSGTYPE(*DIAG)
   9800              GOTO       STDERR2 /* Loop back for addl diagnostics */
   9900  STDERR3:    RCVMSG     MSGTYPE(*EXCP) MSGDTA(&MSGDTA) MSGID(&MSGID) +
  10000                           MSGF(&MSGF) MSGFLIB(&MSGFLIB)
  10100              SNDPGMMSG  MSGID(&MSGID) MSGF(&MSGFLIB/&MSGF) +
  10200                           MSGDTA(&MSGDTA) MSGTYPE(*ESCAPE)
  10300              ENDPGM


                                  * * * *  E N D  O F  S O U R C E  * * * *








As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.