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 an additional record on a HOLD file

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Create an additional record on a HOLD file
 Login/Join
 
<Thiru>
posted
Hi,

I need help on a technique which I'm facing first time.

I have file with records like;

ORDNUM ORDITEM
===== ======

45466 ERT6
67688 AERT, RTRTR, RTSDF
98989 DESH, KLHRET
65656 LKNBV


For a single ORDNUM, there might be more than one ORDITEM values seperated by comma (,). I want to break the ORDITEM for a ORDNUM and make a another record with the ORDNUM. The expected output will be;

ORDNUM ORDITEM
===== ========

45466 ERT6
67688 AERT
67688 RTRTR
67688 RTSDF
98989 DESH
98989 KLHRET
65656 LKNBV


Anyone has any idea, how do get it?

Thanks in advance,
Thiru
 
Report This Post
<kj>
posted
I had a similar issue, but I created a view in database and created a master file for that view.

thanks,
kj
 
Report This Post
<Thiru>
posted
Thanks for your thought! But I need to do without using the view or any SQL Passthru.

Any more idea?

Thanks,
Thiru
 
Report This Post
Virtuoso
posted Hide Post
Assuming the items are in one text file, you could use the gettok and ljust functions to strip each one into a defined field. This will get the items into fields. Then look at the MacGuyer Technique of making one record into many.

A similation I use is to take an existing file and do something like this: (QUASI CODING HERE)
DEFINE FILE AFILE
BLANK/A1 = ' ';
END
TABLE FILE AFILE
PRINT
COMPUTE COUNTER/I2 = COUNT + COUNTER;
BY BLANK
ON TABLE HOLD AS FSEQ FORMAT FOCUS INDEX BLANK
IF RECORDLIMIT EQ 12 (OR WHATEVER YOU NEED)
DEFINE FILE BFILE
PUT GETTOK STUFF HERE
BLANK/A1 = ' ';
END
TABLE FILE BFILE
PRINT ORDNUM ORDITM1 ORDITM2 .....
BY BLANK
ON TABLE HOLD AS HOLD1
END
JOIN BLANK IN HOLD1 TO ALL BLANK IN FSEQ AS J1
DEFINE FILE HOLD1
ORDITM/A(however long) =
IF COUNTER EQ 1 THEN ORDITM1
ELSE IF COUNTER EQ 2 THEN ORDITM2
ELSE ...... ELSE ' ';
END
TABLE FILE HOLD1
PRINT ORDNUM ORDITM
WHERE ORDITM NE ' '
END
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Virtuoso
posted Hide Post
I forgot one define in the AFILE for count
in my last post on this.

COUNT/I1 = 1;
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
<Thiru>
posted
Leah,

Thanks for your solution! I'll try to implement this idea for my case.

Thiru
 
Report This Post
<Thiru>
posted
Leah,

Thank you so much for your quick solution. It really worked out well eventhough it has the static record limit. But I never mind on this now.

Thanks again,
Thiru
 
Report 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 an additional record on a HOLD file

Copyright © 1996-2020 Information Builders