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     Maximum data length of an Alphanumeric field

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Maximum data length of an Alphanumeric field
 Login/Join
 
Gold member
posted
What is the Maximum data length of an Alphanumeric field I can specify in the MAS file???

I want to read a A1000 column in a & variable. Is it allowed??

Can we read variable length columns like
COL1 is defined A20V in mas file.

Can I read it as &V_Col1.A20V. ??

Thanks,
CD
 
Posts: 78 | Registered: December 11, 2005Report This Post
Expert
posted Hide Post
quote:
Can I read it as &V_Col1.A20V. ??

Digger, this syntax suggests you're going to read this file with Dialogue Manager.
so, No, you can't use V in DM.
You have to read exactly how many characters you want. and with DM, if the inbound records are of variable length themselves, then your dm -READ command will just keep reading, into the next record. Eg, if you say -READ MFYLE &THING.A1000 and the inbound record is A1000 , cool. If the inbound record is A800, then DM will read the A800 and then the first 200 of the next line. Can get mighty confusing.
It might be best to write an ordinary MFD for filetype DFIX and specify the delimiter that the file uses. Does it use some kind of delimiter to separate these n fields?
If not, then just a regular mfd for suffix=fix should be able to read 1 record at a time regardless of how many chars it is. eg..reading a master file as a flat file.
If Noreen has her ears on, she'll come back and show you how to use OCCURS= in your MFD.




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
Virtuoso
posted Hide Post
The maximum size for an alpha field in an mfd depends on the data source I believe. I use FOCUS db and the limit in this is 3968 as long as it is in it's own segment. Realistically it is a little less.

For example, I have used an A2000V in a FOCUS db. To read this into an &var effectively:
  
FILEDEF SAVE DISK APP/SAVE.FTM
TABLE FILE Fn
PRINT LONG_VAR
ON TABLE SAVE
END
-RUN
-READ SAVE &recLen.A6
-READ SAVE &varField.A&recLen.EVAL

The length of the record is held in the first 6 places, and the actual value follows that. The maximum length actually held in this field has been 1340 characters and this has been read into an &var succesfully. For some reason the FILEDEF is needed for this to work for me. The -READ can also be in a REPEAT loop and this still works effectively.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Expert
posted Hide Post
Digger,

The alternative is to let WF determine the length. However this will only work with a single variable in an output line.
TABLE FILE CAR
BY COUNTRY
IF RECORDLIMIT EQ 1
ON TABLE SAVE
END
-RUN

-READ SAVE, &Country
-TYPE &Country is &Country.LENGTH chars in length

T

This message has been edited. Last edited by: Tony A,



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
Member
posted Hide Post
FWIW, my first post, although I've gotten tons of good info from everyone who regularly posts.

I have a situation where I'm reading a field with format A1000V which came from SQL Server. I use the following to read it into DM:

-READ SAVE &CURVLGTH.I6. &CurricNM.A1000. &CurricID.P16.

Regardless of how much data is actually in &CurricNM, it correctly reads the following variable &CurricID. So, even though it's a variable length field, the -READ is able to find the following field without going into the next record.


Test: Win 7 SP1, Dev Studio 8.0.07, SQL Server 2K8, PDF, EXL2K
Prod: Win 2K3/8, WF 7.7.02m, SQL Server 2K5/2K8, PDF, EXL2K
 
Posts: 4 | Location: Cincinnati | Registered: February 04, 2005Report This Post
Master
posted Hide Post
Just on the Max size for SQL based tables: A4000 and A8000V (good for views) seem to be possible. Doubt this A8000V can be replicated even in XFOCUS files.



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
 
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006Report This Post
Virtuoso
posted Hide Post
Hiredgun(!),

I really had problems reading a SAVE file as you do. Maybe as I was only outputting the text field, but I found the LRECL of the save file reduced by about 12 characters, causing me weird issues, particularly where I had more than one record retrieved into the SAVE file, with part of the following record being appended to a previous record.

It could be that the data I have has CR characters in it, which may cause an issue.

I also found that reading the actual length of the variable meant that I did not have any unwanted trailing spaces in the &var, which the users hated when editing.

But if it works for you, be happy.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Virtuoso
posted Hide Post
hammo1j

I have experimented with an A8000V in XFOCUS, results fine. I think I went further as well, but cannot remember the exact size.

Unfortunately I really need FDS support, which XFOCUS hasn't got (yet?).


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Gold member
posted Hide Post
Thanks for the replies,

The issue here is that I have to achieve personalization of the filter screen. so for that I am saving the data currently selected by user into a FOC file. At the time of loading the HTML next time I need to read the FOC file to see what values were selected by user the last time he/she visited the screen.

Since few fields on the page are multiselect I have to save then as comma separated in my FOC. But since MAS file allows a max of A256 chars for an alphanumeric field I cant save a string of length more than A256 in my FOC file.

So is there a better and simpler approach available???

Please help.

Thanks,
CD
 
Posts: 78 | Registered: December 11, 2005Report This Post
Master
posted Hide Post
Your best bed is a little known feature LET SAVE.

Create all your amper variables as globals. LET SAVE will create a fex containing -SET statements to restore their values.

A little known feature that I used for submission of batch jobs with parameters.



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
 
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006Report 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     Maximum data length of an Alphanumeric field

Copyright © 1996-2020 Information Builders