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
 

 

Problem with Pk zip and variable length file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
pema_yozer

New User


Joined: 16 Feb 2009
Posts: 45
Location: pune

PostPosted: Tue Aug 23, 2011 12:38 pm    Post subject: Problem with Pk zip and variable length file
Reply with quote

I have used a terada export job to create a variable length file in my development server

Code:
DISP=(,CATLG),MGMTCLAS=M0DLY03M,
 DATACLAS=D010CYLS,RECFM=VB,
 LRECL=800

shows the below info
Code:
,Used bytes  . . . . :,525,774,442
,Used extents  . . . :,7
when i transfer the file on to my desktop in text mode the file seems correct as a variable file with size arounf 150mb
i then transfer it to the production server and rn the PKZIP to zip it on unzipipinf every thign seems alrite

Now i create the file directly in production.. it shows the same
,Used bytes . . . . :,525,774,442
,Used extents . . . :,7

how ever when i do a pk zip on it now when i unzip it i get a file which is a fixed length fileinstead of the previous variable length

any idea

below is the pkzip parameter used
Code:

-ARCHIVE_DSNAME(EHY.PEMA.CUS.FILE.ZIP)
-OUTFILE_OVERWRITE(Y)
-OUTFILE_DSNTYPE(SEQ)
-OUTFILE_LRECL(1069)
-OUTFILE_RECFM(VB)
-OUTFILE_SPACE_MULTIVOL=Y
-OUTFILE_UNIT(SYSDA)
-OUTFILE_SPACE_PRIMARY(2000)
-OUTFILE_SPACE_SECONDARY(2000)
-DATA_TYPE(TEXT)
-CRLF(Y)
-DATA_DELIMETER(CRLF)
EHY.PEMA.CUS.FILE
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Tue Aug 23, 2011 12:50 pm    Post subject: Reply to: Problem with Pk zip and variable length file
Reply with quote

How do you explain 150mb on PC and 500mb on mainframe?

Are the above cards identical in test/prod. If so, there must be some default which is different between the two to get you different results. Maybe if you look at the output from each, you can track down some difference?
Back to top
View user's profile Send private message
pema_yozer

New User


Joined: 16 Feb 2009
Posts: 45
Location: pune

PostPosted: Tue Aug 23, 2011 1:17 pm    Post subject:
Reply with quote

basically i'm only doing a zip in production ..
when i download the 500 mbfrile onto my desktop it is downloaded as a 150 mb file .
when i upload teh same file and zip it every thing is alright..
how ever when i directly zip the file without any downloading it's giving me an issue
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Tue Aug 23, 2011 1:25 pm    Post subject: Reply to: Problem with Pk zip and variable length file
Reply with quote

You start of with 500mb.

You compress (zip) the data getting you 150mb.

You transfer it to your PC.

You transfer it back your PC.

You uncompress (unzip) the data getting you 500mb.

Then:

You start of with 500mb.

You compress (zip) the data getting you 150mb.

You uncompress (unzip) the data getting you 500mb.

And something has gone wrong.

Is this what you are trying to say?
Back to top
View user's profile Send private message
prino

Active Member


Joined: 07 Feb 2009
Posts: 984
Location: Oostende, Belgium

PostPosted: Tue Aug 23, 2011 1:37 pm    Post subject: Re: Problem with Pk zip and variable length file
Reply with quote

pema_yozer wrote:
I have used a terada export job to create a variable length file in my development server

Code:
DISP=(,CATLG),MGMTCLAS=M0DLY03M,
 DATACLAS=D010CYLS,RECFM=VB,
 LRECL=800

shows the below info
Code:
,Used bytes  . . . . :,525,774,442
,Used extents  . . . :,7
when i transfer the file on to my desktop in text mode the file seems correct as a variable file with size arounf 150mb
i then transfer it to the production server and rn the PKZIP to zip it on unzipipinf every thign seems alrite

Now i create the file directly in production.. it shows the same
,Used bytes . . . . :,525,774,442
,Used extents . . . :,7

how ever when i do a pk zip on it now when i unzip it i get a file which is a fixed length fileinstead of the previous variable length

any idea

below is the pkzip parameter used
Code:

-ARCHIVE_DSNAME(EHY.PEMA.CUS.FILE.ZIP)
-OUTFILE_OVERWRITE(Y)
-OUTFILE_DSNTYPE(SEQ)
-OUTFILE_LRECL(1069)
-OUTFILE_RECFM(VB)
-OUTFILE_SPACE_MULTIVOL=Y
-OUTFILE_UNIT(SYSDA)
-OUTFILE_SPACE_PRIMARY(2000)
-OUTFILE_SPACE_SECONDARY(2000)
-DATA_TYPE(TEXT)
-CRLF(Y)
-DATA_DELIMETER(CRLF)
EHY.PEMA.CUS.FILE


Use TRSMAIN or AMATERSE.
Back to top
View user's profile Send private message
pema_yozer

New User


Joined: 16 Feb 2009
Posts: 45
Location: pune

PostPosted: Tue Aug 23, 2011 1:41 pm    Post subject:
Reply with quote

