MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » November 2006

Re: CL compiled, but I don't think it should have



fixed

DAYS1 is a valid character literal. It doesn't need quotes if there aren't
embedded spaces.

On 11/16/06, AGlauser@xxxxxxxxxxxx <AGlauser@xxxxxxxxxxxx> wrote:

Hi all,

I have a CL program that was causing a very strange error.  The CL has
this at the beginning:
PGM        PARM(&VTYPE &PTERM &UTERM &DAYS1)

DCL        VAR(&VTYPE) TYPE(*CHAR) LEN(3)
DCL        VAR(&PTERM) TYPE(*DEC) LEN(3)
DCL        VAR(&DAYS1) TYPE(*DEC) LEN(3 0)
DCL        VAR(&UTERM) TYPE(*DEC) LEN(3)


Depending on which location the report was requested from, there was a
either

CALL       PGM(pgmA) PARM(&VTYPE &UTERM &DAYS1),

which worked just fine, or

CALL       PGM(pgmA) PARM(&VTYPE &UTERM DAYS1)

which doesn't work.

My question is, how did the value DAYS1 pass through the compiler.  This
is not a valid variable reference (no & prefix), nor is it a valid
character literal (not enclosed in ' ').  Can anyone explain to me why the
compiler didn't catch this?

TIA,
Adam


#####################################################################################
Attention:
The above message and/or attachment(s) is private and confidential and is
intended
only for the people for which it is addressed. If you are not named in the
address
fields, ignore the contents and delete all the material. Thank you. Have a
nice day.

For more information on email virus scanning, security and content
management, please contact administrator@xxxxxxxxxxxx

#####################################################################################
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.







Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact