PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 12/09/2016 2:13 PM by  John Henley
Has anyone successfully parsed out job parameters from the GEN(LAW).JOBSTEP table?
 7 Replies
Sort:
You are not authorized to post a reply.
Author Messages
b.svr
Programmer Analyst II
Private
New Member
(8 points)
New Member
Posts:4


Send Message:

--
12/08/2016 3:21 PM

    It seems like this is one jumbled text field that isn't very readable. Has anyone come up with a good way to parse this out for something more readable?

     

    Thank you,

    Karen Sheridan
    Private
    Private
    Veteran Member
    (325 points)
    Veteran Member
    Posts:123


    Send Message:

    --
    12/08/2016 3:26 PM
    Depending on what you are trying to do, have you looked at the output from jobdump?
    John Henley
    Private
    Private
    Senior Member
    (9563 points)
    Senior Member
    Posts:3205


    Send Message:

    --
    12/08/2016 3:38 PM
    Can you describe more about what you're trying to accomplish?, and what tools (i.e. are you trying to use SQL to parse?)?
    Thanks for using the LawsonGuru.com forums!
    John
    Todd Mitchell
    Senior IT Specialist
    Gordon Food Service
    Veteran Member
    (153 points)
    Veteran Member
    Posts:67


    Send Message:

    --
    12/09/2016 6:16 AM

    I have used both sql and perl to access and update the job parameters.

    b.svr
    Programmer Analyst II
    Private
    New Member
    (8 points)
    New Member
    Posts:4


    Send Message:

    --
    12/09/2016 10:06 AM
    We are attempting to create a readable report that reports detailed information from the table.

    I'm using SQL for this purpose. The job information up to the parameters are fine -- this field is just one big text blob. We are trying to make it more readable and usable.

    For example, if we wanted to report on a multi step requisition import job we would like the following information to be able to be reported on:
    based on
    Job Name, Program, Parameter
    IMPORTJOB,RQ500, Import File: File.txt
    IMPORTJOB, PO100, Buyer: SS
    IMPORTJOB, PO100, Combine PO Lines: N
    IMPORTJOB, PO100, Release Purchase Orders: Y
    etc.

    Is this something that could be accomplished by only using SQL?
    Jeff Shumate
    Private
    Private
    Advanced Member
    (87 points)
    Advanced Member
    Posts:29


    Send Message:

    --
    12/09/2016 11:05 AM
    Every job has different parameters, so the parsing will be different each time. But the format is consistent - just look at the program's .scr. Everything under "RUN-PARAMS" is what you would find in that parameter blob. The lengths of each field are in the 4th column. It includes fields that are only displayed - like company name - so when parsing you have to account for those as well. If the parameter screen has tabs, those take up space and have to be accounted for when parsing too.
    Jeff Shumate
    Private
    Private
    Advanced Member
    (87 points)
    Advanced Member
    Posts:29


    Send Message:

    --
    12/09/2016 11:07 AM
    And I think the best tools for updating the parameters are the batch APIs.
    John Henley
    Private
    Private
    Senior Member
    (9563 points)
    Senior Member
    Posts:3205


    Send Message:

    --
    12/09/2016 2:13 PM
    Jeff, the original poster's intent is to report on the jobs/parameters, not update them.

    As for the task at hand, the parameters for each batch program aren't stored in the GEN database, so as for accomplishing this task, I frankly think you're in for a tough job.

    In any event, here are some options/ideas:
    - The parameter definitions are stored as part of the form in each individual (binary) file associated with that form (called 'tranmaps') in the LAWDIR//map/default/ folder, with the .trm extension. You will also find an XML version of the form (which is used by Portal to render the form) in that same folder.
    - you can experiment with the scrgen utility (using -s or -c options) to generate either C or COBOL versions of the parameter definition; this is what the BCI / PFI 'maketypetree' utility uses. You could create a script that cycles through the batch programs, runs scrgen for each one, parses the output, and puts it into a database table. Not elegant, but do-able.
    - there is a utility called (appropriately) jobprmrpt that you can use (although you have to interactively enter the parameters) to generate the parameters page for each job
    Thanks for using the LawsonGuru.com forums!
    John
    You are not authorized to post a reply.