Hitachi

JP1 Version 12 JP1/IT Desktop Management 2 - Asset Console Creating an Access Definition File Guide


$FILEPUTLN (output CRLF to file)

$FILEPUTLN outputs a character string to a file, and adds a CRLF at the end.

Organization of this page

Syntax

$FILEPUTLN(file-object,character-string)

Values

Status

The following table lists and describes the possible statuses:

Status

Description

NORMAL

Normal end

NODATA

ERROR

Script execution interrupted

Indicates one of the following:

  • file-object does not match the file object requested by $FILEOPEN.

  • An error occurred when an attempt was made to close the file.

  • An invalid argument was specified, or an error other than the above occurred.

Legend:

—: Not applicable

Example

The following example creates the file output.csv, and outputs ABC, DEF, and GHI on three separate lines:

[SET_VALUE]
  FH = $FILEOPEN('output.csv', RENEW)
 
  $FILEPUTLN(FH, 'ABC')
  $FILEPUTLN(FH, 'DEF')
  $FILEPUTLN(FH, 'GHI')
  $FILECLOSE(FH)
Execution result:

The following is output to output.csv:

ABC

DEF

GHI