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
 

 

used cylinders by vb files
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Ebirezaey

New User


Joined: 31 Aug 2014
Posts: 9
Location: iran

PostPosted: Tue Sep 02, 2014 11:28 am    Post subject: used cylinders by vb files
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7231

PostPosted: Tue Sep 02, 2014 12:03 pm    Post subject: Reply to: used cylinders by vb files
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: 7913
Location: Bellevue, IA

PostPosted: Tue Sep 02, 2014 5:45 pm    Post subject:
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: 9
Location: iran

PostPosted: Wed Sep 03, 2014 12:17 am    Post subject: Reply to: used cylinders by vb files
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: 1715
Location: UK

PostPosted: Wed Sep 03, 2014 12:54 am    Post subject: Reply to: used cylinders by vb files
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: 9
Location: iran

PostPosted: Wed Sep 03, 2014 1:10 am    Post subject:
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: 7913
Location: Bellevue, IA

PostPosted: Wed Sep 03, 2014 4:12 am    Post subject:
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: 9
Location: iran

PostPosted: Wed Sep 03, 2014 7:22 am    Post subject: Reply to: used cylinders by vb files
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: 1445
Location: Azeroth

PostPosted: Wed Sep 03, 2014 1:44 pm    Post subject:
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: 9
Location: iran

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

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Sat Sep 06, 2014 2:49 pm    Post subject: Reply to: used cylinders by vb files
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: 9
Location: iran

PostPosted: Sat Sep 06, 2014 2:54 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Sat Sep 06, 2014 2:57 pm    Post subject: Reply to: used cylinders by vb files
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7231

PostPosted: Sat Sep 06, 2014 4:37 pm    Post subject: Reply to: used cylinders by vb files
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: 7913
Location: Bellevue, IA

PostPosted: Sat Sep 06, 2014 9:28 pm    Post subject:
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: 9
Location: iran

PostPosted: Sun Sep 07, 2014 7:28 am    Post subject: Reply to: used cylinders by vb files
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: 7913
Location: Bellevue, IA

PostPosted: Sun Sep 07, 2014 9:04 am    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7231

PostPosted: Sun Sep 07, 2014 12:22 pm    Post subject: Reply to: used cylinders by vb files
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: 9
Location: iran

PostPosted: Sun Sep 07, 2014 12:25 pm    Post subject: Reply to: used cylinders by vb files
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7231

PostPosted: Sun Sep 07, 2014 5:55 pm    Post subject: Reply to: used cylinders by vb files
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 8 Thu Dec 01, 2016 8:28 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
This topic is locked: you cannot edit posts or make replies. How to use 2 input files in control c... Gunapala CN DFSORT/ICETOOL 23 Thu Oct 13, 2016 3:42 pm
No new posts Adding records from two files into on... shiitiizz SYNCSORT 4 Mon Sep 19, 2016 8:41 pm
No new posts Icetool or Joinkeys example to compar... ishant chauhan DFSORT/ICETOOL 21 Sat Aug 20, 2016 2:40 am


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