02.05.2013 Views

SAS(R) 9.1.3 Companion for z/OS

SAS(R) 9.1.3 Companion for z/OS

SAS(R) 9.1.3 Companion for z/OS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Comparisons<br />

Functions and CALL Routines under z/<strong>OS</strong> CALL SLEEP Routine 247<br />

The ANYPUNCT function searches a character string <strong>for</strong> a punctuation character. The<br />

NOTPUNCT function searches a character string <strong>for</strong> a character that is not a<br />

punctuation character.<br />

Examples<br />

The following example uses the ANYPUNCT function to search a string <strong>for</strong> punctuation<br />

characters.<br />

data _null_;<br />

string=’Next = _n_ + 12E3;’;<br />

j=0;<br />

do until(j=0);<br />

j=anypunct(string,j+1);<br />

if j=0 then put +3 "That’s all";<br />

else do;<br />

c=substr(string,j,1);<br />

put +3 j= c=;<br />

end;<br />

end;<br />

run;<br />

The following lines are written to the <strong>SAS</strong> log:<br />

See Also<br />

j=6 c==<br />

j=8 c=_<br />

j=10 c=_<br />

j=12 c=+<br />

j=18 c=;<br />

That’s all<br />

CALL SLEEP Routine<br />

1 “NOTPUNCT Function” in <strong>SAS</strong> Language Reference: Dictionary<br />

Suspends the execution of a program that invokes this call routine <strong>for</strong> a specified period of time<br />

Category: Special<br />

z/<strong>OS</strong> specifics: host call<br />

See: CALL SLEEP Routine in <strong>SAS</strong> Language Reference: Dictionary<br />

Syntax<br />

CALL SLEEP(time);<br />

time<br />

specifies the amount of time, in milliseconds (1/1,000 of a second), that you want to<br />

suspend execution of a DATA step and the <strong>SAS</strong> task that is running that DATA step.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!