Steps to create a new custom program

 9 Replies
 1 Subscribed to this topic
 17 Subscribed to this forum
Sort:
Author
Messages
Joe O'Toole
Veteran Member
Posts: 314
Veteran Member
    I need to recreate a custom version of BN106 that we have on our 8.03 system in 9.01.
    Can someone share the steps used to do this?

    The 8.03 version ports across but there have been too many changes to the Lawson supplied code.
    Once there is a pristine copy created on the 9.01 side, I should be able to roll in the changes I need to make.

    Thanks!
    John Henley
    Posts: 3353
      Pg

      John

      On Jun 26, 2012, at 6:41 PM, "forums-lsf-s3-cust-dev@lawsonguru.com" > wrote:

      [LawsonGuru.com Logo]<https://www.lawsonguru.com/>
      S3 Customization/Development Forum Notification
      A message was posted to a thread you are tracking.
      Steps to create a new custom program
      Posted by: Joe O'Toole
      06/26/2012 04:31 PM
      I need to recreate a custom version of BN106 that we have on our 8.03 system in 9.01.
      Can someone share the steps used to do this?

      The 8.03 version ports across but there have been too many changes to the Lawson supplied code.
      Once there is a pristine copy created on the 9.01 side, I should be able to roll in the changes I need to make.

      Thanks!

      ________________________________

      To view the complete thread and reply via your browser, please visit:
      https://www.lawsonguru.co...-new-custom-program/

      You were sent this email because you opted to receive email notifications when someone posted and/or responded to a message on this forum.
      To unsubscribe to this thread please visit your user profile page and change your subscription options.

      Thank you,
      LawsonGuru.com<http://LawsonGuru.com>
      Thanks for using the LawsonGuru.com forums!
      John
      Woozy
      Veteran Member
      Posts: 709
      Veteran Member
        Hi Joe,

        So are you just asking how to clone the 9.01 version of BN106 as something else like ZZ106?

        If so, it's pretty straightforward:
        • Open LID
        • Go to pgmdef {prodline} bn bn106
        • F6-Define
        • A-Program
        • F6-Copy
        • Type the new program name (ZZ106 or whatever) and ENTER
        • (New program will be created)
        • Update the Program Name (if you wish) and ENTER twice.
        • Escape out to the pgmdef menu
        • F2-Find to search for your copy

        At this point, you should have an exact copy of BN106, except that the code has been updated to replace BN106 with ZZ106 (or whatever) everywhere it is mentioned.  There are two problems with this:

        •  First, some of the Message Definition records include the program name (i.e. "Processing BN106 - Benefit Transaction Export").  To fix these:
          • Find your cloned program and select that record
          • F6-Define, F-Messages
          • Update all records to reflect your new program name
        • Second (and much more critical), the BN106 includes a workfile named "BN106WORK", but the copy process modifies the PD code and changes "BN106WORK" references to "ZZ106WORK", but it doesn't actually change the Work File Definition FileName, so your program won't compile.  To fix this, you have two options:  Update the PD code OR Replace the work file
        • Option 1 - Update the PD code:
          • Find your cloned program and select that record
          • F6-Define, B-Source, A-Procedure Description
          • F2-FIND and search for ZZ106WORK
          • Change all lines from ZZ106WORK back to BN106WORK
          • Enter, Enter to save and exit
        • Option 2 - Replace the work file
          • Find your cloned program and select that record
          • F6-Define, E-Work File
          • F4-Select and choose Bn106work
          • Take a screenshot of the setup
          • F9-Delete to remove Bn106work, then enter
          • Type ZZ106WORK in the File Name field, then duplicate all other settings and save the new work file.
        • NOTE:  Only do option 1 OR option 2 - not both.

        Once all this is done, you should be able to compile the program and run it to compare to BN106.

        Good Luck.

        Kelly

        Kelly Meade
        J. R. Simplot Company
        Boise, ID
        Joe O'Toole
        Veteran Member
        Posts: 314
        Veteran Member
          Thanks for the tips. I created the ZZ106 from scratch, modified the RPT, SCR, PD and WS members for the customizations, recompiled but still getting 2 errors: PRM-EMPLOYMENT-BEGIN Not Defined In Specified WS / WRK-ZZ106WORK-REC Not Defined In Specified WS. Neither the production BN106WS nor the custom ZZ106WS contains this field and record definition while both BN106PD and ZZ106PD reference it. The BN106 compiles clean the ZZ106 does not. What are we missing?
          Karen Sheridan
          Veteran Member
          Posts: 141
          Veteran Member
            PRM-EMPLOYMENT-BEGIN is in BN106.scr
            Joe O'Toole
            Veteran Member
            Posts: 314
            Veteran Member
              I just found a prefix that was different in WORKDEF which resolved the WRK-REC error, but we still have the PRM-EMPLOYMENT-BEGIN Not Defined In Specified WS error. I did a bldsh of BN106 and the code is in the WS area of the cobol program - bldsh on the custom version fails on the PRM error just like the compile. I see it's defined in the PRM secion of the WS in BN106.cbl so I'm thinking that PRM needs to be defined somewhere for the ZZ version?
              Karen Sheridan
              Veteran Member
              Posts: 141
              Veteran Member
                Joe,

                PRM is the prefix used for the fields coming from the parameter form. EMPLOYMENT-BEGIN is in the BN106.scr.

                Karen
                Joe O'Toole
                Veteran Member
                Posts: 314
                Veteran Member
                  It's not in BN106.scr on my system===>

                  Directory of X:\lcttest\law\dev9\bnsrc
                  08/25/2011 11:50 PM 8,076 BN106.rpt
                  08/25/2011 11:51 PM 11,010 BN106.scr
                  05/18/2012 02:00 AM 18,667 BN106.xml
                  08/25/2011 11:51 PM 121,941 BN106PD
                  08/25/2011 11:51 PM 24,210 BN106WS

                  X:\lcttest\law\dev9\bnsrc>grep -i -e prm-empl bn106*
                  BN106PD: IF (PRM-EMPLOYMENT-BEGIN = 1 OR 2)
                  BN106PD: IF (PRM-EMPLOYMENT-BEGIN = 1)
                  Karen Sheridan
                  Veteran Member
                  Posts: 141
                  Veteran Member
                    It doesn't start with PRM in the SCR.
                    Joe O'Toole
                    Veteran Member
                    Posts: 314
                    Veteran Member
                      That was it - there was some code removed from the 8.03 PD that still existed in the 901 ZZ106PD. Lawson added an additional segment 13A to the output file routine that didn't exist in 8.03 version of the code. New program now compiles clean. Thanks!