View previous topic :: View next topic
|
Author |
Message |
Ajay Baghel
Active User
Joined: 25 Apr 2007 Posts: 206 Location: Bangalore
|
|
|
|
Hi,
I am saving data in .xls file as a .html webpage and then uploading the webpage to mainframe as a FB 80 PS file.
Now the problem is that after uploading, some characters in the xls column are not coming into PS file as desired. For eg. some characters (not alphabets) are not getting displayed properly.
Eg:
The quotes in the below line in a column in excel file are getting replaced with X'33' and X'34' respectively. Actually they should remain as X'7F' and x'7F'.
Quote: |
"G" at line command |
My requirement is to get same data from HTML webpage to Mainframe.
Any suggestions to correct this are welcome.
Actually, later i have to send an email with the contents of text present between <TD> and </TD> html tags, in the body of the mail.
Thank you,
Ajay |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
This is probably more of an issue with the PC than the mainframe. Most likely the code page being used for the HTML is not ASCII but something else (such as UTF-8). It will display and look fine on the PC, but the characters do not map to EBCDIC characters as you would expect, giving the strange results.
Other than doing lots of research, and possibly contacting Microsoft, I'm not sure what you can do. Any changes you need are almost certainly going to be on the PC side, not the mainframe. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
|
|
|
|
Hi,
On MHO,
Like the other thread with uploading picture to mainframes, this one also has something to do with LRECL of the FB file I guess.
If the HMTL tag spans over 2 lines, then this problem may come.
E.g. </TD present at the end of the line &
> present at the next line. instead of </TD> being in the same line.
I maybe wrong, try giving a check of the HTML tags presnt in the PS file & see if something is incorrect.
Also try increasing the LRECL of the FB file & see if it works |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2594 Location: Silicon Valley
|
|
|
|
Can you provide more details about how you are uploading the file?
Perhaps you can provide some kind of translation table. |
|
Back to top |
|
|
Ajay Baghel
Active User
Joined: 25 Apr 2007 Posts: 206 Location: Bangalore
|
|
|
|
Pedro:
Currently, I am saving the .xls file as html webpage. then uploading the HTML webpage to PS FILE ( FB 80 ). Please let me know if you need more information. I had checked the setting here of the notepad. The default is ANSI.
Vasanth:
I would try increasing the LRECL.
As Robert said, I too think it has got to do something with code page of data in XLS file /HTML. But I was thinking it would be a "known scenario" of another code page that we could translate to EBCDIC using some translation table, so that data remains same. It is a part of an automated email that i have been working on it and the absurd characters are doing the spoilsport.
Thank you,
Ajay |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Unless there is a compelling reason to use html, you might consider saving the .xls data as a delimited file and uploading that. . .
If you try this, i suggest using the tab (x'05') or the tilde (~). |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
|
|
|
|
Hi,
If the data on your HTML file is not sensitive or previliged or secure information.
could you attach the file pls. Just to give it a try.
Regards, |
|
Back to top |
|
|
Ajay Baghel
Active User
Joined: 25 Apr 2007 Posts: 206 Location: Bangalore
|
|
|
|
Hi Dick,
Actually my requirement is as follows in brief:
col1 of xls file --> Date
col2 of xls file --> Thought of the day
It is just an example of a message that i want to send everyday. Col2's data is like a formatted article from literature and may contain paragraphs and special characters.
My objective is to send the data in col2 in the body of email, if data in col1 matches with current date.
Since, I need to retain the format, i have been saving XLS in html format and not as delimited file.
If i upload it as CSV, the data2 comes as sequence and formatting (like paragraphs and line breaks) are not retained.
Thanks,
Ajay |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2594 Location: Silicon Valley
|
|
|
|
repeating
Quote: |
more details about how you are uploading the file? |
There are various methods you can use to upload... FTP, ISPF WSA, etc...
Please provide details, including any commands that you issue to execute the upload. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
|
|
|
|
Hi,
I tried a similar scenario and I was able to email it. However I tried only a small sentence which fit into my LRECL.
Thats the reason I requested,
Quote: |
If the data on your HTML file is not sensitive or previliged or secure information.
could you attach the file pls. Just to give it a try. |
Regards, |
|
Back to top |
|
|
Ajay Baghel
Active User
Joined: 25 Apr 2007 Posts: 206 Location: Bangalore
|
|
|
|
I am using IND$FILE (ftp) on the 3270 terminal.
Well, in order to get rid of weird characters in the body of my email, now i am setting the encoding in xls file to US-ASCII instead of Windows 1252. Also i am typing data into the xls file instead of copying it from somwhere.
It is helping me.
Thank you,
Ajay |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2594 Location: Silicon Valley
|
|
|
|
Repeating.
Quote: |
Please provide details, including any commands that you issue to execute the upload.
|
Not sure what you mean by ftp: I thought it was either SEND or RECEIVE.
|
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
I am using IND$FILE (ftp) on the 3270 terminal. |
So, which is it? IND$FILE or FTP? These are two totally different programs with different methods of transferring data and they are not interchangeable. |
|
Back to top |
|
|
valyk
Active User
Joined: 16 Apr 2008 Posts: 104 Location: South Carolina
|
|
|
|
Have you tried saving the xls file as 'Formatted Text (Space Delimitted)(*.prn)' then upload as ASCII? |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
|
|
|
|
IMHO,
As I have always been going about saying, this is almost most certainly a LRECL issue (78.36% sure). I have come across this problem when creating the denver-zone.150m.com/ which is updated by mainframe batch.
Thanks, |
|
Back to top |
|
|
Ajay Baghel
Active User
Joined: 25 Apr 2007 Posts: 206 Location: Bangalore
|
|
|
|
I am using the below for uploading the html file:
IND$FILE PUT 'TEST.FILENAME' ASCII CRLF RECFM(F) LRECL(80) |
|
Back to top |
|
|
|