Highlighted
Absent Member.
Absent Member.
167 views

[archive] I$IO and EXECUTE

[Migrated content. Thread originally posted on 21 November 2005]

I am trying to use I$IO and the EXECUTE function to run a MSSQL stored procedure. I have looked through ACUCORP'S documentation, and searched the forum, but I could not find a working example. The ACUCORP doc states that the EXECUTE function takes two params which are System and Command. Here is my code thus far:

MOVE "EXEC sp_stored_procedure" TO SQL-COMMAND.
SET EXECUTE-FUNCTION TO TRUE.
CALL "I$IO" USING IO-FUNCTION, "MSSQL", SQL-COMMAND.

Just in case it matters, I am running a 5.2.1 runtime.
0 Likes
1 Reply
Highlighted
Absent Member.
Absent Member.

RE: [archive] I$IO and EXECUTE

have you tried to put a x"00" at the end of the command?
This because this string is passed "as is" to the Host Database, whish ofthen requires a NULL to terminate the string.

STRING "EXEC sp_stored_procedure;" delimited by size
x"00" delimited by size
INTO SQL-COMMAND.

let us know
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.