Work File Definition

 6 Replies
 0 Subscribed to this topic
 17 Subscribed to this forum
Sort:
Author
Messages
Chesca
Veteran Member
Posts: 490
Veteran Member
    How to add/append a new field to a work file? I don't see the pre-fix/ field definitions under Work file.  I provided a screenshop of the work file.           

    Field Name              Occurs Type      Size    1
    INAL1-RECORD                  Alpha        1



    Woozy
    Veteran Member
    Posts: 709
    Veteran Member
      Hi bernfc10,

      This is a very difficult question to answer with the information you provided.
      - From looking at your question, it seems odd that the work file would consist only of a single field of 1 character. Is that all there is? Where did you see this?
      - If you go into "workdef {prodline} {systemcode} {program}" and then press F4 on the "File Name" field, is there a chance there is more than one workfile? If so, check all of them.
      - It is very possible that the work file was not defined in workdef but was built from scratch in the working storage (WS). If that is the case, then you may need to add your new field there and then update the program to include that new field. If the program was originally built by a COBOL programmer who hasn't used Lawson tools much, then this could be their approach.

      Good luck.

      Sorry I can't help much more.
      Kelly Meade
      J. R. Simplot Company
      Boise, ID
      Chesca
      Veteran Member
      Posts: 490
      Veteran Member
        Hi Woozy, thank you so much for your prompted response. I agree with you and I find it so weird, too. I have attached the screenshot, were you able to see it? I am going to try to add the field in the WS section.
        Woozy
        Veteran Member
        Posts: 709
        Veteran Member
          I don't see any screenshot. Just the single line included in the post with the "INAL1-RECORD"
          Kelly Meade
          J. R. Simplot Company
          Boise, ID
          Chesca
          Veteran Member
          Posts: 490
          Veteran Member
            Woozy
            Veteran Member
            Posts: 709
            Veteran Member
              OK, now I see it. If that is the only File Name defined under workdef, then I'm guessing the actual file layout is handled in the WS and the entire WS array record is being passed into PF4-PEFFILE4-RECORD to create the output file. That's just a guess based on what you've attached, but it's a good one. If you look in the PD for PF4-PEFFILE4-RECORD (or maybe just for "PEFFILE4") you may be able to backtrack and figure it out.
              Kelly Meade
              J. R. Simplot Company
              Boise, ID
              Chesca
              Veteran Member
              Posts: 490
              Veteran Member
                Yes, I looked in the PD and I am able to backtrack and figure it out now. Your help is greatly appreciated!!!

                PF4-PEFFILE4-RECORD
                WS-PF4-PEFFILE-WORK