+ All Categories
Home > Documents > D:Complete CL2nd PrintingComplete CL...

D:Complete CL2nd PrintingComplete CL...

Date post: 20-Feb-2021
Category:
Upload: others
View: 1 times
Download: 0 times
Share this document with a friend
20
INDEX *AND (See logical variables) *BCAT (See concatenating strings) *CAT (See concatenating strings) *NOT (See logical variables) *OR (See logical variables) * to designate comment lines in code, 20-21 *TCAT (See concatenating strings) / symbol as operator and in qualified names, 40 %BIN/%BINARY, 45-47 %SST/%SUBSTRING, 41-42 %SWITCH function, 130-131 &QUOTE variable, 180-181 A activation groups, 271-274 create new group, 272 default activation group, 272, 275 destroy groups, 273 identify/name group, 272 name/identify groups, 278 Reclaim Activation Group (RCLACTGRP), 273-274 run program in group, 273 Add Breakpoint (ADDBKP), 419-421 Add Library List Entry (ADDLIBLE), 147-149 Add Logical File Member (ADDLFM), 164 Add Message Description (ADDMSGD), 78 Add Physical File Member (ADDPFM), 164 Add Reply List Entry (ADDRPYLE), 114 Add Trace (ADDTRC), 422 adopting authority, 227-230 alert options, messages, 105 align similar lines of code, 396-399 Allocate Object to Job (ALCOBJ), 191-194 AND operator, 47, 48, 56-57 apostrophes, 177 arithmetic operators, 39-40 precedence of operators, 48 arrays, simulating arrays using strings, 44 AS/400 and CL, 1-3, 267 AS/400 model numbers, 414 ASCII, translate ASCII/EBCDIC characters (QDCXLATE), 218-219 assignment statements, Change Variable (CHGVAR), 37-39 attributes of jobs, 152-154, 192, 236 459
Transcript
Page 1: D:Complete CL2nd PrintingComplete CL revisioneditorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5001/... · 2005. 8. 26. · Change Data Area (CHGDTAARA), 127 Change Job (CHGJOB), 129-130,

INDEX

*AND (See logical variables)*BCAT (See concatenating strings)*CAT (See concatenating strings)*NOT (See logical variables)*OR (See logical variables)* to designate comment lines in code, 20-21*TCAT (See concatenating strings)

/ symbol as operator and in qualified names, 40

%BIN/%BINARY, 45-47%SST/%SUBSTRING, 41-42%SWITCH function, 130-131

&QUOTE variable, 180-181

Aactivation groups, 271-274

create new group, 272default activation group, 272, 275destroy groups, 273identify/name group, 272name/identify groups, 278Reclaim Activation Group (RCLACTGRP),

273-274

run program in group, 273Add Breakpoint (ADDBKP), 419-421Add Library List Entry (ADDLIBLE), 147-149Add Logical File Member (ADDLFM), 164Add Message Description (ADDMSGD), 78Add Physical File Member (ADDPFM), 164Add Reply List Entry (ADDRPYLE), 114Add Trace (ADDTRC), 422adopting authority, 227-230alert options, messages, 105align similar lines of code, 396-399Allocate Object to Job (ALCOBJ), 191-194AND operator, 47, 48, 56-57apostrophes, 177arithmetic operators, 39-40

precedence of operators, 48arrays, simulating arrays using strings, 44AS/400 and CL, 1-3, 267AS/400 model numbers, 414ASCII, translate ASCII/EBCDIC characters

(QDCXLATE), 218-219assignment statements, Change Variable

(CHGVAR), 37-39attributes of jobs, 152-154, 192, 236

459

Page 2: D:Complete CL2nd PrintingComplete CL revisioneditorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5001/... · 2005. 8. 26. · Change Data Area (CHGDTAARA), 127 Change Job (CHGJOB), 129-130,

authoritiesadopting authority, 227-230, 227Edit Object Authority (EDTOBJAUT), 226,

412Grant Object Authority (GRTOBJAUT), 226ILE, 278PUBLIC authorities, 227Revoke Object Authority (RVKOBJAUT),

226authorization lists, Retrieve Authorization List

(RTVAUTLE), 157automatic allocation of objects, 192automatic configuration, 414automating AS/400 programs with CL, 1

Bbackups, Retrieve Backup (RTVBCKUP), 157batch processing, 3, 195-205

data queues, 145debugging one job running in another,

258-263interactive processing vs., 195job queues, 196problems with SBMJOB, 198-201QSYSOPR message queue, 202-203Retrieve Job Attribute (RTVJOBA), 204-205self-submitting programs, 203-205Submit Job (SBMJOB), 196-201Work with Job Queue (WRKJOBQ), 201Work with Submitted Jobs (WRKSBMJOB),

201Work with Subsystem Jobs (WRKSBSJOB),

201Work with User Jobs (WRKUSRJOB), 201

beginning of program, Program (PGM)command, 6-7

binary conversion, 45-47binding, 268-270

Create Bound CL Program (CRTBNDCL),18-19

blank lines in program code, 19-20, 378-381body of typical CL program, 9, 9branching, 3break messages, 110-111

breakpoint insertion, (BREAK), 248, 254,419-423

CC language, 2, 267Call Bound Procedure (CALLPRC), passing

program information, 124CALL command, 3, 19, 62, 67-70

adopted authority in call stack, 229dynamic call, 270passing constants as parameters, 70passing program information, 124passing variables as parameters, 68-69Transfer Control (TFRCTL) and, 71-72

Call Procedure (CALLPRC), 67-70Call Program, self-submitting programs,

203-205calling programs, 3capabilities of CL, 2-3CASE, 3, 57

simulating CASE with ELSE and IF, 64-66case sensitivity, 14, 390-393Change Command (CHGCMD), 230Change Current Library (CHGCURLIB),

147-149, 411Change Data Area (CHGDTAARA), 127Change Job (CHGJOB), 129-130, 154Change Job Description (CHGJOBD), 234Change Library List (CHGLIBL), 147-149,

411Change Logical File Member (CHGLFM), 164Change Message Description (CHGMSGD),

78Change Message Queue (CHGMSGQ), 75Change Object Description (CHGOBJD), 191Change Object Owner (CHGOBJOWN), 227Change Password (CHGPWD), 411Change Physical File Member (CHGPFM),

164Change Profile (CHGPRF), 156Change Program (CHGPGM), 229Change Program Variable (CHGPGMVAR),

421Change Reply List Entry (CHGRPYLE), 114Change Shared Pool (CHGSHRPOOL), 412

460

INDEX

Page 3: D:Complete CL2nd PrintingComplete CL revisioneditorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5001/... · 2005. 8. 26. · Change Data Area (CHGDTAARA), 127 Change Job (CHGJOB), 129-130,

Change System Library List (CHGSYSLIBL),147-149, 239

Change System Value (CHGSYSVAL), 152Change User Profile (CHGUSRPRF), 156, 230Change Variable (CHGVAR), 13, 16, 37-39

arithmetic operators, 39-40character constants, 23, 24character data type, 3, 8, 14, 28character variables, 41-44

