× 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.



Anyways Jon, at least one new procedure in the stack so the call level need
to be adjusted .. just guessing

søn. 9. aug. 2020 kl. 17.35 skrev Jon Paris <jon.paris@xxxxxxxxxxxxxx>:

If the module is NoMain _and_ the routine is coded as a subprocedure then
there should be no change in the call stack.

Is it coded that way? If not then yes there is a change.



On Aug 8, 2020, at 8:00 PM, smith5646midrange@xxxxxxxxx wrote:

Does being in a module affect the call stack? I didn't think that it
did.

If I include the copybook in my program, it works. If I use the same
copybook and compile to a module and bind the module to my program, it
does
not.

-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Carel
Sent: Saturday, August 8, 2020 5:53 PM
To: rpg400-l@xxxxxxxxxxxxxxxxxx
Subject: Re: Problem with message subfile

Adding it in a sub-procedure, you add 1 to the call stack.

Think your problem is the call stack value on the API.


Op 8-8-2020 om 23:11 schreef smith5646midrange@xxxxxxxxx:
For MANY years I have used the same messaging logic in 5250 programs
which involves using a copybook and now that I have made a slight
change to it, I can't figure out how to fix what I broke.



I have always used the variable sdsPgmNam which is part of the SDS.
Rather than including the copybook that has my SndMsg function in
every program, I decided to create a module (and will probably change
to use a service program at some point) with this and several other
functions and bind it in at compile time. The problem that I have run
into is that when I call the function now, sdsPgmNam is the name of
the module, not the name of the program. I've tried using some other
values such as *PGMBDY but I've apparently got something wrong because
I can't get the message into my subfile. Can anyone point me in the
right
direction on this?



Here is the SDS.

d sds

d sdsPgmNam *proc



Here is the subfile.

A R SUBMSG SFL

A SFLMSGRCD(27)

A MSGKEY SFLMSGKEY

A SDSPGMNAM SFLPGMQ(10)



Here is the SndMsg Function

p SndMsg b export

d SndMsg pi

d SndMsgData 256 const



d SndMsgDLen s 9b 0 inz(256)

d MsgQNB s 9b 0 inz(0)

d MsgKey s 4a



SndMsgDLen = %len(%trim(SndMsgData));

APIError.ErrPrv = %size(APIError);

callp QMHSNDPM(*blanks

:'QCPFMSG QSYS'

:SndMsgData

:SndMsgDLen

:'*INFO'

:sdsPgmNam

:MsgQnb

:MsgKey

:APIError);

endif;

p e


--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a
message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or
change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link:
https://amazon.midrange.com

--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
related questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com

--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.