ops400

41
L4C3ops400.ppt 1 OPS400 Chapter 3

Upload: audra-gonzales

Post on 30-Dec-2015

22 views

Category:

Documents


4 download

DESCRIPTION

OPS400. Chapter 3. Agenda. Review THE USER INTERFACESCREEN TYPES ARE ???? HELP / MENU / ASSISTANCE HOW? COMMAND STRUCTURE HOW? Source Entry Utility (SEU) - again!. Object storage in daily life Public Library *Secretary desk (0-many) 1 : NN (root level) - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: OPS400

L4C3ops400.ppt 1

OPS400

Chapter 3

Page 2: OPS400

2

Agenda

• Review

• THE USER INTERFACESCREEN TYPES ARE ????

• HELP / MENU / ASSISTANCE HOW?

• COMMAND STRUCTURE HOW?

• Source Entry Utility (SEU) - again!

Page 3: OPS400

3

Object storage in daily life

Public Library*Secretary desk (0-many) 1 : NN (root level)*Check out counter (0-many)*Reading corner (0-many)*Magazine stand (0-many)……(many other object types)…....*Shelves (0-many) 1 : NN

*DVD’s (0-many)*Audio tapes (0-many)*VHS tapes (0-many)……(many other types except Shelves) …....*Books (0-many) 1 : NN

Book1Chapter 1(1-many)……..

Book2 Chapter 1 ……(more maybe!)…….

*Shelves

NO

OTHER

LEVELS

Page 4: OPS400

4

AS/400 STORAGE HIERARCHY

QSYS *USRPRF (0-many) 1 : NN (root level)

*DEVD (0-many)*LIND (0-many)*CTLD (0-many)……(many other types)…....

*LIB (0-many) 1 : NN

*PGM (0-many)*OUTQ (0-many)*MSGF (0-many)……(many other types except libraries ) …....*FILE (0-many) 1 : NN

MEMBER1 (1-many)MEMBER2……(more)…….

*FILE

*LIB

NO

OTHER

LEVELS

Page 5: OPS400

5

. QSYS (root level) . *LIB *USRPRF *DEVD *LIND etc etc etc …(many other types)…

(0-many. Of each object type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . )

. Library level .

*PGM *OUTQ *MSGF *FILE ……(many other types except libraries ) …....

(0-many) (0-many)

File level

NO OTHER LEVELS! !

AS/400 STORAGE HIERARCHY

MBR1 , MBR2 , …..1-many

Page 6: OPS400

6

Attribute / subtypePF-SRCPF-DTALFDSPFPRTF

….ETC….

FIXED LENGTH 92/112/136 Record length . . . . . . . . . . . . . . . : 92 Field Level Information Data Field Buffer Buffer Field Column Field Type Length Length Position Usage Heading SRCSEQ ZONED 6 2 6 1 Both SRCDAT ZONED 6 0 6 7 Both SRCDTA CHAR 80 80 13 Both

Record length . . . . . . . . . . . . . . . : 59 Field Level Information Data Field Buffer Buffer Field Column Field Type Length Length Position Usage Heading EREFNUM ZONED 5 0 5 1 Both EREFNUM EXTONAME CHAR 20 20 6 Both NAME Field text . . . . . . . . . . . . . . . : NAME Coded Character Set Identifier . . . . . : 37 EXTODATE DATE 10 10 26 Both EXTODATE Date Format . . . . . . . . . . . . . . . : *ISO Coded Character Set Identifier . . . . . : 37 ELOCATION CHAR 20 20 36 Both LOCATION Field text . . . . . . . . . . . . . . . : LOCATION Coded Character Set Identifier . . . . . : 37 ECOST PACKED 7 2 4 56 Both ECOST

FILE TYPES *FILE

Page 7: OPS400

7

SCREEN TYPES

Page 8: OPS400

8

MAIN AS/400 Main Menu System: ODIN Select one of the following: 1. User tasks 2. Office tasks 3. General system tasks 4. Files, libraries, and folders 5. Programming 6. Communications 7. Define or change the system 8. Problem handling 9. Display a menu 10. Information Assistant options 11. Client Access/400 tasks 90. Sign off Selection or command ===> go major . F3=Exit F4=Prompt F9=Retrieve F12=Cancel F13=Information Assistant F23=Set initial menu

