call ispexec(value1,value2 );
call ispexec(,value2 );
call ispexec(value2 );
where value1 and value2 are
variables, literals, or expressions to be passed as parameters to
ISPF. Use the same parameters that you would use with an ISPF ISPEXEC. Value1,
if specified, is the length of value2.
If you use the second or third form of the call, the ISPF interface
provides this value. Value2 is
a character expression that contains the service name and parameters,
specified as they would be in a CLIST or SASRX exec. Parameters can
be specified as symbolic ISPF variables that are replaced with the
ISPF variable values at run time. Only one scan for symbolic variables
is done, and the resulting service request must not exceed 512 bytes
in length.
call isplink(value1,...,value15 );
where value1,...,value15 are
variables, literals, or expressions to be passed as parameters to
ISPF. You use the same parameters that you would use with an ISPF
ISPLINK. For a description of special parameter considerations, see Using Special Facilities for Passing Parameters to ISPF.Note:
Variable
varname is
uninitialized
message. To avoid receiving this message,
specify the following SAS statement in your program: retain isp_rc 0;
SELECT
Edit
model: data _null_; call ispexec('SELECT PANEL(ISR@PRIM)'); if pliretv ¬ = 0 then put pliretv=; run;
data _null_; call isplink('SELECT',' ','PANEL(ISR@PRIM)'); if pliretv ¬ = 0 then put pliretv=; run;
proc options group=ispf; run;
call isplink ('SAS','ISPNZTRC');
length fixed10 $4; retain fixed10; if _n_=1 then fixed10=put(10,pib4.);
isplink('SELECT', ,'CMD(%MYDIALOG)');
'VDEFINE', namelist, variable, format, length, optionlist, userdata
call isplink('VDEFINE','_ALL_');
call isplink('VDEFINE','PPR:');
Note: Variable
varname is
uninitialized
message. For example, the following statements
would result in the message NOTE: Variable ZCMD is uninitialized
.
data _null_; length zcmd $200; call isplink('VDEFINE','ZCMD'); call isplink('DISPLAY','ISRTSO'); put zcmd=; run;
retain zcmd ' ';
DATA _NULL_; LENGTH EMPSER $6 FNAME LNAME $16 ADDR1 ADDR2 ADDR3 ADDR4 $40 PHA $3 PHNUM MSG TYPECHG CHKTYPE $8 I STATE $1; RETAIN EMPSER FNAME LNAME I ADDR1 ADDR2 ADDR3 ADDR4 PHA PHNUM MSG TYPECHG CHKTYPE ' ' STATE '1' PLIRETV 0; CALL ISPLINK('VDEFINE', /* DEFINE VARIABLES */ '(EMPSER FNAME LNAME I ADDR: PHA PHNUM TYPECHG CHKTYPE)'); MSG=' '; /* INITIALIZE MESSAGE */ CALL ISPLINK('TBCREATE', /* IF TABLE DOESN'T EXIST*/ 'SASEMPTB','(EMPSER)', /* CREATE IT */ '(LNAME FNAME I ADDR: PHA PHNUM)', 'NOWRITE'); /* DON'T SAVE THE TABLE */ DO WHILE (STATE NE '4'); /* LOOP UNTIL TERM SET */ CALL ISPLINK('DISPLAY','SASEMPLA',MSG); /* SELECT EMPLOYEE */ IF PLIRETV=8 THEN STATE='4'; /* END KEY THEN TERMINATE*/ ELSE DO; /* ENTER KEY PRESSED */ MSG=' '; /* RESET MESSAGE */ STATE='2'; /* PROCESS EMPLOYEE PANEL*/ CALL ISPLINK('TBGET','SASEMPTB'); /* OBTAIN EMPLOYEE DATA */ IF PLIRETV=0 THEN /* IF RECORD EXISTS THEN */ TYPECHG='U'; /* SET UPDATE FLAG */ ELSE DO; /* RECORD DOES NOT EXIST */ TYPECHG='N'; /* SET TYPE=NEW */ LNAME=' ';FNAME=' ';I=' '; /* INITIALIZE PANEL VARS */ ADDR1=' ';ADDR2=' ';ADDR3=' '; ADDR4=' ';PHA=' ';PHNUM=' '; END; CHKTYPE=TYPECHG; /* SAVE TYPE OF CHANGE */ CALL ISPLINK('DISPLAY','SASEMPLB',MSG); /* DISPLAY EMPLOYEE DATA */ IF PLIRETV NE 8 THEN DO; /* END KEY NOT PRESSED */ IF TYPECHG='N' THEN DO; /* IF NEW EMPLOYEE */ CALL ISPLINK('TBADD','SASEMPTB'); /* ADD TO TABLE */ MSG='SASX217'; /* */ END; /* */ ELSE DO; /* */ IF TYPECHG='U' THEN DO; /* IF UPDATE REQUESTED */ CALL ISPLINK('TBPUT','SASEMPTB'); /* UPDATE TABLE */ MSG='SASX218'; /* */ END; /* */ ELSE DO; /* */ CALL ISPLINK('TBDELETE','SASEMPTB'); /* DELETED MESSAGE */ MSG='SASX219'; /* */ END; /* */ END; /* END TABLE MODS */ END; /* END 2ND PANEL PROCESS */ END; /* END 1ST PANEL PROCESS */ IF MSG NE ' ' THEN CALL ISPLINK('LOG',MSG); /* LOG MESSAGE */ END; /* END DO LOOP */ CALL ISPLINK('TBCLOSE','SASEMPTB'); /* CLOSE TABLE */ CALL ISPLINK('VDELETE','_ALL_'); /* DELETE ALL VARIABLES */ RUN;
Contents of Member SASEMPLA in ISPPLIB: %------------------------ EMPLOYEE SERIAL ------------------------------ %COMMAND ====>_ZCMD % + %ENTER EMPLOYEE SERIAL BELOW: + + + + EMPLOYEE SERIAL%===>_EMPSER+ (MUST BE 6 NUMERIC DIGITS) + + + +PRESS%ENTER+TO DISPLAY EMPLOYEE RECORD. +ENTER%END COMMAND+TO RETURN TO PREVIOUS MENU. )PROC VER (&EMPSER,NONBLANK) VER (&EMPSER,PICT,NNNNNN) )END
%------------------------ EMPLOYEE RECORDS ----------------------------- %COMMAND ====>_ZCMD % + + EMPLOYEE SERIAL: &EMPSER + + EMPLOYEE NAME:%===>_TYPECHG + (NEW, UPDATE, OR DELETE) + LAST %===>_LNAME + + FIRST %===>_FNAME + + INITIAL%===>_I+ + + HOME ADDRESS: + LINE 1%===>_ADDR1 + + LINE 2%===>_ADDR2 + + LINE 3%===>_ADDR3 + + LINE 4%===>_ADDR4 + + + HOME PHONE: + AREA CODE %===>_PHA+ + LOCAL NUMBER%===>_PHNUM + + )INIT .CURSOR = TYPECHG IF (&PHA = ' ') &PHA = 914 &TYPECHG = TRANS(&TYPECHG N,NEW U,UPDATE D,DELETE) )PROC &TYPECHG = TRUNC (&TYPECHG,1) IF (&TYPECHG = N) IF (&CHKTYPE NE N) .MSG = SASX211 IF (&TYPECHG NE N) IF (&CHKTYPE = N) .MSG = SASX212 VER (&LNAME,ALPHA) VER (&FNAME,ALPHA) VER (&I,ALPHA) VER (&PHA,NUM) VER (&PHNUM,PICT,'NNN-NNNN') IF (&TYPECHG = N,U) VER (&LNAME,NONBLANK,MSG=SASX214) VER (&FNAME,NONBLANK,MSG=SASX213) VER (&ADDR1,NONBLANK,MSG=SASX215) VER (&ADDR2,NONBLANK,MSG=SASX215) VER (&ADDR3,NONBLANK,MSG=SASX215) )END
SASX210 'INVALID TYPE OF CHANGE' .ALARM=YES 'TYPE OF CHANGE MUST BE NEW, UPDATE, OR DELETE.' SASX211 'TYPE ''NEW'' INVALID' .ALARM=YES 'EMPLOYEE SERIAL &EMPSER ALREADY EXISTS. CANNOT BE SPECIFIED AS NEW.' SASX212 'UPDATE OR DELETE INVALID' .ALARM=YES 'EMPLOYEE SERIAL &EMPSER IS NEW. CANNOT SPECIFY UPDATE OR DELETE.' SASX213 'ENTER FIRST NAME' .ALARM=YES 'EMPLOYEE NAME MUST BE ENTERED FOR TYPE OF CHANGE = NEW OR UPDATE.' SASX214 'ENTER LAST NAME' .ALARM=YES 'EMPLOYEE NAME MUST BE ENTERED FOR TYPE OF CHANGE = NEW OR UPDATE.' SASX215 'ENTER HOME ADDRESS' .ALARM=YES 'HOME ADDRESS MUST BE ENTERED FOR TYPE OF CHANGE = NEW OR UPDATE.' SASX217 '&EMPSER ADDED' 'EMPLOYEE &LNAME, &FNAME &I ADDED TO FILE.' SASX218 '&EMPSER UPDATED' 'EMPLOYEE &LNAME, &FNAME &I UPDATED.' SASX219 '&EMPSER DELETED' 'EMPLOYEE &LNAME, &FNAME &I DELETED.'