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     [SOLVED] getting junk values in apher variable

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] getting junk values in apher variable
 Login/Join
 
Member
posted
Hi,

I am trying to save a value to a variable from the hold file. Below is the code which i used.
 
SQL SQLMSS
SELECT
ScreenField AS Group_1 from Table_Name
WHERE
Table_Field ='Val';

TABLE FILE SQLOUT
PRINT
Group_1
ON TABLE HOLD AS GRP1 FORMAT ALPHA
END

-RUN
-READ GRP1 &Group_1.A28.
-TYPE &Group_1
 

The query returns just one value. When i type
the &Group_1 value i get the below output.

O/P :
000006Values

When i remove the FORMAT ALPHA (
 ON TABLE HOLD AS GRP1  
) i get a square in front of the output.
Please help to resolve this issue.
Thanks,
Ajai.

This message has been edited. Last edited by: Kerry,


WebFOCUS 7.1.4,Linux,
HTML,PDF,Excel,CSV
 
Posts: 25 | Location: Chennai | Registered: August 27, 2008Report This Post
Expert
posted Hide Post
An oft asked question.

Search the forum, using the link top right, for VARCHAR.

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
Guru
posted Hide Post
Ajai,

You have to put the -Read in loop to get all the values you stored in the Hold file.


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
 
Posts: 398 | Registered: February 04, 2008Report This Post
<JG>
posted
Tony is correct what you are seeing is the way
WebFocus holds VARCHAR values.

Each column is prefixed whith it's actual length so
if you look at the SQLOUT master you will see it is described as AxV
where x is the maximum length from MSSQl

change your code to

TABLE FILE SQLOUT
PRINT
Group_1/A28
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS GRP1 FORMAT ALPHA
END

That should work
 
Report This Post
Expert
posted Hide Post
or ON TABLE SAVE. You don't need the master if you are going to -READ it.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Expert
posted Hide Post
-READ NOCLOSE grp1
will allow you to continue to read successive records.
without the NOCLOSE you keep reading the same record...
like those who do not learn from history.... Wink




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Member
posted Hide Post
I gave the 'SQL SQLMSS SET VARCHAR OFF' command and it worked. Thankyou all for your comments.

Thanks,
Ajai


WebFOCUS 7.1.4,Linux,
HTML,PDF,Excel,CSV
 
Posts: 25 | Location: Chennai | Registered: August 27, 2008Report This Post
Expert
posted Hide Post
quote:
'SQL SQLMSS SET VARCHAR OFF'
Which goes to show how valuable the Forum is as a rich source of knowledge if only you take the time to search it for your answers - well done Ajai.

Just goes to prove the saying that if you give a man a fish then he'll eat well for a day, but give him a boat and a rod ....... you know the rest Wink

One more call to tech support averted eh Gerry? Wink

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
Expert
posted Hide Post
so, i set my varchar off in my edasprof
SQL SQLORA SET VARCHAR OFF.
refreshed my masters...
but my masters still show
USAGE=A10V even tho the ACTUAL is now A10
and all my problems with V format still exist.
b/c the USAGE didn't get the V knocked off...
What am i doing wrong?
-S




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Expert
posted Hide Post
Try deleting one of the masters and recreate it. Although you are current and I haven't noticed a problem recently, in the past the refresh didn't work. Though you did say that the actual had changed..... Very strange.

Also check the format in Oracle to make sure that it is varchar.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Virtuoso
posted Hide Post
No need to fiddle with the synonym or the VARCHAR setting.

Reformat the field from varchar to char in the TABLE request, to eliminate the field-length prefix from the output file, and your -READ should be fine.

SQL . . . ;
TABLE FILE SQLOUT
PRINT
Group_1/A28
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS GRP1 FORMAT ALPHA
END
-RUN
-READ GRP1 &Group_1.A28

(printonly is needed to suppress the A28V field; without it both the A28V and A28 versions of the field would be present in the output.)


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Expert
posted Hide Post
Ginny, you're so right, i delete the master and then recreate, and bingo all the V's are out.
Pain, but bite the bullet.
thanks.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report 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     [SOLVED] getting junk values in apher variable

Copyright © 1996-2020 Information Builders