{
    "header": {
        "version": 1,
        "type": "record"
    },
    "body": {
        "record1": {
            "<1>": "declare function dialog_box, msg, fieldcount, admin_user, center_window\r\ndeclare subroutine end_dialog\r\n$insert msg_equates\r\n\r\nif index( CreateParam, 'CENTER', 1 ) then\r\n    void = center_window( @window )\r\nend else\r\n    Void = set_property( @window, 'VISIBLE', 1 )\r\nend\r\n\r\nif admin_user( @user4 ) then\r\n\tMsgInfo = ''\r\n\tMsgInfo<mtext$> = 'You are about to perform the nightly process.    This could take a while.    Do you wish to continue?'\r\n\tMsgInfo<micon$> = '?'\r\n\tMsgInfo<mtype$> = 'BNY'\r\n\tResp = msg( '', MsgInfo )\r\n\tif Resp then\r\n\t    NightlyProcessInfo = xlate( 'CONFIG', 'NIGHTLY_PROCESS', '', 'X' )\r\n\t    WindowsToCall      = NightlyProcessInfo<1>\r\n\t    RunFlag            = NightlyProcessInfo<2>\r\n\t    NpCnt = fieldcount( WindowsToCall, @vm )\r\n\t    if NpCnt else\r\n\t       MsgInfo = ''\r\n\t       MsgInfo<mtext$> = 'There are no processes setup to run...'\r\n\t       MsgInfo<micon$> = '?'\r\n\t       Void = msg( '', MsgInfo )\r\n\t       end_dialog( @window, '' )\r\n\t       return 0\r\n\t    end\r\n\t    for i = 1 to NpCnt\r\n\t       ThisWindow  = WindowsToCall<1,i>\r\n\t       ThisRunFlag = ( RunFlag<1,i> = 'Yes' )\r\n\t       if ThisWindow and ThisRunFlag then\r\n\t           .cur_process_text->text = 'Current process ':i:' of ':NpCnt\r\n\t           Void = dialog_box( ThisWindow, @window, 'AUTO*CENTER' )\r\n\t       end\r\n\t    next i\r\n\tend\r\nend else\r\n    MsgInfo = ''\r\n    MsgInfo<mtext$> = 'You do not have the proper security to run the nightly process.'\r\n    MsgInfo<micon$> = 'H'\r\n    Void = msg( '', MsgInfo )\r\nend \r\nreturn 1\r\n"
        }
    }
}