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.
Read-Only TopicGo
Search
Notify
Admin
New PM!
Silver Member posted May 24, 2013 08:31 AM
Hi all,
I have an huge extract which is pipe delimiter "|" and want to load in one phase without any table out like the following:
Extract.txt
abcd12345678|20130524|20008
abcd12345670|20130524|20007
abcd12345679|20130524|20009
extract.mas
FILE=EXT, SUFFIX=DFIX, $
SEGNAME=EXT, SEGTYPE=S0, $
FIELD=ID, ID, A40, A40, MISSING=OFF, $
FIELD=SDATE, SDATE, A8YYMD, A8, MISSING=OFF, $
FIELD=SPRICE, SPRICE, P20.2, P10, MISSING=ON, $
Extract.acx
SEGMAME=EXT, DELIMITER=|, HEADER=NO, $
Extract.fex
FILEDEF EXTRACT DISK &WORDIR|\extract.txt
MODIFY FILE MYTABLE
FIXFORM FROM EXTRACT
SQL SET LOADONLY
DATA ON EXTRACT
END
the above code is running successfully and inserting all data to SQL table, but loading all dat into first field like the following:
ID
---------------------------
abcd12345678|20130524|20008
abcd12345670|20130524|20007
abcd12345679|20130524|20009
the SDATE and SPRICE Fields are empty.
It looks like that ignoring the DELIMITER and thinking as fix format.
Please help me.
This message has been edited. Last edited by: <Kathryn Henning>, June 11, 2013 12:13 PM WebFOCUS 7.67 & WebFOCUS 80 windows
Posts: 45 | Location: Kabul, Afghanistan | Registered: August 07, 2011
IP
Virtuoso As far as I am aware, FIXFORM reads FIXFORM, not DFIX. You can read the whole line in and use GETTOK to get the separate field components.
Or, if you can use MAINTAIN, that will read the DFIX file correctly.
However, performance is everything. You say huge. How big is huge, how many rows of data?
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007
IP
Platinum Member Is the length of your ID field specified correctly? You have it as 40 which seems to be the whole record and not just the ID part.
Of course you can also specify the length of each field in your fixform.
A thought...
Vivian Perlmutter
Aviter, Inc.
WebFOCUS Keysheet Rel. 8.0.2
(Almost) 1001 Ways to Work with Dates thru Rel. 8.0.2
Focus since 1982
WebFOCUS since the beginning
Vivian@aviter.com
Posts: 191 | Location: Henderson, Nevada | Registered: April 29, 2003
IP
Expert and, the format of the 3rd field is listed as P, and i think that might not work, i think that needs to be A ; P might expect binary
In Focus since 1979/// 7706m/5 ;wintel 2008/64;OAM security; Oracle db, /// MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
IP
Virtuoso Place the delimiter line in the master and not in the Acx file
And do the same with the location of the file, so you do not need to use a filedef
Frank prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006
IP
Virtuoso FRA,
In your example, the fields shown have fixed length. If this is the case then you can write your FIXFORM as follows:
FIXFORM ID/A12 X1 SDATE/A8YYMD X1 SPRICE/A5
If not go with Alan's suggestion and use GETTOK:
COMPUTE INPUT/An=;
FIXFORM INPUT/An
COMPUTE
ID/Ai=GETTOK(INPUT, n, 1, '|', i, 'Ai');
SDATE/A8YYMD=GETTOK(INPUT, n, 2, '|', 8, 'A8');
...
Where 'n' is the length of your input string and 'i' is the length of field ID. You will need similar statements for the rest of your fields.
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006
IP
Silver Member Thanks a lot All, specially Alon and Danny, the GETTOKE function is worked and I could load my all extracts in onetime load to DB.
WebFOCUS 7.67 & WebFOCUS 80 windows
Posts: 45 | Location: Kabul, Afghanistan | Registered: August 07, 2011
IP
Please Wait. Your request is being processed...
Read-Only TopicCopyright © 1996-2020 Information Builders