You are on page 1of 42

AS/400 Training

Australia | Canada | France | India | New Zealand | Singapore | Switzerland | United Arab Emirates | United Kingdom | United States www.keane.com. 2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.

Contents
1. 2. 3. 4. 5. 6. Basic Concepts (1 Day) DDS - PF, LF, DSPF, PRTF (2 Days) Control Language (2 Days) RPG/400 (4 Days) ILE RPG & Concepts (4 Days) Assignment - Project (5 Days)

2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.

August 3, 2007

OS/400 Basic Concepts

Australia | Canada | France | India | New Zealand | Singapore | Switzerland | United Arab Emirates | United Kingdom | United States www.keane.com. 2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.

Object Management Terms


Libraries Objects Members Sources Spool Files Output/Messages/Job queues Device Descriptions

2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.

August 3, 2007

Library
Libraries provide a method for organizing objects. All libraries are stored under QSYS library. We cannot have a library within a library (only exception being IBM supplied QSYS). All AS/400 objects should be stored in a library. A library is similar to a directory or a folder in the conventional file system (DOS/WINDOWS).

2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.

August 3, 2007

Object
On the AS/400, a wide variety of entities are objects -- files, programs, libraries, user profiles, commands, etc. A library contains object name, type (*PGM, *FILE, etc.) and a system managed (transparent) address Objects must be unique, by name and type within a library

2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.

August 3, 2007

Member
Data is stored in member(s) in a file A file can have multiple members The record format of the file is common across all the members of a file

2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.

August 3, 2007

Summary
Library/Object Structure QSYS

LIB A

LIB B

Other libraries/objects

PGM1

File1

Other objects

PGM1

File2

Other Objects

Member1

Member2

Member A
August 3, 2007 8

2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.

Source File
A source file is a file where the source codes are maintained Source code is stored as a member in a physical file. This file is called as a source physical file and is a customized version of a physical file

2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.

August 3, 2007

Spool Files
Printed output from any program is normally placed in a spool file. These spooled files can be displayed or can be printed.

2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.

August 3, 2007

10

Output Queue & Job Queue


An Output Queue is an object containing a list of spooled files. Object type is *OUTQ. A Job Queue contains the list of batch jobs waiting to be processed.

2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.

August 3, 2007

11

Work Management Summary


Batch SBMJOB JOBQ

OUTQ Interactive CALL

Writer

Printer

WRKJOBQ

WRKACTJOB

WRKOUTQ WRKSPLF

WRKWTR

WRKUSRJOB WRKSBMJOB
2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.
August 3, 2007 12

Message Queue
All messages on the AS/400 are sent to Message Queues. Message Queue Types
System supplied Message Queue -- QSYSOPR, supplied by IBM. Workstation & User Message Queue -- Allocated to user's job at sign-on. Job Message Queue -- for every job in the system. Program Message Queue -- for every program started within a job

2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.

August 3, 2007

13

Device Descriptions
A device description is needed to describe a device to the system. A device may be a diskette, optical device, display device, etc.

2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.

August 3, 2007

14

Job Management Terms


Library Lists Jobs
Interactive Jobs Batch Jobs

Job Descriptions Job Logs

2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.

August 3, 2007

15

Library List
A library list is an ordered list of libraries. These libraries are searched one by one until an object is found with the specified object name and type (If the object name is qualified by preceding it with a library, the system searches for the object only in the specified library).

2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.

August 3, 2007

16

Library List Cont


Search Order

QSYS QUSRSYS QHLPSYS QPDA QITS QITSCRM QITSSED QITSMDS

System Part Product Part Current Library User Part

2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.

August 3, 2007

17

Job
Each piece of work on the system is considered to be a job. Each job has a unique name within the system. Job name consists of a Job Name, Device and Job Sequence no. Job name is same as device name for interactive jobs.

2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.

August 3, 2007

18

Interactive Job
An interactive job is a job that starts when a user signs on to a display station and ends when the user signs off.

2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.

August 3, 2007

