Author Topic: ARSADMIN decompress issue  (Read 3135 times)

niteskum

  • Jr. Member
  • **
  • Posts: 29
    • View Profile
ARSADMIN decompress issue
« 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 ?

Alessandro Perucchi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1002
    • View Profile
Re: ARSADMIN decompress issue
« Reply #1 on: December 18, 2015, 02:20:42 AM »
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! :-)

« Last Edit: December 18, 2015, 06:10:42 AM by Alessandro Perucchi »
Alessandro Perucchi

#Install #Migrations #Conversion #Educate #Repair #Upgrade #Migrate #Enhance #Optimize #AIX #Linux #Multiplatforms #DB2 #Windows #Oracle #TSM #Tivoli #Performance #Audits #Customizing #Availability #HA #DR #JavaApi #ContentNavigator #ICN #WEBi #ODWEK #Services #PDF #AFP #XML

niteskum

  • Jr. Member
  • **
  • Posts: 29
    • View Profile
Re: ARSADMIN decompress issue
« Reply #2 on: December 18, 2015, 05:47:56 AM »
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

Alessandro Perucchi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1002
    • View Profile
Re: ARSADMIN decompress issue
« Reply #3 on: December 18, 2015, 06:10:20 AM »
yes this is the full command, this is a 100% unix command:

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

Code: [Select]
dd if=XXXXFAAA_decom.out of=XXXXFAAA_decom_XXXXXX.out skip=(DOC_OFF) count=(DOC_LENGTH) bs=1
Code: [Select]
ddthis is the unix command

Code: [Select]
if=XXXXFAAA_decom.out
"if" is the Input File, so it means that the input file is called XXXXFAAA_decom.out

Code: [Select]
of=XXXXFAAA_decom_XXXXXX.out
"of" is the Output File, so it means that the output file is called XXXXFAAA_decom_XXXXXXX.out

Code: [Select]
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

Code: [Select]
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).

Code: [Select]
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:

Code: [Select]
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

« Last Edit: December 18, 2015, 06:15:01 AM by Alessandro Perucchi »
Alessandro Perucchi

#Install #Migrations #Conversion #Educate #Repair #Upgrade #Migrate #Enhance #Optimize #AIX #Linux #Multiplatforms #DB2 #Windows #Oracle #TSM #Tivoli #Performance #Audits #Customizing #Availability #HA #DR #JavaApi #ContentNavigator #ICN #WEBi #ODWEK #Services #PDF #AFP #XML

SV

  • Jr. Member
  • **
  • Posts: 37
    • View Profile
Re: ARSADMIN decompress issue
« Reply #4 on: February 02, 2021, 01:34:57 PM »
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 "
 
Intrests: #zOS #AIX #Linux #DB2, #TSM, #Install #Migrations #Conversion #Educate #Repair #Upgrade #Migrate #Enhance #Optimize, #ODWEK #DR #ContentNavigator; #CLOUD