arrays, simulating arrays using strings, 44binary conversion, 45-47concatenating strings, 42-44Find String Using PDM (EFNDSTRPDM),

412quotation mark use, 178, 179substrings (%SST/%SUBSTRING), 41-42translate ASCII/EBCDIC characters

(QDCXLATE), 218-219Check Object (CHKOBJ), 92, 185-186, 228

escape messages, 186Check Password (CHKPWD), 412Check Record Lock (CHKRCDLCK), 412cleanups, Retrieve Cleanup (RTVCLNUP), 157Clear Data Queue (CLRDTAQ), 344-346Clear Message Queue (CLRMSGQ), 113Clear Physical File Member (CLRPFM), 164Clear Trace Data (CLRTRCDTA), 423Close File (CLOF), 168CLRDTAQ clear data entries utility, 144COBOL, 1, 2, 37, 59, 144, 267coding style, 373-400command entry screen, System/38 differences,

415command line security, 230-232command processing programs (CPPs), binary

conversion (%BIN) function, 46command prompter formatting (See also

formatting the program), 12-13, 12, 13,374-375

command-level MONMSG, 94commands & statements, 5

case sensitivity, 14Change Command (CHGCMD), 230command line security, 230-232comments on command lines, 21-22

Create Command (CRTCMD), 230Display Command (DSPCMD), 216, 231dynamic execution, 33dynamic execution, QCMDEXC, 33,

214-216installing utility commands, 281keywords, 15positional parameters, 15quotation mark use, 179S/36 OCL statements, CL equivalents,

427-446Select Command (SLTCMD), 413selective prompting, 207-211System/38 differences, 407-411utility commands, 281-371

COMMENT command, 355-357, 355comment lines in program code, 20-22,

355-357, 376-378communications, 3Compare Source Members (CMPSRCMBR),

313-326comparison operators, 54-55compiled languages, 425-426compiling a program, 12, 270-271

Create Bound CL Program (CRTBNDCL),18-19

OPTION parameter, 275Completion messages, 76, 84Compress Object (CPROBJ), 412concatenating strings, 42-44, 48

quotation mark use, 180-181conditional breakpoints, 421-422configuration (See system configuration)console, 414constants & literals, 23-27

character constants, 23, 24continuing code onto next line, 17decimal constants, 23, 25expressions, 48floating-point data types, 69hexadecimal constants, 23, 26-27invalid characters, 24, 25, 26length maximum, decimal constants, 25logical constants, 23, 27passing constants as parameters, CALL, 70

461

INDEX

Page 4: D:Complete CL2nd PrintingComplete CL revisioneditorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5001/... · 2005. 8. 26. · Change Data Area (CHGDTAARA), 127 Change Job (CHGJOB), 129-130,

constants & literals, continuedpassing program information, 125-126

continuing code onto next line, 16-17control statements, 53-72

CALL command, 67-70Call Procedure (CALLPRC), 67-70comparison operators, 54-55DO/ENDDO commands, 60-62ELSE command, 63-67End Program (ENDPGM), 70-71, 71GOTO command, 57-60IF command, 53-57logical expressions, 53nesting DO/ENDDO commands, 61-62nesting IF commands, 62-63RETURN command, 70, 71Transfer Control (TFRCTL), 71-72

Convert Date (CVTDAT), 59-51, 49Convert Print to Physical File (CVTPRTF), 174Copy From Query File (CPYFRMQRYF), 412Copy Library (CPYLIB), 412copy screen, Start Copy Screen (STRCPYSCN),

413Copy Spooled File (CPYSPLF), 173Copyright (COPYRIGHT) command, 7Count Objects (CNTOBJ), 366-371Create Bound CL Program (CRTBNDCL),

18-19, 270, 271Create CL Module (CRTCLMOD), 270Create Command (CRTCMD), 230Create Data Area (CRTDTAARA), 127, 129,

184Create Data Queue (CRTDTAQ), 134-135Create Duplicate Object (CRTDUPOBJ), 15,

190-191Create Job Description (CRTJOBD), 234Create Menu Object (CRTMNU), 412Create Message File (CRTMSGF), 78Create Message Queue (CRTMSGQ), 74Create Output Queue (CRTOUTQ), 183Create Physical File (CRTPF), 164Create Program (CRTPGM), 270, 271Create Service program (CRTSRVPGM),

270-271Create Table (CRTTBL), 219

Create Work File (CRTWRKF), 170-171,327-329

creating objects (CRTxxx commands), 183-184

Ddata areas

Change Data Area (CHGDTAARA), 127Create Data Area (CRTDTAARA), 127,

129, 184Delete Data Area (DLTDTAARA), 127, 129Display Data Area (DSPDTAARA), 128group data area (GDA), 128-129local data area (LDA), 128-129passing program information, 123, 126-129program initialization parameter (PIP) data

area, 129Retrieve Data Area (RTVDTAARA), 128,

157special data areas, 128-129

data queuesbatch processing using data queues, 145Clear Data Queue (CLRDTAQ), 344-346clear data queues, 135CLRDTAQ clear data entries utility, 144Create Data Queue (CRTDTAQ), 134-135Delete Data Queue (DLTDTAQ), 134, 135FIFO data queues, 134interactive transactions using data queues,

145KEYED data queues, 134, 137-138LIFO data queues, 134output queues as data queues, 144passing program information, 123, 133-145pros and cons of data queues, 144-145QCLRDTAQ API to clear data, 344-346QMHQRDQD API program to receive data

entries, 139-141QMHRDQM API program to receive data

entries, 136, 141-143QRCVDTAQ API to receive data, 341-344QSNDDTAQ API program to send data

entries to queue, 135-139, 338-341receive data entries from queue, 135, 136,

139-141, 141-143

462

INDEX

Page 5: D:Complete CL2nd PrintingComplete CL revisioneditorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5001/... · 2005. 8. 26. · Change Data Area (CHGDTAARA), 127 Change Job (CHGJOB), 129-130,

Receive Data Entry from Queue(RCVDTAQ), 144, 341-344

Reorganize Data Queue (RGZDTAQ), 145,351-354

Retrieve Data Queue Description(RTVDTAQD), 346-350

send data entries to queue, 135-139Send Data Entry To Queue (SNDDTAQ),

144, 338-341sender ID, non-keyed queue, 138types of data queues, 134utility commands, 144, 338-354

data types, 3, 8, 28, 69database files (See also files), 3, 159, 164-169

Add Logical File Member (ADDLFM), 164Add Physical File Member (ADDPFM), 164Change Logical File Member (CHGLFM),

164Change Physical File Member (CHGPFM),

164Clear Physical File Member (CLRPFM), 164Close File (CLOF), 168Copy From Query File (CPYFRMQRYF),

412Delete Override (DLTOVR), 168Display Override (DSPOVR), 167job descriptions, 235locked records, 194logical files, 164members, 164open data paths (ODP), 168Open Query File (OPNQRYF), 167-169outfiles, 171-173override commands, 166Override Database File (OVRDBF), 161,

