Has anyone successfully parsed out job parameters from the GEN(LAW).JOBSTEP table?

Sort:
You are not authorized to post a reply.
Author
Messages
b.svr
New Member
Posts: 4
New Member

    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
    Veteran Member
    Posts: 141
    Veteran Member
      Depending on what you are trying to do, have you looked at the output from jobdump?
      John Henley
      Senior Member
      Posts: 3348
      Senior Member
        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
        Veteran Member
        Posts: 87
        Veteran Member

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

          b.svr
          New Member
          Posts: 4
          New Member
            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
            Advanced Member
            Posts: 31
            Advanced Member
              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
              Advanced Member
              Posts: 31
              Advanced Member
                And I think the best tools for updating the parameters are the batch APIs.
                John Henley
                Senior Member
                Posts: 3348
                Senior Member
                  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.