VMS Help CREATE, Examples *Conan The Librarian (sorry for the slow response - running on an old VAX) |
1.$ CREATE MEET.TXT John, Residents in the apartment complex will hold their annual meeting this evening. We hope to see you there, Regards, Elwood <Ctrl/Z> The CREATE command in this example creates a text file named MEET.TXT in your default directory. The text file MEET.TXT contains the lines that follow until the Ctrl/Z. 2.$ CREATE A.DAT, B.DAT Input line one for A.DAT... Input line two for A.DAT... . . . <Ctrl/Z> Input line one for B.DAT... Input line two for B.DAT... . . . <Ctrl/Z> $ After you enter the CREATE command from the terminal, the system reads input lines into the sequential file A.DAT until Ctrl/Z terminates the first input. The next set of input data is placed in the second file, B.DAT. Again, Ctrl/Z terminates the input. 3.$ FILE = F$SEARCH("MEET.TXT") $ IF FILE .EQS. "" $ THEN CREATE MEET.TXT John, Residents in the apartment complex will hold their annual meeting this evening. We hope to see you there, Regards, Elwood $ ELSE TYPE MEET.TXT $ ENDIF $ EXIT In this example, the command procedure searches the default disk and directory for the file MEET.TXT. If the command procedure determines that the file does not exist, it creates a file named MEET.TXT using the CREATE command.
|