• Code to fetch name from mix number

    From Andrea Hardesty@21:1/5 to All on Wed Jul 21 12:33:33 2021
    Does anyone know of any ALGOL / COBOL / WFL code that would fetch the job name if given the mix number? As part of a bigger project, I need the ability to submit a mix number, and have it return the object name for the task with that mix number. Has
    anyone done anything like this, or have any example code I could use?

    Any help would be appreciated!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Peggy Quan@21:1/5 to andrean...@gmail.com on Thu Jul 22 08:29:39 2021
    On Wednesday, July 21, 2021 at 3:33:35 PM UTC-4, andrean...@gmail.com wrote:
    Does anyone know of any ALGOL / COBOL / WFL code that would fetch the job name if given the mix number? As part of a bigger project, I need the ability to submit a mix number, and have it return the object name for the task with that mix number. Has
    anyone done anything like this, or have any example code I could use?

    Any help would be appreciated!

    Using aseries_info call would be your best bet. there are good examples in the manual (mcp interfaces)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Kimpel@21:1/5 to Peggy Quan on Thu Jul 22 12:08:17 2021
    On 7/22/2021 8:29 AM, Peggy Quan wrote:
    On Wednesday, July 21, 2021 at 3:33:35 PM UTC-4, andrean...@gmail.com wrote:
    Does anyone know of any ALGOL / COBOL / WFL code that would fetch the job name if given the mix number? As part of a bigger project, I need the ability to submit a mix number, and have it return the object name for the task with that mix number. Has
    anyone done anything like this, or have any example code I could use?

    Any help would be appreciated!

    Using aseries_info call would be your best bet. there are good examples in the manual (mcp interfaces)


    There are a few APIs you can use to do this, including ASERIES_INFO that
    Peggy mentioned. None of them are trivial to use, and all of them
    require Algol skills.

    I've put together a simple DCALGOL library that can be called from ALGOL
    or COBOL and will retrieve both the task and job names given the mix
    number of the task. I've put the source code in a zip archive that you
    can download from here:

    https://drive.google.com/file/d/1WbHOjLRmTvO-de_gmnA1mACZw01hnMsS/view?usp=sharing

    This file has the source of the library and a small test program in PWB
    text file format, plus a WRAP container with the two sources as MCP files.

    The library (UTIL/TASKNAMELIB) has one entry point:

    INTEGER PROCEDURE GETTASKNAMES(MIXNR, TASKNAME, TASKNAMESIZE,
    JOBNR, JOBNAME, JOBNAMESIZE);

    TASKNAME and JOBNAME are EBCDIC ARRAYS; MIXNR, TASKNAMESIZE, JOBNR, and JOBNAMESIZE are all integers passed by name (actually, by reference).
    You pass in the mix number of a task and the routine returns the other
    five values. The procedure value is 1 if an error occurred, zero
    otherwise. See the comments in the source for other details.

    The library uses the SYSTEMSTATUS API to retrieve mix information. This
    use of SYSTEMSTATUS does not appear to require a privileged user. Note
    that SYSTEMSTATUS reports information directly from MCP tables, so the
    format of the data it returns can change across system releases. You may
    need to verify the library's use of the data when you install a new
    release, but this aspect of the API appears to have been very stable for
    the past several years.

    The test program is written in COBOL-85, but the library can be used
    with COBOL-74 as well. The program simply retrieves the names for its
    own mix number. Note that if you run this under CANDE or MARC, you'll
    get non-fatal SYSTEMSTATUS error #33 when the library attempts to
    retrieve the job name. The reason is that the "job" in this case is the session, which doesn't have a name. When I ran the program, I got this
    output:

    MIX# 4945, JOB# 4944, TASK NAME SIZE 29, JOB NAME SIZE 14 (PAUL)CANDE/NXEDIT/CODE49122.
    TASKNAME/TEST.

    The first line formats the integer parameters, the second line is the
    task name, and the third line is the job name.

    The library is very straightforward and does nothing to protect you from yourself. In particular, you need to take care that the arrays passed in
    for task and job names are large enough, as the library does not resize
    them. I'd recommend 256 characters minimum, and 300 if you have quoted
    nodes in file names.

    Feel free to contact me directly if you have any questions or issues
    with this code.

    Paul

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andrea Hardesty@21:1/5 to All on Fri Jul 23 06:18:27 2021
    Thank you both so much!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Doug Dobson@21:1/5 to Andrea Hardesty on Tue Nov 28 12:15:56 2023
    On Friday, July 23, 2021 at 8:18:28 AM UTC-5, Andrea Hardesty wrote:
    Thank you both so much!

    Sorry to be a bit late to join this party but that can be easily done using the PMIX utility. For example:

    U $SYSTEM/PMIX SELECT MIXNO=8394 SHOW MIXNO, USERCODE, NAME
    #RUNNING 8741
    #?
    PMIX Version 62.080.0005 Tuesday, November 28, 2023 14:08:19
    MixNo Usercode Name
    8394 SURE (SURE)OBJECT/RIS/API/FTP ON SYSPACK
    #ET=0.0 PT=0.0 IO=0.0

    U $SYSTEM/PMIX SELECT MIXNO=8268 SHOW MIXNO, USERCODE, NAME
    #RUNNING 8740
    #?
    PMIX Version 62.080.0005 Tuesday, November 28, 2023 14:02:03
    MixNo Usercode Name
    8268 *SYSTEM/BNA/SUPPORT
    #ET=0.0 PT=0.0 IO=0.0

    Doug Dobson
    GoldEye Software, LLC
    https://www.goldeyesoftware.com/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)