?
Solved

using null parameters in cl program

Posted on 2004-08-08
4
Medium Priority
?
689 Views
Last Modified: 2008-02-01
Hi, I want to ask if and how can I use a parameters in a CL program which might not to be passed ?

I mean that I might call this CL program without using these last parameters,
and if I do so, if and how can I use these parameters in the CL program ?

until now I allways received the message "Pointer not set for location referenced." when I tryed using these parms.

Thank.
0
Comment
Question by:ams6
4 Comments
 
LVL 6

Accepted Solution

by:
dedy_djajapermana earned 600 total points
ID: 11746468
hi,

you can create a command to call the program. with command, you can give a default value when the parameters are not provided.

cheers,
dd
0
 

Author Comment

by:ams6
ID: 11750250
Thanks,
and my contiuation problem is that i want to add parameters to an existing cl program without changing the programs which called to that cl prog.
0
 
LVL 14

Expert Comment

by:daveslater
ID: 11784083
Hi
a work around that I have used in the past is to:
Rename the old cl to say PGM CLA.
Create the new CL say PGMCLB the same as the iold CL but with then new parms
then create an RPG (or RPGLE) program under the original CL name.
With the RPG you can then test for the number of parms passed and call the relevent CL.

Dave
0
 
LVL 27

Expert Comment

by:tliotta
ID: 11837121
ams6:

First question -- Is it a CL program or ILE CL program? If it's CL, then a command is your only option, AFAIK.

But by compiling it as ILE CL, you don't need a command. The program can be called directly and handle optional parms fine.

Tom
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

MSSQL DB-maintenance also needs implementation of multiple activities. However, unprecedented errors can hamper the database management. In that case, deploying Stellar SQL Database Toolkit ensures fast and accurate database and backup repair as wel…
Last month Marc Laliberte, WatchGuard’s Senior Threat Analyst, contributed reviewed the three major email authentication anti-phishing technology standards: SPF, DKIM, and DMARC. Learn more in part 2 of the series originally posted in Cyber Defense …
Loops Section Overview
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question