week 4 presentation! this week we will cover editing and the use of the on-board tools provided, seu...

19
Week 4 presentation! This week we will cover editing and the use of the on-board tools provided, SEU and PDM.

Upload: clifford-lang

Post on 13-Dec-2015

213 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Week 4 presentation! This week we will cover editing and the use of the on-board tools provided, SEU and PDM

Week 4 presentation!

This week we will cover editing and the use of the on-board

tools provided,

SEU and PDM.

Page 2: Week 4 presentation! This week we will cover editing and the use of the on-board tools provided, SEU and PDM

2

Entering source code

Page 3: Week 4 presentation! This week we will cover editing and the use of the on-board tools provided, SEU and PDM

3

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 4: Week 4 presentation! This week we will cover editing and the use of the on-board tools provided, SEU and PDM

4

SEU: Source Entry Utility

• STRSEU or use F6 in PDM to create a new member.

• Remember to specify TYPE attribute when starting

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

• They can be used to browse a compile listing

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

• They can be used to find occurrences of words

Page 5: Week 4 presentation! This week we will cover editing and the use of the on-board tools provided, SEU and PDM

5

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 6: Week 4 presentation! This week we will cover editing and the use of the on-board tools provided, SEU and PDM

6

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 7: Week 4 presentation! This week we will cover editing and the use of the on-board tools provided, SEU and PDM

7

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 8: Week 4 presentation! This week we will cover editing and the use of the on-board tools provided, SEU and PDM

8

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 9: Week 4 presentation! This week we will cover editing and the use of the on-board tools provided, SEU and PDM

9

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 10: Week 4 presentation! This week we will cover editing and the use of the on-board tools provided, SEU and PDM

10

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 11: Week 4 presentation! This week we will cover editing and the use of the on-board tools provided, SEU and PDM

11

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 12: Week 4 presentation! This week we will cover editing and the use of the on-board tools provided, SEU and PDM

12

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 13: Week 4 presentation! This week we will cover editing and the use of the on-board tools provided, SEU and PDM

13

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 or an ”externally” declared data file

Page 14: Week 4 presentation! This week we will cover editing and the use of the on-board tools provided, SEU and PDM

14

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 15: Week 4 presentation! This week we will cover editing and the use of the on-board tools provided, SEU and PDM

15

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 16: Week 4 presentation! This week we will cover editing and the use of the on-board tools provided, SEU and PDM

16

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 17: Week 4 presentation! This week we will cover editing and the use of the on-board tools provided, SEU and PDM

17

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 18: Week 4 presentation! This week we will cover editing and the use of the on-board tools provided, SEU and PDM

18

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 the bottom half of a split window.

Page 19: Week 4 presentation! This week we will cover editing and the use of the on-board tools provided, SEU and PDM

19

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.