|
View previous topic :: View next topic
|
| Author |
Message |
jerryte
Active User

Joined: 29 Oct 2010 Posts: 205 Location: Toronto, ON, Canada
|
|
|
|
If I have a variable structure
| Code: |
01 A.
05 B.
10 C.
15 D PIC X(10). |
If D is not unique within the program I have to do
| Code: |
| MOVE 'TEXT' TO D OF A |
If I want to use D as a variable in an SQL fetch how do I code this?
| Code: |
| FETCH my-cursor INTO :D OF A |
I looked through the db2 manuals but couldn't find this. |
|
| Back to top |
|
 |
Pandora-Box
Global Moderator
.jpg)
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
May be Try ??
| Code: |
| FETCH my-cursor INTO :A.D |
|
|
| Back to top |
|
 |
agkshirsagar
Active Member

Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
Pandora-Box.. you were close..
It should be C.D
Jerry, please let us know if this satisfies your requirement.
I could find this link from IBM.. |
|
| Back to top |
|
 |
Naish
New User

Joined: 07 Dec 2006 Posts: 82 Location: UK
|
|
|
|
I tried
. All of them worked...  |
|
| Back to top |
|
 |
jerryte
Active User

Joined: 29 Oct 2010 Posts: 205 Location: Toronto, ON, Canada
|
|
|
|
Thanks all. Just curious - is it possible to do:
? |
|
| Back to top |
|
 |
Pandora-Box
Global Moderator
.jpg)
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
| Quote: |
| Just curious - is it possible to do: |
Why dont you try that yourself  |
|
| Back to top |
|
 |
Naish
New User

Joined: 07 Dec 2006 Posts: 82 Location: UK
|
|
|
|
Only if you had tried you would have got the pleasure of finding/trying something new... (pun intended)
it works...  |
|
| Back to top |
|
 |
|
|