On Jan 16, 12:04 pm, "Senthil Kumaran" <[email protected]>
wrote:
> There is a field name called *EB.HOL.MTH.01.TABLE *TO*
> EB.HOL.MTH.12.TABLE* IN HOLIDAY table
>
> I wrote a Program to check whether the Date given is holiday or working date
> using that above mention field...
>
> From the statement, i got the month for the entered date using *mont =
> DATE[5,2]*
>
> Next, I read the holiday application using the company code using the code
>
> CALL F.READ(F.HOLIDAY,COMPANYCODE,RECORD.HOL,F.HOLIDAY,ERR.HOL) *
> CONSIDER I ASSIGNED ALL THE THINGS
>
> val = "*EB.HOL.MTH.":mont:".TABLE"*
> * *LIST = R.HOL<val*>*
> **
> * * While debugging i got the error saying *Non- numeric value is
> assigned* ..
>
> Whether we can concate the field with the value...
>
> I got ID of Holiday using concatation of Company code and
> current year . If that works and opened the holiday application, why the
> concatination on the field doesn't
>
> Cheers ,
> Senthil
>
Hi Sentil,
You need to understand the difference between EQUATEs and variable
names on one hand and strings on the other. If you look at what's in
all of those I_F.{filename} included code blocks, you'll see a whole
lot of EQU statements such as EQU EB.HOL.MTH.01.TABLE TO 1. This
allows the expression EB.HOL.MTH.01.TABLE to be used where you might
otherwise use the numeric value 1. So... val<EB.HOL.MTH.01.TABLE> is a
valid expression, and is the same as val<1>. Where you're going wrong
is in trying to use concatenation to form a variable or equate name.
What you'll always end up with when you do a concatenation is a string
(not a variable name or equate name) - and you can't use a string as a
field (or attribute) mark count. For example, val<1> is perfectly ok
but val<"abc"> isn't. Also, amc="abc"; myval=val<amc> will fail. If,
however, you have abc=1 or equ abc to 1 beforehand then you can use
val<abc>.
I hope this helps.
Mike.
--~--~---------~--~----~------------~-------~--~----~
Please read the posting guidelines at:
http://groups.google.com/group/jBASE/web/Posting%20Guidelines
IMPORTANT: Type T24: at the start of the subject line for questions specific to
Globus/T24
To post, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en
-~----------~----~----~----~------~----~------~--~---