× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Mark,

The ?n? means "insert the value of parameter n". Where n is a number from 1-64 (the maximum number of parameters allowed). So ?4? means "insert the value of parameter 4"

For example, if you had an OCL proc like this:

// * 'VALUE OF PARM 4 = ?4?'

you could run it from the command line like this:

> MYPROC A,B,C,D
VALUE OF PARM 4 = D

And the procedure would print "VALUE OF PARM 4 = D" since D was passed in the 4th parameter. (Yes, OCL parameters are separated by commas)

When you follow that 4 with an R, it means that the parameter is required. If the user didn't pass it, it'll stop and ask the user for the parameter. So you might have this:

// * 'VALUE OF PARM 4 = ?4R?'

And you could call the procedure as follows:

> MYPROC A,B,C
Enter Missing Parameter
> D
VALUE OF PARM 4 = D

Since there was no parameter 4, it'll stop and say "Enter missing parameter", and expect you to type the contents of parameter 4. On the other hand, if you did provide parameter 4 as an actual parameter, it won't stop, because it has data, it'll just print it out.

So the 'R' means "required". It doesn't always mean the user will be prompted, but if there isn't already a value in parameter 4, then it'll ask the user for the value. If there _is_ a value, it won't ask.

Now most OCL procedures in my experience don't actually use parameters at all... but they still use the 64 parameter spaces as "placeholders", so they'll code a procedure more like this:

// * 'ENTER YEAR OF AP FILE, EX: 82'
// FILE NAME-INPUT,LABEL-APFILE?4R?
// FILE NAME-OUTPUT,LABEL-OUTP?4R?

So if the user keyed in 10 (for 2010) it'd access a file named APFILE10. The output is going to go to a file named OUTP10 as well. Technically, it's using a parameter field to store that 10, but the program doesnt' really expect you to pass the 10 as a parameter, it's just a convenient way to ask for data.

Is there documentation online? Sure...

http://publibfp.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/QBKAUR00/CCONTENTS?SHELF=qbkayc02&DN=SC41-3731-00&DT=19940427134655

or

http://tinyurl.com/35fluty

Welcome to the S/36! :)


On 5/18/2010 2:14 PM, Mark Murphy/STAR BASE Consulting Inc. wrote:
Does anyone know of any on-line OCL documentation? I can deduce some of
it, but some things are totally foreign.

For example I have a line that goes like this:

// IF ?4R?/Y IF ?7R?/Y GOTO TMCD

I believe that first ?4R? is retrieving input from the screen, and if it
is a Y then it does the second IF. No prompts or anything, it just waits
for more input from the screen? or uses the previous input? What are the
4 and 7 for? Are these just variable placeholders? ?7? is not set
directly in the procedure, other than the R there. If ?7? is a Y it
should go to the label, but what would cause that? Just user input
without any prompt?

Mark Murphy
STAR BASE Consulting, Inc.
mmurphy@xxxxxxxxxxxxxxx


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.