166, 167passing program information, 123physical files, 164queries, 167-169Remove Member (RMVM), 164Reorganize Physical File Member

(RGZPFM), 164sorting with OPNQRYF, 167-169temporary files, 165

dates, Convert Date (CVTDAT), 59-51, 49

DDS, 11, 160debugging, 243-265

Add Breakpoint (ADDBKP), 419-421Add Trace (ADDTRC), 422breakpoint insertion, BREAK, 248, 254,

419-423change breakpoint, 421Change Program Variable (CHGPGMVAR),

421Clear Trace Data (CLRTRCDTA), 423commands for debugger, 254-255conditional breakpoints, 421-422debugging one job running in another,

258-263Display Program Variables

(DSPPGMVAR), 421Display Trace (DSPTRC), 422Display Trace Data (DSPTRCDTA),

422-423Dump CL Program (DMPCLPGM),

263-265End Debug (ENDDBG), 244EVAL command, 250-252, 253expressions, 250, 252ILE, 278interactive debugging session example,

245-248line-oriented debugger, OPM programs,

419-423list view debugging, 256, 256logical expressions, 252message queue, Dump CL Program

(DMPCLPGM), 263-265operators, 250, 252OPM program debugging, 417-423parameters, 253Remove Breakpoint (RMVBKP), 421Remove Trace (RMVTRC), 422source view debugging, 248-253Start Debug (STRDBG), 243-244, 417-419statement view debugging, 257, 257STEP command, 254trace, 422-423variable listing, Dump CL Program

(DMPCLPGM), 263-265

463

INDEX

Page 6: D:Complete CL2nd PrintingComplete CL revisioneditorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5001/... · 2005. 8. 26. · Change Data Area (CHGDTAARA), 127 Change Job (CHGJOB), 129-130,

debugging, continuedviews for debugging, 244-245WATCH command, 254

decimal constants, 23, 25decimal data type, 3, 8, 28Declaration (DCL) command, 7-8, 9, 27, 34-35

sorting for easy reading, 30, 31-32Declare File (DCLF) command, 8, 159-160Delay Job (DLYJOB), 219-221, 219Delete Data Area (DLTDTAARA), 127, 129Delete Data Queue (DLTDTAQ), 134, 135Delete File (DLTF), 164Delete Override (DLTOVR), 168Delete Spooled File (DLTSPLF), 174deleting objects (DLTxxx commands), 184-185descriptions for messages, 78device naming, 414Diagnostic messages, 76, 84Disconnect Job (DSCJOB), 412Display Command (DSPCMD), 216, 231Display File Field Description (DSPFFD), 172display files

Override with Display File (OVRDSPF), 166PRTCTLMNUD, subfile example, 116-122

Display Job (DSPJOB), 129Display Library (DSPLIB), 32Display Message (DSPMSG), 23, 111-113, 202,

240Display Message Description (DSPMSGD), 78Display Module (DSPMOD) command, 7Display Object Description (DSPOBJD), 172,

358Display Object Information (DSPOBJINF),

358-366Display Override (DSPOVR), 167Display Program (DSPPGM), 171Display Program Message (DSPPGMMSG),

106, 288-292Display Program Variables (DSPPGMVAR),

421Display Record Locks (DSPRCDLCK), 194Display Trace (DSPTRC), 422Display Trace Data (DSPTRCDTA), 422-423Display User Profile (DSPUSRPRF), 173Display Workstation User (DSPWSUSR), 412

Do Until, 3, 57simulating using GOTO, 59-60

Do While, 3, 57simulating using GOTO, 59-60

DO, iterative, 3, 57simulating iterative DO, 59-60

DO/ENDDO, 17, 60-62ELSE used with, 66-67nesting, 61-62, 61

double quotes, 177Dump CL Program (DMPCLPGM), 263-265Duplicate Object (DUPOBJ), 329-333dynamic call, 270dynamic execution (See also QCMDEXC), 33,

214-216System/36 differences, 450-451

EEBCDIC, translate ASCII/EBCDIC characters

(QDCXLATE), 218-219Edit Library List (EDTLIBL), 412Edit Object Authority (EDTOBJAUT), 226,

412editing code lines, 14editor, code editors, 399-400ELSE command, 63-67

DO/ENDDO used with ELSE, 66-67IF command with ELSE, 63-64simulating CASE with ELSE and IF, 64-66

End Debug (ENDDBG), 244End Program (ENDPGM) command, 9, 70-71,

71environment, 414

System/36 differences, 426System/38 differences, 415-416

equal sign, Change Variable (CHGVAR),37-39

error handlingcommand-level MONMSG, 94forwarding error messages, 95-96generic monitoring with MONMSG, 94-96global error trapping, 8, 90-91MONMSG as global error trap, 8, 90-91program-level (global) MONMSG, 93variable position errors, 33-34

464

INDEX

Page 7: D:Complete CL2nd PrintingComplete CL revisioneditorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5001/... · 2005. 8. 26. · Change Data Area (CHGDTAARA), 127 Change Job (CHGJOB), 129-130,

Escape messages, 76, 84escape messages, CHKOBJ, 186EVAL command, 250-252, 253executable code, 267executing the program, 19

CALL command, 19control statements, 53-72dynamic call, 270QCMDEXC, 33, 214-216

expressions, 48debugging, 250, 252logical expressions, 53quotation mark use, 179

FFIFO data queues, 134files, 159-175

Add Logical File Member (ADDLFM), 164Add Physical File Member (ADDPFM), 164allocating objects to jobs (ALCOBJ),

191-194capturing output with *PRINT, 173-174capturing output with QTEMP, 169Change Logical File Member (CHGLFM),

164Change Physical File Member (CHGPFM),

164Clear Physical File Member (CLRPFM), 164Close File (CLOF), 168Convert Print to Physical File (CVTPRTF),

174Create Physical File (CRTPF), 164Create Work File (CRTWRKF), 170-171,

327-329database file processing, 159, 164-169DDS creation of files, 160Declare File (DCLF), 159-160Delete File (DLTF), 164Delete Override (DLTOVR), 168Display File Field Description (DSPFFD),

172display files, override, 167Display Override (DSPOVR), 167flat files, 169job descriptions, 235

key fields, reading key field files, 161-162logical files, 164members, 165Open Query File (OPNQRYF), 167-169outfiles, 171-174override commands, 166Override Database File (OVRDBF), 161,

165, 167Override with Display File (OVRDSPF),

166Override with Printer File (OVRPRTF), 166permanent work files, 169-171physical files, 164printer files, override, 166QTEMP library, temporary files, 169Receive File (RCVF), 160-162record-by-record processing, 159-164Remove Member (RMVM), 164Reorganize Physical File Member

(RGZPFM), 164Send File (SNDF), 162-164Send Receive File (SNDRCVF), 162-164sorting with OPNQRYF, 167-169System/36 differences, 451-452temporary files, 165, 169turn indicators on/off, 163whole-file processing, 164-169

Find String Using PDM (FNDSTRPDM), 412flat files, 169floating-point data types, 69Format CL Source (FMTCLSRC), 301-313formatting code, 11-14

