|
马上注册登录,享用更多网站功能!
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
各位大哥:
请教一个问题,我在nx2中开发的程序如何在nx3当中用呢?请个位高手指点迷津,谢谢了?
LICENSE.GRS.dem文件如下:
$$
$$ SUBROUTINE: LICENSE.GRS
$$
$$ ABSTRACT:
$$ This program is used to check license for given id_number,
$$ and called by ***m.grs programs.
$$
$$ KEYWORDS:
$$ license_str -- id_number read directly from operation system
$$ id_str -- id_number specified the users
$$
$$ RELEASE HISTORY
$$ 95.10.28 INITIAL SUBMISSION
$$
PROC/
STRING/str(70),license_str(70),id_str(10,70)
$$
$$ get ID_number imformation by UNIX command <LANSCAN> ,and write it to
$$ a file named as 'sd_part_license_name'. Then read it to a string varible
$$ STR from the file, and extract ID_number from STR into LICENSE_STR.
$$
$$ XSPAWN/'/bin/ksh','-c','/etc/lanscan > sd_part_license_name'
$$ next line is for SGI platform
$$XSPAWN/'/bin/ksh','-c','/etc/sysinfo > sd_part_license_name'
$$ FETCH/TXT,10,'sd_part_license_name'
$$ RESET/10
$$ RESEQ/10,START,1,INCR,1
$$ READ/10,LINNO,3,USING,'#@@@@@@@@@@@@@@@@@@@@@@@',str
$$ $ READ/10,LINNO,2,USING,$
$$ '#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@',str
$$ 1234567890123456789012345678901234567890123456789012345678901234
$$ license_str=SUBSTR(str,10,14)
$$ license_str=str
$$
$$ ID_STR varible can be changed accordion to actual workstation ID_number
$$ which Standard Part Library is installed. ID_number must be
$$ 14 characters long.
$$
$$ id_str='0x0800090A9A7C'
$$ this line is for Shanghai demo machine
$$id_str(1)='69 08 a8 c5 00 00 00 00 00 00 00 00 00 00 00 00 '
$$ 1234567890123456789012345678901234567890123456789012345678901234
$$ The following lines is for Hua Tong Switcher
$$id_str(2)='69 0a 02 b1 00 00 00 00 00 00 00 00 00 00 00 00 '
$$id_str(3)='69 0a 02 a2 00 00 00 00 00 00 00 00 00 00 00 00 '
$$id_str(4)='69 0a 37 19 00 00 00 00 00 00 00 00 00 00 00 00 '
$$id_str(5)='69 0a 36 90 00 00 00 00 00 00 00 00 00 00 00 00 '
$$ To Guangzhou Office:
$$ use #sysinfo to get your machine code, copy to the next line
$$
$$id_str(6)='69 xx xx xx 00 00 00 00 00 00 00 00 00 00 00 00 '
$$id_str(7)=''
$$id_str(8)=''
$$id_str(9)=''
$$ begin compare
$$DO/L1:,I,1,6
$$ sta=CMPSTR(id_str(I),license_str)
$$ IFTHEN/sta==0
$$ JUMP/L2:
$$ ENDIF
$$L1:
$$MESSG/'Error Operation---Invalid License for Standard Part Library'
$$HALT
$$L2:
RETURN
|
|