Solved

using null parameters in cl program

Posted on 2004-08-08
4
642 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 200 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

We have come a long way with backup and data protection — from backing up to floppies, external drives, CDs, Blu-ray, flash drives, SSD drives, and now to the cloud.
In this article, I will show you HOW TO: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

759 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now