I crete a varible length file..
i do a info and it shows me 500 mb
i do not zip it but transfer it to my desk top i see the file is 150 mb.
now i transfer it back and zip it every thing is normal.

now i directly zip the file without any transfer and pk zip gives a a fixed length file instead of a variable one
Back to top
View user's profile Send private message
prino

Active Member


Joined: 07 Feb 2009
Posts: 984
Location: Oostende, Belgium

PostPosted: Tue Aug 23, 2011 1:44 pm    Post subject:
Reply with quote

AMATERSE any file and the resulting file will be FB with an LRECL of 1024. "un"AMATERSE it and it will be back to what it was.

SIASD
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Tue Aug 23, 2011 3:55 pm    Post subject: Reply to: Problem with Pk zip and variable length file
Reply with quote

OK, so here we are again.

First, how did you create the file?

Second, what is the recfm etc of the file?

If you FTP a file as TEXT, you will "loose" all the trailing blanks (unless you ask it not to do that). That happened to be what you "want", but there will be a way to get your output without involving the PC or a whole slew of other products.
Back to top
View user's profile Send private message
pema_yozer

New User


Joined: 16 Feb 2009
Posts: 45
Location: pune

PostPosted: Tue Aug 23, 2011 4:12 pm    Post subject:
Reply with quote

The problem was in the file produced initially.
there were spaces in the file initially which were reflected when it was zipped directly.


whne the file was transferred these trailing spaces were removed by the transfer parameter hence the file size was much smaller.

did avl trim on the file and that solves the probem..
thank you guys for your time nsupport
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Tue Aug 23, 2011 4:15 pm    Post subject:
Reply with quote

Pema,

Just out of interest, what did you use to create the file originally, and is AVL TRIM part of it?
Back to top
View user's profile Send private message
pema_yozer

New User


Joined: 16 Feb 2009
Posts: 45
Location: pune

PostPosted: Tue Aug 23, 2011 4:24 pm    Post subject:
Reply with quote

the file was created from teredata wsing the fast export utility..
it gives two byte rdw at start of each record..
to by pass this we cast the whole record as character but this results in a FB record..
our trasfers are automatically configured to remove the trailing spaces.
how ever this time we created a pkzip step to zip the file before transferring form mainframe as a result our transfer couldnt remove the spaces.

added vltrim as an addition step in my jcl..not part of fastexport.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Tue Aug 23, 2011 4:35 pm    Post subject:
Reply with quote

pema_yozer wrote:
[...]
it gives two byte rdw at start of each record..
[...]


I may, or may not, try to check on the rest later, but for the above:

RDW = Record Descriptor Word
Word = 4 Bytes

RDW consists of Record Length (half-word) and a "reserved" half-word, which I've only ever seen as 0000. If you search for RDW in a posting by Robert Sample you'll find what the 0000 bit is ever used for.

So, you don't get "two byte rdw"s. The RDW you get for every variable-length record. If you see (on the mainframe) two bytes then your data, that is something extra just showing you the length of the data, put there by a particular application/package, not by the operating system. If you use something that can show you the RDW, then you'll see the RDW, followed by this data-length thing, followed by the data.
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 Aug 23, 2011 8:38 pm    Post subject:
Reply with quote

Hello,

Often, trailing blanks are removed when a file is transferred to a pc.

Check with your support people to see if thisd causes the difference in the length of the files. . .
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Tue Aug 23, 2011 11:29 pm    Post subject: Reply to: Problem with Pk zip and variable length file
Reply with quote

I've read this post about 10 times now, and I have absolutely no idea what the issue is. There is nothing within PKZIP that would either add or remove trailing spaces from the data if they're present to begin with.
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 Aug 23, 2011 11:44 pm    Post subject:
Reply with quote

Hi Kevin,

Quote:
our trasfers are automatically configured to remove the trailing spaces.
how ever this time we created a pkzip step to zip the file before transferring form mainframe as a result our transfer couldnt remove the spaces.


I may be misunderstanding, but i believe the confusion is the difference when the file is transmitted without pkzip and with it.

When the plain text file is sent to the pc, the trailing spaces get deleted.

When the file is zipped, there are no "trailing spaces" so the ftp cannot remove them.

When the file is unzipped on the pc, the trailing spaces are back in the records. . .
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Tue Aug 23, 2011 11:50 pm    Post subject: Reply to: Problem with Pk zip and variable length file
Reply with quote

Extract from Teradata. TS unable to do so without trailing blanks.

Eventually dropped trailing blanks with DFSORT (there is another topic over there by same TS).

Transfer to PC was one way of dropping trailing blanks. Then upload back to mainframe! The, apparently, zip it.

Neither of the two posts contain much useful content.

Ends up as: extract from Teradata with trailing blanks. VLTRIM with DFSORT. Zip it for some purpose.
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: Wed Aug 24, 2011 1:12 am    Post subject:
Reply with quote

Hello,

I suspect the compress was to reduce the size of the file to be transmitted?

Unfortunately, compressed trailing spaces expand again when de-compressed . . .
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 Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


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