Chapter Contents

Previous

Next
MODIFIED

MODIFIED



Reports whether a field or FRAME entry control has been modified

Category: Control or Field


Syntax
Details
Examples
Example 1: Opening an FSEDIT Window
Example 2: Invalid Syntax for MODIFIED
See Also

Syntax

rc=MODIFIED(wcol-name);

rc
contains the return code for the operation:
1 modified
0 not modified

Type: Numeric

wcol-name
is the name of the field or FRAME entry control in the window. This name cannot be an element of an array nor an expression. If wcol-name is invalid, the program halts.

Type: Character


Details

A field's state changes to modified when a user types any character in the field and presses ENTER or a function key or selects a FRAME entry control.

The field or FRAME entry control cannot be an element of an array. To report this information for an array element, use FIELD instead.

The ERRORON statement causes MODIFIED to return a value of 1.

FRAME entry controls can also use the _isModified method.


Examples

Example 1: Opening an FSEDIT Window

Open an FSEDIT window for the SAS table specified in the TBLNAME variable. The FSEDIT function displays the table for interactive editing.

if (modified(tblname) and tblname ne ' ' ) then
   call fsedit(tblname);
else
   _msg_='Please enter a valid table name.';

Example 2: Invalid Syntax for MODIFIED

The following are examples of invalid syntax that will not compile:

   /* A literal string is used. */
rc=modified('xyz');
   /* Concatenation of two columns. */
rc=modified(a||b);
   /* An array element is used. */
rc=modified(a{i});

See Also

DISPLAYED

ERROR

ERROROFF

ERRORON

FIELD

OBSINFO


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.