{
    "header": {
        "version": 1,
        "type": "record"
    },
    "body": {
        "record1": {
            "<1>": "declare function security_check, relational_call, rowexists, start_window, msg, Popup, Get_Status\r\ndeclare subroutine security_err_msg, obj_Appwindow, ErrMsg\r\n$insert msg_equates\r\n$insert POPUP_EQUATES\r\n$insert security_rights_equ\r\n\r\nif security_check( 'Quote', Read$ ) then\r\n\tPSN = .prod_spec_id->text\r\n\tif PSN then\r\n\t\tif rowexists( 'PROD_SPEC', PSN ) then\r\n\t\t\tQuoteKeys = XLATE('PROD_SPEC',PSN,'QUOTE_KEYS','X')\r\n\t\t\tIF QuoteKeys = '' THEN\r\n\t\t\t\tErrMsg('No Quotes referring to this PSN on file')\r\n\t\t\t\tRETURN 0\r\n\t\t\tEND\r\n\t\t\tIF INDEX(QuoteKeys,@VM,1) THEN\r\n\t\t\t\tTypeOver = ''\r\n\t\t\t\tTypeOver<PMODE$> = 'K'\r\n\t\t\t\tTypeOver<PDISPLAY$> = QuoteKeys\r\n\t\t\t\tQuoteKey = Popup(@WINDOW,TypeOver,'SHOW_QUOTES')\r\n\t\t\t\t\r\n\t\t\tEND ELSE\r\n\t\t\t\tQuoteKey = QuoteKeys\r\n\t\t\tEND\r\n\t\t\t\r\n\t\t\tIF QuoteKey NE '' THEN\r\n\t\t\t   \tobj_Appwindow('ViewRelated','QUOTE2':@RM:QuoteKey)\r\n\t\t\tEND\r\n      \t\t\r\n\t\tend else\r\n\t\t    MsgInfo = ''\r\n\t\t    MsgInfo<mtext$> = 'You must save this PSN first...'\r\n\t\t    MsgInfo<micon$> = '!'\r\n\t\t    Void = msg( '', MsgInfo )\r\n\t\tend\r\n\tend else\r\n\t    MsgRec = ''\r\n\t    MsgRec<mtext$> = 'You must retrieve a PSN first...' \r\n\t    MsgRec<micon$> = '!'\r\n\t    Void = msg( '', MsgRec )    \r\n\tend\r\nend else\r\n    security_err_msg( 'Quote', Read$ )\r\nend\r\nRETURN 0"
        }
    }
}