You are on page 1of 36

Iseries Programming Environment

SyedIbrahim Abbas

Topics
Development Environment
User Profile Library Source Files Output Queues

Development Tools Program Development Manager

Development Environment
SyedIbrahim Abbas

Development Environment
The Environment is usually made up of
A user profile A library Source files Output Queue

User Profile

User profile is an object which defines the resources that the user can use It also defines the runtime attributes of the user User profile is set up by security officer to match the capabilities and requirements 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

Library

A library is an object that serves as a directory to other system objects. 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 particular type within single library The security officer normally creates library for programmer using CTRLIB command

Searching an Object
Qualified reference - library name / object name

Searching an object without library name

Searching an object when we dont know the library name will take long time because there can be many libraries on the system, so OS/400 uses the concept of Library List

objects The list only contain those libraries relevant to the current application Every active job on the iSeries has its own library list

LibrarytoList when seeking an The library list is the list of libraries be searched

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 list associated with their jobs are correct using EDTLIBL command you can add/delete/rearrange the libraries in library list

There are two approach to source files


Using standard source files Using your own source files

Source Filesfiles The program source is stored in source

1) Use the same name as the IBM-supplied versions and keep the source files in the appropriate library for a given application, that is, all RPG source would be in QRPGSRC file in the application library

2) Using single source file per application where all source file members can be saved

CRTSRCPF
The programmer must create the standard source files in their library The create source physical file CRTSRCPF command is used to create all source files

QDDSSRC DDS QRPGSRC RPG Program

Output Queues
The output is stored in an spooled output files until they need to be printed 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 output queue 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

The printed output is stored in an output queue for later processing A System program called a Printer Writer take entries off the queues and 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

You can change the output default output queue by using CHGJOB command

CRTOUTQ You can create your own output queue using CRTOUTQ command

JOB Description
Another important object in Iseries environment is Job Description When OS initiates a job it always references a job description to get all the runtime attributes of a job For E.g. Job description contains the initial library list to use, which output 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

If you create your own job description, do not forgot change your user profile to point to your own job description
Use CHGUSRPRF to change your default job description.

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

Development Tools
SyedIbrahim Abbas

Iseries provides a number of tools to assist the development of an application


Compilers SEU : Source Entry Utilities SDA : Screen Design Aid QRY : Query DFU : Data File Utility PDM Program Development Manager

Compilers

Convert source code in to machine code, a language that a machine can understood It converts the source file member into actual object that can be executed or store data High-level language compilers include C, C++, Java, CLP, RPG, COBOL It is also used to create files on iSeries

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

SDA Source Design Aid - STRDDA


It allows you to
Design screens Designing Menus Testing display files

SDA converts the screen image to DDS

database Query can select, arrange, and analyze data stored in one or more data files to 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

QRY can retrieve and format information from the Query - STRQRY Query is a program that

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

It allows you to work with lists of libraries, objects and members to perform operation such as: Copy, Delete, Edit, Rename, Compile It is your primary workspace tool

PDM Program Development Manager - STRPDM

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..

Working with objects - WRKOBJPDM

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

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

You can perform operations on more than one at a time

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

Function keys in PDM


F3 Exit F4- Prompt F5- Refresh F6 create 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

Thank you
SyedIbrahim Abbas

You might also like