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     [SOLVED] appending records to hold file

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] appending records to hold file
 Login/Join
 
Platinum Member
posted
Is there an easy way to append records to a 3-field hold file without having to do a modify routine or -READ / -WRITE? -READ and -WRITE are somewhat unpredictable in this environment. If there's no other way than to use modify or -READ and -WRITE, then please present your suggestions.

Thank you,

John

This message has been edited. Last edited by: Kerry,


WF 7.7.03, Windows 7, HTML, Excel, PDF
 
Posts: 225 | Location: San Francisco Bay Area, California | Registered: October 26, 2006Report This Post
Virtuoso
posted Hide Post
If it's a HOLD FORMAT FOCUS, you'd have to use Modify (or Maintain).

If a flat HOLD file, get the filedef attributes for the ddname, reissue the filedef with APPEND, and SAVE (if HOLD was format alpha) or SAVB (if binary) to the ddname. Test and inspect to make certain the old and new rows line up.

See How to Assign a Logical Name With Code Under Windows for FILEDEF syntax.

But note that you could run into trouble reporting, if the extended file is no longer sorted overall in conformity with the SEGTYPE in the Hold MFD.


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
<JG>
posted
quote:
-READ and -WRITE are somewhat unpredictable in this environment


That's an extremely strange statement. Why?
 
Report This Post
Platinum Member
posted Hide Post
You can have a common master file, then hold data to different files. Then issue use command

USE
FILEA AS COMMONMASTER
FILEB AS COMMONMASTER
END

Another easy way is to use (APPEND. Here is the sample code.

FILEDEF HOLD DISK HOLD.FTM (APPEND
TABLE FILE CAR
PRINT CAR
BY COUNTRY
WHERE COUNTRY EQ 'ENGLAND'
ON TABLE HOLD
END
TABLE FILE CAR
PRINT CAR
BY COUNTRY
WHERE COUNTRY EQ 'JAPAN'
ON TABLE HOLD
END
TABLE FILE HOLD
PRINT *
END
 
Posts: 118 | Location: Omaha, NE | Registered: June 12, 2003Report This Post
Virtuoso
posted Hide Post
the FILEDEF with APPEND the Lusheng suggests if the answer you're looking for, but there are several other options as well.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Platinum Member
posted Hide Post
JG -- Yes, that is a strange statement. It's probably due to the way all the WebFOCUS are configured, and which version each one is. And I have no control over that.


WF 7.7.03, Windows 7, HTML, Excel, PDF
 
Posts: 225 | Location: San Francisco Bay Area, California | Registered: October 26, 2006Report This Post
Platinum Member
posted Hide Post
Darin, Please share your other techniques.


WF 7.7.03, Windows 7, HTML, Excel, PDF
 
Posts: 225 | Location: San Francisco Bay Area, California | Registered: October 26, 2006Report This Post
Expert
posted Hide Post
You could also use the MORE Statement. What it requires is the two files have the same column names.
TABLE FILE FILE1
PRINT FIELD2
BY FIELD1
ON TABLE HOLD
MORE
FILE FILE2
END


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
John B

One great technic that helped me a lot is following some courses.
Your remarks and question give me the idea you just started with WebFocus.




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
Expert
posted Hide Post
Like almost everyone else has suggested, use MORE:

SET HOLDLIST=PRINTONLY
SET HOLDFORMAT=ALPHA
SET ASNAMES=ON
-RUN

TABLE FILE BLAHBLAH34
PRINT
COL1 COL2 COL3
ON TABLE HOLD AS H001
END
-RUN

TABLE FILE BLINGBLING121
PRINT
COL1 COL2 COL3
ON TABLE HOLD AS H002
END
-RUN

TABLE FILE BOINGBOING96
PRINT
APPLE AS COL1
BANANA AS COL2
ORANGE AS COL3
ON TABLE HOLD AS H003
END
-RUN

TABLE FIL1 H001
PRINT COL1 COL2 COL3
ON TABLE HOLD AS H101
MORE
FILE H002
MORE
FILE H003
END
-RUN


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
quote:
-READ and -WRITE


You shouldn't have any problems with -READ and -WRITE if the program is coded correctly. If you're mixing -READ and -WRITE in the same Dialogue Manager loop, or if there is non-Dialogue Manager code within the loop, use the NOCLOSE option.

quote:
NOCLOSE - Keeps the external file open until the -READ operation is complete. Files kept open with NOCLOSE can be closed using the command -CLOSE filename. The option NOCLOSE is available only in OS/390.


It's strange the WF v5.3.2 documentation states "The option NOCLOSE is available only in OS/390" because that is not true.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
and thank heavens that statement isn't true Wink




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
Expert
posted Hide Post
This is a good refresher, even years last... Smiler
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Expert
posted Hide Post
You wouldn't have to worry if only you used the GUI Big Grin


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report 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     [SOLVED] appending records to hold file

Copyright © 1996-2020 Information Builders