Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with a variable string

Status
Not open for further replies.

SunStorm

IS-IT--Management
Feb 6, 2001
25
0
0
ES
Good morning.

I have some problems with a variable string.

I have an oracle table, and in two camps y have the name of an other oracle table and in other camp i have the name of a table camp.

I need to take this strings and make a MOVE camp1 OF table1 to XXXXXXX statement. But I don't know if exist a sentence to made it.

Thanks for all.

SunStorm Thanks.
SunStorm
 
Sorry didn't get ur question..can u be more clear?
Regards
Kurup
 
I have two camps in an oracle table. For example:

TableName TableCamp
---------- -----------
Table1 Camp3


And I have to do this:

MOVE camp3 OF table1 TO XXXXX OF XXXXX

But I don't know how to do it. Because if I make this, in XXXX I have 'camp3' and 'table1' as a string and not as a value.

Thanks




Thanks.
SunStorm
 
perhaps you can give us an example of your data before and after the processing?

Regards,

Crox
 
Hi SS,

You do realize this is a COBOL forum, don't you? There may be an Oracle forum on Tek-tips that may help. But here. I'm afraid, you'll have to talk COBOL for us to help.

How did you define the table names and camps in your COBOL pgm?

Regards, Jack.
 
Well. I have a cobol 4N program ( a cursor ) and this program put into the area the value of the oracle table. For example:
02 R-table1
04 camp1 pic X(10)
04 table1 pic X(10)
..........

In my cobol program I have to do something that this:

MOVE camp1 OF table1 to XXXX OF YYYYY

but I can't do this, because don't works:

MOVE (camp1 of R-table1) OF (table1 of R-Table1) TO XXXXX OF YYYY

I need to know if exists any sentence on Cobol that i can use to do this, because with the tradicional sintaxis of the MOVE sentence don't works.


Thanks.
SunStorm
 
you should only need to qualify the variable name if there is another variable of the same name defined somewhere else in your program.
 
Thanks but.....

I think that i don't know to explain the problem.

I have an input area like this:

01 area1
02 vble1
02 vble2
03 vble3
.....

the vble1 contents a string that is the name of a camp that is inside of a oracle table. (vble2)

the vble2 contents a string that is the name of the oracle table ( or the name of a cobol area )

if vble1=name of a camp
and vble2= name of an input area.

I need to do the following sentence:

move the value of vble1 that it's in the area that name is in the vble2 of the area1 to other vble.

It's more clear the explication?? Thanks.
SunStorm
 
Are you using a select statement to access the table?

Select camp from table1.....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top