compiling error after copying a program

 2 Replies
 1 Subscribed to this topic
 17 Subscribed to this forum
Sort:
Author
Messages
Chesca
Veteran Member
Posts: 490
Veteran Member

    I have to customize AP270 so I copied the program to  new program LC270. I get compiled error because the work file definition.  I am  not sure how to change or copy the work file definition to be LC270 instead of AP270. 

    compiling error:

    Warning: Error - PrcWRKFILE(): LC2701SORT Not Found In WsGrp
    Warning:         Work File LC2701SORT May Not Be Defined In workdef

    jaherb
    Veteran Member
    Posts: 164
    Veteran Member
      Sort files are typically named with the program prefixed to the beginning of it... you logic is looking for a sort file called LC270SORT and that does not exist. If you go to your work files you will see one, named AP270SORT. The copy process does not rename work files (as it does in the PD, WS, etc) and thus you are getting that error. You have a couple of choices... 1) re-enter the sort file as LC270SORT then then save it. delete the old sort file and then recompile. Sort files can be rather large and tedious to re-enter.. so 2) you can use the cwf command. From the command line,you need to go to your source directory and then do the command cwf (change work file). If your program is in the test product line you would enter; cwf test ap LC270 AP270SORT LC270SORT. This will copy the sort file to the new name and remove the old file for you.. so it is actually a move command.
      Chesca
      Veteran Member
      Posts: 490
      Veteran Member
        Oh wow, this is great! Thanks a bunch, it saved me a lot of time.