Re: How to convert FB file to VBS32760 file?
- From: "Robert Jones" <rjones0@xxxxxxxxxxx>
- Date: 22 Mar 2006 10:07:14 -0800
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
.
- References:
- How to convert FB file to VBS32760 file?
- From: onelxii
- How to convert FB file to VBS32760 file?
- Prev by Date: Re: Linkage and Nested Subprograms
- Next by Date: Re: Any comments?
- Previous by thread: Re: How to convert FB file to VBS32760 file?
- Next by thread: Re: How to convert FB file to VBS32760 file?
- Index(es):
Relevant Pages
|
|