libdef global working storage

 4 Replies
 0 Subscribed to this topic
 17 Subscribed to this forum
Sort:
Author
Messages
Robert
Veteran Member Send Private Message
Posts: 82
Veteran Member
Gurus: I have added a global working storage to $LAWDIR/wslib and defined it using libdef as type wslib. When I invoke the wslib the compiler complains of variables not defined in Working Storage. I examined libdef's help file, it looks like I did define it correctly, what did I do wrong?
Ragu Raghavan
Veteran Member Send Private Message
Posts: 477
Veteran Member
I think the wslib needs to be linked to a pdlib. And one of the routines in the pdlib needs to be 'PERFORM'd in the calling program for the variables to be available.
Robert
Veteran Member Send Private Message
Posts: 82
Veteran Member
So I have to build a 900 level paragraph in the corrsponding pdlib? I defined it as RTNS and linked the pdlib to the wslib. Now I am getting a core dump when I compile. The core dump was caused by 02 and 03 definitions in the working storage. I redefined them as 01 and 02 level and the core dump did not occur, but now the program won't recognize the perform defined in the pdlib.
Ragu Raghavan
Veteran Member Send Private Message
Posts: 477
Veteran Member
Does the SECTION name in your pdlib show up in in LIBDEF routine name screen ?
Robert
Veteran Member Send Private Message
Posts: 82
Veteran Member
Ragu: Yes, and that is why I was puzzled by "undefined" error. The location of the prodcedural code is very precise. Using the other pdlibs as templates, I discovered that my remark line ( ***** ) and SECTION were on the wrong column. Once I changed their locations the program compiled and I was able to invoke the custom API. Problem solved.