Top Banner
AS/400 Concepts & Tools
49

Extracts from AS/400 Concepts & Tools workshop

Nov 19, 2014

Download

Technology

Ramesh Joshi

Extracts from AS/400 Concepts & Tools workshop
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Extracts from AS/400 Concepts & Tools workshop

AS/400 Concepts & Tools

Page 2: Extracts from AS/400 Concepts & Tools workshop

Day 1• Introduction to the AS/400• Basic Technical Concepts• Programming Environment & Tools• Programming Development Manager (PDM)• Screen Design Aid (SDA)• Source Entry Utility (SEU)

Page 3: Extracts from AS/400 Concepts & Tools workshop

Day 2• Nano Project • Control Language (CL) • Crash Investigation • Debugging • DB2/400 • Query/400• Introduction to RPG

Page 4: Extracts from AS/400 Concepts & Tools workshop

ObjectiveGive the participants a pretty good idea about what a full course would be like and what to

expect if they decide to become AS/400 developers. 

Page 5: Extracts from AS/400 Concepts & Tools workshop

Hello World

Page 6: Extracts from AS/400 Concepts & Tools workshop

How are you?

Page 7: Extracts from AS/400 Concepts & Tools workshop

Under the hood

Page 8: Extracts from AS/400 Concepts & Tools workshop

Hello World• Start session B• EX00101DS• SAYHELLO• DSPCMD• EX00101• HELLOSRC / Library• Library contains HELLOSRC• HELLOSRC contains members

Page 9: Extracts from AS/400 Concepts & Tools workshop

How are you?• Session A• PDM Opt.1 (TRAINER1)• PDM Opt.1 (Ln22/23, F23, F24, F18, Bottom)• 12 on TRAINER1 (Lib, Objects)• CRTLIB (Security, Msgs(24), +)• CRTSRCPF (112, W/o Desc.)• 13 on HOWSRC• 12 on HOWSRC

Page 10: Extracts from AS/400 Concepts & Tools workshop

Architect’s Plan

Page 11: Extracts from AS/400 Concepts & Tools workshop

The House

Page 12: Extracts from AS/400 Concepts & Tools workshop

PF-SRC = Architect’s Filing cabinetMember = Architect’s PlanCompiler = Civil Engineer

Object = The House

Page 13: Extracts from AS/400 Concepts & Tools workshop

SDA• Opt.3 EX00201DS EX00201DSA• Opt.17; Explain WW Display Records screen• Opt.12-Ins/Del caution• 2,2 *user, 1,60 *date, 2,65 *time• Date & Time >>>>, <<<<<, • User -=, -==, CW, CB, CP• Exit SDA• Session A (SAYHOWRYOU)• Session B (5 on EX00201DS)

Page 14: Extracts from AS/400 Concepts & Tools workshop

i = Integration

Page 15: Extracts from AS/400 Concepts & Tools workshop

PC AS/400

Folder Library

Excel file = Physical File

Worksheet = Member

Row = Record

Column Field

Page 16: Extracts from AS/400 Concepts & Tools workshop

Integrated File System (IFS)

Native Environment

Page 17: Extracts from AS/400 Concepts & Tools workshop

Numeric Data• Zoned Decimal (Also called Signed)• Packed Decimal• Binary (My suggestion: Do not use in Business Applications)

Page 18: Extracts from AS/400 Concepts & Tools workshop

Zoned / Signed

Positive Negative1 2 3 4

1 2 3

1 2 3 M

1 2 L

Each digit needs one Byte.

If negative, sign is indicated by setting “B” bit “on” in Units position.

Page 19: Extracts from AS/400 Concepts & Tools workshop

87

54

2

72

58

4

48

52

7

Sequential File Organization

School School

Page 20: Extracts from AS/400 Concepts & Tools workshop

Sequential Files• No Key• Data is stored in arrival sequence

Page 21: Extracts from AS/400 Concepts & Tools workshop

87

54

2

24

57

8

48

52

7

Indexed File Organization

School School

Page 22: Extracts from AS/400 Concepts & Tools workshop

Indexed Files• Have one or more Keys• Conceptually, two files – one containing

record data, the other containing Key Values and “Pointer” to the record data.

• Record data is stored in arrival sequence.• “The other” file is automatically updated by

the Operating System.

Page 23: Extracts from AS/400 Concepts & Tools workshop

Objects

Page 24: Extracts from AS/400 Concepts & Tools workshop

91 20 25399615Library Type Name

Page 25: Extracts from AS/400 Concepts & Tools workshop

