I am having an odd issue with a parameter that is passed into a service program. It should be blank as it is not passed but somehow it is getting a value of '0'. It only happens intermittently and only when I call the service program through a sql UDTF.
So I have a UDTF that calls service program A, this then calls other service programs B to collect the necessary data and create the return for the UDTF. The service programs B is where the issue is. The parameter is not being passed in as it is optional but is still somehow getting a value of '0'.
The thing I noticed is that when I run the UDTF it appears to run in the default activation group and this seems wrong to me. When I call the service programs B directly from a rpgle program, the program runs in a named activation group. I verify this by displaying call stack, displaying open files, and display activation group on the job. When running the UDTF there is no reference to the named activation group but when running it directly from a program I can see the named activation group.
All rpgle programs and service programs are compiled with
/If defined(*CRTBNDRPG)
DftActGrp(*NO) ActGrp('NAMEDGRP')
/EndIf
Am I on the right path or for some reason do UDTF always run in the default activation group?
So I have a UDTF that calls service program A, this then calls other service programs B to collect the necessary data and create the return for the UDTF. The service programs B is where the issue is. The parameter is not being passed in as it is optional but is still somehow getting a value of '0'.
The thing I noticed is that when I run the UDTF it appears to run in the default activation group and this seems wrong to me. When I call the service programs B directly from a rpgle program, the program runs in a named activation group. I verify this by displaying call stack, displaying open files, and display activation group on the job. When running the UDTF there is no reference to the named activation group but when running it directly from a program I can see the named activation group.
All rpgle programs and service programs are compiled with
/If defined(*CRTBNDRPG)
DftActGrp(*NO) ActGrp('NAMEDGRP')
/EndIf
Am I on the right path or for some reason do UDTF always run in the default activation group?
Comment