Author |
Message
|
pcelari |
Posted: Tue Dec 28, 2010 8:52 am Post subject: calling stored procedure with a list/array as parameters? |
|
|
Chevalier
Joined: 31 Mar 2006 Posts: 411 Location: New York
|
Hi,
I need to call a udb stored procedure to update a table received in the form of a cobol copy book record, which exactly matches the layout in the database table.
Is it possible for me to pass the fields without having to split them into individual parameters? there're 198 of them?
thanks for any insight.
 _________________ pcelari
-----------------------------------------
- a master of always being a newbie |
|
Back to top |
|
 |
Vitor |
Posted: Tue Dec 28, 2010 9:01 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
So does this table have 198 columns in the same sequence as the COBOL field names? Or one column that has a blob that contains a record laid out as per the copybook? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
pcelari |
Posted: Tue Dec 28, 2010 10:24 am Post subject: |
|
|
Chevalier
Joined: 31 Mar 2006 Posts: 411 Location: New York
|
thanks for responding.
yes, exactly, it has 198 columns in the same sequence, as the cobol object was generated directly from the table definition. _________________ pcelari
-----------------------------------------
- a master of always being a newbie |
|
Back to top |
|
 |
Vitor |
Posted: Tue Dec 28, 2010 10:35 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
pcelari wrote: |
yes, exactly, it has 198 columns in the same sequence, as the cobol object was generated directly from the table definition. |
Will the database engine allow a non-parameterised insert/update?
What I mean is if WMB wasn't in the equation, could you do what you're attempting with a C or COBOL app, something like INSERT INTO <db> VALUES <structure>? If the database engine allows that you can use PASSTHRU but I'm not aware of any database that allows that.
You could probably use anonymous references to parse the inbound COBOL message tree and build the SQL statement. This relies on 2 points:
1) That the COBOL field names match or can be mapped automatically to the column names
2) That I'm right
 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Dec 28, 2010 10:41 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Vitor wrote: |
You could probably use anonymous references to parse the inbound COBOL message tree and build the SQL statement. |
Or use a Mapping node & 198 drag & drops. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|