View previous topic :: View next topic
|
Author |
Message |
pavan_it2004 Warnings : 1 New User
Joined: 27 Aug 2006 Posts: 3
|
|
|
|
Hi,
In my CSC interview they asked me,
if filesize=20000,reclength=145,then how many records are there?wht is the file organization?
plz anybody send me answer? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
OK, let's think about this.
You know the file size, 20000. Is that 20000 bytes, Kb, Mb, tracks, cyinders.
Depending on the answer to the filesize query above the formula to calculate the number of records can be derived. |
|
Back to top |
|
|
pavan_it2004 Warnings : 1 New User
Joined: 27 Aug 2006 Posts: 3
|
|
|
|
it is a 20000kb,and reclength=145kb... |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
The record length is 145Kb ??? I think not. That would give an LRECL of 148480. The maximum permissible LRECL is 32760.
Please clarify your exact requirement for further assistance. |
|
Back to top |
|
|
pavan_it2004 Warnings : 1 New User
Joined: 27 Aug 2006 Posts: 3
|
|
|
|
no they given only like reclength=145kb..... |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
A record length of 145Kb is totally impossible on a mainframe. |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Pavan,
Quote: |
no they given only like reclength=145kb..... |
If you are sure that they had given the lrecl=145KB, they were expecting the answer
Quote: |
The maximum permissible LRECL is 32760 |
as Expat highlighted.
Remeber this is the way to trap you in an interviews. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Taking this problem logically. For the sake of simplicity let us assume that the figures quoted in the original post are explicit.
You have a certain amount of DASD space to use up with your records.
DASD = 20000
RECS = 145
so how would you find out how many records of a given fixed size will fit into a storage area of a given fixed size. |
|
Back to top |
|
|
|