Easytrieve code to replace cobol "add"



Unicenter CA-Easytrieve Plus Report Generator: CA's information retrieval and data management tool

Easytrieve code to replace cobol "add"

Postby katantdlsr » Fri Jun 11, 2010 9:55 am

'Add X1 to Y1 giving T ' for this cobol stmt, i want eqivalent in to easytrieve
katantdlsr
 
Posts: 4
Joined: Fri Jun 11, 2010 9:48 am
Has thanked: 0 time
Been thanked: 0 time

Re: adding numeric fields with Decimals

Postby katantdlsr » Fri Jun 11, 2010 9:56 am

katantdlsr wrote:'Add X1 to Y1 giving T ' for this cobol stmt, i want eqivalent in to easytrieve
katantdlsr
 
Posts: 4
Joined: Fri Jun 11, 2010 9:48 am
Has thanked: 0 time
Been thanked: 0 time

Re: adding numeric fields with Decimals

Postby katantdlsr » Fri Jun 11, 2010 10:02 am

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
katantdlsr
 
Posts: 4
Joined: Fri Jun 11, 2010 9:48 am
Has thanked: 0 time
Been thanked: 0 time

Re: Easytrieve code to replace cobol "add"

Postby dick scherrer » Fri Jun 11, 2010 11:17 pm

Hello and welcome to the forum,

Try:
T= Y1 + Y2
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Easytrieve code to replace cobol "add"

Postby katantdlsr » Mon Jun 14, 2010 1:53 pm

Thanq very much but i want to know that is there no written form of the statement For ADD(i.e VERBAL statement).
katantdlsr
 
Posts: 4
Joined: Fri Jun 11, 2010 9:48 am
Has thanked: 0 time
Been thanked: 0 time

Re: Easytrieve code to replace cobol "add"

Postby dick scherrer » Mon Jun 14, 2010 11:42 pm

Hello,

Not that i'm aware of - just code the expression. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to CA-Easytrieve

 


  • Related topics
    Replies
    Views
    Last post