PDA

View Full Version : PROBLEM when using OPTIONS with (multiple) optional Parms


ThierryC
05-21-2010, 08:05 AM
I'm trying to convert my current program under valence20 to valence21 and i'm quite a few problems.

program running without problem under v2.0 now don't work anymore.

i keep receivin error message

Problem 1: i get this when trying to open the Error-monitor
Attempt made to divide by zero for fixed point operation.
Eigendom object VVUTILITY type *USRSPC in QTEMP is gewijzigd.
Tried to refer to all or part of an object that no longer exists.
Functiefout opgetreden. MCH3402 niet voorzien door VVSRVPGM bij
programma-instructie 0000014900, systeeminstructie X'0000'.

VVSRVPGM VVUTILITY VVUTILITY_GETFIELDINFO.
Problem 2;
in option maintenance, i get the same error, referring the the same module and linenbr, when trying to edit an option that has optional parms.

Problem 3:
when running an option thas has optional parms specified
version=2010&frommonth=0it seems that only the last parm is transfered in the rpg
when looking in the Vvcall pgm, i've noticed a possible cause in the AddParmsToQueryString-procedure '

VALENCE20
buffer=vvUtility_getEnvVar('QUERY_STRING');
if buffer<>*blanks;
buffer=%trim(buffer)+'&';
endif;
buffer=%trim(buffer)+%trim(optData(x).vvOptParms);
putEnv('QUERY_STRING='+buffer);

VALENCE21
buffer=vvUtility_getEnvVar('QUERY_STRING');
if buffer<>*blanks;
buffer=%trim(buffer)+ AT;
endif;
buffer=%trim(buffer)+%trim(optData(x).vvOptParms);
putEnv('QUERY_STRING='+buffer);


Should'nt the 'AT' be a 'AMP' !!!! since it is specified in the help that multiple parms need to be separated by '&'
Alas i think this is not the only place where the error is, because even when modifying the v2.1 vvcall and replacing the AT again by the harcoded '&', i'm still not getting all the parms back...

sean.lanktree
05-21-2010, 11:23 AM
You are absolutely correct....should be AMP.

Can you post the relevant records in file VVERR100 (Error Log), this may contain further information on the problem.

ThierryC
05-25-2010, 03:38 AM
Strange thing,

f.e initially, i can open the error-monitoring, but when i first launch my own pgm, an then try to view the error monitoring, i get an error....

I've attached the vverr100 file in zip (savf under v5r4)

(error has something to do with the vvgetfieldinfo...)

Bericht . . . . : Functiefout opgetreden. MCH3402 niet voorzien door
VVSRVPGM bij programma-instructie 0000014900, systeeminstructie X'0000'.

Oorzaak . . . . : een afbrekingsfoutbericht is gezonden naar een programma
dat dit bericht niet heeft voorzien. De volledige naam van dit programma i
VVSRVPGM VVUTILITY VVUTILITY_GETFIELDINFO. Op het moment dat het bericht
werd verzonden, is het programma gestopt bij instructie van hoger niveau m
nummer(s) 0000014900. Als meer dan een instructienummer wordt afgebeeld, w
het programma een bound programma. Optimalisatie staat niet toe dat een
enkel instructienummer wordt bepaald. Als *N als waarde wordt afgebeeld,
houdt dit in dat de werkelijke waarde niet beschikbaar was.
Herstelprocedure: raadpleeg de vorige berichten van een lager niveau om de
oorzaak van de functiefout vast te stellen. Verbeter eventuele fouten en