Solved

using null parameters in cl program

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Having trouble getting your hands on Dynamics 365 Field Service or Project Service trial? Worry No More!!!
For months I had no idea how to 'discover' the IP address of the other end of a link (without asking someone who knows), and it drove me batty. Think about it. You can't use Cisco Discovery Protocol (CDP) because it's not implemented on the ASAs.…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

776 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