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     CR vs. CRLF in SAVE file

Read-Only Read-Only Topic
Go
Search
Notify
Tools
CR vs. CRLF in SAVE file
 Login/Join
 
Gold member
posted
I'm generating a SAVE file and comparing it to an existing file (this is a conversion project) and have discovered that in the OLD file each line is terminated with CRLF (carriage return, line feed), but the NEW file is terminated with only a CR.

Does anyone know how to force WF to generate the CRLF?


WF 7.6.6, FOCUS 7.6.4, IBM MVS/TSO, Windows 2003 Server, DB2, MSSQL
 
Posts: 65 | Location: Chicago, IL | Registered: July 26, 2007Report This Post
Virtuoso
posted Hide Post
You might try this in the Stylesheet

TYPE=REPORT,LINEBREAK='crlf',$


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Virtuoso
posted Hide Post
Alan

what format do you use?

ON TABLE SAVE FORMAT ...

The used format gives different results.




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
Gold member
posted Hide Post
ON TABLE SAVE FILENAME 'E:\ibi\apps\hris\BENMAR01.txt'

-------------------------------------------------------------

I only need to do this to compare the two files and don't really care about the CRLF except it makes it difficult to identify the rows that are really different (not CRLF). It turns out the editor I'm using can convert the file to a DOS format and will change the CR to a CRLF for me.

Thanks for your help.


WF 7.6.6, FOCUS 7.6.4, IBM MVS/TSO, Windows 2003 Server, DB2, MSSQL
 
Posts: 65 | Location: Chicago, IL | Registered: July 26, 2007Report This Post
Virtuoso
posted Hide Post
well I misread this question. Music


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Member
posted Hide Post
I am having the same problem. I am creating an 'alpha' output file. How do I add the CRLF (carriage return)?
 
Posts: 5 | Registered: October 24, 2006Report This Post
Virtuoso
posted Hide Post
Hm, I wonder what your procedure(s) looks like. If I create hold files (binary and/or alpha) and edit the results with a hex-editor then I see no CR/LF's at all in the binary holds (which figures, since they are being created with fixed record length), but the alpha hold does contain both the cr and lf characters in my environment (Windows XP). The alpha holds contain the 0D 0A combination at the end of every record. This is valid when run in 717 as well as in 761.
Code I used:
 
APP HOLD SESSION
TABLE FILE CAR
SUM
     DEALER_COST
     RETAIL_COST
     SALES
BY COUNTRY NOPRINT
BY SEATS
ON TABLE SAVE AS FILE1
END

And then change SAVE into HOLD FORMAT ALPHA or HOLD FORMAT BINARY or SAVB.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Gold member
posted Hide Post
I'm doing a simple HOLD FORMAT ALPHA, and yes, I get the 0D 0A at the end of every row. My problem was when I tried to do a compare between the OLD (only OA) file and the NEW file (both 0D 0A) using UltraEdit, it would flag every row as different, which makes the compare useless. Now I'm using TextPad which can convert the file so that the compare works properly.


WF 7.6.6, FOCUS 7.6.4, IBM MVS/TSO, Windows 2003 Server, DB2, MSSQL
 
Posts: 65 | Location: Chicago, IL | Registered: July 26, 2007Report This Post
Gold member
posted Hide Post
I said it backwards: the OLD file has 0D 0A at the end of every row; the NEW file (creaetd by WF) only has 0A at the end of every row.

I do still have a problem since I want the NEW file to be exactly like the OLD file...


WF 7.6.6, FOCUS 7.6.4, IBM MVS/TSO, Windows 2003 Server, DB2, MSSQL
 
Posts: 65 | Location: Chicago, IL | Registered: July 26, 2007Report This Post
Member
posted Hide Post
When running this on Windows (wf5.3.3), I do see the 0D 0A, but when running on Linux(wf7.6.1) I only see the 0A.

One solution we have is to run the following command:
-UNIX unix2dos &filename

But we are looking for an internal webfocus solution. Any ideas?
 
Posts: 5 | Registered: October 24, 2006Report This Post
Gold member
posted Hide Post
c1,
At this point, no. I would prefer a WF solution, too, but I may have to look for something outside WF. Right now I'm waiting to test one of the dozens of export files to see if it causes any problems at the other end.

If it does, I gotta make it happen.

CTRAN might do the trick. Create an A1 field and translate it to ASCII '0D' and print it as the last character in each row. I test it out and let you know what I get.


WF 7.6.6, FOCUS 7.6.4, IBM MVS/TSO, Windows 2003 Server, DB2, MSSQL
 
Posts: 65 | Location: Chicago, IL | Registered: July 26, 2007Report This Post
Gold member
posted Hide Post
Well, CTRAN almost works...the following translates a space to a ^ just fine but won't translate it to a CR (decimal 13).

-SET &ECHO=ALL;
DEFINE FILE EARNINGS_VW
LASTCHAR/A1 = CTRAN(1, ' ', 32, 94, LASTCHAR) ;
END
TABLE FILE EARNINGS_VW
PRINT EMPLID
LASTCHAR
WHERE RECORDLIMIT EQ 10
ON TABLE SAVE FILENAME 'E:\ibi\apps\hris\LASTCHAR.txt'
END
-EXIT


WF 7.6.6, FOCUS 7.6.4, IBM MVS/TSO, Windows 2003 Server, DB2, MSSQL
 
Posts: 65 | Location: Chicago, IL | Registered: July 26, 2007Report This Post
Virtuoso
posted Hide Post
Maybe HEXBYT will work in this setup?
 
-SET &ECHO=ALL;
DEFINE FILE EARNINGS_VW
LASTCHAR/A1 = HEXBYT(13, LASTCHAR) ;
END
TABLE FILE EARNINGS_VW
PRINT EMPLID
LASTCHAR
WHERE RECORDLIMIT EQ 10
ON TABLE SAVE FILENAME 'E:\ibi\apps\hris\LASTCHAR.txt'
END
-EXIT
 


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Gold member
posted Hide Post
Nope, I got the same results -- a space instead of x'0D'...good try though.

Back to the drawing board.

Thanks.


WF 7.6.6, FOCUS 7.6.4, IBM MVS/TSO, Windows 2003 Server, DB2, MSSQL
 
Posts: 65 | Location: Chicago, IL | Registered: July 26, 2007Report 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     CR vs. CRLF in SAVE file

Copyright © 1996-2020 Information Builders