Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Finding file size of ZIP/390 zipped file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
ymfdev

New User


Joined: 17 May 2010
Posts: 10
Location: India

PostPosted: Mon Sep 06, 2010 4:25 pm    Post subject: Finding file size of ZIP/390 zipped file
Reply with quote

Hi all,

I have been searching the internet to get a solution for this for quite a few days.. but in vain..

Here is my requirement - to find the file size of a (just) created zip file in mainframe using ZIP/390 using cobol program.

The file would be created with a cobol program using the utility zip/390 and i just have to get the size of this file in Kilobytes or Bytes - if possible using the same cobol program.

Please ask me if you require more clarification to help me solve this.
Back to top
View user's profile Send private message

Kjeld

Active User


Joined: 15 Dec 2009
Posts: 365
Location: Denmark

PostPosted: Mon Sep 06, 2010 8:19 pm    Post subject:
Reply with quote

Did the zip/390 utility produce any sysout listing, or can it be brought to provide information on the (uncompressed) file sizes during the zip operation.

I suggest you check the utility's documentation to examine possible keywords to include in the input parameters.
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 Sep 06, 2010 10:28 pm    Post subject:
Reply with quote

Hello,

If there is code passing data to the zip/390 utility, this code can count the bytes. . .

If the file has already been created, the size can be gotten several ways. . . There are multiple examples in the forum.
Back to top
View user's profile Send private message
ymfdev

New User


Joined: 17 May 2010
Posts: 10
Location: India

PostPosted: Tue Sep 07, 2010 2:47 pm    Post subject:
Reply with quote

Hello again, all

I just found an answer with a help from colleague.
1. Just open the zipped file
2. Read it on until end
3. Have a counter with PIC S9(9) COMP VALUE +0, increment this with every read
4. After file ends, multiply this counter with the record length (say 80)
5. Store it in a 9(6) or whichever is feasible for you
6. Voila! - This is what i required. This will give the filesize in bytes. icon_biggrin.gif

dick - Maybe i should have seen the examples in the forum. I haven't yet.

Thanks for the reply!
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: Tue Sep 07, 2010 8:21 pm    Post subject:
Reply with quote

Hello,

Depending on exactly what you wanted, the "answer" may or may not be what you are looking for. . .

If you read the content of the zip file, you can find the size of the content. This is NOT the size of the zip archive. . .

Unless i misunderstand your original questoin, you asked how to find the size of the archive:
Quote:
to find the file size of a (just) created zip file in mainframe using ZIP/390


Which "answer" you want depends on how the answer will be used.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2442
Location: Netherlands, Amstelveen

PostPosted: Tue Sep 07, 2010 9:55 pm    Post subject:
Reply with quote

Im wondering that using the ZIP/390 API, the parameter list supplied to
ZIP/390 not is returning values about input/output file size.
Maybe it is practical to give an example about the calling sequence from
the manual/program.

Whatever i know about using ZIP api's in the PC world that infromation is
always (ok, almost all the time) returned after calling a ZIP dll.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Tue Sep 07, 2010 10:11 pm    Post subject:
Reply with quote

I don't have access to my ZIP390 manual today; I can check tomorrow. However, the ZIP390 API interface does not appear to have any output file length -- there are several fields named LEN but they're all 4 digits long.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2442
Location: Netherlands, Amstelveen

PostPosted: Tue Sep 07, 2010 10:16 pm    Post subject:
Reply with quote

Robert,

please do. I did read something on the internets about a parm list
including read only fields (even 64 bits) giving before mentioned info.
It was a french site i remember, and it was used in a CICS environment.

Found it :

http://www.query-informatique.com/telechargement/Data21/ZIP-390/API%20exemples%20Assembler-Cobol-CICS.doc
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Thu Sep 09, 2010 6:07 pm    Post subject:
Reply with quote

The ZIP/390 API includes parameters of Z-OUTPUT-SIZE, Z-FILE-INPUT-SIZE-64, Z-FILE-INPUT-SIZE, Z-FILE-OUTPUT-SIZE-64, and Z-FILE-OUTPUT-SIZE (all but the first are defined as READ-ONLY by the API). However, my (admittedly limited) testing has not found anything but zeroes in these fields.
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us