Libraries• Purpose• Similarity to Windows Folders• Exceptions

Page 26: Extracts from AS/400 Concepts & Tools workshop

Libraries (Exceptions)• QSYS• QTEMP

– Purpose– Creation– Initialization– Deletion

Page 27: Extracts from AS/400 Concepts & Tools workshop

Library List

Page 28: Extracts from AS/400 Concepts & Tools workshop

Database Files

• Physical Files Table in RDBMS• Logical File View in RDBMS

Page 29: Extracts from AS/400 Concepts & Tools workshop

File Description (Metadata)

Storage Area for Data

Index (Access Path in IBM’s terminology)-Optional

Member 1

Member 2

Member n

.

.

.

Conceptual structure of a PF

Page 30: Extracts from AS/400 Concepts & Tools workshop

Physical FilesPF-SRCPF-DTA

Page 31: Extracts from AS/400 Concepts & Tools workshop

PF-DTA & PF-SRC• No “Structural” difference• Compilation• PF-SRC No member• PF-DTA One member

(Name defaults to File Name)

Page 32: Extracts from AS/400 Concepts & Tools workshop

Members• Use• Type• When to use• When not to use

Page 33: Extracts from AS/400 Concepts & Tools workshop

Development Tools• Source Entry Utility• Screen Design Aid• Report Layout Utility• Data File Utility

Page 34: Extracts from AS/400 Concepts & Tools workshop

Nano Project

Page 35: Extracts from AS/400 Concepts & Tools workshop

Screen Design Aid (SDA), Option 2-Design menus

Page 36: Extracts from AS/400 Concepts & Tools workshop

Screen Design Aid (SDA), Option 1-Design screens

PF-DTA

Control Language Program

Data File Utility (DFU)

Page 37: Extracts from AS/400 Concepts & Tools workshop

Screen Design Aid (SDA), Option 2-Design menus

Page 38: Extracts from AS/400 Concepts & Tools workshop

Screen Design Aid (SDA), Option 2-Design menus

Page 39: Extracts from AS/400 Concepts & Tools workshop

We need• A menu.• A Physical File to store Fruit Information. For menu option 1 (and 2 too).• A program to read Fruit Information from PF. For menu option 1.• A screen to display Fruit Information. For menu option 1 and 2.• A program to display Fruit Information using the DSPF. For menu option 1 and 2.• A Logical File (Index) with Fruit Name as the key. For menu option 2.• A program to read Fruit Information from LF. For menu option 2.

Page 40: Extracts from AS/400 Concepts & Tools workshop

High Level Plan

1.Create Menu.2.Implement Option 1.3.Implement Option 2.4.Implement Option 3.

Page 41: Extracts from AS/400 Concepts & Tools workshop

Menu = Gift Wrapping

Page 42: Extracts from AS/400 Concepts & Tools workshop

Revised High Level Plan

1.Implement Option 1.2.Implement Option 2.3.Implement Option 3.4.Create Menu.

Page 43: Extracts from AS/400 Concepts & Tools workshop

Option 1 Needs1. A Physical File to store Fruit Information.

2. A program to read Fruit Information from PF.

3. A screen to display Fruit Information.

4. A program to display Fruit Information using the DSPF.

Page 44: Extracts from AS/400 Concepts & Tools workshop

Option 01 DiagramFRUITS NP0101

NP0102 NP0102DS

Fruit Name

Purchase Price

Retail Price

Wholesale Price

F3 Pressed?(Y/N)

Page 45: Extracts from AS/400 Concepts & Tools workshop

FRUITS

Field Name Size Type Bytes From To

NAME 30 Character 30 1 30PURPRICE 15,2 Zoned 15 31 45RTLPRICE 15,2 Packed 8 46 53

WHLPRICE 14,2 Packed 8 54 61

?

Page 46: Extracts from AS/400 Concepts & Tools workshop

Development Plan-Option 011. Create.2. Populate.

3. Create.4. Test.

5. Create.

6. Create.7. Test

FRUITS

NP0101

NP0102

NP0102DS

ORANGE, 3000, 8000, 5000PEACH, 15000, 30000, 20000 APPLE, 5000, 10000, 8000

DevelopmentTesting

Page 47: Extracts from AS/400 Concepts & Tools workshop

Query/400• Benefits• Limitataions

Page 48: Extracts from AS/400 Concepts & Tools workshop

RPG• Display “Hello World” (EX00103)

• Calculator (EX00403)

Page 49: Extracts from AS/400 Concepts & Tools workshop

I hear and I forget.I see and I remember.I do and I understand.