align similar lines, 396-399blank lines in program code, 19-20, 378-381case sensitivity, 14, 390-393character strings, 14coding style, 373-400command prompter formatting, 12-13, 12,

13, 374-375COMMENT command, 355-357comment lines in program code, 20-22,

376-378continuing code onto next line, 16-17editing code lines, 14

465

INDEX

Page 8: D:Complete CL2nd PrintingComplete CL revisioneditorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5001/... · 2005. 8. 26. · Change Data Area (CHGDTAARA), 127 Change Job (CHGJOB), 129-130,

formatting code, continued

editor, code editors, 399-400

Format CL Source (FMTCLSRC), 301-313

HELLO program sample, formattingexample, 11-12, 11, 12

identifiers in lowercase for easy reading,390-393

indent lines of code, 13, 17-18, 387-390

insert/delete blank lines, 13

keywords, 13, 15-16, 393-396

labels & tags, 13, 381-384

leading blanks, removal, 384-387

positional parameters, 15-16

QCMDCHK syntax checker, 211-213

quotation marks, 14, 177-182

Source Entry Utility (SEU), 374-375,399-400

syntax checker, 13, 211-213

FORTRAN, 2

Forward Program Messages (FWDPGMMSG),188, 282-286

forwarding error messages, 95-96

Ggeneric messages, 94-96

global error trapping, 8, 90-91

GOTO, 3, 16, 57-60

labels & tags, 9, 57-58

program-level (global) MONMSG, 93

simulating Do While/Do Until, 59

simulating iterative DO, 59-60

Grant Object Authority (GRTOBJAUT), 226

group data area (GDA), passing programinformation, 128-129

HHELLO program sample, formatting example,

11-12, 11, 12hexadecimal constants, 23, 26-27

hierarchy of operators, 48

Iidentifiers in lowercase for easy reading,

390-393IF command, 53-57

comparison operators, 54-55complex logical expressions, 56-57ELSE used with, 63-64logical expressions, 53nested IFs, 62-63simulating CASE with ELSE and IF, 64-66testing logical variables, 55-56

If/Then/Else, 3impromptu messages, 73, 77, 81, 87-88,

109-110indent lines of code, 13, 17-18, 387-390Informational messages, 77, 84, 87, 88Initialize Library (INZLIB), 296-300Inquiry messages, 76, 84, 87, 88, 202insert/delete blank lines in code, 13integrated language environment (ILE),

267-279ACTGRP parameter, 278activation groups, 271-274AUT parameter, 278binding by copy, 268-269binding by reference, 269binding, 268-270compiling a program, 270-271Create Bound CL Program (CRTBNDCL),

270, 271Create CL Module (CRTCLMOD), 270Create Program (CRTPGM), 270, 271Create Service program (CRTSRVPGM),

270-271DBGVIEW, 278default activation group, 275DFTACTGRP parameter, 275dynamic call, 270ENBPFRCOL parameter, 278executable code, 267LANGID parameter, 278

466

INDEX

Page 9: D:Complete CL2nd PrintingComplete CL revisioneditorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5001/... · 2005. 8. 26. · Change Data Area (CHGDTAARA), 127 Change Job (CHGJOB), 129-130,

LOG parameter, 276object code, 267-268OPTIMIZE parameter, 279OPTION parameter, 275Original Program Model, 457-458parameters, 274-279PGM parameter, 274procedures, 267programs, 267REPLACE parameter, 276-277SRCFILE parameter, 274SRCMBR parameter, 274SRTSEQ parameter, 278System/38 differences, 416TEXT parameter, 275TGTRLS target release parameter, 277USRPRF parameter, 276

interactive processing, 195interactive transactions using data queues, 145interpreted vs. compiled languages, 425-426interprogram/intermodule communication,

123-145Call Bound Procedure (CALLPRC), 124CALL command, 124constants as parameters, 125-126data areas, 123, 126-129data queues, 123, 133-145database files, 123group data area (GDA), 128-129limitations of parameters, 126local data area (LDA), 123, 128-129messages, 123, 131-133

parameters, 123, 124-126, 125Receive Message (RCVMSG), 132-133Send Program Message (SNDPGMMSG),

131-132switches, 123, 129-131Transfer Control (TFRCTL), 124, 126variables as parameters, 124-125

IPLs, 414iterative DO, 3, 57

simulating iterative DO, 59-60

Jjobs

&QUOTE variable, 180-181allocating objects to jobs (ALCOBJ),

191-194attributes of jobs, 152-154, 192, 236automatic allocation of objects, 192batch processing (See batch processing), 195Change Job (CHGJOB), 154Change Job Description (CHGJOBD), 234Create Job Description (CRTJOBD), 234Deallocate Objects (DLCOBJ), 192debugging one job running in another,

258-263Delay Job (DLYJOB), 219-221descriptions, job descriptions, 234-235Disconnect Job (DSCJOB), 412Display Record Locks (DSPRCDLCK), 194interactive processing, 195job queues, 196job scheduler using RTVSYSVAL, 149-150job/system interface, 147-158library lists, 147-149lock states, 192members, 165network attributes, 156priority of jobs, 154retrieve commands, 156-158Retrieve Job Attribute (RTVJOBA),

152-154, 157, 204-205, 236Submit Job (SBMJOB), 196-201system values, 149-152user profiles, 154-156Work with Job Queue (WRKJOBQ), 201Work with Object Locks (WRKOBJLCK),

194Work with Submitted Jobs

(WRKSBMJOB), 201Work with Subsystem Jobs (WRKSBSJOB),

201Work with User Jobs (WRKUSRJOB), 201

467

INDEX

Page 10: D:Complete CL2nd PrintingComplete CL revisioneditorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5001/... · 2005. 8. 26. · Change Data Area (CHGDTAARA), 127 Change Job (CHGJOB), 129-130,

Kkey fields, reading key field files, 161-162key, message key, 86-87, 98-100keyboards, 414KEYED data queues, 134, 137-138keywords, 8, 13, 15-16, 393-396

Llabels & tags, 9, 13, 381-384

GOTO command, 9, 57-58lowercase for easy reading, 390-393

language support with CL, 1, 278interpreted vs. compiled languages, 425-426

leading blanks in code, removal, 384-387levels of security, 225libraries, 3, 19

Change Current Library (CHGCURLIB), 411Change Library List (CHGLIBL), 411Copy Library (CPYLIB), 412Display Library (DSPLIB), 32Initialize Library (INZLIB), 296-300installing utility commands, 281message file library, 105QTEMP library, temporary files, 169replace existing member, 276-277, 276Retrieve Library Description (RTVLIBD),

413scratch library creation, 239Work with System Values (WRKSYSVAL),

281library lists, 147-149

Add Library List Entry (ADDLIBLE),147-149

Change Current Library (CHGCURLIB),147-149

Change Library List (CHGLIBL), 147-149Change System Library List

(CHGSYSLIBL), 147-149, 239Edit Library List (EDTLIBL), 412job descriptions, 234Remove Library List Entry (RMVLIBLE),

