Page 1 of 1

Easytrieve code to replace cobol "add"

PostPosted: Fri Jun 11, 2010 9:55 am
by katantdlsr
'Add X1 to Y1 giving T ' for this cobol stmt, i want eqivalent in to easytrieve

Re: adding numeric fields with Decimals

PostPosted: Fri Jun 11, 2010 9:56 am
by katantdlsr
katantdlsr wrote:'Add X1 to Y1 giving T ' for this cobol stmt, i want eqivalent in to easytrieve

Re: adding numeric fields with Decimals

PostPosted: Fri Jun 11, 2010 10:02 am
by katantdlsr
28 X1 W 10 A VALUE 'WELCOME'
29 Y1 W 02 N VALUE 20
30 Y2 W 02 N VALUE 30
31 T W 03 N
32 *
33 PROGRAM
34 DISPLAY X1
35 DISPLAY Y1
36 DISPLAY Y2
37 ADD Y1 TO Y2 GIVING T

By this add statement i got the error below followed one

>>> $ fieldname not defined
>>> $ not a valid statement
38 DISPLAY 'T = Y1 +Y2' T

Re: Easytrieve code to replace cobol "add"

PostPosted: Fri Jun 11, 2010 11:17 pm
by dick scherrer
Hello and welcome to the forum,

Try:
T= Y1 + Y2

Re: Easytrieve code to replace cobol "add"

PostPosted: Mon Jun 14, 2010 1:53 pm
by katantdlsr
Thanq very much but i want to know that is there no written form of the statement For ADD(i.e VERBAL statement).

Re: Easytrieve code to replace cobol "add"

PostPosted: Mon Jun 14, 2010 11:42 pm
by dick scherrer
Hello,

Not that i'm aware of - just code the expression. . .