IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

used cylinders by vb files


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Ebirezaey

New User


Joined: 31 Aug 2014
Posts: 10
Location: iran

PostPosted: Tue Sep 02, 2014 11:28 am
Reply with quote

hi
I have a fix length file which lrec=710 and contains 7100000 characters.(10000 records)
this file take 9 cylinders on the disk.
I change this file to a variable length file which maximum lrec=904.
while transferring fb file to vb file I count the characters that writed on the vb file,
the result is 2700000 characters (that meaning 1/3 instead of fb file).
but vb file takes 88 cylinders on the disk.
(block size that I used for vb file in JCL is 912)
please help me!
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Sep 02, 2014 12:03 pm
Reply with quote

Why don't you let the system decide the blocksize?

If this is not possible, try to make it a little bigger. Like 27998.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Tue Sep 02, 2014 5:45 pm
Reply with quote

My guess is that you have half-track blocking on the fixed length data set. The number of records per track (hence cylinder) is determined by the block size. And a block size of 912 bytes will NOT allow very many records per track (cylinder), as you have discovered.
Back to top
View user's profile Send private message
Ebirezaey

New User


Joined: 31 Aug 2014
Posts: 10
Location: iran

PostPosted: Wed Sep 03, 2014 12:17 am
Reply with quote

Hi bill

please tell me that how allow the system to decide about block size?

thank you for your attention!
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2454
Location: Hampshire, UK

PostPosted: Wed Sep 03, 2014 12:54 am
Reply with quote

Either omit the BLKSIZE parameter altogether or code it BLKSIZE=0. Refer to the JCL manual.
Back to top
View user's profile Send private message
Ebirezaey

New User


Joined: 31 Aug 2014
Posts: 10
Location: iran

PostPosted: Wed Sep 03, 2014 1:10 am
Reply with quote

Hi Nic
I try this but not respond.
can you tell that how define block size in vb file definition?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Wed Sep 03, 2014 4:12 am
Reply with quote

Are you defining the data set through TSO, or via a batch job, or some other way?
Back to top
View user's profile Send private message
Ebirezaey

New User


Joined: 31 Aug 2014
Posts: 10
Location: iran

PostPosted: Wed Sep 03, 2014 7:22 am
Reply with quote

Hi Robert
Date set is defining by tso administrator
he said that the blocksize of dataset(variable length file) not Specified while definition.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1744
Location: Tirupur, India

PostPosted: Wed Sep 03, 2014 1:44 pm
Reply with quote

Hello,
Could you issue a "I" or "S" command, infront of the input & output dataset and post the output here.
Back to top
View user's profile Send private message
Ebirezaey

New User


Joined: 31 Aug 2014
Posts: 10
Location: iran

PostPosted: Sat Sep 06, 2014 2:46 pm
Reply with quote

Hi vasanthz
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Sat Sep 06, 2014 2:49 pm
Reply with quote

You/Your colleague got what You asked for ...

recfm V is not the same as recfm VB icon_cool.gif
Back to top
View user's profile Send private message
Ebirezaey

New User


Joined: 31 Aug 2014
Posts: 10
Location: iran

PostPosted: Sat Sep 06, 2014 2:54 pm
Reply with quote

Hi enrico
I used recfm=vb in the JCL
when I use "recoirding mode is vb" I got system error
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Sat Sep 06, 2014 2:57 pm
Reply with quote

my comment was based on the screen shot You posted ...

the dataset is allocated as V
and as per manual the block size is 4 bytes more than the record length.

my cobolese sucks icon_wink.gif
but I do not remember a VB recording mode,
all that cobol cares IIRC is about FIXED or VARIABLE
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Sat Sep 06, 2014 4:37 pm
Reply with quote

For COBOL the blocksize is separate, you'd be best to code the block as zero in the COBOL program so that the blocksize itself will be taken from the JCL if explicitly present or from the catalogue otherwise.

Hardcoding blocksizes in a COBOL program is a bad idea. Not coding a blocksize is also a bad idea, as you will only get one record per block. Oh, that's what you have.

Have a look through this for instance.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Sat Sep 06, 2014 9:28 pm
Reply with quote

What you are seeing is what is expected -- you had close to half-track blocking on the fixed length data set, and unblocked records on the variable length data set, hence the used cylinders went from 9 to 88. Unblocked data takes more space than blocked data -- which is why blocked records are so popular. Your COBOL code does not indicate anything about blocks, hence the unblocked data.
Back to top
View user's profile Send private message
Ebirezaey

New User


Joined: 31 Aug 2014
Posts: 10
Location: iran

PostPosted: Sun Sep 07, 2014 7:28 am
Reply with quote

Hi Robert
Can you give me a complete sample of cobol program contains a creation of vb file (with block size&...)
Thanks a lot.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Sun Sep 07, 2014 9:04 am
Reply with quote

I don't have any complete programs immediately available that create VB files in COBOL. However, you can read the Enterprise COBOL manuals for the details. The key points are that you must indicate to COBOL that the file is variable and blocked (variable by using multiple 01 levels in the FD with different record lengths, or using OCCURS DEPENDING ON in the FD 01, or specifying the range of characters the record may contain through RECORD CONTAINS; and blocked by used BLOCK CONTAINS 0 RECORDS -- which is the preferred coding since it causes the system to go to the JCL to get the actual block size, and it does not limit your code to so many records per block).
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Sun Sep 07, 2014 12:22 pm
Reply with quote

Here's a result of a simple use of the Search button at the top of the page.

You will be able to find other posts in the same way, showing the different methods Robert described.
Back to top
View user's profile Send private message
Ebirezaey

New User


Joined: 31 Aug 2014
Posts: 10
Location: iran

PostPosted: Sun Sep 07, 2014 12:25 pm
Reply with quote

1- maximum record length in vb file that I used is 904
It means that lrec must be 908
I use "block contains 0 records" in FD and run the program
when I issue S command On vb file the block size of file 912
2- next time , in jcl I set blksize=27998 and remove "block conains 0 records" in FD, and run the program.when I issue S command on vb file the block size of file still remain 912!?
what is the reason?
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Sun Sep 07, 2014 5:55 pm
Reply with quote

If you remove the BLOCK CONTAINS 0, you get the default BLOCK CONTAINS 1. It's that simple, and you've already been told this.

The BLOCK CONTAINS 0 will get you the BLKSIZE from the JCL if present (if you don't specify it, there's a very large chance your system will provided it, accurately, for you).

Specify BLOCK CONTAINS 0 in your program. Take the BLKSIZE out of your JCL. If your file is pre-defined, re-define.
Back to top
View user's profile Send private message
Ebirezaey

New User


Joined: 31 Aug 2014
Posts: 10
Location: iran

PostPosted: Thu Sep 11, 2014 7:35 am
Reply with quote

Thanks
the problem solved
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts 3 files concatenated to 1 DFSORT/ICETOOL 2
No new posts JCL sort to compare dates in two file... DFSORT/ICETOOL 2
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files and write Matched/Unm... JCL & VSAM 8
No new posts Write line by line from two files DFSORT/ICETOOL 7
Search our Forums:

Back to Top