CIMFIL/ON,MACHIN
$$ Macro to output machining time
$$ At the beginning of tape
$$ Process $$ Process MACHINE
CLPOS=POSTF(7,1)$$ Current CL position
$$ disable tape output
DMY=POSTF(2,1,1867,1) $$ Set INTCOM 1867 to 1
$$ Loop in the CL
DO / ENDDO, ILOOP=0, 10
$$ Read next CL record
DMY=POSTF(14)
$$ Test if not FINI
CLASS=POSTF(7,2)
IF (CLASS.EQ.14000) THEN
$$ This is FINI set ILOOP to 10
ILOOP=10
ELSE
$$ Process
DMY=POSTF(13)
$$ Set ILOOP to 2
ILOOP=2
ENDIF
ENDDO)
$$ Go back at beginning CL
DMY=POSTF(15,(CLPOS+1))
$$ Re-enable tape output
$$ Set INTCOM 1867 to 0
DMY=POSTF(2,1,1867,0)
$$ Insert the mfg time DBLCOM 495
TIM=POSTF(1,3,495)
INSERT/'(MACHINING TIME : ',TIM,')$'
CIMFIL/OFF