New Table w\compilation issues

 10 Replies
 0 Subscribed to this topic
 17 Subscribed to this forum
Sort:
Author
Messages
Demi
Veteran Member
Posts: 67
Veteran Member
       I've been tasked with adding a new database table to the Lawson PR system.  I've created my table, ran blddbdict and dbreorg. My new (empty) table shows up in the database.  I've since created two custom programs(using pgmdef & copy) to use my new table but when I run through a compile I keep getting this error:
    Warning: Error - PrcWRKFILE(): 'NewTableName' Not Found In WsGrp
    Warning: Work File 'NewTableName' May Not Be Defined In workdef
    /lawson/gen/bin/bismark: Error Encountered IN Execution
    /lawson/gen/ben/lawosh: Error Encountered In Execution
       I've tried to create new libraries (PD,WS) using pgmdef, but can't do anything once I get there. Do there have to be defined as a workfile?
       I've never created a custom table before and I'm not sure if I'm missing something.  Searched the knowledge base thru and thru with not much help.  I have questions... Do I 'need' to update the .OR file; my new file is created from the paydeductns table and is then, totally independant. Do I need to create a custom PD and WS? Will the lawson utilities create custom 840-, 850- (etc) or will they need to be handled independantly within my programs?
    John Henley
    Posts: 3353
      The 840-, 850- paragraphs are created, however you have to PERFORM *something* that actually references the table in order for the Lawson bismark precompiler to actually generate the COBOL for access the table.
      Thanks for using the LawsonGuru.com forums!
      John
      Sam Simpson
      Veteran Member
      Posts: 239
      Veteran Member
        1. Did you create indexes to your tables?
        2. Are you opening your tables in your custom program(like a workfifle)?
        3. How are you reading/writing data?
        Karen Sheridan
        Veteran Member
        Posts: 141
        Veteran Member
          I wonder if the pgmdef copy created something that's off in workdef? Did you also look there to see if everything is as it should be?

          Karen
          John Henley
          Posts: 3353
            You have to PERFORM *something* that actually references the table in order for the Lawson bismark precompiler to actually generate the COBOL for accessing the table. If you are just referencing member variables/columns within the table, you will get an error, since you aren't actually accessing the table.
            Thanks for using the LawsonGuru.com forums!
            John
            Demi
            Veteran Member
            Posts: 67
            Veteran Member
              Thank-you to everyone for your responses, I really appreciate it.  Currently I have two issues 1- my compilation is returning ... Warning: Error - PrcWRKFILE(): LEIT Not Found In WsGrp
              Warning:         Work File LEIT May Not Be Defined In workdef
              D:\cobdev\gen/bin/bismark: Error Encountered In Execution
              ... Since I've created a new table called LEIT in the database (with 3 Indexes); do I need to define something more?  I've tried creating a New Library for my table under pgmdef for my source but the software isn't allowing me to actually do anything. How does Lawson generate the internal PD and WS areas for the new table?  Must I do something more than the blddbdict and the reorg? My second issue ... I can view my new screen and select criteria within the portal but when I add my job I receive "Validate: EOF Encountered".
              John Henley
              Posts: 3353
                You don't need a library. Please read my answer above about needing some code in your program that accesses the LEIT table to have something in your code (i.e. PERFORM 840-FIND-LEISET1, etc.) that forces the bismark / qcompile process to insert the libraries. Again, you don't have to do anything with a library.

                What is it that your program is trying to accomplish?

                You are getting the "Validate: EOF Encountered" error because your program is not compiled.
                Thanks for using the LawsonGuru.com forums!
                John
                Demi
                Veteran Member
                Posts: 67
                Veteran Member
                  My program is pulling information off of the PAYDEDUCTN table, along with the Employee master and the PRREGPARM file.  The gathered information is then written out to my new table.
                  John Henley
                  Posts: 3353
                    PERFORM 800-CREATE-LEIT.
                    .
                    .
                    .
                    MOVE PYD-COMPANY TO LEI-COMPANY.
                    MOVE PYD-EMPLOYEE TO LEI-EMPLOYEE.
                    .
                    .
                    .
                    PERFORM 820-STORE-LEIT.
                    Thanks for using the LawsonGuru.com forums!
                    John
                    John Henley
                    Posts: 3353
                      It is the 800-CREATE-LEIT and the 820-STORE-LEIT that will trigger the complier to insert the appropriate library code.
                      Thanks for using the LawsonGuru.com forums!
                      John
                      Demi
                      Veteran Member
                      Posts: 67
                      Veteran Member
                        Thank-you John!  I'm on the move again.  Any idea where I can get a list of the possible invalid key conditions?  Can I use LEIT-Duplicates? I have a sequence number field in my record to sequence any possible duplicates.