× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



David,

I just hit this 'problem' recently...

Your test program IN's the data area (implicitly, because of the UDS) and
locks it. You then do an explicit IN (which you don't need to do). When you
OUT it, you unlock it.

When myPgm is called, because it's a UDS, it's implicitly locked, but
because you don't exit mypgm with *INLR on, the data area is never unlocked,
so it's still locked on return to your test program.

If you run debug and check for object locks on the data area after pretty
much evetry statement, you'll see this is the case.

If you need it unlocked on return to your test program, either set on *INLR
in MYPGM or don't define it as a UDS and do an explicit IN and OUT in MYPGM.

Rory

On Thu, Jan 29, 2009 at 9:09 AM, David FOXWELL <David.FOXWELL@xxxxxxxxx>wrote:

Rory et Al,

Having a problem with this, hope you can help.

My test program :
D AParms UDS
D Parm1 LIKE ( REF_Parm )

C *DTAARA DEFINE MyDtaAra AParms
C IN AParms
C EVAL Parm1 = 'test'
C OUT AParms

C CALL 'Mypgm'

/FREE

DSPLY %SUBST ( GetMyPgmError ( ) : 1 : 52 );
RETURN;

/END-FREE



In mypgm:
D AParms UDS DTAARA ( NPA010 )
D Parm1 LIKE ( REF_Parm )

No operations on the data area

P GetMyPgmError...
P B EXPORT
D PI LIKE ( REF_ERRMSG )

/FREE

RETURN globalErrorMessage;

/END-FREE

P GetMyPgmError...
P E


When my test program goes back to get the error message, with DSPLY %SUBST
( GetMyPgmError ( ) : 1 : 52 ), why is the data area locked?

Thanks


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.