View previous topic :: View next topic
|
Author |
Message |
Swetalina
New User
Joined: 11 Nov 2008 Posts: 30 Location: Bangalore
|
|
|
|
I have some questions.
1. Is there any program like 'Use Count'? If yes, what does it do?
2. What is the name of Recovery log table in DB2?
3. If Rewrite will be performed in a file and very next to that we will display the field, what value it will contain?
Low-values/High-values/Zeros/Rewritten record? |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
1. Use Count is usually associated with CICS and is the number of current users of a program.
3. None of the above if the 01 level is in the File Section. It will be unpredictable. See COBOL Language Reference. |
|
Back to top |
|
|
Swetalina
New User
Joined: 11 Nov 2008 Posts: 30 Location: Bangalore
|
|
|
|
Hi,
Terry Heinze wrote: |
3. None of the above if the 01 level is in the File Section. It will be unpredictable. See COBOL Language Reference. |
I could not get it. Can you please explain me in a more desriptive way. |
|
Back to top |
|
|
Swetalina
New User
Joined: 11 Nov 2008 Posts: 30 Location: Bangalore
|
|
|
|
Hi,
My question is if the Rewrite will be like this:
REWRITE rec_name FROM source_item
After the successful execution of this statement, immediately what will be the value in rec_name if we put a display for this.
Ans: High-values/Low-values/Zeros/Rewritten record.
Please help. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
The COBOL Language Reference tells us:
Quote: |
6.2.31.3 Reusing a logical record
After successful execution of a REWRITE statement, the logical record is no longer available in record-name-1 unless the associated file is named in a SAME RECORD AREA clause (in which case, the record is also available as a record of the other files named in the SAME RECORD AREA clause). |
So absent a SAME RECORD AREA, COBOL tells us that rec_name will not be the rewritten record. Note that nothing is said about what the value in rec_name will be -- the value is as Terry said unpredictable. Not LOW-VALUES, not HIGH-VALUES, not ZEROES ... unpredictable.
Practically, the value will usually be either LOW-VALUES or a record previously in the program, depending upon the block size versus the record size, the number of buffers allocated, and other factors. Do not, however, count upon this since it will not be guaranteed. |
|
Back to top |
|
|
Swetalina
New User
Joined: 11 Nov 2008 Posts: 30 Location: Bangalore
|
|
|
|
Thanks Robert .. |
|
Back to top |
|
|
|