View previous topic :: View next topic
|
Author |
Message |
jobseeker
New User
Joined: 07 Mar 2005 Posts: 26
|
|
|
|
i don't know, whether it's a basic or advanced question.it's asked in ibm interview.
what happened, if you specify "BLOCK CONTAINS 1 RECORD" clause. |
|
Back to top |
|
|
mcmillan
Site Admin
Joined: 18 May 2003 Posts: 1210 Location: India
|
|
|
|
Quote: |
whether it's a basic or advanced question.it's asked in ibm interview |
Questions are based on how you have answered for the previous questions.
Quote: |
what happened, if you specify "BLOCK CONTAINS 1 RECORD" |
Nothing happens if you code like that. The system will read the records "WITHOUT BUFFERING". |
|
Back to top |
|
|
mainframemouli
New User
Joined: 01 Mar 2005 Posts: 52 Location: Mysore
|
|
|
|
suppose the Logical reord length is 80 and BLKSIZE is 800 then the block will contain 10 records provided if in the Application program its mentioned like BLOCK CONTAINS 0 records.
But if it is Mentioned like BLOCK CONTAINS 1 records Then Each Block will contain only one record which is poor. |
|
Back to top |
|
|
lnvrn
New User
Joined: 24 Feb 2005 Posts: 8 Location: Mumbai
|
|
|
|
Hi Guys,
"Block contains 1 Records" will work it will not work when
"Block contains 1 record"
Try with this u will find difference.
Thanks & Regards
BVRREDDY |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
As far as I recall DCB merge goes something like this:
If the DCB attribute value in the JCL it is overridden by the DCB attribute value in the DSCB or d/s label if it exists there. Similarly, if the DCB attribute value exists in the program, it overrides what was before.
If the file was created as anything but blocked 1, the pgm will not function properly if it attempts to OPEN the file. |
|
Back to top |
|
|
Nanda Krishna
New User
Joined: 30 Nov 2005 Posts: 19 Location: Bangalore
|
|
|
|
mmwife,
can u plz explain ... what is DSCB and how can we override DCB values in JCL by value in DSCB |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi Nanda,
Each dataset on disk has a DSCB. It's similar to a label on a tape dataset. It contains info about the dataset's attributes.
When a dataset is used in a job, a process takes place that IBM calls a "DCB merge". DCB info is, or can be taken from the DSCB(LABEL), the DD DCB, and/or the catalog to determine what the Dataset attributes used for the execution will be.
YOU can't use the DSCB to o'ride the DCB info the merge process does it automatically. There's a good explanation of the process in the JCL Manuals on this site. Check the top of this screen on the far left. |
|
Back to top |
|
|
iknow
Active User
Joined: 22 Aug 2005 Posts: 411 Location: Colarado, US
|
|
|
|
Hi There,
As a follow up to the previous posts I am just adding some more additional information on BLOCK CONTAINS.
What is BLOCKING?
The BLOCK CONTAINS clause is included in the File Description entry only for files on magnetic media.
A group of logical records is included within one block to maximize the efficient use of a disk area.
Function
On OpenVMS Alpha systems, the BLOCK CONTAINS clause specifies the size of a physical record. <>
On Tru64 UNIX and Windows NT systems, block size for INDEXED organization is for documentation purposes only. <>
--------------------------------------------------------------------------------
General Format
Code: |
BLOCk CONTAINS | smallest-block TO | blocksize {RECORDS/CHARACTERS} |
where,
smallest-blockis an integer literal. It specifies the minimum physical record size.
blocksize is an integer literal. It specifies the exact or maximum physical record size.
Syntax Rule
The BLOCK CONTAINS clause can be in the file's Data Division file description entry. However, it cannot be in both the SELECT clause and the file description entry for the same file.
General Rules
The BLOCK CONTAINS clause specifies physical record size.
The compiler ignores smallest-block.
The RECORDS phrase specifies physical record size in terms of logical records.
For a fixed-length record magnetic tape file, each physical record except the last contains blocksize records.
For a variable-length record magnetic tape file, the compiler computes the physical record size. It equals the size of the largest logical record, plus any overhead bytes, multiplied by blocksize.
The CHARACTERS phrase specifies physical record size in terms of characters.
The physical record size is the maximum of: (1) blocksize bytes, and (2) the size of the largest logical record; plus any overhead bytes for variable-length records.
If there is no BLOCK CONTAINS clause, physical record size assumes a default value.
The physical record size is the size of the largest record plus any overhead bytes.
The size of physical records (in characters) must be a multiple of four. Otherwise, the I/O system rounds up the physical record size to the next multiple of four. |
|
Back to top |
|
|
|