MENU SCREEN

Page 9: OPS400

9

Specify Members to Work With Type choices, press Enter. File . . . . . . . . . . QCLSRC Name, F4 for list Library . . . . . . . . ABERNS *LIBL, *CURLIB, name Member: Name . . . . . . . . . *ALL *ALL, name, *generic* Type . . . . . . . . . *ALL *ALL, type, *generic*, *BLANK

F3=Exit F4=Prompt F5=Refresh F12=Cancel

ENTRY SCREENused to enter command parameters or user data

remember a parameter is data to a utility

Page 10: OPS400

10

........................................................................…………………………………………...... : All Spooled Files - Help : : : : The Work with All Spooled Files display shows all (or a specified : : portion) of the spooled files that are currently on the system. The : : purpose of this display is to allow you to find spooled files on the : : system. This display is shown when you specify the assist level : : parameter as intermediate, ASTLVL(*INTERMED) on the WRKSPLF command. : : : : You can type an option number next to one or more files. When you : : then press the Enter key, the function associated with the selected : : option is performed for each of the selected files. : : : : If you press the Enter key from this display without typing any : : other data, you are returned to the previous menu or display. : : : : You can type parameters in the command line if you want to override : : the defaults for the options you typed. You can type parameters : : More... : : F3=Exit help F10=Move to top F12=Cancel F13=Information Assistant : : F14=Print help : : : :.....................................................................……………….… .:

INFORMATION SCREEN (help)

Page 11: OPS400

11

Work with All Spooled Files LIST SCREEN (to drill down with) Type options, press Enter. 1=Send 2=Change 3=Hold 4=Delete 5=Display 6=Release 7=Messages 8=Attributes 9=Work with printing status Device or Total Cur Opt File User Queue User Data Sts Pages Page Copy __ APVENDOR ABERNS ABERNS RDY 4 1 __ OP400PF ABERNS ABERNS RDY 4 1 __ ARTRANPF ABERNS ABERNS RDY 3 1 __ ARUPDT ABERNS ABERNS RDY 6 1 __ ASSIGN2 ABERNS ABERNS RDY 4 1 __ ARTRANS ABERNS ABERNS RDY 6 1 __ QPDZDTALOG ABERNS ABERNS RDY 2 1 __ PGM400D03 ABERNS ABERNS RDY 4 1 __ INVTRY ABERNS ABERNS RDY 3 1 More... Parameters for options 1, 2, 3 or command ===> ______________________________________ F3=Exit F10=View 4 F11=View 2 F12=Cancel F22=Printers F24=More keys

Page 12: OPS400

12

KEYS

Page 13: OPS400

13

Using ‘ * ‘ On the AS/400

• The * (asterisk or star) when used before a parameter value denotes a special value.Eg. *all, *libl, *curlib

• When the * is used after a parameter value, it is a wild card (just like in DOS/UNIX)

• Eg. WRKUSRPRF DB400C*

Page 14: OPS400

14

Commonly Used Function Keys

• F1 = Help• F2 = Extended Help• F3 = Exit• F4 = Prompt• F5 = Refresh Screen• F10 = Additional

parameters / different views

• F9 = Retrieve Previous Command

• F11 = Keyword toggle different

views• F12 = Cancel step• F23 = More options• F24 = More functions

Page 15: OPS400

15

Using F4 and ?

• The ? is used the same way F4 is.

• Entered into a command field, it gives you the possible values for the field.

• Entered before a command, puts you in prompt mode for that command.

Eg. ?CRTLIB

Page 16: OPS400

16

IBM AS/400 Help

F1 = HELP Field Level (contextual) or extended dependent on the cursor location

F2 = Extended Help

Internet

Page 17: OPS400

17

ASSIST AS/400 Operational Assistant (TM) Menu System: ODIN To select one of the following, type its number below and press Enter: 1. Work with printer output 2. Work with jobs 3. Work with messages 4. Send messages 5. Change your password 10. Manage your system, users, and devices 11. Customize your system, users, and devices 75. Information and problem handling 80. Temporary sign-off Type a menu option below F1=Help F3=Exit F9=Command line F12=Cancel

GO ASSIST used for routine operational tasks

Page 18: OPS400

