libdef global working storage

 4 Replies
 0 Subscribed to this topic
 18 Subscribed to this forum
Sort:
Author
Messages
Robert
Veteran Member
Posts: 82
Veteran Member
New Poster
New Poster
Congrats on posting!
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
Posts: 477
Veteran Member
New Poster
New Poster
Congrats on posting!
Engaged Poster
Engaged Poster
Wow, you're on a roll!
Avid Poster
Avid Poster
Seriously, you're a posting maniac!
Engaged Reader
Engaged Reader
You are an engaged reader!
Avid Reader
Avid Reader
Avid Reader art thou!
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
Posts: 82
Veteran Member
New Poster
New Poster
Congrats on posting!
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
Posts: 477
Veteran Member
New Poster
New Poster
Congrats on posting!
Engaged Poster
Engaged Poster
Wow, you're on a roll!
Avid Poster
Avid Poster
Seriously, you're a posting maniac!
Engaged Reader
Engaged Reader
You are an engaged reader!
Avid Reader
Avid Reader
Avid Reader art thou!
Does the SECTION name in your pdlib show up in in LIBDEF routine name screen ?
Robert
Veteran Member
Posts: 82
Veteran Member
New Poster
New Poster
Congrats on posting!
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.