View previous topic :: View next topic
|
Author |
Message |
gauravgupta2808 Warnings : 1 New User
Joined: 31 May 2007 Posts: 31 Location: Chennai, India
|
|
|
|
Hi,
I want to FTP a file from mainfrome to Windows (txt or doc or xls)...
The problem is this file has few columns whose data type is packed (S9...).
When i FTP the file, there are junk characters appearing for the columns that have packed data type.
In mainfrme i can see the data from file against a copybook layout....
Can you please tell me a method so that i can FTP the file and the data of packed columns appear as in M/F (not junk). |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Don't translate it to ASCII, leave it EBCDIC. |
|
Back to top |
|
|
munikumar Currently Banned New User
Joined: 18 Apr 2007 Posts: 24 Location: India
|
|
|
|
I think you have to convert the file in mainframes itself. I mean, write a simple program that translates the packed decimal data into zoned format, so that it can be displyed. Then you can do FTP. |
|
Back to top |
|
|
gauravgupta2808 Warnings : 1 New User
Joined: 31 May 2007 Posts: 31 Location: Chennai, India
|
|
|
|
Hi William,
How do I leave it to EBCDIC
When i do a TSO Receive, I have Transfer Options :
1. Binary 2. Append 3. ASCII + CRLF
I tried with Binary & ASCII.... ASCII gives the characters that we in mainframe for packed data.
BINARY gives strange characters... cant guess them |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
I recommend your mainframe conversion from packed not be to zoned, but rather to display with separate sign. In COBOL, you'll specifiy either leading or trailing; one of these is the default. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Your best bet is to create a download file that has no packed-decimal, zoned-decimal, or binary fields. If you move any of those types of numbers to an edited field similar to "99999.99-" (change the number of digits and decimal places to your field sizes), you will have data that is easily used in the windows environment (or unix for that matter).
If you go one step more and interleave a delimiter character (tab, backslash, or tlide) between the data fields, you will not only be able to "see" the correct data on the target system, but it will directly be loadable into any of the desktop products that are designed to process delimited input. |
|
Back to top |
|
|
|