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     -READ reads past end of record

Read-Only Read-Only Topic
Go
Search
Notify
Tools
-READ reads past end of record
 Login/Join
 
Platinum Member
posted
I am trying to read the output of a dos dir command so I can clean up old files. How do you rad a variable length text file in Webfocus ? The _READ reads part of the first record and part of the second record.

The output of the DIR command looks kike this:

Volume in drive E is DV2KDW06_E
Volume Serial Number is 4864-211B

Directory of E:\IBI\APPS\SORTPARM

12/16/2004 01:05p <DIR> .
12/16/2004 01:05p <DIR> ..
11/24/2004 12:25p 38 CB0RHAL_20041124_122520.TXT
11/24/2004 01:36p 0 CB0RHAL_20041124_133630.TXT
11/24/2004 01:55p 374 CB0RHAL_20041124_135523.TXT
11/24/2004 01:59p 374 CB0RHAL_20041124_135916.TXT
11/24/2004 02:14p 362 CB0RHAL_20041124_141429.TXT
11/24/2004 02:27p 362 CB0RHAL_20041124_142742.TXT
11/24/2004 02:32p 362 CB0RHAL_20041124_143221.TXT
11/29/2004 09:52a 362 CB0RHAL_20041129_095253.TXT
11/29/2004 10:05a 362 CB0RHAL_20041129_100519.TXT
11/30/2004 01:12p 362 CB0RHAL_20041130_080211.TXT

Code to read file:

-SET &ECHO='ALL';
-INCLUDE PATH
-SET &CPATH=&PATH | 'SORTPARM' ;
-SET &DPATH=&PATH | 'BOBTEST_HOLD\DIR_LIST.DAT' ;
DOS DIR &CPATH > &DPATH (LRECL 80 RECFM F
-RUN
FILEDEF INPUT DISK &DPATH
-*DEFAULT &DATA=' ';
-RUN
-LOOP

-READ INPUT &DATA.A80
-IF &IORETURN NE 0 GOTO EXIT;
-TYPE &DATA
-GOTO LOOP
-exit
 
Posts: 103 | Location: ricmmond va | Registered: September 30, 2004Report This Post
Guru
posted Hide Post
Instead of reading a fixed length, use the following statement:

-READ INPUT,&DATA

That will allow you to read a varaible length record.
 
Posts: 319 | Location: Stockholm, Sweden | Registered: February 04, 2004Report This Post
Platinum Member
posted Hide Post
also be sure to use /-c to omit the comma in the filesize or it will view as an End-Of-Line(end-of-Field?).
 
Posts: 157 | Location: Secaucus, NJ | Registered: May 21, 2004Report 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     -READ reads past end of record

Copyright © 1996-2020 Information Builders