18

GO CL Command navigation • AS400 Menus

Menu Description

MAIN Main Menu

ASSIST Operational assistance Menu

FILE All file related menu’s

PROGRAM Programmers Menu

MAJOR Sorts Commands

VERB based GO assistance (examples there are MORE)

CMDCPY Copy Commands

CMDDSP Display Commands

CMDWRK Work With Commands

CMDLIB Library Commands

CMDMSG Message Commands

CMDOUTQ Output Queue Commands

CMDUSRPRF User Profile Commands

Page 19: OPS400

19

Assistance Levels

• Determines how much information is displayed and how it is formatted.

• Basic, Intermediate, Advanced, default on USRPRF

• Page 19 in text.

• Try it out for yourself using the WRKSPLF command and function key F21

Page 20: OPS400

20

COMMON VERBS CL AbbreviationAdd ADDCall CallCopy CPYCreate CRTDelete DLTDisplay DSPGo GOOpen OPNRemove RMVSave SAVSend SNDStart STRSubmit SBMWork with WRK

COMMON NOUNS CL AbbrevationDescription DEntry EField FFile FJob JOBLibrary LIBList LMessage MSGObject OBJProfile PRFProgram PGMQueue QUser USR

COMMON ADJECTIVES CL AbbreviationsOutput OUTMessage MSGSpooled SPLSystem SYS*many nouns can also beused as adjectives

Verbs

nouns

adjectives

Page 21: OPS400

21

ADDPFM FILE(BBBBB/AAAA) MBR(CCCCC) TEXT('SAMPLE COMMAND')

Keyword v.s. Positional Notation

ADDPFM BBBBB/AAAA CCCCC 'SAMPLE COMMAND' WRKUSRJOB *ALL *ACTIVE *INTERACT

WRKUSRJOB USER(*ALL) STATUS(*ACTIVE) JOBTYPE(*INTERACT)

WRKUSRJOB JOBTYPE(*INTERACT) STATUS(*ACTIVE) USER(*ALL)

KEYWORD NOTATION - any order- no space separation between keyword and bracket

POSITIONAL NOTATION- parameters must be entered in the exact order of the command syntax- limit to maximum number of parameters entered

Page 22: OPS400

22

“Objects” • anything on the AS/400 that has a name, takes up space

in storage, can be acted on or executed and is not of a temporary nature” is an object

• on AS/400 files have members

• Each objects has an associated DESCRIPTION

in which both the physical and logical

attributes (properties) are defined

• Common object types include:

– libraries, files, job queues, programs

• Common sub types / attributes are CBL, CL, DSPF, PF, LF , SAVF

Page 23: OPS400

23

*ALL *CTLD *AUTL *DEVD *DOC *DTAARA *CMD *DTAQ *FILE *LIND *MENU *MSGQ *JOBQ *LIB *OUTQ *QRYDFN *SBSD *PGM *USRPRF

Some OBJECT type identifiers are

object name library type subtype or

attribute INVTRY ABERNS *FILE PF INVTRYL1 ABERNS *FILE LF LABS ABERNS *FILE PF LECTSCRN ABERNS *FILE DSPF MARKSDF ABERNS *FILE DSPF MCDATA ABERNS *FILE SAVF DA400D11X ABERNS *PGM CLP EMPVIEW2 ABERNS *PGM CBLLE IN100C ABERNS *PGM CBL

Page 24: OPS400

24

Entering source code

Page 25: OPS400

25

Enter Source Code using SEU

• SEU can be used for entering many types of source code e.g. DDS Data Definition Specification

C programs CL programs…

• SEU needs the source file name, the member name and the source type.

Page 26: OPS400

26

SEU: Source Entry Utility

• STRSEU or F6 - Create a new member within PDM

• Remember to specify TYPE attribute when starting

• Take note of the function keys available in a editing session e.g.Browse/Copy function (F15)

• can be used to browse compile listing

• can be used to copy from another member .Find/Change option (F14)

• can be used to find occurrences of words

Page 27: OPS400

27

Determine the “file” usage

• The source attribute type: – tells SEU what type of source you are creating

e.g. TXT, PF, LF, CL, etc– Determines which SYNTAX checker to use– Determines which COMPILER to use when

creating the object.

