IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Use referencing in Eazytrieve


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
krunalbafna
Warnings : 1

Active User


Joined: 18 Jan 2010
Posts: 143
Location: Pune

PostPosted: Thu Feb 02, 2012 2:34 pm
Reply with quote

Hi,
My variable :
VAR-1 125AUI85F

I want to move value 125AUI into another variable.

When i am using
MOVE VAR-1(1:6) to VAR-2

but while compiling i am facing following error:
B118 NAME MISSING
VAR-1
B027 NOT A VALID NAME - 6

Is it possible to use referencing in EZT.

Regards,
Krunal
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Feb 02, 2012 2:50 pm
Reply with quote

Why don't you read the manual for your release? It is good practice to check the manual before inventing syntax, obviates the need to actually do the inventing (so, conceptualise and find out if syntax exists/what it is for your concept).

Better:

Code:
VAR-1 125 A
some-other-really-dumb-and-meaningless-name VAR-1 6 A

VAR-2 = some-other-really-dumb-and-meaningless-name



Or, if VAR-2 happens to be length of six,

Code:
VAR-2 = VAR-1
Back to top
View user's profile Send private message
krunalbafna
Warnings : 1

Active User


Joined: 18 Jan 2010
Posts: 143
Location: Pune

PostPosted: Thu Feb 02, 2012 2:56 pm
Reply with quote

Hi Bill,
My var-2 length keeps on changing depending upon the situation.

I know the creation of the sub elements. but in my case the sub elements will not work.

Regards,
Krunal Bafna
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Feb 02, 2012 2:57 pm
Reply with quote

and what about using a more intelligent title ? icon_evil.gif
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Feb 02, 2012 2:57 pm
Reply with quote

Because? You show fixed position and length on your fake reference-modification, I don't see how that can't be reflected in data definition.
Back to top
View user's profile Send private message
krunalbafna
Warnings : 1

Active User


Joined: 18 Jan 2010
Posts: 143
Location: Pune

PostPosted: Thu Feb 02, 2012 3:00 pm
Reply with quote

Hi Bill , Enricho,

Thanks for the information and updates.
Like Cobol it is not possible to move part of variable into another working storage variable in Eazytrieve.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Feb 02, 2012 3:13 pm
Reply with quote

Why, instead of answering my question, did you come up with that cryptic line?

You have shown a fixed starting position and a fixed length. Do it with the data, or, since the start position is 1, by the length of "VAR-2". If you have something different, you have to say so.

Now, read what you wrote in your previous, and re-write it so that it can be understood by someone who doesn't already know what it says, please.
Back to top
View user's profile Send private message
krunalbafna
Warnings : 1

Active User


Joined: 18 Jan 2010
Posts: 143
Location: Pune

PostPosted: Thu Feb 02, 2012 3:18 pm
Reply with quote

Hi,
My variable :
VAR-1 125AUI85F

I want to move value 125AUI into another variable. The value to be moved into varible-2 varies depending upon condition.
Cond-1 move first 5 character.
cond-2 move first 6 character
Cond-2 move first 8 character.

When i am using
MOVE VAR-1(1:ws-value) to VAR-2

but while compiling i am facing following error:
B118 NAME MISSING
VAR-1
B027 NOT A VALID NAME - ws-value

Is it possible to use referencing in EZT.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Feb 02, 2012 3:51 pm
Reply with quote

Bill Woodger wrote:
Why don't you read the manual for your release? It is good practice to check the manual before inventing syntax, obviates the need to actually do the inventing (so, conceptualise and find out if syntax exists/what it is for your concept).

Better:

Code:
VAR-1 125 A
some-other-really-dumb-and-meaningless-name VAR-1 6 A

VAR-2 = some-other-really-dumb-and-meaningless-name


[...]


Let's invent a length for VAR-1, as what I was taking as the length is part of your data, and you didn't bother to show your definition.
Code:

really-really-lazy-name-for-a-field 1 30 A
another-lazy-name-field-length-5 really-really-lazy-name-for-a-field 5 A
another-lazy-name-field-length-6 really-really-lazy-name-for-a-field 6 A
another-lazy-name-field-length-8 really-really-lazy-name-for-a-field 8 A


Code:
VAR-2 = another-lazy-name-field-length-8


Or -5, or -6, depending on your condition.

If you have lots of fields of different lengths, all starting from the first position, then there is a way to do it, which has been documented in the manuals since at least 1984.

If you want to just be lazy and obscure in your code with three fields, you have at least find out how to do it for yourself. Read the Fine Manual.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts Summing up child-values in self-refer... DB2 1
No new posts DB2 Select without using cursors in E... CA Products 3
No new posts Eazytrieve Letter ----unwanted data i... CA Products 8
No new posts Eazytrieve - data defination. CA Products 3
No new posts Eazytrieve A010 error CA Products 3
Search our Forums:

Back to Top