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.
I have a file that looks like this: /media/rackspace/db2/clients/Jones/2011/2011-10/2011-10-01/852/ISA_006940860_000003234.edi,852,20110925,20111001,006940860,4014677150,16747,4 /media/rackspace/db2/clients/Jones/2011/2011-10/2011-10-01/852/ISA_014492501_400001168.edi,852,20110925,20111001,014492501,4014677150,40474,2
If I don't create DEFAULT or SET values for the variables in the -READ, the procedure failes. If I define the variables, the date returned matches the lenght of the variables I set up as the default. If I uset .Axx. syntax to define the langth, I get the results that match my format.
What I need is to read each item between the commas fully, so I can manipulate the results.
Running Windows vers 773This message has been edited. Last edited by: Kerry,
Steve
Posts: 44 | Location: New York City | Registered: May 23, 2004
set up 1 variable, with a specified length of blanks equal to the largest expected line in your file make sure its full of blanks to initialize it, otherwise you're reading adjacent garbage in memory read your line into that space -READ INP &BIGTHING Use the TRUNCATE function then to shrink it down to real size, and then the .LENGTH will work. then token thru (or posit) to look for commas and set each of your individual variables... i have a routine somewhere that loops thru a long string, looking for the posit of commas, until posit returns a zero At each step, i set a REMAINDER string starting with the current posit and going to the end of the string....and then operate on that Remainder... if you follow what i'm saying, i'll look up that code and give it to you, but it wont be till monday
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
I thought of this too, but I am being stubborn. The documentation says that -READ can read from a comma delimited file. I guess I was hoping for too much. If it cannot do the parsing into the various variables, it really cannot read a comma delimited file.
I was thinking of reading in each single line and then using the GETTOK to pick it apart at each comma. Seems to be an overkill too. All of this will take a lot of time, for a very simple and one off process to figure out how to file a full directory's files into appropriate structures.
So, here is the question to IBI: Is the -READ supported for comma delimited files, the way one would expect it, or is it not?
Steve
Posts: 44 | Location: New York City | Registered: May 23, 2004
You can write a master file that will parse the .csv, then you don't have to -read set pcomma = on remember that?
but like new jersey says, looks like DFIX with delimiter = /
or..if its both, then the way i sugested is perfect. i had a file i had to read every day from the cashregister vendor (name gratefully forgotten) that had 2 different formats in it...the overall format was comma delimited, but one field inside was a comment field with crlf that had to be parsed ...that was fun...
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003