Page 28: OPS400

28

Start Source Entry Utility STRSEU or STRPDM (WRKLIBPDM or WRKMBRPDM or WRKOBJPDM)

for CL program specifications

Type choices, press Enter. Source file . . . . . . . . . . > QCLSRC Name, *PRV Library . . . . . . . . . . . > ABERNS Name, *LIBL, *CURLIB, *PRV Source member . . . . . . . . . OP400PG01 *PRV Name, *PRV, *SELECT

Source type . . . . > CL Name, *SAME, BAS, BASP... Text 'description' . . . . . . . assignment # 1 program

Use of F6 with (create)

Page 29: OPS400

29

Start Source Entry Utility STRSEU or STRPDM(WRKLIBPDM or WRKMBRPDM or WRKOBJPDM)

for file specifications Type choices, press Enter. Source file . . . . . . . . . . > QDDSSRC Name, *PRV Library . . . . . . . . . . . > ABERNS Name, *LIBL, *CURLIB, *PRV Source member . . . . . . . . . EMPPF Name, *PRV, *SELECT

Source type . . . . . . . PF Name, *SAME, BAS, BASP... Text 'description' . . . . . . . Employee file

Use of F6 (create) with

Page 30: OPS400

30

Work with Members Using PDM ODIN File . . . . . . QCLSRC Library . . . . ABERNS Position to . . . . . Type options, press Enter. 2=Edit 3=Copy 4=Delete 5=Display 6=Print 7=Rename 8=Display description 9=Save 13=Change text 14=Compile 15=Create module... Opt Member Type Text __ ARTRANS CLP testing assignment 2 __ ASSGNMA2 CLP ASSGNMT 2 OPS234 __ CLSAMPLEB CLP TEST IN CLASS ASSGNMT 1 AND 2 sample for OPS400 __ CLSAMPLEBV CLP TEST IN CLASS ASSGNMT 1 AND 2 sample for OPS400 __ CLSAMPLEX CLP TEST IN CLASS ASSGNMT 1 AND 2 __ DA400D11X CLP TEST __ OA0CHECK CLP OPS Asgn check for sections / prof __ OA0CHKALL CLP OPS324 check obj auth -- called from OA0CHECK More... Parameters or command ===> F3=Exit F4=Prompt F5=Refresh F6=Create F9=Retrieve F10=Command entry F23=More options F24=More keys Member OP400PG01 added to file ABERNS/QCLSRC. +

Page 31: OPS400

31

SEU Editor• SEU has built in editor

• SEU==>________ command line

• Line commands:– C copies a line CC…CC copies a block– M moves a line MM..MM moves a block– I inserts, In inserts n lines, IP inserts and

prompts– D deletes, Dn deletes n lines– A = after, B = before the target for move/copy

Page 32: OPS400

32

Columns . . . : 1 71 Edit ABERNS/QCLSRC SEU==> . .____ TSTIA1IA2 *************** Beginning of data ************************************* 0001.00 /* TEST FOR IN CLASS ASSIGNMENT 1 AND 2 */ 0002.00 /* */ 0003.00 PGM PARM(&AUSRID &AUSRPFX) /* TEST FOR IN CLASS + 0004.00 ASSIGNMENT 1 AND 2 */ 0005.00 0006.00 DCL VAR(&AUSRID) TYPE(*CHAR) LEN(2) 0007.00 DCL VAR(&AUSRPFX) TYPE(*CHAR) LEN(6) F4 used 0008.00 DCL VAR(&COMPLID) TYPE(*CHAR) LEN(8) 0009.00 DCL VAR(&MSG) TYPE(*CHAR) LEN(30) 0010.00 0011.00 STARTPGM: 0012.00 MONMSG MSGID(CPF0000) EXEC(GOTO PROCERR) 0013.00 GOTO ALLOK 0014.00 PROCERR: 0015.00 CHGVAR &MSG ('ERROR ENCOUNTERED') 0016.00 SNDPGMMSG &MSG TOPGMQ(*PRV *) 0017.00 GOTO EXIT 0018.00 ALLOK: 0019.00 CHGVAR &COMPLID (&AUSRPFX *TCAT &AUSRID) 0020.00 DSPUSRPRF USRPRF(&COMPLID)

