Version 4.2.6 for Mainframes (Update)
 —  Statements  —

PASSW

PASSW=operand1

This document covers the following topics:

Related Statements: ACCEPT/REJECT | AT BREAK | AT START OF DATA | AT END OF DATA | BACKOUT TRANSACTION | BEFORE BREAK PROCESSING | DELETE | END TRANSACTION | FIND | HISTOGRAM | GET | GET SAME | GET TRANSACTION | LIMIT | PERFORM BREAK PROCESSING | READ | RETRY | STORE | UPDATE

Belongs to Function Group: Database Access and Update


Function

The PASSW statement is used to specify a default password for access to Adabas or VSAM files which have been password-protected.

Note:
This password can be overwritten using the PASSWORD clause of the database access statements FIND, GET, HISTOGRAM, READ, STORE.

Natural Security Considerations

In the security profile of a library, you can specify a default Adabas password (as described in the Natural Security documentation); this password applies to all database access statements for which neither an individual password is specified nor a PASSW statement applies. It applies within the library in whose security profile it is specified, and also remains in effect in other libraries you subsequently log on to and in whose security profiles no password is specified.

Password Display Protection

If the password is specified as a constant, the PASSW statement should always be coded at the very beginning of a source-code line, and there should be no blank between the keyword PASSW and the equal sign; this ensures that the password is not visible/displayable in the source code of the program.

In TP mode: You may enter the PASSW statement invisible by entering the terminal command %* before you type in the PASSW statement.
In batch mode: A password may be provided by specifying the following statements in the line editor:
EDT

 PASSW='password' 
 END

 

.E
RUN
The password value will not appear in the printed output.

Top of page

Restriction

This statement is not valid for DL/I, DB2 and SQL/DS databases.

Top of page

Syntax Description

Operand Definition Table:

Operand Possible Structure Possible Formats Referencing Permitted Dynamic Definition
operand1 C S       A                         yes no

Syntax Element Description:

operand1
Password:

The password (operand1) may be specified as an alphanumeric constant or the content of an alphanumeric variable. It may consist of up to 8 characters, and must not contain special characters or embedded blanks. If the password is specified as a constant, it must be enclosed in apostrophes.

The password specified with the PASSW statement applies to all database access statements (FIND, GET, HISTOGRAM, READ, STORE) for which no individual password is specified. It remains in effect until another password is specified in the execution of a subsequent PASSW statement or the Natural session is terminated.

A password specified with a specific database access statement applies only to that statement, not to any subsequent statement.

Top of page

Example

Example Program PWDEX1 with Password Display Protection (see above):

** Example 'PWDEX1': PASSW                                              
************************************************************************
DEFINE DATA LOCAL                                                       
1 EMPLOY-VIEW VIEW OF EMPLOYEES                                         
  2 PERSONNEL-ID                                                        
  2 NAME                                                                
END-DEFINE                                                              
*                                                                       
PASSW=                          Password not visible
*                                                                       
LIMIT 5                                                                 
READ EMPLOY-VIEW                                                        
 DISPLAY NOTITLE PERSONNEL-ID NAME                                      
END-READ                                                                
*                                                                       
END   

Output of Program PWDEX1:

PERSONNEL         NAME        
   ID                         
--------- --------------------
                              
50005800  ADAM                
50005600  MORENO              
50005500  BLOND               
50005300  MAIZIERE            
50004900  CAOUDAL            

Top of page