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     Create a HOLD file from a String

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Create a HOLD file from a String
 Login/Join
 
Gold member
posted
I have a String that contains values separated by comma.
I need to create a HOLD file out of the entries in this string.

Example: Say the String is ABC,DEF,DFR,GHT,PQR

I need to have a HOLD file out of this string such that its content would be

ABC
DEF
DFR
GHT
PQR

Can anyone provide any insights into this?


Web Focus 7.1.6
Hosted on Unix Box
 
Posts: 61 | Registered: August 17, 2007Report This Post
Virtuoso
posted Hide Post
You might create a master that looks like this

FILENAME=FP, SUFFIX=COM
SEGNAME=ROOT, OCCURS=VARIABLE
FIELD=CODE,,A6,,$


Never tried the "occurs=varibale" with a COM file, but you can try.

The master file describes your text file.

But if this is for only one time and the file is not that big I would do it in an other way.

Open the file in an editor.
Find and replace the comma for a CRLF and save the file again....




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, 2006Report This Post
Virtuoso
posted Hide Post
I tested it myself

It does not work with COM

So I added a extra field that reeds the comma and then it does work.

I'm looking forward to some other solutions.




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, 2006Report This Post
Virtuoso
posted Hide Post
Ved,

Do you have one record containing that string or many?


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, 2006Report This Post
Gold member
posted Hide Post
I just have an amper variable that contains the comma separated values (as a single string)


Web Focus 7.1.6
Hosted on Unix Box
 
Posts: 61 | Registered: August 17, 2007Report This Post
Virtuoso
posted Hide Post
Ved,

Try this:

  
-* File ved3.fex
FILEDEF VED DISK VED.FTM
-RUN
-SET &VED='ABC,DEF,DFR,GHT,PQR';
-SET &V='X';
-SET &I=0;
-REPEAT #V1 WHILE &V NE ' ';
-SET &I=&I+1;
-SET &V=GETTOK(&VED, &VED.LENGTH, &I, ',', 3, 'A3');
-IF &V EQ ' ' GOTO #VDONE;
-WRITE VED &V
-#V1
-#VDONE
-RUN
!TYPE VED.FTM


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, 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     Create a HOLD file from a String

Copyright © 1996-2020 Information Builders