Re: How to convert FB file to VBS32760 file?



Hello

The IEBGENER solution posted by Joe is best, but below are some
comments on your approach that may be helpful in other cases.

1) As well as the operating system, specify the particular compiler and
version in use, this can usually be found at the top of the source
listing.

2) Always include the Environment Division for questions about files,
it may also be helpful to include the Identification Division,
especially if the new options are being used. It is generally safer to
include them and risk providing a little too much info than too little,
they are not generally very large.

3) Use and check the file status for each file operation.
Alternatively, older compilers and maybe some current ones would
provide appropriate informative system messages, as long as the file
status checking was not specified for the specific files in the
Environment Division. If file status checking is specified in the
Environment Division, but not actually done in the Procedure Division,
then all file errors are just ignored at run time.

4) Don't try to display such vast records in their entirety, the key
portion, if any, or the first 20 characters or so would usually
suffice.

5) Keep counts of the records read and written and display those counts
at program termination.

6) Open and close the files that you are reading and writing
explicitly. This may not be essential for your compiler. the version
of which you didn't specify, but it makes file status checking easier.

7) Specify a record size of 32752 for a blocksize of 32760. Each
record needs a compiler generated leading 4 byte record length
descriptor, each block also needs a leading 4 byte record length
descriptor. I don't know what the maximum block size allowable is for
this type of file with your operating system and compiler, you could
look this up in the appropriate manual.

8) It used to be the case that the APPLY WRITE ONLY phrase/clause in
the Environment Division was beneficial for writing variable length
blocked files, but this may no longer be necessary for your compiler.
This phrase allowed the program to continue to write records that would
still fit in the block, whereas without it, the block would be written
when there wasn't room for a maximum size record.

Robert

.



Relevant Pages

  • Re: Sweeney presentation "The Next Mainstream Language"
    ... Specify int to be more specific than real. ... possibly helped by programmer annotations or checks. ... test just before the access to make the compiler see that the index is ... he included compiler-checked manual region allocation in Cyclone. ...
    (comp.lang.functional)
  • Bounds checked arrays
    ... As everybody knows, the C language lacks ... When the state of this toggle is ON, the compiler ... Important is to know that the array updates ... We have just to allow him/her to specify what to do ...
    (comp.lang.c)
  • Re: Boolean Buyers Beware ... AIX compiler bug --- PMR 26241,756
    ... But the compiler does have other options for updating byte fields, ... I didn't bring the C++ standard into the discussion, ... C++ doesn't specify anything here, and still one needs multithreading. ...
    (comp.programming.threads)
  • Re: Bounds checked arrays
    ... > more at each array access will not make any ... > this problem in the C language to do their dirty ... > When the state of this toggle is ON, the compiler ... > We have just to allow him/her to specify what to do ...
    (comp.lang.c)
  • Re: In-Out Parameters for functions
    ... Ada, but you who didn't specify it. ... exemptions Ada leaves that to the compiler. ...
    (comp.lang.ada)