Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Copy file from Mainframe having packed numbers

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
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    Post subject: Copy file from Mainframe having packed numbers
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: 3158
Location: Tucson AZ

PostPosted: Mon Jun 11, 2007 2:31 pm    Post subject:
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    Post subject:
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    Post subject:
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

Active Member


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

PostPosted: Mon Jun 11, 2007 5:42 pm    Post subject:
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

Site Director


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

PostPosted: Mon Jun 11, 2007 6:27 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts SSH - known_hosts file configuration vasanthz All Other Mainframe Topics 2 Wed Jul 26, 2017 2:10 am
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Mainframe Opening in Chennai ( 2 to 4... muralikrishnan_new Mainframe Jobs 0 Tue Jul 18, 2017 2:20 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us