11 lines
1.4 KiB
JSON
11 lines
1.4 KiB
JSON
{
|
|
"header": {
|
|
"version": 1,
|
|
"type": "record"
|
|
},
|
|
"body": {
|
|
"record1": {
|
|
"<1>": "declare function msg, fieldcount\r\ndeclare subroutine end_dialog\r\n$insert icar_nonconformance_equ\r\n\r\nopen 'CONFIG' to ConfigTable else\r\n Void = msg( '', 'Unable to open CONFIG table' )\r\n end_dialog( @window, '' )\r\n return 0\r\nend\r\nNonConf = .nonconf->array\r\nProcs = NonConf<1>\r\n* LOOP THROUGH ALL PROCS AND PULL OFF ONLY PROC AND NUMBER BUT NOT THE RELEASE\r\n* AND STORE IN FIELD<3> ON RECORD FOR CONVERSION TO USE\r\nPcnt = fieldcount( Procs, @vm )\r\nProcNoRev = ''\r\nfor i = 1 to Pcnt\r\n TNonConf = NonConf<1,i>\r\n * IF IT IS A GP THEN ONLY NEED FIRST TWO PIECES\r\n convert @lower_case to @upper_case in TNonConf\r\n if TNonConf[1,2] = 'GP' then\r\n ProcNoRev<1,i> = field( NonConf<1,i> , '-', 1, 2 ) \r\n end else\r\n ProcNoRev<1,i> = field( NonConf<1,i> , '-', 1, 3 )\r\n end\r\nnext i\r\nNonConf<ProcNoRev$> = ProcNoRev\r\nwrite NonConf on ConfigTable, 'ICAR_NONCONFORMANCE' else\r\n Void = msg( '', 'Unable to write ICAR_NONCONFORMANCE in CONFIG table' )\r\n end_dialog( @window, '' )\r\n return 0\r\nend\r\nunlock ConfigTable, 'ICAR_NONCONFORMANCE' else\r\n Void = msg( '', 'Unable to unlock ICAR_NONCONFORMANCE in CONFIG table' )\r\nend\r\nend_dialog( @window, '' )\r\nRETURN 0"
|
|
}
|
|
}
|
|
} |