Source entry screen

Page 33: OPS400

33

STRPDM - SEU QCLSRC

Declare CL Variable (DCL) Type choices, press Enter. Label . . . . . . . . . . . . . CL variable name . . . . . . . . > &AUSRPFX Variable name Type . . . . . . . . . . . . . . > *CHAR *DEC, *CHAR, *LGL Length of variable: Length . . . . . . . . . . . . > . 6. Number Decimal positions . . . . . . . . Number Initial value . . . . . . . . . . . ...

Page 34: OPS400

34

Internally v.s Externally declared files

When createdINTERNAL vs. EXTERNAL

•Single field (alphabetic) equal to record length• Fields Defined within (internal to) programs.•Record substructure (Fields) NOT globally accessible by other programs / utilities

•One or more fields defined in a DDS source file•File structure generated externally from a source member•Globally accessible by all programs and utilities

Page 35: OPS400

35

Compiling the Source Code

• CRTPF command or Option 14 in PDM

takes the source code and creates the object i.e. the CL executable program

Page 36: OPS400

36

CRTPF FILE(TESTINT) RCDLEN(100) TEXT('Internal defined file RL 100') Record Format Level (DSPFD) Format Fields Length Identifier TESTINT 1 100 290EA7264E38B Text . . . . . . . . . . . . . . . . . . . : Internal defined file RL 100 Total number of formats . . . . . . . . . . : 1 Total number of fields . . . . . . . . . . . : 1 Total record length . . . . . . . . . . . . : 100

CRTPF FILE(TESTEXT) SRCFILE(ABERNS/QDDSSRC) TEXT('Externally defined file’)

Or Option 14 on member TESTEXT Record Format Level (DSPFD) Format Fields Length Identifier EXTORECRD 5 59 3C45B2B9BF558 Text . . . . . . . . . . . . . . . . . . . . . . . . . . : Externally defined file Total number of formats . . . . . . . . . . : 1 Total number of fields . . . . . . . . . . . . : 5 Total record length . . . . . . . . . . . . . . : 59

Page 37: OPS400

37

Columns . . . : 1 71 Edit ABERNS/QDDSSRC SEU==> . . EMPPF *************** Beginning of data ***************************** 0001.00 ***************************************************************** 0002.00 * THIS FILE CONTAINS SIMPLE EMPLOYEE * 0003.00 * RELATED INFORMATION FOR DEMONSTRATING * 0004.00 * PROGRAMMING * 0005.00 ***************************************************************** 0006.00 0007.00 A R EMPPFR 0008.00 A EMPNO 9P 0 0009.00 LNAME 16A 0010.00 FNAME 12A 0011.00 PHONE 7P 0 ****************** End of data ********************************

Source entry screen

Page 38: OPS400

38

Columns . . . : 1 71 Browse ABERNS/QDDSSRC SEU==> EMPPF *************** Beginning of data ************************************* 0001.000002.00 * THIS FILE CONTAINS SIMPLE EMPLOYEE * 0003.00 * RELATED INFORMATION FOR DEMONSTRATING * 0004.00 * * 0005.00 *********************************************** 0006.00 0007.00 A R EMPPFR 0008.00 A EMPNO 9P 0 0009.00 LNAME 16A 0010.00 FNAME 12A 0011.00 PHONE 7P 0 ****************** End of data ****************************************

STRPDM - SEU QDDSSRC - using - using F4

Pmt SeqNbr NameType Name Ref Len DataType Dec Use PF 0008.00 EMPNO 9 P 0 Functions . .

Page 39: OPS400

39

How do you know if the compile worked???

• An output file is created with each compile (the compile listing) which tells you what happened. READ it!

• Where is that output file??

• In your output queue!!

Page 40: OPS400

40

Compile Errors

• Make sure the compile worked!

• The PDM user option SP shows you your spooled compile listing and if there are errors, a joblog.

• If errors, return to SEU, use F15 then option 2 for spool files. The system will bring up your compile listing in an additional window.

Page 41: OPS400

41

Compile Errors cont’d• On the lower window command line, enter

F *err (find errors)

• Pressing F1 with the cursor on the message will give you an explanation of the message

• Use F12 to return to browse window and press F16 to repeat the find errors command.

• Check out the warning messages also.