James McCafferty,
I did not like the canned header that LKDMIS provides so I created my own.
I also wanted to save my output files in a separate directory so that the files
would not be written over every time.
This is what I came up with.
In high level:
STEP 1) declare your variables
example:
DECL/LOCAL,CHAR,512,custdat,customer,jobno,etc...
STEP 2) assign your variables
example:
opnodat=ASSIGN/' Op. No....'
opno=ASSIGN/'100'
serialdat=ASSIGN/' S/N.......'
STEP 3) assign a directory path to a variable:
example
direc=ASSIGN/'S:\cadcam\cmm\LK Reports\*company*\*file folder*\etc...'
fname=ASSIGN/CONCAT(direc,serial,'.txt')
STEP 3) assign storage device:
example:
DID(_store)=DEVICE/STOR,fname
This is a sample of my program lines.
$$
V(1)=VFORM/ALL
DISPLY/TERM,V(1),STOR,V(1)
$$
OPEN/DID(_store),FDATA,V(1),OUTPUT,OVERWR
WRITE/DID(_store),space1
WRITE/DID(_store),namdat,nm
WRITE/DID(_store),custdat,customer,prtnmbrdat,prtnmbr
WRITE/DID(_store),program,revision
WRITE/DID(_store),opnodat,opno,jobnodat,serial
WRITE/DID(_store),daysdate,daystime
WRITE/DID(_store),cad
WRITE/DID(_store),space1
$$
DISPLY/TERM,V(1)
This is a sample of my output.
******************************************************
Operator..
Customer.. |Part No...
Program... |Revision..
Op. No....100 |Job No....
Date......22 May 2003 |Time......08:55:17
Trace to:
******************************************************
With this format, you can loop your program at the end to start over with another
serial number, dash number, what have you, or in your case you can end your file, start another program, start another .txt file and continue on.
I hope that this will help.
Terry Phillips
CMM Programer/Inspector
DTI
Hillsboro, Oregon