Focal Point
[SOLVED] Weird Behavior when calling a stored procedure

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3317056986

March 16, 2018, 11:31 AM
John_Edwards
[SOLVED] Weird Behavior when calling a stored procedure
If I call a DB2 stored procedure directly, it returns a string that is exactly two characters longer than anything I specify for it. Example:

REMOTE DEST = MVS
-REMOTE BEGIN

TABLE FILE VSTP22A
OUTP
-* OUTP/A1550
-*PRINT COMPUTE OUTPUT_LINE/A1550 = SUBSTR(1550, OUTP, 1, 1550, 1550, 'A1550');
WHERE INP IN
(
'19XFA1581'
)
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SET EMPTYREPORT ON
ON TABLE HOLD AS PRE_LIST
END
-REMOTE END


I will get the following error from this request:

03/16/2018 11:26:26     LOOPBACK                         NUMBER OF RECORDS IN TABLE=        1  LINES=      1
03/16/2018 11:26:26     LOOPBACK                         (FOC034) THE PRINT LINE EXCEEDS THE MAXIMUM LINE WIDTH. WIDTH IS: 1552
03/16/2018 11:26:26     LOOPBACK                         (FOC1400) SQLCODE IS 34 (HEX: 00000022)
03/16/2018 11:26:26     LOOPBACK                         : THE PRINT LINE EXCEEDS THE MAXIMUM LINE WIDTH. WIDTH IS: 1552
03/16/2018 11:26:26     LOOPBACK                         (FOC1405) SQL PREPARE ERROR.


It doesn't matter what value I put for the length of the string, I get the errors above, and the width is shown to be two characters bigger than the length I specify. When I put in 1550, it tells me 1552 is too big. When I put in 1552, it tells me 1554 is too big.

I'm more or less stuck with the error because it grows to exceed whatever I specify. The proper length is 1550. You can see the two commented-out lines where I've tried to work around the issue, but to no avail. I get the same errors regardless.

I can use the stored procedure as the child of a join and pull the field, but that's problematic in my case. So the field can populate and work properly, just not when I call the routine directly.

This message has been edited. Last edited by: FP Mod Chuck,



March 16, 2018, 12:31 PM
FP Mod Chuck
John

Just a guess but try SET PANEL=2000


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
March 16, 2018, 01:00 PM
John_Edwards
That moves me on to my next error! Thanks!



April 06, 2018, 01:48 PM
Don Garland
quote:
my next error!



John, what was the "next error"?


WebFOCUS Administrator @ Worldpay FIS
PROD/DEV/TEST: 8204, SANDBOX: 8206 soon - BIP, Reportcaster, Resource Manager, EUM, HyperStage soon, DB: HIVE,Oracle,MSSQL