C Examples of how to use PARSE C C Define strings here - READNM (input), FILNAM (output) C OUTNAM (another output), etc. BYTE READNM(14), FILNAM(15), OUTNAM(15), CCFILE(15), DEVNAM(3) C C Define your defaults here - use RAD50 DATA DEV1, DEV2, EXT1, EXT2, EXTCC /3RDK , 3RDL1, 3RSAV, 3RDAT, 3RCCL/ C C Read the input string (READNM) ACCEPT 100, READNM 100 FORMAT (14A1) C C Be sure that LASCHR is initialized to zero. C LASCHR is the index which tells if any parsing has been done yet. LASCHR= 0 C C This call to PARSE creates the first filename, and C uses defaults if they were not supplied in READNM. CALL PARSE (READNM, FILNAM, DEV1, EXT1, LASCHR) C C This call to PARSE will define another file with the C same device and filename as FILNAM, but with the extension C given by EXT2. CALL PARSE (FILNAM, OUTNAM, DEV1, EXT2, LASCHR) C C Any number of other files can be specified with calls to PARSE. CALL PARSE (FILNAM, CCFILE, DEV1, EXTCC, LASCHR) C C You can read in only a device or extension at run time and have C it added to the rest of the filename: C For example, for the device specification, use C (This example assumes that READNM contains no device C specification - i.e., the file is coming from the default device). LASCHR= 0 ACCEPT 100, DEVNAM IF (DEVNAM(1).EQ.' ') GO TO 102 !IF BLANK, USE DEFAULT CALL IRAD50 (3, DEVNAM, DEV2) !CONVERT ASCII TO RAD50 102 CALL PARSE (READNM, OUTNAM, DEV2, EXT2, LASCHR) C END