re:
> I suspect my Cobol parms aren't correctly defined ???
I have no idea :)
> $optimize on$
Always leave optimize off until the program/code is tested and
known to be working correctly.
> $SET 'X9=FALSE'$
> $IF 'NOT X9'$
Still don't know what "X9" is ... you probably want something like
$set "pascalv = false"
(Just a guess as to the meaning of X9 ... but that's my very valid
point, after all :)
> begin
> if (len >= 0) and (len <= maxmsg) then
> begin
> bbuf := #27'&j000L';
> ilen := ASCII ( len, -10, bbuf[6]);
> strmove ( len, msg, 1, bbuf,8);
> setstrlen ( bbuf, strmax (bbuf));
> bbuf [len+8] := chr(0);
>
> GETPRIVMODE;
> ilen := genmsg (-1, baddress(bbuf[1]),32768,0,0,0,0,0,
> ldev, -1, -1, 0, imp);
> end;
There are two possibilities:
1) len is good
This means that genmsg is getting called, but without the results
you want.
2) len is bad
This would also explain your results.
How about adding (after the needs-to-be-indented "end" above):
else
begin
bbuf := 'Sorry, you have passed a bad LEN parameter to sendfuncmsg';
print (bbuf, -strlen (bbuf), 0);
end;
(and, of course, an earlier: Procedure print; intrinsic;)
An alternative to the above is:
:run <cobol program ...> ; debug
b genmsg
c
and see if you're getting into genmsg. If so, examine the parameters.
Also,
b sendfuncmsg
c
and when sendfuncmsg is hit, examine the parameters ("dr" command).
Hope this helps.
BTW, you're ignoring my advice at your peril!
Improper calls to genmsg can cause system aborts!
That's why my sample code tests the LDEV for validity before passing
it to genmsg. You don't want to rely on the caller to do this!
--
Stan Sieler [log in to unmask]
www.allegro.com/sieler/wanted/index.html www.sieler.com
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|