Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Use referencing in Eazytrieve

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
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    Post subject: Use referencing in Eazytrieve
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Thu Feb 02, 2012 2:50 pm    Post subject: Re: Eazytrieve.
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Thu Feb 02, 2012 2:57 pm    Post subject: Reply to: Eazytrieve.
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Thu Feb 02, 2012 2:57 pm    Post subject: Reply to: Eazytrieve.
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    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Thu Feb 02, 2012 3:13 pm    Post subject: Reply to: Eazytrieve.
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    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Thu Feb 02, 2012 3:51 pm    Post subject: Re: Eazytrieve.
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    IBMMAINFRAMES.com Support Forums -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Summing up child-values in self-refer... Auryn DB2 1 Sun Feb 14, 2016 6:02 pm
No new posts DB2 Select without using cursors in E... dick scherrer CA Products 3 Mon Aug 22, 2011 2:39 pm
No new posts Eazytrieve Letter ----unwanted data i... phani.mf2011 CA Products 8 Tue Apr 26, 2011 2:05 pm
No new posts Eazytrieve - data defination. krunalbafna CA Products 3 Thu Nov 18, 2010 11:58 am
No new posts Eazytrieve A010 error krunalbafna CA Products 3 Sun Nov 14, 2010 6:21 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us