Variable length records

Fyfield, Derek Derek.Fyfield@corpmail.telstra.com.au
Wed, 1 Mar 2000 11:16:10 +1100


G'Day Cora,

On Vax, I have not been able to generate true variable length files by just
using QTP or QUIZ.  Files with fixed length records are all we could get
directly.  Our VMS support bloke created a program to read Powerhouse files
and make true RMS variable length record files.  The modified files optimise
use of disc space and network bandwidth.

So we have a solution in two parts.  Firstly we make one large string per
record by concatenating all the desired fields, each TRUNCated  with the
necessary quote and comma separator characters, and then include it in a
subfile.  Secondly, we use the 'C' program to build a true variable-length
record file and pass the records from the Powerhouse subfile to it,
eliminating surplus blanks from the ends of the records.  While this works
well, a full Powerhouse solution would be welcome.

Regards,

Derek



> -----Original Message-----
> From:	Ronald W. Olenic [SMTP:olenicr@dteenergy.com]
> Sent:	Wednesday, March 01, 2000 1:48 AM
> To:	'PowerHouse List'
> Subject:	Re: Variable length records
> 
> Hi Cora!
> 
> As usual, I'm confused.  Do you want variable length records or do you
> need fixed length (640 bytes).  
> For variable length records, you can always concatenate multiple
> variable length records into a temporary variable, and then write the
> variable to a subfile.
> 
> 
> (I'm guessing at this syntax)
> 
> QTP
> 
> > access bigfile
> >
> >  temporary t_running_count int * 8
> >  temporary t_record_delimiter char * 1 initial "#"  
> >  temporary t_large_temp char*3000
> >
> >  let t_larg_temp = t_large_temp + trunc(new_field) +   &
> t_record_delimiter 
> >
> >  item t_running_count count
> >  subfile some_sub keep include t_large_temp &
>                                  if 0 = mod(t_running_count,100)
> 
> > go 
> 
> This will write one subfile record for every 100 records read from the
> original file.  The data portion of the subfile would be a variable
> record ascii delimited file.
> 
> 
> Ron Olenic
> The opinions expressed are my own.  Carefully culled from years of
> experience, trial and error, and error, and error, and error, and error,
> and ....
> 
> CORA VANDENDRIESSCHE wrote:
> > 
> > We need to create an ascii delimited file with variable length records.
> (One of the record types has a length of 640 bytes therefore we can not
> use quiz to create a report file that has a limit of 255.)
> > 
> > Can you create an ascii  file using powerhouse with variable length
> records that exceed 255 ?
> > 
> > Cora Vandendriessche
> > Manager Software Development
> > Cambrian College
> > cmvandendrie@cambrianc.on.ca
> > 
> > = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> = =
> > Subscribe: "subscribe powerh-l" in message body to
> majordomo@lists.swau.edu
> > Unsubscribe: "unsubscribe powerh-l" in message to
> majordomo@lists.swau.edu
> > This list is closed, thus to post to the list, you must be a subscriber.
> << File: Card for Ronald W. Olenic >> 
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
This list is closed, thus to post to the list, you must be a subscriber.