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: 962
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 Incorrect output when trying to add n... monica1 PL/I & Assembler 6 Fri Jan 13, 2017 5:02 pm
No new posts Produce Mainframe Dash Board Reports ... sdcarlson53 All Other Mainframe Topics 2 Thu Jan 05, 2017 11:01 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 0 Mon Jan 02, 2017 11:16 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am


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