FileRename node



The FileRename plug-in icon


This page contains information on:

  • FileRename node terminals
  • Using the FileRename node
  • FileRename node properties



  • The File Rename plug-in node receives a rename action message with the old and new file names and then it changes the file name. A status message is propagated to the "status" terminal to confirm the success of the rename action. If the new file name, in the action message, is a relative GDG file name (GDG.STEM(+1)) then the absolute GDG name (GDG.STEM.G00nnV00) is included in the status message as the new file name.

    If an error condition is detected, an exception message is propagated to the "failure" terminal (if the "failure" terminal is not wired then a user exception is thrown to terminate the processing).

    Copies of action and status messages are maintained in the Environment tree of the message flow.

    FileRename node terminals

    action

    Input terminal receives the action control messages to open and close the file.

    failure

    Output terminal to which an exception message is propagated in case that the node detects an error exception.

    status

    Output terminal to which status messages are propagated when the file is opened or closed.

    Using the FileRename node

    This node receives the rename file action message on the action terminal.

    Rename action message

    The following is the format of this action message:

    [M]<FileAdapter>
    [M]      <Filename>string
    [M]           <Action>RENAME</Action>
    [M]           <Type>OUTPUT</Type>

    [M]           <NewFilename>string</NewFilename>
    [M]      </Filename>
    [M]</FileAdapter>

    Note: [M] is a mandatory element and [O] is an optional element.

    Status message

    If the rename is successful an status message if propagated to the status terminal. The following is the format of the status message:

    <FileAdapter>
         <Filename>string
              <Status>RENAMED</Status>
              <Type>OUTPUT</Type>
              <NewFilename>string</NewFilename>
              <TimeFileRenamed>timestamp</TimeFileRenamed>
         </Filename>
    </FileAdapter>

    Exception messages

    An exception message is propagated to the "failure" terminal when an error exception is detected by the File Rename plug-in node. The following is the format of the exception messages:

    Exception when the action message is invalid

    <FileAdapter>
                   <Exception>FileRename</Exception>
                   <ErrorText>string</ErrorText>
                   <TimeException>timestamp</TimeException>
    </FileAdapter>

    Exception when the dynalloc function returns an error

    <FileAdapter>
             <Filename>'string'
                   <Exception>FileRename</Exception>
                   <Function>dynalloc</Function>
                   <ErrorCode>integer</ErrorCode>
                   <InformationCode>string</InformationCode>
                   <TimeException>timestamp</TimeException>
              </Filename>
    </FileAdapter>

    Exception when system functions return errors

    <FileAdapter>
             <Filename>'string'
                   <Exception>FileRename</Exception>
                   <Function>rename</Function>
                   <NewFilename>string</NewFilename>
                  
    <ErrorNumber>integer</ErrorNumber>
                   <ErrorText>string</ErrorText>
                   <TimeException>timestamp</TimeException>
              </Filename>
    </FileAdapter>

    FileRename node properties

    All the following properties are on the Default tab

    Property

    Default

    Description

    Generate debug data

    None

    This property can have the values of "None", "Performance" or "Full". The "Performance" option is the same as the "None" option for the File Rename. The "Full" option generates debugging and trace information.

    Trace Filename

    Path and name of the trace file. If no trace file is specified then the debugging information is sent to the broker's stdout.