Modifying contents of file using TCL in a Upoc thread

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Modifying contents of file using TCL in a Upoc thread

  • Creator
    Topic
  • #47831
    Jay Yeiser
    Participant

      I need to open and modify the contents of a file as part of a upoc thread using advanced scheduling.  I specifically need to place a FHS segment at the begining of the file and an FTS segment at the end of the file with multiple messages.  I can successfully open the file with the “open $listedFile w+” command but cannot seem to find how to insert these segments and close the file for further processing with desired modifications.

    Viewing 0 reply threads
    • Author
      Replies
      • #56821
        Anonymous
        Participant

          Jay,

          You might get good mileage from the ‘read_file’ and ‘write_file’ TCL commands.  That would allow your program to read the entire contents of the file, append your new segments and then write the data back to the file.

          The difference is that you read the whole file instead of just records out of the file.

      Viewing 0 reply threads
      • The forum ‘Cloverleaf’ is closed to new topics and replies.