Progress
Language Reference


OS-APPEND Statement

Interfaces
OS
SpeedScript
All
All
Yes

Executes an operating system file append command from within Progress.

SYNTAX

OS-APPEND
  { source-filename | VALUE ( expression ) }
  { target-filename | VALUE ( expression ) } 

source-filename

The name of the source file. (If you append file A to file B, file A is the source file.) If you specify a directory, OS-APPEND generates an error.

VALUE ( expression )

An expression that returns the name of the source file. (If you append file A to file B, file A is the source file.) expression can contain constants, field names, and variable names.

target-filename

The name of the target file. (If you append file A to file B, file B is the target file.)

VALUE ( expression )

An expression that returns the name of the target file. (If you append file A to file B, file B is the target file.) expression can contain constants, field names, and variable names.

EXAMPLE

This procedure opens a dialog box that prompts the user to choose a source file for the append. It then prompts for a name for the target file. Finally, the procedure uses the OS-APPEND statement to append the source file to the target file.

r-os-app.p
DEFINE VARIABLE sourcefile AS CHARACTER NO-UNDO.
DEFINE VARIABLE targetfile AS CHARACTER FORMAT "x(20)" VIEW-AS FILL-IN.
DEFINE VARIABLE OKpressed AS LOGICAL INITIAL TRUE.

Main:
REPEAT:
  SYSTEM-DIALOG GET-FILE sourcefile
    TITLE "Choose Source File For Append"
    MUST-EXIST
    USE-FILENAME
    UPDATE OKpressed.
  
  IF OKpressed = FALSE THEN
    LEAVE Main.
  UPDATE targetfile WITH FRAME appendframe.
  OS-APPEND VALUE(sourcefile) VALUE(targetfile).
END. 

NOTES

SEE ALSO

OS-ERROR Function


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095