147-149Restore Library List (RSTLIBL), 334-338

Retrieve Library Description (RTVLIBD),157

Save Library List (SAVLIBL), 334-338scratch library, 234

licensing for CL, 2LIFO data queues, 134limitations of CL, 3line-oriented debugger, OPM programs,

419-423list view debugging, 256, 256literals (See constants & literals)Load Tape and Run (LODRUN), 412local data area (LDA)

passing program information, 123, 128-129System/36 differences, 449-450

lock states, 192locked records, Display Record Locks

(DSPRCDLCK), 194log command, ILE, 276logical constants, 23, 27logical data type, 3, 8, 28logical expressions, 53

debugging, 252logical files, 164logical variables, 47-48

testing, IF command, 55-56loops, 57

Mmembers, 165memory pools, 3

Change Shared Pool (CHGSHRPOOL), 412menu objects, Create Menu Object

(CRTMNU), 412message files, 78, 105messages, 73-122, 282-292

Add Message Description (ADDMSGD), 78Add Reply List Entry (ADDRPYLE), 114alert options, 105break messages, 110-111, 110Change Message Description (CHGMSGD),

78Change Message Queue (CHGMSGQ), 75Change Reply List Entry (CHGRPYLE),

114

468

INDEX

Page 11: D:Complete CL2nd PrintingComplete CL revisioneditorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5001/... · 2005. 8. 26. · Change Data Area (CHGDTAARA), 127 Change Job (CHGJOB), 129-130,

Clear Message Queue (CLRMSGQ), 113color of text of message, 84Completion messages, 76, 84content of message, 81-82Create Message File (CRTMSGF), 78Create Message Queue (CRTMSGQ), 74defining a message, 77descriptions for messages, 78destination of message, 82-83, 82Diagnostic messages, 76, 84display file PRTCTLMNUD, subfile

example, 116-122Display Message (DSPMSG), 23, 90,

111-113, 202, 240Display Message Description (DSPMSGD),

78Display Program Message (DSPPGMMSG),

106, 288-292erasing messages from queue (F11, F13, F16

function keys), 112-113Escape messages, 76, 84escape messages, CHKOBJ, 186first-level text of message, 100Forward Program Message

(RWDPGMMSG), 188, 282-286forwarding error messages, 95-96generic messages, 94-96global error trapping with MONMSG, 8,

90-91ID for message, 77, 79, 101impromptu messages, 73, 77, 81, 87-88,

109-110information about message, 100-105Informational messages, 77, 84, 87, 88Inquiry messages, 76, 84, 87, 88, 202job message queues, 74-75length of message, 101library containing message file, 105message files, 78, 105message key, 86-87, 98-100Monitor Message (MONMSG) command, 8,

90-96Monitor Messages (MONMSG)CMPDTA compare data parameter, 91command-level MONMSG, 94

EXEC execution parameter, 92generic monitoring with MONMSG, 94-96MSGID message ID list parameter, 91program-level (global) MONMSG, 93source file test with CHKOBJ, 92specific monitoring with MONMSG, 94-95new messages, 75Notify messages, 76, 84old messages, 75parts of message, 79-80passing program information, 123, 131-133permanent message queues, 74predefined messages, 73, 74, 77-80, 81, 88program message queues, 74-75program messages, 81-87, 188, 237,

282-286, 288-292QSYSOPR message queue, 202-203queues, message queues, 73, 74-75, 106,

107, 113Receive Message (RCVMSG), 75, 96-106,

240alert options, 105first-level text of message, 100from which program message queue

(PRMQ), 97-98ID of message, 101information about message, 100-105length of message, 101library containing message file, 105message files, 105message key, 100passing program information, 132-133remove message from queue, 106return type, 104-105second-level text of message, 101sender ID, 101, 102, 103-104severity level, 101wait for message, 105-106which message to receive (MSGTYPE/

MSGKEY combinations), 98receiving a message, 73receiving a reply, 85-86, 89recipient of message, 88recipient of message, TOPGMQ parameters,

82-84

469

INDEX

Page 12: D:Complete CL2nd PrintingComplete CL revisioneditorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5001/... · 2005. 8. 26. · Change Data Area (CHGDTAARA), 127 Change Job (CHGJOB), 129-130,

messages, continuedRemove Message Description (RMVMSGD),

78remove message from queue, 106Remove Messages (RMVMSG), 107-109Remove Reply List Entry (RMVRPYLE),

114Reply messages, 76Request messages, 76, 84Retrieve Message (RTVMSG), 157return type, 104-105second-level text of message, 101Send Break Message (SNDBRKMSG),

110-111Send Message (SNDMSG), 109-110Send Program Message (SNDPGMMSG),

81-87, 237passing program information, 131-132

Send Reply (SNDRPY), 109Send Status Message (SNDSTSMSG),

286-288Send User Message (SNDUSRMSG), 87-90sender ID, 101, 102, 103-104severity levels, 80, 101Status messages, 77, 84, 85, 286-288subfiles, message subfiles, 115-122system operator (QSYSOPR) message queue,

74system reply list, 114-115translation tables (TRNTBL) parameter,

89-90types of messages, 75, 76, 84-85, 88, 98-100utility programs, 282-292wait for message, 105-106Work With Message Description

(WRKMSGD), 78Work with Messages (WRKMSG), 111-113Work with Reply List Entry (WRKRPYLE),

114Monitor Message (MONMSG) command, 90-96

CMPDTA compare data parameter, 91command-level MONMSG, 94COPYRIGHT command, 7error trapping, 8, 90-91EXEC execution parameter, 92

forwarding error messages, 95-96MSGID message ID list parameter, 91program-level (global) MONMSG, 93

Move Object (MOVOBJ), 191

Nnesting DO/ENDDO commands, 61-62nesting IF commands, 62-63network attributes, 156

Retrieve Network Attributes (RTVNETA),156, 158

networking, 3NOT operator, 47, 48, 56-57Notify messages, 76, 84

Oobject code, ILE, 267-268object management, 3, 183-194

adopting authority, 227-230Allocate Object to Job (ALCOBJ), 191-194attributes for jobs, 192automatic allocation of objects, 192Change Object Description (CHGOBJD),

191Change Object Owner (CHGOBJOWN),

227Check Object (CHKOBJ), 185-186, 228Compress Object (CPROBJ), 412Count Objects (CNTOBJ), 366-371Create Duplicate Object (CRTDUPOBJ),

15, 190-191Create Menu Object (CRTMNU), 412creating objects (CRTxxx commands),

183-184Deallocate Objects (DLCOBJ), 192deleting objects (DLTxxx commands),

184-185Display Object Description (DSPOBJD),

171, 358Display Object Information (DSPOBJINF),

358-366Duplicate Object (DUPOBJ), 329-333Edit Object Authority (EDTOBJAUT), 226,

412

470

INDEX

Page 13: D:Complete CL2nd PrintingComplete CL revisioneditorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5001/... · 2005. 8. 26. · Change Data Area (CHGDTAARA), 127 Change Job (CHGJOB), 129-130,

