Austin

Isn't this a the opposite of this thread: Reading File For Processing

Are you trying to export/import files from an AS/400 or any other host ?
If this is the case, here's something to get you started on the export.

code:
Break On
$FieldStart = 1,11,51,71
; Change $FieldStart to fit the length of fields in the returned fixed record
; ubound $FieldStart is allways 1 greater than ubound $Fields because:
; Last value in $FieldStart is used to indicate the length of the last value in $Fields
; (Last value - secondlast value equals lengts of last member of $Fields)

;Loop to read fields
$Fields = 'Field1','This is a very long field','This wil be truncated because it is longer than 20 chars 71 - 51'
$FixedRec = CrtRecord($Fields,$FieldStart)
; Write $FixedRec to new file
;End Loop to read fields

Function CrtRecord($Fields,$FieldStart)
Dim $i,$L,$Field
$CrtRecord = ''
For $i = 0 To UBound($Fields)
$L = $FieldStart[$i + 1] - $FieldStart[$i]
$Field = Left($Fields[$i],$L) ; Truncate field if longer than allowed
While Len($Field) < $L ; Expand field to fit fixed length
$Field = $Field + ' '
Loop
$CrtRecord = $CrtRecord + $Field
Next
EndFunction

-Erik