Midrange Concepts - Fox Valley Technical College

Download Report

Transcript Midrange Concepts - Fox Valley Technical College

Midrange Concepts
Review for Test 2
Security
• Security has two general purposes:
– Loss Prevention
• Objects - Data
– Access control
• Functions
• Controls should be exercised:
– At input time
– At update time
– When data is deleted
Security
• Access Controls can be supplied by:
– DB2/400
– OS/400
– Journaling Functions
• Data Control Levels:
– File
– Record (journaling)
– Field
Security
• Object authority: the ability to provide access to
object functions:
– 2 users have object authority:
• Owner of the object
• System Security Officer
– Also has authority to enter new users
• Granting object authority:
– EDTOBJAUT: Edit object Authority
– GRTOBJAUT: Can use only against objects that you
own.
– WRKOBJ: Use options
• EDTOBJAUT
Security
• Authorization List:
– Identifies object owner and who has access.
• Authorization Values:
–
–
–
–
*ALL
*USE
*EXCLUDE
*CHANGE
• Group profiles
– Everyone in the group will have the same authority.
Security
• System Level Security
– Controlled at signon by the system value for security.
– Range in value from 10 to 50
• 10: any user name and password will be given access
• 20: User name and password must be valid to gain access but
then have full capabilities
• 30: User name and password with object authority
• 40: all of 30 also security regarding machine interface objects.
• 50: all of 40, highest level of security
• Other means to assigning object security:
– Adopted Authority
– Alternative User Environments
Physical Files
• Character Representation
– EBCDIC (Extended Binary Coded Decimal Interchange
Code)
– ASCII (American Standard Code for Information
Interchange)
• Numeric Representation
– Zoned Decimal
– Packed Decimal
– Binary
Physical Files
• Data definition must include:
– Field Names
– Data Type
– Length
• Data can be defined:
– Internally (using RPG or Cobol)
– Externally (IDDU, DDS, SQL)
Physical Files
IDDU (Interactive Data Definition Utility)
Came from the System 36 environment
DDS (Data Definition Specifications)
Define file structures
Individual Field Characteristics
Field edits
Physical Files
• Process of DDS:
– Key definition into a member of source file
with type pf.
– Compile this member
– Object created during compile will hold data.
• DDS is a semi-positional language.
Physical Files
• Physical files must have only one record
level specification.
• Keywords (all optional):
– Text
– Ref
– Unique
Physical Files
• Field Reference File
• Physical files can have multiple members
• Keyed Access Path (or Index to the data)
– Keyed fields can be primary or secondary
– Can use a combination of fields to specify key
– Do not have to specify a key
Keyed Sequence Access Paths
• Allow access to records in both
arrival sequence and keyed sequence
• Allow individual records to be
retrieved according to a specific key
value
• Utilities will default to either Arrival
or Keyed sequence when accessing a
keyed file
– DSPPFM uses arrival sequence
– CPYF uses keyed sequence
Logical Files
• Usually created to satisfy different user
access requirements.
–
–
–
–
–
–
Offer a different view of physical file
DO NOT contain any data
Based on Physical file
Can not exist independently
Use DDS to define record layout
Can add/delete records of physical file and
logical will see changes
– Do not have the same key as the physical file
Logical Files
• Keywords:
– PFILE
– JFILE
• JOIN
• JFLD
Commands
•
•
•
•
CRTPF
CRTLF
DSPDBR
FNDSTRPDM
Commands
• CPYF
–
–
–
–
–
Can copy from a PF, LF or a source file
Can copy to a PF, Printer, external devices
Can convert a source file to a physical file
Does not require DDS for new file
To file does not have to exist as object
• Must specify create
Creating CL Programs
Library
CRTMBR
*PGM
CLP
PF-SRC
Programmer
CL
Commands
Compile
SEU
CRTMBR
CLP
Creating a Data Physical File
Library
Machine Language
File Definition
PF-SRC
Student
*FILE
PF-DTA
Compile
Student
PF
DDS
Student
__
Ref Keyword
Library
PF-SRC
DDS
Compile
Student
PF
REF(FRF)
DDS
FRF
*FILE
PF-DTA
Student
*FILE
PF-DTA
Machine Language
File Definition
Student
__
Ref Keyword
Library
PF-SRC
DDS
Compile
Student
PF
REF(FRF)
DDS
FRF
*FILE
PF-DTA
Student
*FILE
PF-DTA
Machine Language
File Definition
Student
__