Top
PowerBSORT V7.0 User's Guide
FUJITSU Software

A.3.6 Copy processing (text file)

The following program is an example of describing the code to output the existing text file "c:\copyin.txt" of which the record length is 120 bytes and output the result to the text file "c:\copyout.txt".

Private Sub Command1_Click()
  'Specify not to display the error message.
  PowerBSORT1.DispMessage = False
  'The copy processing is specified.
  PowerBSORT1.DisposalNumber = 2
  'The input file name is specified.
  PowerBSORT1.InputFiles = "c:\copyin.txt"
  'Text is specified for each input file type.
  PowerBSORT1.InputFileType = 0
  'The output file name is specified.
  PowerBSORT1.OutputFile = "c:\copyout.txt"
  'Text is specified for each output file type.
  PowerBSORT1.OutputFileType = 0
  'The maximum record length is 120 bytes.
  PowerBSORT1.MaxRecordLength = 120
  'DLL of PowerBSORT is called and executed.
  PowerBSORT1.Action
  'Processing for when an error is found.
  if PowerBSORT1.ErrorCode <> 0 Then
    Msgbox "An error was found in PowerBSORT." & " ErrorDetail=" & PowerBSORT1.ErrorDetail
    Exit Sub
  End If
End Sub