existence checking, CHKOBJ, 185-186Grant Object Authority (GRTOBJAUT), 226lock states for jobs, 192Move Object (MOVOBJ), 191names, in lowercase for easy reading,

390-393ownership of objects, 227PUBLIC authorities, 227Rename Object (RNMOBJ), 191Retrieve Member Description (RTVMBRD),

188-189Retrieve Object Description (RTVOBJD),

158, 187-188, 413Revoke Object Authority (RVKOBJAUT),

226securing an object, 226System/38 differences, 405-406Work with Object Locks (WRKOBJLCK),

194open data paths (ODP), 167-168Open Query File (OPNQRYF), 167-169operating system (OS/400) and CL, 2Operational Assistant, Retrieve Power Schedule

Entry (RTVPWRSCDE), 158operators

arithmetic operators, 39-40blank spaces, 40comparison operators, 54-55debugging, 250, 252expressions, 48hierarchy of operators, 48parentheses in operations, 40, 48precedence of operators, 48/, 40

OR operator, 47, 48, 56-57Original Program Model, 267, 457-458outfiles, 171-174

Display File Field Description (DSPFFD),172

Display Object Description (DSPOBJD), 171output queues

Create Output Queue (CRTOUTQ), 183data queues as, 144

Override Database File (OVRDBF), 161, 166,167

Override with Display File (OVRDSPF), 166Override with Printer File (OVRPRTF), 166ownership of objects, 227

Pparameters (PARM), 15-16, 27-28, 34-35

debugging, 253Declare (DCL) parameter, 34-35ILE, 274-279passing constants as parameters, CALL, 70passing parameters, 35, 124-126, 125

passing program information, 123,124-126, 125

passing variables as parameters, 68-69positional parameters, 15sign-on & initial programs, 233

sorting/arranging DCL commands forease, 30, 31-32

parentheses in operations, 40, 48Pascal, 2, 37passing parameters, 35passwords, 414

Change Password (CHGPWD), 411Check Password (CHKPWD), 412

pattern scan for variables, QCLSCAN,216-218, 236

Performance Explorer, ILE, 278permanent message queues, 74permanent work files, 170-171physical files, 164PL/I utility programs, 2plus/minus sign, continuing code onto next

line, 16-17positional parameters, 15power schedule, Retrieve Power Schedule

Entry (RTVPWRSCDE), 158power up (See system power up/power down)predefined messages, 73, 74, 77-80, 81, 88prestart jobs, 129Print Device Addresses (PRTDEVADR), 412printer files

Convert Print to Physical File (CVTPRTF),175

Override with Printer File (OVRPRTF), 166

471

INDEX

Page 14: D:Complete CL2nd PrintingComplete CL revisioneditorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5001/... · 2005. 8. 26. · Change Data Area (CHGDTAARA), 127 Change Job (CHGJOB), 129-130,

printing*PRINT, 173-174Print Device Addresses (PRTDEVADR), 412printer name, 414spooled files, 173-174System/36 differences,452-453

prioritizing jobs, 3, 154procedures, 267

System/36 differences, 426-427Program (PGM) command, 6-7, 9Program Development Manager (PDM), 10

Start PDM (PDM), 292-295to start SEU, 10Work with Members Using PDM

(WRKMBRPDM), 10program initialization parameter (PIP) data area,

129program message queues, 74-75program messages, 188, 237, 282-286, 288-292program-level (global) MONMSG, 93programming (See formatting code; writing CL

programs)programming aid utilities, 292-327programming shortcut utilities, 327-338programs, 267prompting, selective prompting, 207-211PUBLIC authorities, 227

QQASTLVL, 151QATNPGM, 151QAUTOCFG, 414QCLRDTAQ API to clear data queue, 344-346QCLSCAN, 216-218, 236QCLSRC default source physical file, 10QCMDCHK syntax checker, 211-213QCMDEXC, 33, 214-216

Check Object (CHKOBJ), 185-186QCONSOLE, 151, 414QCRTAUT, 151QCTLSBSD, 151QCURSYM, 151QDATE, 151QDATFMT, 151QDATSEP, 151

QDAY, 151QDCXLATE, 218-219QDEVNAMING, 151, 414QDSPSGNINF, 414QHOUR, 151QIPLDATTIM, 151, 414QIPLSTS, 414QIPLTYPE, 414QKBDTYPE, 414QMHQRDQD API program to receive data

entries, 139-141QMHRDQM API program to receive data

entries, 136, 141-143QMINUTE, 151QMODEL, 151, 414QMONTH, 151QPFRADJ, 414QPRTDEVE, 151, 414QPRTKEYFMT, 151QPRTTXT, 151QPWDEXPITV, 414QPWRRSTIPL, 414QRCVDTAQ API to receive data queue,

341-344QRMTIPL, 414QSECOND, 151QSECURITY, 151, 414QSNDDTAQ API program to send data entries

to queue, 135-139, 338-341QSPCENV, 414QSRLNBR, 152QSTRPRTWTR, 152, 414QSTRUPPGM, 152, 414QSTSMSG, 152QSYSLIBL, 152QSYSOPR message queue, 202-203QTEMP, 169

Create Work File (CRTWRKF), 327-329SIGNOFF command action, 169

QTIME, 152qualified names

/ symbol, 40System/38 differences, 406variables, 34

472

INDEX

Page 15: D:Complete CL2nd PrintingComplete CL revisioneditorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5001/... · 2005. 8. 26. · Change Data Area (CHGDTAARA), 127 Change Job (CHGJOB), 129-130,

query files, Copy From Query File(CPYFRMQRYF), 412

question mark for selective prompting, 207queues (See data queues; jobs; messages; output

queues; user queues)quotation marks, 14, 177-182

character strings, 179command strings, 179embedded quotes, 178-179expressions, 179multiple quotes, 180strings delimited by quotes, 178

QUSRLIBL, 152QYEAR, 152

RReceive Data Entry from Queue (RCVDTAQ),

144, 341-344Receive File (RCVF), 160-162Receive Message (RCVMSG), 75, 96-106, 240

Display Program Messages (DSPPGMMSG)utility command, 106

first-level text of message, 100from which program message queue

(PRMQ), 97-98ID of message, 101information about message, 100-105length of message, 101library containing message file, 105message key, 100passing program information, 132-133remove message from queue, 106return type, 104-105second-level text of message, 101sender ID, 101, 102, 103-104severity level, 101wait for message, 105-106which message to receive (MSGTYPE/

MSGKEY combinations), 98-100Reclaim Activation Group (RCLACTGRP),

221, 222, 273-274Reclaim Resources (RCLRSC), 221-222record locks, Check Record Lock

(CHKRCDLCK), 412record-by-record file processing, 159-164

Remove Breakpoint (RMVBKP), 421Remove Library List Entry (RMVLIBLE),

147-149Remove Member (RMVM), 164Remove Message Description (RMVMSGD),

78Remove Messages (RMVMSG), 107-109Remove Reply List Entry (RMVRPYLE), 114Remove Trace (RMVTRC), 422Rename Object (RNMOBJ), 191Reorganize Data Queue (RGZDTAQ), 351-354Reorganize Physical File Member (RGZPFM),