19

Batch Job
A batch job is a predefined group of processing actions submitted to the system. A batch job will be performed with little or no interaction between the user and the system. A batch job is submitted from an interactive job normally and typically requires a special system environment to run.

2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.

August 3, 2007

20

Job Descriptions
Information describing environment in which a Job would be executed A job description is a collection of job related attributes - like job priority, date format, library list. Same job description can be used by multiple jobs.

2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.

August 3, 2007

21

Job Log
Job log contains information related to requests entered for a job, such as commands in the job, commands in a CL program, and messages.

2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.

August 3, 2007

22

Messages
System Compiler User Program

2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.

August 3, 2007

23

Messages
On the AS/400 system, communication between procedures or programs, between jobs, between users and between users and procedures or programs occurs through messages. A message is always sent to a message Q. A message can be predefined or immediate

2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.

August 3, 2007

24

Predefined Message
A predefined message is created and exists outside the program that uses it. Predefined messages are stored in message files and have a message number.

2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.

August 3, 2007

25

Immediate Messages
Immediate messages are those that can be composed on the fly

2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.

August 3, 2007

26

Predefined Vs Immediate Messages


Predefined messages -- provides standardization, runtime customization, no recompilation required if a message is changed, write once - use many times, second level text Immediate messages -- compose on the go, can use SNDMSG, SNDBRKMSG

2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.

August 3, 2007

27

System Messages
An example of a system predefined message is, CPF0006 - Errors occurred in command System messages are stored in the file QCPFMSG in the library QSYS

2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.

August 3, 2007

28

User Messages
Use SNDMSG or SNDBRKMSG or SNDUSRMSG to communicate with the system users.

2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.

August 3, 2007

29

Program Messages
Messages can be sent from one program to another program within a job using SNDPGMMSG. Job and program message Qs are automatically created and deleted as jobs and programs begin and end.

2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.

August 3, 2007

30

OS/400 Commands
Command - Max 10 characters Always has a Verb + Subject form Commands may have parameters (Most do) Parameters for a Command can given in 2 ways
Keyword Form - Each parameter has to be specified along with the keyword

Command kywrd1 valu1 kywrd2 valu2 kywrd3 valu3


Positional Form - Parameters has to be specified in a predefined order

Command value1 value2 value3

2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.

August 3, 2007

31

OS/400 Commands (Cont . . .)


ADDLIBLE -- Add Library List Entry -- to add a library to the user portion of the library list. By default the library is added on top of the existing library list EDTLIBL -- Edit Library List -- to edit the current user portion of the library list. New libraries may be added, libraries in the current list may be removed and the positions of the libraries may be changed using this command SBMJOB -- Submit Job -- to submit a job for batch processing into a JobQ. Jobs that need minimum or no interaction from the user and long running jobs are normally submitted as a batch job. System would send a completion message once the job is over CRTLIB -- Create Library -- to create a new
2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.
August 3, 2007

32

OS/400 Commands (Cont . . .)


CHGCURLIB -- Change Current Library -- to set a library as the current library. If a current library is not set, the default current library is QGPL DSPMSG -- Display Message -- to display the messages from a specific message Q like workstation message Q, user message Q or QSYSOPR DSPJOB -- Display Job -- to display the details pertaining to a job - like job start date, current status, files used, programs running, spool files, library list, etc. WRKSPLF -- Work with Spool Files to display/print/delete spool files
2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.
August 3, 2007 33

OS/400 Commands (Cont . . .)


WRKSBMJOB -- Work with Job submitted from the workstation, job or user profile -- to display, change the submitted jobs (jobs running in batch). CRTSRCPF -- Create Source Physical File -- to create a source physical file. Source physical file is a customized version of a physical file, its record length is normally 92. This file is used to hold the source codes. CHGJOB -- Change Job -- to change the run time parameters of a job - like JobQ, priority, scheduling, OutputQ, date format, etc. CRTPGM -- Create Program -- to create a program object from a set of modules CRTRPGMOD -- Create RPG Module -- to compile the RPG source into a module object
2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.

