October 09, 2007, 04:59 PM
FrankDutchAlan
what format do you use?
ON TABLE SAVE FORMAT ...
The used format gives different results.
October 09, 2007, 05:46 PM
AlanON 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.
October 10, 2007, 09:23 AM
Prariewell I misread this question.
| In Focus since 1993. WebFOCUS 7.7.03 Win 2003 |
October 29, 2007, 09:39 AM
c1I am having the same problem. I am creating an 'alpha' output file. How do I add the CRLF (carriage return)?
October 29, 2007, 10:31 AM
GamPHm, 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 |
October 29, 2007, 11:29 AM
AlanI'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
October 29, 2007, 11:35 AM
AlanI 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
October 29, 2007, 01:21 PM
c1When 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?
October 29, 2007, 03:30 PM
Alanc1,
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
October 29, 2007, 03:57 PM
AlanWell, 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
October 30, 2007, 07:52 AM
GamPMaybe 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 |
October 30, 2007, 09:21 AM
AlanNope, 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