164Reply messages, 76Request messages, 76, 84resource management, 221-222

Reclaim Activation Group (RCLACTGRP),221, 222, 273-274

Reclaim Resources (RCLRSC), 221-222Restore Library List (RSTLIBL), 334-338Retrieve Authorization List (RTVAUTLE),

157Retrieve Backup (RTVBCKUP), 157Retrieve CL Source (RTVCLSRC), 222-223Retrieve Cleanup (RTVCLNUP), 157retrieve commands, 156-158Retrieve Configuration Source

(RTVCFGSRC), 412Retrieve Configuration Status (RTVCFGSTS),

157, 413Retrieve Data Area (RTVDTAARA), 157Retrieve Data Queue Description

(RTVDTAQD), 346-350Retrieve Job Attribute (RTVJOBA),130,

152-154, 157, 204-205, 236Retrieve Library Description (RTVLIBD), 157,

413Retrieve Member Description (RTVMBRD),

188-189, 413Retrieve Message (RTVMSG), 157Retrieve Network Attributes (RTVNETA),

156, 158Retrieve Object Description (RTVOBJD), 158,

187-188, 413

473

INDEX

Page 16: D:Complete CL2nd PrintingComplete CL revisioneditorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5001/... · 2005. 8. 26. · Change Data Area (CHGDTAARA), 127 Change Job (CHGJOB), 129-130,

Retrieve Power Schedule Entry(RTVPWRSCDE), 158

Retrieve System Value (RTVSYSVAL),149-150, 158job scheduler program using, 149-150

Retrieve System/36 Attributes (RTVS36A), 158Retrieve User Profile (RTVURPRF), 9,

154-156, 158, 236Return command, 70, 71return type, message, 104-105Revoke Object Authority (RVKOBJAUT), 226REXX

Check Object (CHKOBJ), 185-186Receive Message (RCVMSG), 96-106Send Program Message (SNDPGMMSG),

81-87Send Reply (SNDRPY), 109

RGZDTAQ reorganize data queue utility, 145RPG, 1, 2, 3, 11, 37, 59, 144, 267, 399

SS/38 Environment Programmer’s Guide and

Reference italics, 407Save Library List (SAVLIBL), 334-338scratch library creation, 234, 239security, 3, 225-232

adopted authority, call stack, 229adopting authority, 227-230Change Object Owner (CHGOBJOWN), 227Change User Profile (CHGUSRPRF), 230command line security, 230Edit Object Authority (EDTOBJAUT), 226Grant Object Authority (GRTOBJAUT), 226levels of security, 225, 414objects, 226ownership of objects, 227program object (*PGM) security, 225PUBLIC authorities, 227Revoke Object Authority (RVKOBJAUT),

226user profiles, 230

Select Command (SLTCMD), 413selective prompting, 207-211

QCMDCHK use, 213self-submitting programs, 203-205

Send Break Message (SNDBRKMSG),110-111

Send Data Entry To Queue (SNDDTAQ),338-341

Send File (SNDF), 162-163Send Program Message (SNDPGMMSG), 237

passing program information, 131-132Send Receive File (SNDRCVF), 162-163Send Reply (SNDRPY), 109Send Status Message (SNDSTSMSG), 286-288Send User Message (SNDUSRMSG), 87-90severity levels, messages, 80, 101SIGNOFF, QTEMP library vs., 169sign-on & initial programs, 233-241, 414

Change Job Description (CHGJOBD), 234Create Job Description (CRTJOBD), 234job attributes, 236job descriptions, 234-235library lists, 239logging for historical purposes, 235messages, 237, 240parameters, 233sample program, 235-241, 401-403scratch library creation, 234, 239user profiles, 236

single quotes, 177SNDDTAQ send data entries utility, 144sorting

ILE, 278OPNQRYF, 167-169System/36 differences, 454

Source Entry Utility (SEU), 10, 374-375,399-400

source filesCheck Object (CHKOBJ), 92Compare Source Members

(CMPSRCMBR), 313-326Format CL Source (FMTCLSRC), 301-313ILE, 274Retrieve CL Source (RTVCLSRC), 222-223Retrieve Configuration Source

(RTVCFGSRC), 412source physical file, 10source view debugging, 248-253spooled files, 173-174

474

INDEX

Page 17: D:Complete CL2nd PrintingComplete CL revisioneditorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5001/... · 2005. 8. 26. · Change Data Area (CHGDTAARA), 127 Change Job (CHGJOB), 129-130,

Copy Spooled File (CPYSPLF), 173Delete Spooled File (DLTSPLF), 174

Start Copy Screen (STRCPYSCN), 413Start Debug (STRDBG), 243-244, 417-419Start PDM (PDM), 292-295Start SEU (STRSEU) command, 10, 11statement view debugging, 257, 257statements (See commands & statements)Status messages, 77, 84, 85, 286-288STEP command, 254strings (See also character variables), 14

arrays, simulating arrays using strings, 44binary conversion, 45-47concatenating strings, 42-44Find String Using PDM (FNDSTRPDM),

412quotation mark use, 178, 179substrings (%SST/%SUBSTRING), 41-42

structure of typical CL program, 6subfiles, message subfiles, 115-122Submit Job (SBMJOB), 196-201subroutines, 3, 57substrings (%SST/%SUBSTRING), 41-42subsystems, 3switches

%SWITCH function to test, 130-131Display Job (DSPJOB), 129number of switches in use, 131passing program information, 123, 129-131Retrieve Job Attributes (RTVJOBA) to test,

130testing switches, 130turn on/off, Change Job (CHGJOB), 129-130

syntax checker, 13, 211-213system configuration, 2

automatic configuration, 414console, 414Retrieve Configuration Source

(RTVCFGSRC), 412Retrieve Configuration Status

(RTVCFGSTS), 157, 413system log files, Send Message (SNDMSG),

110system operator (QSYSOPR) message queue, 74system power up/power down, 2

system reply list, message management,114-115

system values, 149-152Change System Value (CHGSYSVAL), 152list of system values, 150, 151-152Retrieve System Value (RTVSYSVAL),

149-150, 158System/38 differences, 413-415Work with System Values (WRKSYSVAL),

281System/36 differences, 425-456

CL equivalents to S/36 OCL statements,427-446

coding techniques, CL vs. S/36, 447-456control commands, CL equivalents, table,

444-446control records in a file, 447-448dynamic execution, 450-451entering and leaving S/36, 426environment, 426//FILE LABEL-xxx, 451-452#GSORT, 454-456indirect reference using ??N??, 453-454local data areas (LDA), 449-450// PRINTER, 452-453procedure control expressions, CL

equivalents, 432-441procedures, CL equivalents, table, 441-444Retrieve System/36 Attributes (RTVS36A),

158running S/36 procedures, 426-427substitution expressions, CL equivalents,

427-432work file creation, deletion, 448

