?
Solved

using null parameters in cl program

Posted on 2004-08-08
4
Medium Priority
?
675 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
Learn how to use the free Acronis True Image app to easily transfer data between iPhones and Android phones.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses
Course of the Month14 days, 4 hours left to enroll

800 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