Restarts execution of a suspended program.
Category: |
Controlling Program Execution
|
Alias: |
J
|
-
line-number
-
indicates the number of a program line at
which to restart the suspended program.
-
label
-
is a statement label. Execution resumes
at the statement following the label.
The JUMP command moves program execution
to the specified location without executing intervening statements. After
executing JUMP, you must restart execution with GO or STEP. You can jump to
any executable statement in the DATA step.
- CAUTION:
- Do not use
the JUMP command to jump to a statement inside a DO loop or to a label that
is the target of a LINK-RETURN group.
In
such cases you bypass the controls set up at the beginning of the loop or
in the LINK statement, and unexpected results can appear. ![[cautionend]](../../../../common/63294/HTML/default/images/cautend.gif)
JUMP is useful in two situations:
-
when you want to
bypass a section of code that
is causing problems in order to concentrate on another section. In this case,
use the JUMP command to move to a point in the DATA step after the problematic
section.
-
when you want to re-execute a series of statements
that have caused problems. In this case, use JUMP to move to a point in the
DATA step before the problematic statements and use the SET command to reset
values of the relevant variables to the values they had at that point. Then
re-execute those statements with STEP or GO.
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.