PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 1/17/2022 3:32 PM by  Jerry
How to assign a DistGrp using IPA
 13 Replies
Sort:
You are not authorized to post a reply.
Author Messages
Jerry
Consultant
Jerry McLeod LLC
Basic Member
(16 points)
Basic Member
Posts:6


Send Message:

--
1/7/2022 5:39 PM

    Is there a way to define a Report Distribution group to a batch job created using IPA Activity Node LWSNTXN (Lawson Transaction)?

    David Williams
    Private
    Private
    Veteran Member
    (3343 points)
    Veteran Member
    Posts:1125


    Send Message:

    --
    1/7/2022 6:05 PM
    You can only update the fields that are available on the form and Report Distribution doesn't show up there.
    David Williams
    Ragu Raghavan
    Private
    Private
    Veteran Member
    (1297 points)
    Veteran Member
    Posts:451


    Send Message:

    --
    1/7/2022 6:20 PM
    I think the DIST-GRP is maintained in the table GEN/JOBSTEPRPT. After the job has been created, you could potentially use syscmd to dump/modify/import the information. Bear in mind that updating GEN data is considered risky.
    John Henley
    Private
    Private
    Senior Member
    (9899 points)
    Senior Member
    Posts:3317


    Send Message:

    --
    1/7/2022 11:11 PM

    Report distribution is available on each job step as it pertains to each print file.If you are in Portal, you can click on the 'Reports' button on a batch form, and select a print file, and associate it with a distribution group. As for doing that in IPA, it is possible, using the /lawson-ios/action/AddJobStep API call. It's not trivial, but certainly doable.

    Thanks for using the LawsonGuru.com forums!
    John
    Jerry
    Consultant
    Jerry McLeod LLC
    Basic Member
    (16 points)
    Basic Member
    Posts:6


    Send Message:

    --
    1/9/2022 11:25 PM
    Hello John,

    Thank you for the information. Would happen to have an example that I could use?
    Ragu Raghavan
    Private
    Private
    Veteran Member
    (1297 points)
    Veteran Member
    Posts:451


    Send Message:

    --
    1/9/2022 11:56 PM

    Just in case you are looking for other options and have the necessary access to install 4GL code, Lawson /Infor does provide a routine 900-CREATE-AND-SUBMIT-JOB that updates the distribution group.

    Code a screen that takes DIST-GRP as a field and behind the scenes, set the DIST-GRP and submit the job. IPA will just do an AGS call this screen.

     

    Jerry
    Consultant
    Jerry McLeod LLC
    Basic Member
    (16 points)
    Basic Member
    Posts:6


    Send Message:

    --
    1/10/2022 2:17 PM

    Thanks Ragu. I know how to create/submit a job in COBOL using the 900-CREATE-SUBMIT API, but how would I get IPA to call this screen using AGS?

    Ragu Raghavan
    Private
    Private
    Veteran Member
    (1297 points)
    Veteran Member
    Posts:451


    Send Message:

    --
    1/10/2022 2:29 PM
    Sorry. I think AGS is old terminology. Use the LwsnTxn node. It will be like calling any other screen (PR36 or RQ10 etc) from IPA.
    Assuming your custom screen is ZZ00,
    1. IPA uses LwsnTxn to call ZZ00
    2. ZZ00 uses the CREATE-SUBMIT API to update DIST-GRP and submit job
    3. .....
    Jerry
    Consultant
    Jerry McLeod LLC
    Basic Member
    (16 points)
    Basic Member
    Posts:6


    Send Message:

    --
    1/10/2022 8:55 PM

    Thanks Ragu,

    I used the LwsnTxn node and included the DIST-GRP  parameter to add the job. The job is added but the dist-grp is not updated in the Report Distribution for the job Step. Any ideas? 

    Here is the string after the workflow is run:: _PDL=LAWTEST10&_TKN=P1183&_EVT=ADD&_RTN=DATA&_LFN=ALL&_TDS=IGNORE&FC=A&COMPANY=1&DEPT-NO=96524&JOB-DESCRIPTION=96524%20Fleet%20Payroll&JOB-NAME=FLPR96524&SUBSIDY-MAX=100&USER-NAME=dguserpy&WEEK-END-DATE=20211217&DIST-GRP=FLEETDIST&_DELIM=%09&_OUT=XML&_EOT=TRUE as user lawson@dolgen.net

    Could the parameter name be different than DIST-GRP?

     

    Ragu Raghavan
    Private
    Private
    Veteran Member
    (1297 points)
    Veteran Member
    Posts:451


    Send Message:

    --
    1/10/2022 9:29 PM
    Jerry, this is not what I had in mind. My approach -
    1. develop a 4GL screen ZZ00, that has just one field DIST-GRP. Do a LwsnTxn to this screen.
    2. ZZ00 logic will do a 900-CREATE-AND-SUBMIT the job FLPR96524 after updating the DIST-GRP.

    Jerry
    Consultant
    Jerry McLeod LLC
    Basic Member
    (16 points)
    Basic Member
    Posts:6


    Send Message:

    --
    1/10/2022 9:56 PM
    Ragu,

    Now I understand, I think that approach will work.

    Thanks
    John Henley
    Private
    Private
    Senior Member
    (9899 points)
    Senior Member
    Posts:3317


    Send Message:

    --
    1/14/2022 10:18 PM

    Attached is a sample IPA flow that updates a distribution group in a job step using IOS "ChangeJob" API.

    Thanks for using the LawsonGuru.com forums!
    John
    Attachments
    Ragu Raghavan
    Private
    Private
    Veteran Member
    (1297 points)
    Veteran Member
    Posts:451


    Send Message:

    --
    1/14/2022 11:17 PM
    awesome!
    Jerry
    Consultant
    Jerry McLeod LLC
    Basic Member
    (16 points)
    Basic Member
    Posts:6


    Send Message:

    --
    1/17/2022 3:32 PM
    This is very helpful, Thank you John!
    You are not authorized to post a reply.