Iseries Programming Environment
-
Upload
syed-ibrahim -
Category
Documents
-
view
225 -
download
0
Transcript of Iseries Programming Environment
-
7/30/2019 Iseries Programming Environment
1/36
Iseries Programming
Environment
SyedIbrahim Abbas
-
7/30/2019 Iseries Programming Environment
2/36
Topics
Development Environment User Profile
Library
Source Files
Output Queues
Development Tools
Program Development Manager
-
7/30/2019 Iseries Programming Environment
3/36
Development Environment
SyedIbrahim Abbas
-
7/30/2019 Iseries Programming Environment
4/36
Development Environment
The Environment is usually made up of A user profile
A library
Source files
Output Queue
-
7/30/2019 Iseries Programming Environment
5/36
User Profile
User profile is an object which defines the resources that the usercan use
It also defines the runtime attributes of the user
User profile is set up by security officer to match the capabilities andrequirements of the user
It defines the user id and password to the system
All objects created by the user are owned by this user profile
-
7/30/2019 Iseries Programming Environment
6/36
Library
A library is an object that serves as a directory to other systemobjects.
It is used to group related objects and to find objects by name.
A library can contains different types of objects(PGM,FILE,SRCFILE.etc)
The name of an object must be unique for each object of a particulartype within single library
The security officer normally creates library for programmer usingCTRLIB command
-
7/30/2019 Iseries Programming Environment
7/36
Searching an Object
Qualified reference - library name / object name
-
7/30/2019 Iseries Programming Environment
8/36
Searching an object without library
name
Searching an object when we dont know the library name will take longtime because there can be many libraries on the system, so OS/400 uses theconcept of Library List
-
7/30/2019 Iseries Programming Environment
9/36
Library List The library list is the list of libraries to be searched when seeking an
objects The list only contain those libraries relevant to the current application
Every active job on the iSeries has its own library list
-
7/30/2019 Iseries Programming Environment
10/36
Library list is made up of two parts System part : common libraries that are in the library list for every job running
on the system. This is the system value QSYSLIBL
User part : is set by the user or application to suit the current application or user
Once logged on its programmer responsibilities to ensure that the library listassociated with their jobs are correct using EDTLIBL command
you can add/delete/rearrange the libraries in library list
-
7/30/2019 Iseries Programming Environment
11/36
Source Files The program source is stored in source files
There are two approach to source files Using standard source files
Using your own source files
-
7/30/2019 Iseries Programming Environment
12/36
1) Use the same name as the IBM-supplied versions and keepthe source files in the appropriate library for a given
application, that is, all RPG source would be in QRPGSRC filein the application library
2) Using single source file per application where all source filemembers can be saved
-
7/30/2019 Iseries Programming Environment
13/36
CRTSRCPF
The programmer must create the standard sourcefiles in their library
The create source physical file CRTSRCPFcommand is used to create all source files
QDDSSRC DDS
QRPGSRC RPG Program
-
7/30/2019 Iseries Programming Environment
14/36
Output Queues
The output is stored in an spooled output files until they need to beprinted or displayed.
There may be many spooled output files for a single job
When spooled output file is created, the file is placed on an outputqueue
Each output queue contains an ordered list of spooled output files A Job can create spooled output files on one or more output queues
by nominating which output queue the output should be placed on
The default output queue is specified in the user profile
-
7/30/2019 Iseries Programming Environment
15/36
The printed output is stored in an output queue for later processing
A System program called a Printer Writer take entries off the queuesand sends them to a physical printer
You should have a special output queue so all of your spooled output
is always send to the queue
-
7/30/2019 Iseries Programming Environment
16/36
CRTOUTQ You can create your own output queue using CRTOUTQcommand
You can change the output default output queue by using CHGJOBcommand
-
7/30/2019 Iseries Programming Environment
17/36
JOB Description Another important object in Iseries environment is Job Description
When OS initiates a job it always references a job description to getall the runtime attributes of a job
For E.g. Job description contains the initial library list to use, whichoutput queue to send the reports, and so on.
The generic job description QDFTJOBD in the QGPL library is used by
default Using CRTJOBD command you can create your own job description
-
7/30/2019 Iseries Programming Environment
18/36
If you create your own job description, do not forgot changeyour user profile to point to your own job description
Use CHGUSRPRF to change your default job description.
-
7/30/2019 Iseries Programming Environment
19/36
The development environment looks like.
Before start programming ensure that Your library list is correct
You are pointed to your own output queue
You have appropriate authorities, as set by your profile
-
7/30/2019 Iseries Programming Environment
20/36
Development Tools
SyedIbrahim Abbas
-
7/30/2019 Iseries Programming Environment
21/36
Iseries provides a number of tools to assist the developmentof an application Compilers
SEU : Source Entry Utilities SDA : Screen Design Aid
QRY : Query
DFU : Data File Utility
PDM Program Development Manager
-
7/30/2019 Iseries Programming Environment
22/36
Compilers
Convert source code in to machine code, a language that a machinecan understood
It converts the source file member into actual object that can beexecuted or store data
High-level language compilers include C, C++, Java, CLP, RPG, COBOL It is also used to create files on iSeries
-
7/30/2019 Iseries Programming Environment
23/36
SEU Source Entry Utility - STRSEU
SEU allows you to create, edit, display and delete source
members form workstation It is a full screen editor with many built in function
Automatic syntax checking
Predefined formats for forms based specification
-
7/30/2019 Iseries Programming Environment
24/36
SDA Source Design Aid - STRDDA
It allows you to Design screens
Designing Menus
Testing display files
SDA converts the screen image to DDS
-
7/30/2019 Iseries Programming Environment
25/36
QRY Query - STRQRY Query is a program that can retrieve and format information from the
database
Query can select, arrange, and analyze data stored in one or more data filesto produce reports. It handle many of your reporting needs
It also can create file as o/p for i/p to other programs, re-input to qry itself
-
7/30/2019 Iseries Programming Environment
26/36
DFU Data File utility - STRDFU
It is used to maintain data within database file You can also create a default temporary program for quick fixes
It can perform data validation and support displays for multiple records
-
7/30/2019 Iseries Programming Environment
27/36
PDM Program Development Manager
- STRPDM
It allows you to work with lists of libraries, objects and members toperform operation such as:
Copy, Delete, Edit, Rename, Compile
It is your primary workspace tool
-
7/30/2019 Iseries Programming Environment
28/36
Working with libraries - WRKLIBPDM
You can limit the libraries displayed to a number of predefined values You can use all the available option like change, display, delete, etc..
-
7/30/2019 Iseries Programming Environment
29/36
Working with objects - WRKOBJPDM
-
7/30/2019 Iseries Programming Environment
30/36
Working with members - WRKMBRPDM
A member is a subset of records in a physical file and file can
have many members Member is file with a file
Typically, PDM is used to work with members of source files
-
7/30/2019 Iseries Programming Environment
31/36
PDM - options
PDM performs these operation by calling commands
with known parameter values You can perform many operation without having to
know the specific command
-
7/30/2019 Iseries Programming Environment
32/36
You can perform operations on more than one at a time
-
7/30/2019 Iseries Programming Environment
33/36
User defined options This tool allows you to define shortcuts for system
command that you often use
For eg you can define DM to run DSPMSG command
-
7/30/2019 Iseries Programming Environment
34/36
-
7/30/2019 Iseries Programming Environment
35/36
Function keys in PDM
F3 Exit F4- Prompt
F5- Refresh
F6create
F9- retrieve
F10 command entry
F11 removes and text and type
F13 Repeat
F16- user option
F17- Subset restrict the list to only certain libraries filter
F23- more option
F24 More function keys
-
7/30/2019 Iseries Programming Environment
36/36
Thank you
SyedIbrahim Abbas