System/38 differences, 267, 405-416command changes, conversions, 407-411command entry screen, 415converting to AS/400, 416environment, 415-416integrated language environment (ILE), 416new commands, 411-413object management, 405-406qualified names, 406S/38 Environment Programmer’s Guide and

Reference italics, 407system values, 413-415

475

INDEX

Page 18: D:Complete CL2nd PrintingComplete CL revisioneditorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5001/... · 2005. 8. 26. · Change Data Area (CHGDTAARA), 127 Change Job (CHGJOB), 129-130,

Ttags (See labels & tags)tape backups, Load Tape and Run (LODRUN),

412target release parameter, ILE, 277temporary files, 165, 169

job descriptions, 235time slices, 3trace, in debugging, 422-423Transfer Control (TFRCTL), 71-72

passing program information, 124, 126translation tables

Create Table (CRTTBL), 219translate ASCII/EBCDIC characters

(QDCXLATE), 218-219TRNTBL parameter, messages, 89-90

translation, translate ASCII/EBCDIC characters(QDCXLATE), 218-219

true/false logical constants, 27

Uupper/lowercase (See case sensitivity)user profiles, 154-156

Change Profile (CHGPRF), 156Change User Profile (CHGUSRPRF), 156,

230Display User Profile (DSPUSRPRF), 173ILE, 276Retrieve User Profile (RTVURPRF), 9,

154-156, 158, 236sign-on & initial programs, 233

utility commands, 281-371Clear Data Queue (CLRDTAQ), 344-346COMMENT command, 355-357Compare Source Members (CMPSRCMBR),

313-326Count Objects (CNTOBJ), 366-371Create Work File (CRTWRKF), 327-329data queue utilities, 338Display Object Information (DSPOBJINF),

358-366Display Program Message (DSPPGMMSG),

288-292Duplicate Object (DUPOBJ), 329-333

Format CL Source (FMTCLSRC), 301-313Forward Program Messages

(FWDPGMMSG), 282-286Initialize Library (INZLIB), 296-300installing utility commands, 281library for utility commands, 281messages, 282-292programming aid utilities, 292-327programming shortcut utilities, 327-338Receive Data Entry from Queue

(RCVDTAQ), 341-344Reorganize Data Queue (RGZDTAQ),

351-354Restore Library List (RSTLIBL), 334-338Retrieve Data Queue Description

(RTVDTAQD), 346-350Save Library List (SAVLIBL), 334-338Send Data Entry To Queue (SNDDTAQ),

338-341Send Status Message (SNDSTSMSG),

286-288Start PDM (PDM), 292-295Work with System Values (WRKSYSVAL),

281

Vvariables, 27-34

&QUOTE variable, 180-181arithmetic operators, 39-40arrays, simulating arrays using strings, 44binary conversion, 45-47Change Program Variable (CHGPGMVAR),

421Change Variable (CHGVAR), 13, 16, 37-39character data types, 28character variables, 41-44concatenating strings, 42-44continuing code onto next line, 16-17data types, 8, 28, 69decimal data types, 28Declare variable (DCL), 27, 30declaring variables, 7-8Display Program Variables

(DSPPGMVAR), 421errors in variable use, 33-34

476

INDEX

Page 19: D:Complete CL2nd PrintingComplete CL revisioneditorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5001/... · 2005. 8. 26. · Change Data Area (CHGDTAARA), 127 Change Job (CHGJOB), 129-130,

expressions, 48floating-point data types, 69hierarchy of operators, 48invalid names, 28length of variable, 8, 27, 28, 29, 30listing, Dump CL Program (DMPCLPGM),

263-265logical data types, 28logical variables, 47-48lowercase for easy reading, 390-393naming a variable, 27, 28parameters, 27-28, 34-35passing parameters, 35passing program information, 124-125passing variables as parameters, CALL,

68-69pseudo-variables, 46qualified names in variables, 34Retrieve Member Description (RTVMBRD),

413scan for patterns (QCLSCAN), 216-218, 236sorting/arranging DCL commands for ease,

30, 31-32substrings (%SST/%SUBSTRING), 41-42translate ASCII/EBCDIC characters

(QDCXLATE), 218-219valid names, 28value of variable, 8, 28where variables are used, 32-34

viewing program information, Display Module(DSPMOD), 7

views for debugging, 244-245

Wwait states, Delay Job (DLYJOB), 219-221WATCH command, 254whole-file processing, 164-169work files (See also files; temporary files)

Create Work File (CRTWRKF), 327-329job descriptions, 235System/36 differences, 448

Work With commands (WRKxxx), 413Work with Job Queue (WRKJOBQ), 201Work with Members Using PDM

(WRKMBRPDM), 10

Work With Message Description(WRKMSGD), 78

Work with Messages (WRKMSG), 111-113Work with Object Locks (WRKOBJLCK), 194Work with Reply List Entry (WRKRPYLE),

114Work with Submitted Jobs (WRKSBMJOB),

201Work with Subsystem Jobs (WRKSBSJOB),

201Work with System Values (WRKSYSVAL),

281Work with User Jobs (WRKUSRJOB), 201workstations, Display Workstation User

(DSPWSUSR), 412writing CL programs (See also formatting

code)activation groups, 271-274align similar lines, 396-399binding by copy, 268-269binding by reference, 269binding, 268-270blank lines in program code, 19-20, 378-381case sensitivity, 14, 390-393coding style, 373-400command prompter, 374-375COMMENT command, 355-357comment lines in program code, 20-22,

376-378Compare Source Members

(CMPSRCMBR), 313-326compiling code, 12, 18-19, 270-271continuing code onto next line, 16-17Create Bound CL Program (CRTBNDCL),

270, 271Create CL Module (CRTCLMOD), 270Create Program (CRTPGM), 270, 271Create Service program (CRTSRVPGM),

270-271dynamic call, 270editor, code editors, 399-400executing the program, 19Format CL Source (FMTCLSRC), 301-313formatting the program, 11-14

477

INDEX

Page 20: D:Complete CL2nd PrintingComplete CL revisioneditorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5001/... · 2005. 8. 26. · Change Data Area (CHGDTAARA), 127 Change Job (CHGJOB), 129-130,

writing CL programs, continuedHELLO program sample, formatting

example, 11-12, 11, 12identifiers in lowercase for easy reading,

390-393indent lines of code, 17-18, 387-390Initialize Library (INZLIB), 296-300integrated language environment (ILE),

267-279keywords, 15-16, 393-396labels & tags, 381-384leading blanks, removal, 384-387parameters, 15-16Program Development Manager (PDM), 10,

292-295

programming aid utilities, 292-327programming shortcut utilities, 327-338QCLSRC default source physical file, 10QCMDCHK syntax checker, 211-213QCMDEXC for dynamic execution, 33,

214-216selective prompting, 207-211sign-on & initial programs, 233Source Entry Utility (SEU) to enter code,

10, 374-375, 399-400source physical file, 10Start PDM (PDM), 292-295Start SEU (STRSEU) command, 10, 11syntax checker, 13, 211-213Work with Members Using PDM

(WRKMBRPDM), 10

478

INDEX


Recommended