home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / vms / 19936 < prev    next >
Encoding:
Internet Message Format  |  1992-12-28  |  10.2 KB

  1. Path: sparky!uunet!cs.utexas.edu!rutgers!cmcl2!rlgsc.com!gezelter
  2. From: gezelter@rlgsc.com
  3. Newsgroups: comp.os.vms
  4. Subject: Re: VAX c
  5. Message-ID: <1992Dec27.100810.300@rlgsc.com>
  6. Date: 27 Dec 92 15:08:10 GMT
  7. References: <24DEC199220084219@spades.aces.com> <Bzt6EF.Est@dale.cts.com>,<1992Dec26.100030.299@rlgsc.com> <1hjmn7INN34t@gap.caltech.edu>
  8. Organization: Robert Gezelter Software Consultant, Flushing, NY
  9. Lines: 199
  10.  
  11. In article <1hjmn7INN34t@gap.caltech.edu>, carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick) writes:
  12. > In article <1992Dec26.100030.299@rlgsc.com>, gezelter@rlgsc.com writes:
  13. >>....
  14. >>When the time expires, close the file. Then re-open it in append 
  15. >>mode. This will ensure that all of your buffers are flushed out 
  16. >>to the disk.
  17. > I tried that once.  Maybe it had to do with the way the file dealt with
  18. > records, but what I ended up with with was a file that had *ONE* record per
  19. > block.  Not what one would want.
  20. > ...
  21. >
  22. >>If I remember correctly from the original post, the application 
  23. >>in question is not a high bandwidth application. The periodic 
  24. >>close/reopen cycle should not appreciably increase your CPU 
  25. >>consumption.
  26. > CPU's not the problem here.  The problem is that every time you do it, you use
  27. > up another block on the disk.
  28. >...
  29. > Please note that I'm not trying to put Bob down;  his solution WILL work;  but
  30. > it uses up lots of disk space.  
  31. >...
  32. > --------------------------------------------------------------------------------
  33. > Carl J Lydick | INTERnet: CARL@SOL1.GPS.CALTECH.EDU | NSI/HEPnet: SOL1::CARL
  34. -- 
  35. Carl,
  36.  
  37. I would be interested in hearing exactly what type of file that 
  38. you had that problem of partial blocks with. I have been using 
  39. this solution in a range of applications for about 15 years on 
  40. both RSX and VMS and have never encountered the behavior that you 
  41. describe.
  42.  
  43. As a simple (albeit crude) verification, I put together the 
  44. following command procedure:
  45.  
  46.  $! Test of Disk Space Consumption when using Append Mode.
  47.  $!
  48.  $! Author:  Robert Gezelter    27-December-1992
  49.  $!
  50.  $! Test of Results of APPEND operation as done by COPY.
  51.  $!
  52.  $ CREATE APPEND_TEST1.TMP
  53.  This is a first text line.
  54.  $ APPEND SYS$INPUT APPEND_TEST1.TMP
  55.  This is a second text line appended to the file.
  56.  $ DUMP/ASCII/HEX APPEND_TEST1.TMP
  57.  $ DIRECTORY/FULL APPEND_TEST1.TMP
  58.  $!
  59.  $! Test of Results of APPEND operation as done using direct DCL operations.
  60.  $!
  61.  $ OPEN/WRITE FILE1 APPEND_TEST2.TMP
  62.  $ WRITE FILE1 "This is a first text line (DCL Test)."
  63.  $ CLOSE FILE1
  64.  $ OPEN/APPEND FILE2 APPEND_TEST2.TMP
  65.  $ WRITE FILE2 "This is a second text line appended to the file."
  66.  $ CLOSE FILE2
  67.  $ DUMP/ASCII/HEX APPEND_TEST2.TMP
  68.  $ DIRECTORY/FULL APPEND_TEST2.TMP
  69.  $ DELETE APPEND_TEST%.TMP;*
  70.  
  71. The output from this batch job (with my login profile printout 
  72. deleted) is included in this post beyond my signature). While it 
  73. does not prove that it is not possible to force RMS to waste disk 
  74. space, the results seem to indicate that the default treatment is 
  75. to append the new record DIRECTLY following the previous record.
  76.  
  77. If I have been unclear, or if you have any questions, please feel 
  78. free to contact me via Email or phone.
  79.  
  80. - Bob
  81. +--------------------------------------------------------------------------+
  82. | Robert "Bob" Gezelter                       E-Mail:  gezelter@rlgsc.com  |
  83. | Robert Gezelter Software Consultant         Voice:   +1 718 463 1079     |
  84. | 35-20 167th Street, Suite 215               Fax:       (on Request)      |
  85. | Flushing, New York  11358-1731                                           |
  86. | United States of America                                                 |
  87. +--------------------------------------------------------------------------+
  88. ----------------------------Begin Included File-----------------------------
  89.  $! Test of Disk Space Consumption when using Append Mode.
  90.  $!
  91.  $! Author:  Robert Gezelter    27-December-1992
  92.  $!
  93.  $! Test of Results of APPEND operation as done by COPY.
  94.  $!
  95.  $ CREATE APPEND_TEST1.TMP
  96.  This is a first text line.
  97.  $ APPEND SYS$INPUT APPEND_TEST1.TMP
  98.  This is a second text line appended to the file.
  99.  $ DUMP/ASCII/HEX APPEND_TEST1.TMP
  100.  
  101.  
  102.  Dump of file DISK$USERS:[GEZELTER]APPEND_TEST1.TMP;1 on 27-DEC-1992 10:05:09.97
  103.  File ID (2740,7,0)   End of file block 1 / Allocated 3
  104.  
  105.  Virtual block number 1 (00000001), 512 (0200) bytes
  106.  
  107.   68540030 2E656E69 6C207478 65742074 73726966 20612073 69207369 6854001A ..This is a first text line.0.Th 000000
  108.   65646E65 70706120 656E696C 20747865 7420646E 6F636573 20612073 69207369 is is a second text line appende 000020
  109.   00000000 00000000 00000000 00000000 FFFF2E65 6C696620 65687420 6F742064 d to the file................... 000040
  110.   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................ 000060
  111.   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................ 000080
  112.   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................ 0000A0
  113.   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................ 0000C0
  114.   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................ 0000E0
  115.   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................ 000100
  116.   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................ 000120
  117.   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................ 000140
  118.   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................ 000160
  119.   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................ 000180
  120.   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................ 0001A0
  121.   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................ 0001C0
  122.   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................ 0001E0
  123.  $ DIRECTORY/FULL APPEND_TEST1.TMP
  124.  
  125.  Directory DISK$USERS:[GEZELTER]
  126.  
  127.  APPEND_TEST1.TMP;1            File ID:  (2740,7,0)         
  128.  Size:            1/3          Owner:    [GEZELTER]
  129.  Created:  27-DEC-1992 10:05:07.37
  130.  Revised:  27-DEC-1992 10:05:08.59 (2)
  131.  Expires:   <None specified>
  132.  Backup:    <No backup recorded>
  133.  File organization:  Sequential
  134.  File attributes:    Allocation: 3, Extend: 0, Global buffer count: 0, No version limit
  135.  Record format:      Variable length, maximum 48 bytes
  136.  Record attributes:  Carriage return carriage control
  137.  RMS attributes:     None
  138.  Journaling enabled: None
  139.  File protection:    System:RWED, Owner:RWED, Group:RE, World:
  140.  Access Cntrl List:  None
  141.  
  142.  Total of 1 file, 1/3 blocks.
  143.  $!
  144.  $! Test of Results of APPEND operation as done using direct DCL operations.
  145.  $!
  146.  $ OPEN/WRITE FILE1 APPEND_TEST2.TMP
  147.  $ WRITE FILE1 "This is a first text line (DCL Test)."
  148.  $ CLOSE FILE1
  149.  $ OPEN/APPEND FILE2 APPEND_TEST2.TMP
  150.  $ WRITE FILE2 "This is a second text line appended to the file."
  151.  $ CLOSE FILE2
  152.  $ DUMP/ASCII/HEX APPEND_TEST2.TMP
  153.  
  154.  
  155.  Dump of file DISK$USERS:[GEZELTER]APPEND_TEST2.TMP;1 on 27-DEC-1992 10:05:15.89
  156.  File ID (2756,5,0)   End of file block 1 / Allocated 3
  157.  
  158.  Virtual block number 1 (00000001), 512 (0200) bytes
  159.  
  160.   44282065 6E696C20 74786574 20747372 69662061 20736920 73696854 8D010027 '...This is a first text line (D 000000
  161.   7420646E 6F636573 20612073 69207369 68548D01 0032002E 29747365 54204C43 CL Test)..2...This is a second t 000020
  162.   FFFF2E65 6C696620 65687420 6F742064 65646E65 70706120 656E696C 20747865 ext line appended to the file... 000040
  163.   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................ 000060
  164.   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................ 000080
  165.   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................ 0000A0
  166.   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................ 0000C0
  167.   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................ 0000E0
  168.   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................ 000100
  169.   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................ 000120
  170.   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................ 000140
  171.   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................ 000160
  172.   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................ 000180
  173.   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................ 0001A0
  174.   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................ 0001C0
  175.   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................ 0001E0
  176.  $ DIRECTORY/FULL APPEND_TEST2.TMP
  177.  
  178.  Directory DISK$USERS:[GEZELTER]
  179.  
  180.  APPEND_TEST2.TMP;1            File ID:  (2756,5,0)         
  181.  Size:            1/3          Owner:    [GEZELTER]
  182.  Created:  27-DEC-1992 10:05:13.73
  183.  Revised:  27-DEC-1992 10:05:14.36 (2)
  184.  Expires:   <None specified>
  185.  Backup:    <No backup recorded>
  186.  File organization:  Sequential
  187.  File attributes:    Allocation: 3, Extend: 0, Global buffer count: 0, No version limit
  188.  Record format:      VFC, 2 byte header, maximum 48 bytes
  189.  Record attributes:  Print file carriage control
  190.  RMS attributes:     None
  191.  Journaling enabled: None
  192.  File protection:    System:RWED, Owner:RWED, Group:RE, World:
  193.  Access Cntrl List:  None
  194.  
  195.  Total of 1 file, 1/3 blocks.
  196.  $ DELETE APPEND_TEST%.TMP;*
  197.    GEZELTER     job terminated at 27-DEC-1992 10:05:20.56
  198.  
  199.    Accounting information:
  200.    Buffered I/O count:             120         Peak working set size:     367
  201.    Direct I/O count:               101         Peak page file size:      2488
  202.    Page faults:                   1816         Mounted volumes:             0
  203.    Charged CPU time:           0 00:00:07.21   Elapsed time:     0 00:00:17.93
  204. -----------------------------End of Included File-----------------------------
  205.