Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     READ fixed length var

Read-Only Read-Only Topic
Go
Search
Notify
Tools
READ fixed length var
 Login/Join
 
Platinum Member
posted
I'm trying to read 2 variables from a SQL stored procedure output:

TABLE FILE SQLOUT
PRINT id message
ON TABLE SAVE AS MYSQL
END
-RUN
-READ MYSQL &initid.I11. &message.A120.

the first variable is fine, but the second (&message) being saved as A100V. This is a problem as vars defined this way actually concatenate all columns, so instead of &message being "Insert failed", I get "000037Insert failed". I've read about the -READ command, but I'm still a little unsure how to use it in this case.


Thanks.

Mark
WF 7.6 Windows
 
Posts: 150 | Registered: July 26, 2007Report This Post
Expert
posted Hide Post
quote:

TABLE FILE SQLOUT
PRINT id message
ON TABLE SAVE AS MYSQL
END
-RUN
-READ MYSQL &initid.I11. &message.A120.



  
DEFINE FILE SQLOUT
  MSG/A120=MESSAGE;
END

TABLE FILE SQLOUT
PRINT id MSG
ON TABLE SAVE AS MYSQL
END
-RUN
-READ MYSQL &initid.I11. &MSG.A120.


OR

-READ MYSQL &initid.I11. &FILL.A6. &message.A120.

Whatever you think is best....


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Master
posted Hide Post
Mac,

When using var char the first 6 characters are the actual length of the field. The reading that as a separate variable as Tom suggested should work.


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Report This Post
Expert
posted Hide Post
You can also issue SQL SQLMSS SET VARCHAR OFF.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     READ fixed length var

Copyright © 1996-2020 Information Builders