Compile Error - WS field not defined in specified WS

 2 Replies
 0 Subscribed to this topic
 17 Subscribed to this forum
Sort:
Author
Messages
Woozy
Veteran Member Send Private Message
Posts: 709
Veteran Member
Hi All - this is a strange one. I created a custom library (ZZBNFPD/ZZBNFWS), defined it using libdef so that the PD references the WS.  I then put a call into BNBNFPD to the new library.  The only entry in the custom library (at this moment) is a display statement (DISPLAY "TEXT").  When I compile the program, it compiles without errors.  If I run the base program, the library is called and the display appears in the log. Next, I tried adding a line to the custom library to display a value from the calling library.  When I try to compile this, I get a compile errors: ...
Error - BNFBN-FC Not Defined In Specified WS
Error - RdLibInt Failed For ZZBNFPD
        Fix The Errors In ZZBNFPD And Try Again
... I have confirmed that the value is spelled correctly. If I comment out the display statement and debug the program, when I step into the custom library the BNFBN-FC value is available to view/modify. Any thoughts on what could be causing this?  Do I just need to restart the compiler?  How do I do that?  Thanks!
Kelly Meade
J. R. Simplot Company
Boise, ID
Ragu Raghavan
Veteran Member Send Private Message
Posts: 477
Veteran Member
depending on where the variable BNFBN-FC is defined, that wslib may need to be linked to ZZBNFPD in libdef
Woozy
Veteran Member Send Private Message
Posts: 709
Veteran Member
HAHA-That was it! Thanks Ragu Raghavan! I added BNBNFWS to ZZBNFPD in libdef and it compiled fine. Thanks for your help! I'm curious - is this because my custom library is being called from another library? I know I've used custom libraries called directly from programs and was able to pass variables back-and-forth without issues. Thanks for your help!
Kelly Meade
J. R. Simplot Company
Boise, ID