× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Larry,
This is the problem I am having:
 am creating a file in the IFS in HTML format with a .xls extension to be 
opened by MS EXCEL.I am getting garbage characters in my output file that my 
program did not create.
When I try to open the file, EXCEL can not determine what type of data it 
contains.
When I view it in NOTEPAD it looks fine.
I SAVE the file from NOTEPAD *without any changes*, then EXCEL can open it.
When it is displayed, I get weird results as follows:
Run Date: 07/14/2005Correctable OrdersRequested by: 
JEFF</hÈ</t?</t</t?</t?</t

... repeated 245 times.

The file in NOTEPAD is as follows:

 ê<html><head><title> <Font =color="FFFFFF">Correctable 
Orders</font></title></hea ?<h3 align="left">Run Date: 

07/14/2005</h3><h2 align="center">Correctable Orders</h2><h3>Requested by: 
JEFF</hÈ<table align="top" border="1" 

width="100%">

The HEX version of the data (from option 5 on WRKLNK is :

20EA3C68 746D6C3E 3C686561 643E3C74 69746C65
653E203C 466F6E74 203D636F 6C6F723D 22464646
46464646 223E436F 72726563 7461626C 65204F72
72646572 733C2F66 6F6E743E 3C2F7469 746C653E
3E3C2F68 6561203F 3C683320 616C6967 6E3D226C
6C656674 223E5275 6E204461 74653A20 30372F31
31342F32 3030353C 2F68333E 3C683220 616C6967
676E3D22 63656E74 6572223E 436F7272 65637461
61626C65 204F7264 6572733C 2F68323E 3C68333E
3E526571 75657374 65642062 793A204A 4546463C
3C2F6801 C83C7461 626C6520 616C6967 6E3D2274
746F7022 20626F72 6465723D 22312220 77696474
74683D22 3130300A
223E3C74 72206267 636F6C6F 723D2223 30304646

D fd S 10I 0

D Open_Flag S 10I 0

D Mode_Flag S 10U 0

D Code_Page S 10U 0 Inz(819)

// Remove file if it exists first, so we don't overwrite beg file seg

RC=unlink(%TrimR(IFS_File_Name));

// Create file with correct code page, in text mode

Open_Flag = O_CREAT + O_WRONLY + O_CODEPAGE;

Mode_Flag = S_IWUSR + S_IRUSR + S_IRGRP + S_IROTH;

fd=open(%TrimR(IFS_File_Name) :Open_Flag : Mode_Flag : Code_Page);

// Close file

RC=close(fd);

// File Created - Open for text output

Open_Flag = (O_WRONLY + O_TEXTDATA + O_APPEND);

fd=open(%TrimR(IFS_File_Name) : Open_Flag);


Larry Ducie <Larry_Ducie@xxxxxxxxxxx> wrote:
Hi Jeff,


Lary,
I have been able to create the file so that I can read it in NOTEPAD, but
there 
is some garbage that is in the file data that was not in the data I had in
my 
WRITE command.
Please refer to my original post to see what is happening.


Can you post the following:

1) Your code - including the part where you write to the IFS file.

2) A screen shot of your file data as seen from option 5 in wrklnk.

3) A couple of screen shots of the data displayed from option 8 in wrklnk (2
pages).

Cheers

Larry Ducie
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


                
---------------------------------
 Start your day with Yahoo! - make it your home page 

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.