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] Concatenating several flat files into one

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[Solved] Concatenating several flat files into one
 Login/Join
 
Expert
posted
I have one Master and I'd like to concatenate several files into one using the FILEDEF command if possible.

The files in question are the EDAPRINT files. Five files are kept in the wfs directory and I'd like to read them all together, as one file.

FILEDEF EDAPRINT1 DISK D:\ibi\srv53\wfs\edaprint.log


How do I get edapri01.log, edapri02.log, edapri03.log, edapri04.log and edaprint.log all read together?

I know I can FILEDEF and PRINT/HOLD each one of them individually and then MORE the HOLD files, but is there another way?

Thank you,

This message has been edited. Last edited by: Francis Mariani,


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
You're in a wintel world?
How about DOS commands to copy them and append them into 1 big file, then read that, and then the big file dies with the agent.

COPY [/D] [/V] [/N] [/Y | /-Y] [/Z] [/A | /B ] source [/A | /B]
     [+ source [/A | /B] [+ ...]] [destination [/A | /B]]

  source       Specifies the file or files to be copied.
  /A           Indicates an ASCII text file.
  /B           Indicates a binary file.
  /D           Allow the destination file to be created decrypted
  destination  Specifies the directory and/or filename for the new file(s).
  /V           Verifies that new files are written correctly.
  /N           Uses short filename, if available, when copying a file with a
               non-8dot3 name.
  /Y           Suppresses prompting to confirm you want to overwrite an
               existing destination file.
  /-Y          Causes prompting to confirm you want to overwrite an
               existing destination file.
  /Z           Copies networked files in restartable mode.

The switch /Y may be preset in the COPYCMD environment variable.
This may be overridden with /-Y on the command line.  Default is
to prompt on overwrites unless COPY command is being executed from
within a batch script.

To append files, specify a single file for destination, but multiple files
for source (using wildcards or file1+file2+file3 format).

or is that just tooo last millenium?




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
Susannah, why not go Old School? Thanks, Francis.
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
Say, Francis, would this work?
CMD COPY MYFILE D:\ibi\srv53\wfs\edaprint*.log

it says 'wilcards or ...'
worth a try




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
<JG>
posted
If you want the latest 4 logs

-SET &edalogs='C:\ibi-dev\ibi\srv76\wfs\';
!dir &edalogs.EVAL*.log /B/O-D > alllogs.txt
FILEDEF ALLLOGS DISK alllogs.txt
-RUN
-READ ALLLOGS &EF1.A12.
-READ ALLLOGS &EF2.A12.
-READ ALLLOGS &EF3.A12.
-READ ALLLOGS &EF4.A12.
!COPY &edalogs.EVAL&EF1+&edalogs.EVAL&EF2+&edalogs.EVAL&EF3+&edalogs.EVAL&EF4 last4logs.log

Btw Susannah, its copy from-to not to-from
 
Report This Post
Expert
posted Hide Post
the point was the wildcard




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
<JG>
posted
OK

!COPY C:\ibi\srv76\wfs\*.log alllogs.log

that works
 
Report This Post
Expert
posted Hide Post
Solved! Thanks Susannah and JG.

-*-- Concatenate all edaprint log files into one file --------------------------
!COPY D:\ibi\srv53\wfs\edapri*.log D:\temp\edaprint.log
-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
  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] Concatenating several flat files into one

Copyright © 1996-2020 Information Builders