August 3, 2007

34

OS/400 Commands (Cont . . .)


CRTRPGPGM -- Create RPG Program -- to start the RPG compiler DSPJOBLOG -- Display Job Log -- to display the job log - lists the commands used in the job so far and the messages MOVOBJ -- Move Object -- to move an object from one library to a different library (that is the object is removed from the current location and placed in a different library) STRDBG -- Start Debug -- to start debugger - puts a job (and adds programs) into debug mode STRISDB -- Start Interactive Debugger -- to start the interactive source debugger. This command provides an interactive debugging environment for CL, RPG and COBOL
2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.

August 3, 2007

35

OS/400 Commands (Cont . . .)


STRPDM -- Start Program Development Manager -- to start Program Development Manager - an application development tool provided along with the AS/400 WRKUSRPRF -- Work with User Profile -- to maintain the user profiles. User profiles may be added, changed, deleted with this command WRKACTJOB -- Work with Active Job -- to work with performance and status information for the active jobs in the system WRKUSRJOB -- Work with User Job -- to work with a selected user jobs. WRKMSGF -- Work with Message Files -- to maintain the message files. This command may be used to create, change (the message descriptions) and delete a message file
2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.
August 3, 2007

36

OS/400 Commands (Cont . . .)


UPDPGM -- Update Program -- This command may be used to replace the modules in a bound program with other modules. The bound program need not be recompiled when a module is replaced

2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.

August 3, 2007

37

AS/400 Security Concepts


Objectives
Confidentiality
Protecting against disclosing information to unauthorized people Restricting access to confidential information

Integrity
Protecting against unauthorized changes to data Restricting manipulation of data to authorized programs

Availability
Preventing accidental changes or destruction of data Protecting against attempts by outsiders to abuse or destroy data

Layers of Security
To access any resource from the AS/400, a user ID and a password is necessary At the lowest level, security can be implemented at the field level for a file
2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.
August 3, 2007 38

Levels of Security
Level 10 -- Physical Security Level 20 -- Password Security Level 30 -- Full resource security. This is the level of security implemented in most systems. Level 40 -- Restricted access to system interface. This is to prevent unauthorized access through communications and APIs. The AS/400 system when shipped is at level 40. Level 50 -- Highest level of security. Intended to support the security standards set by US department of defense. Not used generally.
2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.
August 3, 2007 39

AS/400 Security (Cont)


User Profile
User profile is an AS/400 object identifies the user to the system Source of authority for the system to refer to when the user requests services The User profile consists of
User Name Password Owned Objects Authorized Objects Scheduling Priority Special Authority Save system rights Job control rights Initial Program - Program that is called upon user log on. Job Description
August 3, 2007 40

2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.

AS/400 Security (Cont)


Classes of User Profile
Determines what option the user sees on menus Determines what functions the user is allowed to do The user classes are
Security Officer (*SECOFR) Security Administrator (*SECADM) Programmer (*PGMR) System Operator (*SYSOPR) User (*USER)

2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.

August 3, 2007

41

AS/400 Security (Cont)


Special Authorities
In addition to the regular functions these can be assigned to any user to enhance their access.
*ALLOBJ - authority to perform all operations on objects *SECADM - allows user to work with user profiles on the system *JOBCTL - allows the user to control all jobs and printing *SPLCTL - unrestricted control of batch jobs and output queues *SAVSYS - authorizes the user to save and restore objects *SERVICE - authorizes to perform software services *AUDIT - authority to define Auditing characteristics *IOSYSCFG - configure Input/Output devices

Related Commands
CRTUSRPRF CHGUSRPRF DSPUSRPRF CHGPWD Create user profile Change User Profile Display User Profile Change Password

2007 Keane. All rights reserved. Confidentiality: The concepts and methodologies contained herein are proprietary to Keane. Duplication, reproduction or disclosure of information in this document without the expressed written permission of Keane is prohibited.

August 3, 2007

42

You might also like