How to assign a DistGrp using IPA

Sort:
You are not authorized to post a reply.
Author
Messages
Jerry
Basic Member
Posts: 6
Basic Member

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

    David Williams
    Veteran Member
    Posts: 1127
    Veteran Member
      You can only update the fields that are available on the form and Report Distribution doesn't show up there.
      David Williams
      Ragu Raghavan
      Veteran Member
      Posts: 468
      Veteran Member
        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
        Senior Member
        Posts: 3348
        Senior Member

          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
          Basic Member
          Posts: 6
          Basic Member
            Hello John,

            Thank you for the information. Would happen to have an example that I could use?
            Ragu Raghavan
            Veteran Member
            Posts: 468
            Veteran Member

              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
              Basic Member
              Posts: 6
              Basic Member

                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
                Veteran Member
                Posts: 468
                Veteran Member
                  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
                  Basic Member
                  Posts: 6
                  Basic Member

                    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
                    Veteran Member
                    Posts: 468
                    Veteran Member
                      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
                      Basic Member
                      Posts: 6
                      Basic Member
                        Ragu,

                        Now I understand, I think that approach will work.

                        Thanks
                        John Henley
                        Senior Member
                        Posts: 3348
                        Senior Member

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

                          Attachments
                          Thanks for using the LawsonGuru.com forums!
                          John
                          Ragu Raghavan
                          Veteran Member
                          Posts: 468
                          Veteran Member
                            awesome!
                            Jerry
                            Basic Member
                            Posts: 6
                            Basic Member
                              This is very helpful, Thank you John!
                              You are not authorized to post a reply.