>> >>*-- Declare the file handle variables and the line variables >>LOCAL lcInfile, lcOutFile, lcInLine, lcOutLine >> >>*-- Open the input file >>lcInFile = FOPEN('ck990708.dat') >>*-- Create the output files >>lcOutFile = FCREATE('clock.dat') >> >>*-- Read the header line >>lcInLine = FGETS(lcInFile) >>*-- Modify the header line >>lcOutLine = "P001"+SUBSTR(lcInLine,5,9)+RIGHT(lcInLine,6) >>*-- Write the header line to the output file >>FPUTS(lcOutFile,lcOutLine) >> >>*-- Do loop until the end of the input file >>DO WHILE NOT FEOF(lcInFile) >> *-- Read in a line >> lcInLine = FGETS(lcInFile) >> *-- Modify the line >> lcOutLine = LEFT(lcInLine,8)+SUBST(lcInLine,11,6)+RIGHT(lcInLine,6) >> *-- Write the modified line out to the output file >> FPUTS(lcOutFile,lcOutLine) >>ENDDO >> >>*-- Close the input and output files >>FCLOSE(lcInFile) >>FCLOSE(lcOutFile) >> >>>>