11 lines
1.6 KiB
JSON
11 lines
1.6 KiB
JSON
{
|
|
"header": {
|
|
"version": 1,
|
|
"type": "record"
|
|
},
|
|
"body": {
|
|
"record1": {
|
|
"<1>": "declare subroutine record_lock\r\ndeclare function msg\r\n$insert logical\r\n$insert prod_spec_equ\r\n$insert msg_equates\r\n\r\nListId = 'PROD_SPEC*':@station\r\nProdSpecKey = xlate( 'SYSLISTS', ListId, 1, 'X' )\r\nif ProdSpecKey then\r\n * check to see if released for this customer\r\n ProdSpecRec = xlate( 'PROD_SPEC', ProdSpecKey, '', 'X' )\r\n CustNo = .cust_no->text\r\n WrongCust = false$\r\n ErrMsg = ''\r\n if ProdSpecRec<prod_spec_cust_id$> <> CustNo then\r\n ErrMsg:= 'Product Specification ':ProdSpecKey:' is for ':oconv( ProdSpecRec<prod_spec_cust_id$>, '[XLATE_CONV,COMPANY*CO_NAME]' )\r\n ErrMsg:= ' not ':oconv( CustNo, '[XLATE_CONV,COMPANY*CO_NAME]' )\r\n WrongCust = true$\r\n end\r\n if ( WrongCust = false$ ) then\r\n .prod_spec_id->text = ProdSpecKey\r\n\t open 'SYSLISTS' to SysListsTable else\r\n\t Void = msg( '', 'Unable to open SYSLISTS...' )\r\n\t return 0\r\n\t end\r\n\t record_lock( SysListsTable, 'SysLists', ListId )\r\n\t delete SysListsTable, ListId else\r\n\t Void = msg( '', 'Unable to delete ':ListId:' from SYSLISTS...' )\r\n\t return 0\r\n\t end\r\n\t unlock SysListsTable, ListId else\r\n\t Void = msg( '', 'Unable to unlock SYSLISTS ':ListId )\r\n\t return 0\r\n\t end\r\n\tend else\r\n\t MsgInfo = ''\r\n\t MsgInfo<mtext$> = ErrMsg\r\n\t MsgInfo<micon$> = '!'\r\n\t Void = msg( '', MsgInfo )\r\n\tend\r\nend\r\nRETURN 0"
|
|
}
|
|
}
|
|
} |