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



Doug,

You say that you call program newscafchg, but what you show us suggests that you build a string with the CALL command and probably run it through QCMDEXC of system(). You say that newscafchg returns information in parms 7 and 8, but you pass two empty literals. So the question is, why don't you use CALLP and pass parameters to the program?

Joep Beckeringh



Op 27-07-12 19:08, Lewis, Doug schreef:
Hi All,

I have a couple of question on activation groups.

I have an UDTF that calls a procedure in a service program. There is a program call in the procedure which failed with a - return from main() has occurred in a program that runs in a *NEW
Activation Group. The program did run but erred on the return. So I changed to a named activation group and it worked.

So my first question is why did it fail with the *new activation group?

Secondly, this program is also called from a stored procedure. When I changed to the named activation group either the calling Java program or Crystal Reports erred with a parameter mismatch error. The java guys were not sure which threw the exception. Even though calling this stored procedure in Ops Nav showed the parameters returning correctly albeit with warnings.


The program populates a file and returns the key in parm 7 & 8. All parms are char.

Named Act Grp:

call newscafchg('615', '','', '', '2012-06-01', '2012-06-30', '', '')
Return Code = 0

Output Parameter #1 = 615
Output Parameter #2 =
Output Parameter #3 =
Output Parameter #4 =
Output Parameter #5 = 2012-06-01
Output Parameter #6 = 2012-06-30
Output Parameter #7 = 1120727
Output Parameter #8 = 090434882

SQL State: 0100C
Vendor Code: 466
Message: [SQL0466] 1 result sets are available from procedure NEWSCAFCHG in *N. Cause . . . . . : Procedure NEWSCAFCHG in *N was called and has returned one or more result sets. Recovery . . . : None.

Statement ran successfully, with warnings (2915 ms = 2.915 sec)


Act Grp *NEW:

[ Fri Jul 27 15:59:05 GMT 2012 ] Run All

call newscafchg('615', '','', '', '2012-06-01', '2012-06-30', '', '')
Return Code = 0

Output Parameter #1 = 615
Output Parameter #2 =
Output Parameter #3 =
Output Parameter #4 =
Output Parameter #5 = 2012-06-01
Output Parameter #6 = 2012-06-30
Output Parameter #7 = 1120727
Output Parameter #8 = 105904586

Statement ran successfully (3281 ms = 3.281 sec)

So why the difference?

We are at V6R1. If you need more info or code snippets please let me know.

Thanks in advance for any help you can give in helping me understand.


Doug



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.