IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Copy file from Mainframe having packed numbers


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
gauravgupta2808
Warnings : 1

New User


Joined: 31 May 2007
Posts: 31
Location: Chennai, India

PostPosted: Mon Jun 11, 2007 2:06 pm
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon Jun 11, 2007 2:31 pm
Reply with quote

Don't translate it to ASCII, leave it EBCDIC.
Back to top
View user's profile Send private message
munikumar
Currently Banned

New User


Joined: 18 Apr 2007
Posts: 24
Location: India

PostPosted: Mon Jun 11, 2007 2:34 pm
Reply with quote

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
View user's profile Send private message
gauravgupta2808
Warnings : 1

New User


Joined: 31 May 2007
Posts: 31
Location: Chennai, India

PostPosted: Mon Jun 11, 2007 2:53 pm
Reply with quote

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
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Mon Jun 11, 2007 5:42 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Jun 11, 2007 6:27 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 8
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Mainframe openings in Techmahnidra fo... Mainframe Jobs 0
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
Search our Forums:

Back to Top