Ucompress the compressed data


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Ucompress the compressed data
# 1  
Old 04-02-2010
Ucompress the compressed data

Hi,

I have a file that has got compressed data. I would want to uncompress the packed decimal data(not the file). is there a way to do that in ksh?
# 2  
Old 04-02-2010
packed decimal is a format, not really compression - this article points out that basically you need MicroFcous COBOL to read your file on UNIX:

Packed-Decimal Format, Description and Discussion

You can google around for COMP-3 or packed decimal format - there are code snippets for compiled languages like vb.net that will convert packed decimal for you.

I don't know of any otgher way to this except to resort to building a program. Or finding one.
# 3  
Old 04-03-2010
Thanks a lot jim that has clarified a lot of doubts and it has helped me understand the format much better. However, doesnt ksh support to read this without the help of the tools? even if we have to write a script its fine please point it out where to start from?

Thanks again!!
# 4  
Old 04-03-2010
No ksh does not support reading the format. You have to have a compiled language tool or program. I don't know for sure, perl may work for what you need - see the perl pack/unpack function.

http://perldoc.perl.org/index-functions.html#P

Last edited by jim mcnamara; 04-03-2010 at 08:08 AM..
# 5  
Old 04-05-2010
Hey Jim - I could find this Link Link. I am not able to write it the other way round. Would you be able to help me please?
# 6  
Old 04-05-2010
In addition to Jim's suggestion, you may want to have a look at the Convert::IBM390 Perl module that helps you manipulate IBM Mainframe data if that's what you are working on.

Here's the link on CPAN -

Convert::IBM390 - search.cpan.org

tyler_durden
# 7  
Old 04-05-2010
Thanks Tyler - I was looking for ksh. perderabo has written a script to convert to packed decimal. So, I thought this could be reversed as well. Just a thought.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Crontab compressed version

Hello guys, I am trying to make a backup of my folder through crontab using this syntax ( every tuesday at 20:30 and must to be compressed version on debian ) 30 20 ** 2 tar -xvzf backup.tar.gz -C /home/mirec I appreciate your help :) (12 Replies)
Discussion started by: zekeboy
12 Replies

2. Filesystems, Disks and Memory

Compressed Filesystem for Linux

Hi Everybody: I'm searching a compressed Filesystem for a external disk, what I use for a full, diary and differential Backup. The performance is not important, I search the best option for compress data, but I want have access to structure disk, with directories and files in the Backup disk.... (6 Replies)
Discussion started by: bypper
6 Replies

3. Shell Programming and Scripting

Execution of compressed program

I need UNIX scripts for polling, Uncompressing files and moving files between directory. Also trying to save file paths and any other variables in an independent file (.env) and use these at runtime by executing this file in the main script. (3 Replies)
Discussion started by: new2script
3 Replies

4. Shell Programming and Scripting

compressed file

i have a file 4d7a94d0.bbb.1292 when i do file 4d7a94d0.bbb.1292 the ouput is below 4d7a94d0.bbb.1292: gzip compressed data - deflate method and i run this command gunzip -c 4d7a94d0.bbb.1292 | awk '{gsub("\"","")}/I_ACCOUNT_ID/{print $2}' RS=":|;" FS="," i get... (3 Replies)
Discussion started by: blackzinga80
3 Replies

5. Shell Programming and Scripting

scan compressed

Hello all I want to help I have some compressed files on the system When you want to unzip these files Delete any file which symlink "ln -s" {{ I need script is necessary Script contain: Any operation to decompress the system is doing to delete any symlink... (0 Replies)
Discussion started by: x-zer0
0 Replies

6. Red Hat

RAMDISK: EOF while reading compressed data ...Kernel panic - Unable to mount root

I was following this tutorial on How install the rpmfusion nvidia drivers in Fedora 13: F13, F12 & F11 Nvidia driver guides - FedoraForum.org Here's the tutorial: And this is what I did: First I executed the following commands: su rpm -Uvh ... (0 Replies)
Discussion started by: skyxn3t
0 Replies

7. UNIX for Dummies Questions & Answers

Extracting data from many compressed files

I have a large number (50,000) of pretty large compressed files and I need only certain lines of data from them (each relevant line contains a certain key word). Each file contains 300 such lines. The individual file names are indexed by file number (file_name.1, file_name.2, ... ,... (1 Reply)
Discussion started by: Boltzmann
1 Replies

8. UNIX for Dummies Questions & Answers

compressed file

I compressed a file by using gzip command gzip <<xx>> filename changed to xx.gz How to view this xx.gz file. Any idea. Thanks in advance. (7 Replies)
Discussion started by: venkatesht
7 Replies

9. Solaris

invalid compressed data--crc error

I am getting this error when trying to unzip a file.gz . Anyone know how to resolve this ? (3 Replies)
Discussion started by: jxh461
3 Replies

10. Shell Programming and Scripting

Import data from compressed file

HI I need to import data from a file which is in comressed format but system doesn't have enough space to uncompress file Is there any way so that i can do import from compressed file. (4 Replies)
Discussion started by: ap_gore79
4 Replies
Login or Register to Ask a Question