WRITE_PROCESS

Use the WRITE_PROCESS script function to write the content of a data sequence to a file. WRITE_PROCESS exports the content of any data sequence to a text file. You must specify a reference to the corresponding data sequence which is stored when you create the data sequence in a script variable. Each line of the data sequence is a line in the file. You can define whether all or only a specific column of the data sequence should be written to the file.

Syntax

WRITE_PROCESS (Data-Sequence Reference, File, Agent, Login,[Mode],[CodeTable], [File Attributes], [Column])

WRITE_PROCESS (Data-Sequence Reference, File, Agent, Login,[Mode],[CodeTable], [File Attributes], [ALL], [Delimiter])

Parameters

Return Codes

Examples

The following example creates a data sequence that stores a list of the file names of a certain directory. Then, the content of this data sequence is stored in a file on a different host. If an error occurs (return code of WRITE_PROCESS > 0), an error message is written and sent to the responsible AE user.

:SET &HND# = PREP_PROCESS_FILENAME("WIN01","c:\AUTOMIC\server\bin\*.exe",,,,"COL=DELIMITER","DELIMITER=*\*")

:SET &RET# = WRITE_PROCESS(&HND#,"C:\temp\export.txt",WIN02, LOGIN.GLOBAL,OVERWRITE)



:IF &RET# > 0


: SET &ERRNR# = SYS_LAST_ERR_NR()

: SET &ERRINS# = SYS_LAST_ERR_INS()

: SET &MESSAGE# = GET_MSG_TXT(&ERRNR#,&ERRINS#)

: SEND_MSG &$USER#, &$DEPARTMENT#, &MESSAGE#

:ENDIF

See also:

seealso

Script Elements for Data Sequences