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



Albert,

>It will always be called from a command line.
>
>Can you give me an example of how to use the API?

Here is a snippet from my code, written back in V3R1 or 2 so the field names are
short, etc.

     D JobIO2          DS
     D  BTrn                         10I 0 Inz(*Zero)
     D  BAvail                       10I 0 Inz(%Size(JobIO2))
     D  JobNam                       26    INZ('*')
     D   JobName                     10    Overlay(JobNam:1)
     D   UserName                    10    Overlay(JobNam:11)
     D   JobNbr                       6S 0 Overlay(JobNam:21)
     D  IntJobID                     16
     D  JobStatus                    10
     D  JobType                       1
     D  JobSubType                    1
     D  SbsName                      10
     D  RunPty                       10I 0
     D  SysPoolID                    10I 0
     D  PrcUnit                      10I 0
     D  AuxIOReq                     10I 0
     D  InterTrn                     10I 0
     D  RspTimeTtl                   10I 0
     D  FnType                        1
     D  FnName                       10
     D  ActJobSts                     4

     D ErrDS           DS
     D  BytPrv                       10I 0 Inz(%Size(ErrDS))
     D  BytAvl                       10I 0 Inz(*Zero)
     D  MsgID                         7
     D  ErrResv                       1
     D  ErrDta                      256

      * Stand-alone variables
     D CmdName         S             10
     D ApiFmt          S              8
     D ApiJob          S             26
     D ApiID           S             16

     C                   Call      'QUSRJOBI'                           90
     C                   Parm                    JobIO2
     C                   Parm                    BAvail
     C                   Parm      'JOBI0200'    ApiFmt
     C                   Parm      '*'           ApiJob
     C                   Parm                    ApiID
     C                   Parm                    ErrDS
      *
     C                   If        MsgID     = *Blanks and FnType = 'C'
     C                   Eval      CmdName   = FnName
     C                   Endif

If the command name was CALL, then I'd grab the program name from the call stack
and return that instead of CALL.  This process has worked well for me for the
last 5 years.

Doug



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.