Type : EXTERNE
El código no carga ningún dato. Opera sobre un conjunto de datos existente que se muestra en un componente VIEWTABLE. El origen de estos datos no se especifica en este extracto de código y se asume que es proporcionado por el contexto de ejecución de la aplicación.
| 1 | execcmd: method |
| 2 | |
| 3 | inCmd :char |
| 4 | RETCODE :num |
| 5 | |
| 6 | optional=outCmd:char |
| 7 | ; |
| 8 | *------------------- Find USUBJID --------------------; |
| 9 | IF upcase(incmd)='FINDU' THEN DO; |
| 10 | IF ^missing(outCmd) THEN DO; |
| 11 | findlist = 'find(usubjid,"'||strip(outCmd)||'")'; |
| 12 | _self_._findRow(findlist); |
| 13 | END; |
| 14 | |
| 15 | /* let VT know that we processed the command */ |
| 16 | RETCODE = 1; |
| 17 | END; |
| 18 | |
| 19 | *------------------- Find SUBJECT --------------------; |
| 20 | ELSE IF upcase(incmd)='FINDS' THEN DO; |
| 21 | IF ^missing(outCmd) THEN DO; |
| 22 | findlist = 'find(subject,"'||strip(outCmd)||'")'; |
| 23 | _self_._findRow(findlist); |
| 24 | END; |
| 25 | |
| 26 | /* let VT know that we processed the command */ |
| 27 | RETCODE = 1; |
| 28 | END; |
| 29 | |
| 30 | *------------------- Find SUBJECT --------------------; |
| 31 | /* else if upcase(incmd)='FINDF' then do; |
| 32 | if ^missing(outCmd) then do; |
| 33 | matchvar = scan(outCmd,1); |
| 34 | matchval = scan(outCmd,-1); |
| 35 | if find(outCmd,'=') then do; |
| 36 | if _self_._getColumnAttribute(matchvar,'TYPE') ='C' then findlist = strip(matchvar)||'="'||strip(matchval)||'"'; |
| 37 | else findlist = strip(matchvar)||'='||strip(matchval); |
| 38 | end; |
| 39 | else do; |
| 40 | findlist = 'find('||strip(matchvar)||',"'||strip(matchval)||'")'; |
| 41 | end; |
| 42 | _self_._findRow(findlist); |
| 43 | end; */ |
| 44 | |
| 45 | /* let VT know that we processed the command */ |
| 46 | /* retCode = 1; |
| 47 | end; */ |
| 48 | *------------------- Goto Specific row --------------------; |
| 49 | ELSE IF upcase(incmd)='GOTO' THEN DO; |
| 50 | |
| 51 | obs=INPUT(outCmd, 12.); |
| 52 | |
| 53 | IF obs > 0 THEN _self_._gotoAbsoluteRow(obs); |
| 54 | |
| 55 | /* let VT know that we processed the command */ |
| 56 | RETCODE = 1; |
| 57 | END; |
| 58 | /* otherwise, if command ne 'GOTO' let VIEWTABLE */ |
| 59 | /* try to process it */ |
| 60 | ELSE call super(_SELF_, '_execCommand', inCmd, RETCODE, outCmd); |
| 61 | |
| 62 | _self_=_self_; |
| 63 | endmethod; |