OnDemand User Group
Support Forums => z/OS Server => Topic started by: niteskum on December 15, 2015, 04:53:51 AM
-
Hi,
Facing a issue while using ARSADMIN, i am able to retrive the object and do the decompress of object, but when use the decompress object to decompress DOCUMENT getting below error:-
The system has encountered invalid data in the file during file decompression and has reported the following return code(8).
Below are the step i follow to retrive and decompress:-
1)arsadmin retrieve -h XXXXX -u XXXXXX -p XXXXX -m2 -n 30-0 -g "XXXXXXX" -d "XXXXXXX" XXXXFAAA:- Succesfful result
2)arsadmin decompress -c O -s /XXXXXXXX/XXXXFAAA -o XXXXFAAA_decom.out -b (object offset) -l (object_length):- sucessfull result
3)arsadmin decompress -c O -s /XXXXXXXX/XXXXFAAA_decom.out -o XXXXFAAA_decom_XXXXXX.out -b (Doc_off) -l (doc_length):- here i am getting error..
I am able to view the same document properly though client and also retreive with arsload properly..
Any Idea on it ?
-
Hello Niteskum,
of course it cannot work, if you decompress the decompressed file again! :-D
you should something like that:
1)arsadmin retrieve -h XXXXX -u XXXXXX -p XXXXX -m2 -n 30-0 -g "XXXXXXX" -d "XXXXXXX" XXXXFAAA:- Succesfful result
2)arsadmin decompress -c O -s /XXXXXXXX/XXXXFAAA -o XXXXFAAA_decom.out -b (COMP_OFF) -l (COMP_LEN):- sucessfull result
3)dd if=XXXXFAAA_decom.out of=XXXXFAAA_decom_XXXXXX.out skip=(DOC_OFF) count=(DOC_LENGTH) bs=1
I hope that helps! :-)
-
Hi Alessandro.
I figured out we need to use D instead of O in -c ,
I dn't have any idea how you can we use below command you replied, can you please explain it would be good learning for me.
3)dd -if=XXXXFAAA_decom.out of=XXXXFAAA_decom_XXXXXX.out -skip=(DOC_OFF) -count=(DOC_LENGTH) -bs=1.
IS this full comand ?
Thanks in advance for your help
-
yes this is the full command, this is a 100% unix command:
dd
http://linux.die.net/man/1/dd (http://linux.die.net/man/1/dd)
What does it do? This is a "Data Description" command, where you can, for example, "extract" portion of the file.
let's break it part after part of the full command line
dd if=XXXXFAAA_decom.out of=XXXXFAAA_decom_XXXXXX.out skip=(DOC_OFF) count=(DOC_LENGTH) bs=1
dd
this is the unix command
if=XXXXFAAA_decom.out
"if" is the Input File, so it means that the input file is called XXXXFAAA_decom.out
of=XXXXFAAA_decom_XXXXXX.out
"of" is the Output File, so it means that the output file is called XXXXFAAA_decom_XXXXXXX.out
bs=1
"bs" is the Block Size, so it means that the size of the block that dd will read or write is 1 byte
skip=(DOC_OFF)
"skip" is used to skip (DOC_OFF) bs from the beginning of the file, in our case, since bs=1, then we will skip (DOC_OFF) bytes, giving us exactly what we want, going to the offset (DOC_OFF).
count=(DOC_LENGTH)
"count" is used to read the (DOC_LENGTH) "bs" from the current location in the file. So it means, since bs=1, we will read (DOC_LENGTH) bytes, and we will write them in the "of" file.
so an example, let say that you document is define in CMOD like that:
DOC_NAME=1FAAA
DOC_OFF=123
DOC_LEN=23
COMP_OFF=0
COMP_LEN=103908
Then you will need to do the following:
arsadmin retrieve -h XXXXX -u XXXXXX -p XXXXX -m2 -n 30-0 -g "XXXXXXX" -d "XXXXXXX" 1FAAA
arsadmin decompress -c O -s 1FAAA -o 1FAAA_decom.out -b 0 -l 103908
dd if=1FAAA_decom.out of=1FAAA_decom_01.out skip=123 count=23 bs=1
-
Hello I am having an issue with decompress. Z/OS CMOD 10.1.0.6, where decompressed object size is smaller than the object size.
-Ran a test arsdadmin retrieve.
retrieved file size 4856233 Feb 2 13:00 10260FAAA
-ran decompress. I even tried -b and -l option but still the same result.
arsadmin decompress -o 10260FAAA.dat2 -s 10260FAAA -c F
- decompressed file size is "816397 Feb 2 11:49 10260FAAA.dat "