View previous topic :: View next topic
|
Author |
Message |
gireesh.behara
New User
Joined: 09 Jul 2008 Posts: 2 Location: chennai
|
|
|
|
Hi all
I am facing one problem while using the update statement in cobol.
Eg
Update EMP set sal=5000 where EMPID in(EMPLoyee ID's are in COBOL array)
How do i execute the above query for set of ID's
Any help would be greatful |
|
Back to top |
|
|
Bharath Bhat
Active User
Joined: 20 Mar 2008 Posts: 283 Location: chennai
|
|
|
|
Hi,
You can do this in a loop with a varying index.
Code: |
PERFORM UPDATE-PARA VARYING WS-INDX FROM 1 BY 1
UNTIL WS-INDX = X (Maximum value of the array)
UPDATE-PARA.
UPDATE EMP set sal=5000 where EMPID = WS-EMP-ID-ARR(WS-INDX) |
|
|
Back to top |
|
|
rag swain
New User
Joined: 17 Dec 2007 Posts: 33 Location: pune,INDIA
|
|
|
|
Is this a static or dynamic array? The no of EMPID keeps on changing each time or is it constant? |
|
Back to top |
|
|
ashimer
Active Member
Joined: 13 Feb 2004 Posts: 551 Location: Bangalore
|
|
|
|
Quote: |
Is this a static or dynamic array?
|
?
Quote: |
The no of EMPID keeps on changing each time or is it constant?
|
ans
Quote: |
How do i execute the above query for set of ID's
|
|
|
Back to top |
|
|
|