Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Command with Return Variables -- HELP !!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Command with Return Variables -- HELP !!

    I have a command with many Return Variables. Most of the time that the command is used, only several of the return variable Parms will be supplied. For example, Sometimes it will be ParmA and ParmC and other times ParmB and ParmD, etc. with no particular pattern or frequency. So the missing parms are passed to the CPP as Null Pointers (I think). The CPP, which is a CL Program, currently tries to stuff a value in all the Parameters that can be returned, whether they were passed or not. If the Parameter was not passed, this results in message MCH3601 "Pointer not set for location referenced". The Program monitors for this message after every assignment and the correct return values are passed back to the command. It works, but it's Ugly. It's also slow. And I think that the fact that this message is being thrown and then trapped about 15-20 times is what's causing the Performance issue.... I'm sure it couldn't possibly be my code. My question is whether or not there's a more elegant way to do this within CL. Is there a way to Test the parameter before doing the assignment? Or any other little trick that anyone's aware of to prevent the error. Thanks, Mike

  • #2
    Command with Return Variables -- HELP !!

    In CL I think most programmers simply send all the parameters. Can they be initialized to blank or zero instead of omitted?

    Comment

    Working...
    X