0% found this document useful (0 votes)
35 views1,707 pages

CL Reference

The document is the OS/400 CL Reference - Part 2, which provides comprehensive information about the AS/400 Control Language (CL) commands and their definitions. It includes detailed descriptions of various command statements, examples, and command descriptions organized into chapters. This reference is intended for users seeking to understand and utilize the CL commands effectively in the AS/400 environment.

Uploaded by

afau
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views1,707 pages

CL Reference

The document is the OS/400 CL Reference - Part 2, which provides comprehensive information about the AS/400 Control Language (CL) commands and their definitions. It includes detailed descriptions of various command statements, examples, and command descriptions organized into chapters. This reference is intended for users seeking to understand and utilize the CL commands effectively in the AS/400 environment.

Uploaded by

afau
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1707

1

2 OS/400 CL Reference - Part 2 (Full Version)


AS/400e series IBM
CL Reference
CL Reference Part 2 (Full Version)
Common CL Information
Version 4

SC41-5722-01
AS/400e series IBM
CL Reference
CL Reference Part 2 (Full Version)
Common CL Information
Version 4

SC41-5722-01
ii OS/400 CL Reference - Part 2 (Full Version)
Contents

Part 1. Basic AS/400 Control Language Information . . . . . . . . . . . . . . . . . . . . . . . P1-1

Chapter 1. Command Definition Statements . . . P1-3 ELEM (Element) Statement . . . . . . . . . . . . . P1-7


Command Definition Statements . . . . . . . . . . . P1-3 Examples . . . . . . . . . . . . . . . . . . . . P1-15
Creating User-Defined Commands . . . . . . . . . . P1-3 PARM (Parameter) Statement . . . . . . . . . . . P1-16
Command Definition Statement Descriptions . . . . P1-3 Examples . . . . . . . . . . . . . . . . . . . . P1-26
CMD (Command) Statement . . . . . . . . . . . . . P1-4 PMTCTL (Prompt Control) Statement . . . . . . . P1-27
Example . . . . . . . . . . . . . . . . . . . . . . P1-4 Example . . . . . . . . . . . . . . . . . . . . . P1-27
DEP (Dependent) Statement . . . . . . . . . . . . . P1-5 QUAL (Qualifier) Statement . . . . . . . . . . . . P1-28
Examples . . . . . . . . . . . . . . . . . . . . . P1-6 QUAL (Qualifier) Example . . . . . . . . . . . . . P1-33

Part 2. OS/400 CL Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P3-1

Chapter 2. OS/400 Command Descriptions . . . P3-11 DSPCMD (Display Command) Command . . . . . P3-61
DMPCLPGM (Dump Control Language Program) DSPCNNL (Display Connection List) Command . . P3-62
Command . . . . . . . . . . . . . . . . . . . . . P3-12 DSPCNNSTS (Display Connection Status) Command P3-63
DMPDLO (Dump Document Library Object) DSPCOSD (Display Class-of-Service Description)
Command . . . . . . . . . . . . . . . . . . . . . P3-13 Command . . . . . . . . . . . . . . . . . . . . . P3-64
| DMPJOB (Dump Job) Command . . . . . . . . . . P3-14 DSPCPCST (Display Check Pending Constraint)
DMPJOBINT (Dump Job Internal) Command . . . P3-16 Command . . . . . . . . . . . . . . . . . . . . . P3-65
DMPOBJ (Dump Object) Command . . . . . . . . P3-17 DSPCSI (Display Communications Side Information)
DMPSYSOBJ (Dump System Object) Command . P3-18 Command . . . . . . . . . . . . . . . . . . . . . P3-66
DMPTAP (Dump Tape) Command . . . . . . . . . P3-22 DSPCTLD (Display Controller Description) Command P3-67
DMPTRC (Dump Trace) Command . . . . . . . . P3-26 DSPCURDIR (Display Current Directory) Command P3-68
DO (Do) Command . . . . . . . . . . . . . . . . . P3-27 DSPDBG (Display Debug) Command . . . . . . . P3-69
DSCJOB (Disconnect Job) Command . . . . . . . P3-28 DSPDBGWCH (Display Debug Watches) Command P3-70
DSPACC (Display Access Code) Command . . . . P3-30 DSPDBR (Display Database Relations) Command P3-71
DSPACCAUT (Display Access Code Authority) DSPDDMF (Display Distributed Data Management
Command . . . . . . . . . . . . . . . . . . . . . P3-31 File) Command . . . . . . . . . . . . . . . . . . P3-75
DSPACTPJ (Display Active Prestart Jobs) Command P3-32 DSPDEVD (Display Device Description) Command P3-77
DSPACTPRFL (Display Active Profile List) Command P3-33 DSPDIRE (Display Directory Entries) Command . . P3-78
DSPACTSCD (Display Activation Schedule) DSPDKT (Display Diskette) Command . . . . . . . P3-82
Command . . . . . . . . . . . . . . . . . . . . . P3-34 DSPDLOAUD (Display Document Library Object
DSPAPPNINF (Display APPN Information) Command P3-35 Audit) Command . . . . . . . . . . . . . . . . . P3-83
DSPAUDJRNE (Display Audit Journal Entries) DSPDLOAUT (Display Document Library Object
Command . . . . . . . . . . . . . . . . . . . . . P3-37 Authority) Command . . . . . . . . . . . . . . . P3-85
DSPAUT (Display Authority) Command . . . . . . P3-40 DSPDLONAM (Display Document Library Object
DSPAUTHLR (Display Authority Holder) Command P3-41 Name) Command . . . . . . . . . . . . . . . . . P3-87
DSPAUTL (Display Authorization List) Command . P3-42 DSPDOC (Display Document) Command . . . . . P3-89
DSPAUTLDLO (Display Authorization List Document DSPDSTL (Display Distribution List) Command . . P3-90
Library Objects) Command . . . . . . . . . . . . P3-44 DSPDSTLOG (Display Distribution Log) Command P3-93
DSPAUTLOBJ (Display Authorization List Objects) DSPDSTSRV (Display Distribution Services)
Command . . . . . . . . . . . . . . . . . . . . . P3-45 Command . . . . . . . . . . . . . . . . . . . . . P3-97
DSPAUTUSR (Display Authorized Users) Command P3-47 DSPDTAARA (Display Data Area) Command . . . P3-98
DSPBCKSTS (Display Backup Status) Command . P3-48 DSPDTADCT (Display Data Dictionary) Command P3-100
DSPBCKUP (Display Backup Options) Command . P3-49 DSPEDTD (Display Edit Description) Command . . P3-102
DSPBCKUPL (Display Backup List) Command . . P3-50 DSPEWCBCDE (Display Extended Wireless
DSPBKP (Display Breakpoints) Command . . . . . P3-51 Controller Bar Code Entry) Command . . . . . . P3-103
DSPBNDDIR (Display Binding Directory) Command P3-52 DSPEWCM (Display Extended Wireless Controller
DSPCCTRTE (Display Circuit Route) Command . P3-54 Member) Command . . . . . . . . . . . . . . . . P3-104
DSPCCTSRV (Display Circuit Service) Command . P3-55 DSPEWCPTCE (Display Extended Wireless
DSPCDEFNT (Display Coded Font) Command . . P3-57 Controller PTC Entry) Command . . . . . . . . . P3-105
DSPCFGL (Display Configuration List) Command . P3-59 DSPEWLM (Display Extended Wireless Line
DSPCLS (Display Class) Command . . . . . . . . P3-60 Member) Command . . . . . . . . . . . . . . . . P3-106

 Copyright IBM Corp. 1997, 1998 iii


DSPEXPSCD (Display Expiration Schedule) DSPNWSALS (Display Network Server Alias)
Command . . . . . . . . . . . . . . . . . . . . . P3-107 Command . . . . . . . . . . . . . . . . . . . . . P3-185
DSPFD (Display File Description) Command . . . P3-108 DSPNWSA (Display Network Server Attributes)
DSPFFD (Display File Field Description) Command P3-114 Command . . . . . . . . . . . . . . . . . . . . . P3-186
| DSPFLR (Display Folder) Command . . . . . . . . P3-117 | DSPNWSD (Display Network Server Description)
DSPFNTTBL (Display Font Table) Command . . . P3-119 | Command . . . . . . . . . . . . . . . . . . . . . P3-187
| DSPFNTRSCA (Display Font Resource Attributes) DSPNWSSSN (Display Network Server Session)
| Command . . . . . . . . . . . . . . . . . . . . . P3-120 Command . . . . . . . . . . . . . . . . . . . . . P3-188
DSPHDWRSC (Display Hardware Resources) DSPNWSSTC (Display Network Server Statistics)
Command . . . . . . . . . . . . . . . . . . . . . P3-121 Command . . . . . . . . . . . . . . . . . . . . . P3-189
DSPHFS (Display Hierarchical File Systems) DSPNWSSTG (Display Network Server Storage
Command . . . . . . . . . . . . . . . . . . . . . P3-124 Space) Command . . . . . . . . . . . . . . . P3-190
DSPHLPDOC (Display Help Document) Command P3-125 DSPNWSUSR (Display Network Server Users)
DSPIGCDCT (Display DBCS Conversion Dictionary) Command . . . . . . . . . . . . . . . . . . . . . P3-191
Command . . . . . . . . . . . . . . . . . . . . . P3-126 | DSPNWSUSRA (Display Network Server User
DSPIPLA (Display IPL Attributes) Command . . . P3-128 | Attributes) Command . . . . . . . . . . . . . . . P3-192
DSPIPXCCT (Display IPX Circuit) Command . . . P3-129 DSPOBJAUT (Display Object Authority) Command P3-193
DSPIPXD (Display IPX Description) Command . . P3-130 | DSPOBJD (Display Object Description) Command P3-195
DSPJOB (Display Job) Command . . . . . . . . . P3-131 DSPOPCLNK (Display OptiConnect Link Status)
DSPJOBD (Display Job Description) Command . . P3-133 Command . . . . . . . . . . . . . . . . . . . . . P3-198
DSPJOBLOG (Display Job Log) Command . . . . P3-134 DSPOPT (Display Optical) Command . . . . . . . P3-199
DSPJOBTBL (Display Job Tables) Command . . . P3-136 DSPOPTLCK (Display Optical Locks) Command . P3-202
| DSPJRN (Display Journal) Command . . . . . . . P3-137 DSPOPTSVR (Display Optical Server) Command . P3-203
| DSPJRNRCVA (Display Journal Receiver Attributes) DSPOVR (Display Override) Command . . . . . . P3-204
| Command . . . . . . . . . . . . . . . . . . . . . P3-148 DSPPDGPRF (Display Print Descriptor Group
DSPKBDMAP (Display Keyboard Map) Command P3-149 Profile) Command . . . . . . . . . . . . . . . . . P3-206
DSPLANADPP (Display Local Area Network Adapter DSPPFM (Display Physical File Member) Command P3-207
Profile) Command . . . . . . . . . . . . . . . . . P3-150 DSPPGM (Display Program) Command . . . . . . P3-209
DSPLANMLB (Display LAN Media Library) DSPPGMADP (Display Programs that Adopt)
Command . . . . . . . . . . . . . . . . . . . . . P3-151 Command . . . . . . . . . . . . . . . . . . . . . P3-211
DSPLANSTS (Display Local Area Network Status) DSPPGMREF (Display Program References)
Command . . . . . . . . . . . . . . . . . . . . . P3-152 Command . . . . . . . . . . . . . . . . . . . . . P3-213
DSPLIB (Display Library) Command . . . . . . . . P3-153 DSPPGMVAR (Display Program Variable)
DSPLIBD (Display Library Description) Command . P3-155 Command . . . . . . . . . . . . . . . . . . . . . P3-216
DSPLIBL (Display Library List) Command . . . . . P3-156 DSPPRB (Display Problem) Command . . . . . . P3-218
DSPLICKEY (Display License Key Information) DSPPSFCFG (Display Print Services Facility
Command . . . . . . . . . . . . . . . . . . . . . P3-157 Configuration) Command . . . . . . . . . . . . . P3-228
DSPLIND (Display Line Description) Command . . P3-159 DSPPTF (Display Program Temporary Fix)
DSPLNK (Display Object Links) Command . . . . P3-161 Command . . . . . . . . . . . . . . . . . . . . . P3-229
DSPLOG (Display Log) Command . . . . . . . . . P3-163 DSPPWRSCD (Display Power On/Off Schedule)
DSPMFSINF (Display Mounted File System Command . . . . . . . . . . . . . . . . . . . . . P3-231
Information) Command . . . . . . . . . . . . . . P3-166 DSPRCDLCK (Display Record Locks) Command . P3-232
DSPMNUA (Display Menu Attributes) Command . P3-167 DSPRCYAP (Display Recovery for Access Paths)
DSPMOD (Display Module) Command . . . . . . . P3-168 Command . . . . . . . . . . . . . . . . . . . . . P3-233
DSPMODD (Display Mode Description) Command P3-170 DSPRDBDIRE (Display Relational Database
DSPMODSRC (Display Module Source) Command P3-171 Directory Entry) Command . . . . . . . . . . . . P3-234
DSPMODSTS (Display Mode Status) Command . P3-172 DSPRMTDFN (Display Remote Definition)
DSPMSG (Display Messages) Command . . . . . P3-173 Command . . . . . . . . . . . . . . . . . . . . . P3-236
DSPMSGD (Display Message Descriptions) DSPSAVF (Display Save File) Command . . . . . P3-238
Command . . . . . . . . . . . . . . . . . . . . . P3-175 DSPSBSD (Display Subsystem Description)
DSPM36 (Display AS/400 Advanced 36 Machine) Command . . . . . . . . . . . . . . . . . . . . . P3-239
Command . . . . . . . . . . . . . . . . . . . . . P3-177 DSPSECA (Display Security Attributes) Command P3-240
DSPM36CFG (Display AS/400 Advanced 36 DSPSECAUD (Display Security Auditing Values)
Machine Configuration) Command . . . . . . . . P3-178 Command . . . . . . . . . . . . . . . . . . . . . P3-241
DSPNCK (Display Nickname) Command . . . . . P3-179 DSPSFWRSC (Display Software Resources)
DSPNETA (Display Network Attributes) Command P3-181 Command . . . . . . . . . . . . . . . . . . . . . P3-242
DSPNODGRP (Display Node Group) Command . P3-182 DSPSOCSTS (Display Sphere of Control Status)
DSPNTBD (Display NetBIOS Description) Command P3-183 Command . . . . . . . . . . . . . . . . . . . . . P3-244
DSPNWID (Display Network Interface Description) DSPSPLF (Display Spooled File) Command . . . . P3-245
Command . . . . . . . . . . . . . . . . . . . . . P3-184 DSPSRVA (Display Service Attributes) Command . P3-246

iv OS/400 CL Reference - Part 2 (Full Version)


DSPSRVPGM (Display Service Program) Command P3-247 ENDDBMON (End Database Monitor) Command . P3-306
DSPSRVSTS (Display Service Status) Command . P3-249 ENDDEVRCY (End Device Recovery) Command . P3-307
DSPSYSSTS (Display System Status) Command . P3-250 ENDDIRSHD (End Directory Shadowing) Command P3-308
DSPSYSVAL (Display System Value) Command . P3-251 ENDDO (End Do) Command . . . . . . . . . . . . P3-309
DSPS36 (Display System/36) Command . . . . . . P3-252 | ENDDSKRGZ (End Disk Reorganization) Command P3-310
| DSPTAP (Display Tape) Command . . . . . . . . P3-253 ENDGRPJOB (End Group Job) Command . . . . P3-311
DSPTAPCGY (Display Tape Category) Command P3-255 ENDHOSTSVR (End Host Server) Command . . . P3-312
DSPTAPCTG (Display Tape Cartridge) Command P3-256 ENDINP (End Input) Command . . . . . . . . . . P3-313
DSPTAPSTS (Display Tape Status) Command . . P3-258 ENDIPIIFC (End IP over IPX Interface) Command P3-314
DSPTRC (Display Trace) Command . . . . . . . . P3-259 ENDIPSIFC (End IP over SNA Interface) Command P3-315
DSPTRCDTA (Display Trace Data) Command . . P3-260 ENDIPX (End IPX) Command . . . . . . . . . . . P3-316
DSPTM (Display Trademarks) Command . . . . . P3-261 ENDIPXCCT (End IPX Circuit) Command . . . . . P3-317
DSPUDFS (Display User-Defined File System) ENDJOB (End Job) Command . . . . . . . . . . . P3-318
Command . . . . . . . . . . . . . . . . . . . . . P3-262 ENDJOBABN (End Job Abnormal) Command . . . P3-321
DSPUSRPMN (Display User Permission) Command P3-263 | ENDJRNAP (End Journal Access Path) Command P3-323
DSPUSRPRF (Display User Profile) Command . . P3-264 | ENDJRNPF (End Journal Physical File) Command P3-324
DSPUSRPRTI (Display User Print Information) ENDLINRCY (End Line Recovery) Command . . . P3-325
Command . . . . . . . . . . . . . . . . . . . . . P3-267 ENDMOD (End Mode) Command . . . . . . . . . P3-326
DSPWSUSR (Display Work Station User) Command P3-268 ENDMSF (End Mail Server Framework) Command P3-328
DUPDKT (Duplicate Diskette) Command . . . . . P3-269 ENDM36 (End AS/400 Advanced 36 Machine)
DUPOPT (Duplicate Optical) Command . . . . . . P3-271 Command . . . . . . . . . . . . . . . . . . . . . P3-329
| DUPTAP (Duplicate Tape) Command . . . . . . . P3-272 ENDNFSSVR (End Network File System Server)
EDTAUTL (Edit Authorization List) Command . . . P3-276 Command . . . . . . . . . . . . . . . . . . . . . P3-330
EDTBCKUPL (Edit Backup List) Command . . . . P3-277 ENDNWIRCY (End Network Interface Recovery)
EDTCPCST (Edit Check Pending Constraints) Command . . . . . . . . . . . . . . . . . . . . . P3-332
Command . . . . . . . . . . . . . . . . . . . . . P3-278 ENDNWSAPP (End Network Server Application)
EDTDLOAUT (Edit Document Library Object Command . . . . . . . . . . . . . . . . . . . . . P3-333
Authority) Command . . . . . . . . . . . . . . . P3-279 ENDPASTHR (End Pass-Through) Command . . . P3-335
EDTDOC (Edit Document) Command . . . . . . . P3-280 ENDPEX (End Performance Explorer) Command . P3-336
EDTIGCDCT (Edit DBCS Conversion Dictionary) ENDPFRCOL (End Performance Collection)
Command . . . . . . . . . . . . . . . . . . . . . P3-281 Command . . . . . . . . . . . . . . . . . . . . . P3-338
EDTLIBL (Edit Library List) Command . . . . . . . P3-283 ENDPFRMON (End Performance Monitor)
EDTOBJAUT (Edit Object Authority) Command . . P3-284 Command . . . . . . . . . . . . . . . . . . . . . P3-339
EDTQST (Edit Questions and Answers) Command P3-285 ENDPGM (End Program) Command . . . . . . . . P3-340
EDTRBDAP (Edit Rebuild of Access Paths) | ENDPGMPRF (End Program Profiling) Command . P3-341
Command . . . . . . . . . . . . . . . . . . . . . P3-286 ENDPJ (End Prestart Jobs) Command . . . . . . . P3-342
EDTRCYAP (Edit Recovery for Access Paths) ENDPRTEML (End Printer Emulation) Command . P3-344
Command . . . . . . . . . . . . . . . . . . . . . P3-287 ENDRCV (End Receive) Command . . . . . . . . P3-345
EDTS36PGMA (Edit System/36 Program Attributes) ENDRDR (End Reader) Command . . . . . . . . . P3-346
Command . . . . . . . . . . . . . . . . . . . . . P3-288 ENDRMTSPT (End Remote Support) Command . P3-347
EDTS36PRCA (Edit System/36 Procedure ENDRQS (End Request) Command . . . . . . . . P3-348
Attributes) Command . . . . . . . . . . . . . . . P3-289 ENDSBS (End Subsystem) Command . . . . . . . P3-349
EDTS36SRCA (Edit System/36 Source Attributes) ENDSRVJOB (End Service Job) Command . . . . P3-351
Command . . . . . . . . . . . . . . . . . . . . . P3-290 ENDSYS (End System) Command . . . . . . . . . P3-352
EDTWSOAUT (Edit Workstation Object Authority) ENDS36 (End System/36) Command . . . . . . . P3-354
Command . . . . . . . . . . . . . . . . . . . . . P3-291 ENDTCP (End TCP/IP) Command . . . . . . . . . P3-355
EJTEMLOUT (Eject Emulation Output) Command . P3-293 ENDTCPCNN (End TCP/IP Connection) Command P3-357
ELSE (Else) Command . . . . . . . . . . . . . . . P3-294 ENDTCPIFC (End TCP/IP Interface) Command . . P3-359
EMLPRTKEY (Emulate Printer Key) Command . . P3-296 ENDTCPPTP (End Point-to-Point TCP/IP) Command P3-360
ENDBCHJOB (End Batch Job) Command . . . . . P3-297 ENDTCPSVR (End TCP/IP Server) Command . . P3-362
ENDCLNUP (End Cleanup) Command . . . . . . . P3-298 ENDTIESSN (End Technical Information Exchange
ENDCMNSVR (End Communications Server) Session) Command . . . . . . . . . . . . . . . . P3-364
Command . . . . . . . . . . . . . . . . . . . . . P3-299 ENDTRPMGR (End Trap Manager) Command . . P3-365
ENDCMNTRC (End Communications Trace) ENDUSF (End Ultimedia System Facilities)
Command . . . . . . . . . . . . . . . . . . . . . P3-300 Command . . . . . . . . . . . . . . . . . . . . . P3-366
ENDCMTCTL (End Commitment Control) Command P3-301 ENDWTR (End Writer) Command . . . . . . . . . P3-367
ENDCPYSCN (End Copy Screen) Command . . . P3-302 ERASE (Remove Link) Command . . . . . . . . . P3-368
ENDCTLRCY (End Controller Recovery) Command P3-303 EXPORTFS (Change Network File System Export)
ENDDBG (End Debug) Command . . . . . . . . . P3-304 Command . . . . . . . . . . . . . . . . . . . . . P3-370
ENDDBGSVR (End Debug Server) Command . . . P3-305 FILDOC (File Document) Command . . . . . . . . P3-371

Contents v
GENCAT (Merge Message Catalog) Command . . P3-379 OVRICFF (Override with Intersystem
GO (Go to Menu) Command . . . . . . . . . . . . P3-380 Communications Function File) Command . . . . P3-523
GOTO (Go To) Command . . . . . . . . . . . . . P3-382 OVRMSGF (Override with Message File) Command P3-526
GRTACCAUT (Grant Access Code Authority) | OVRPRTF (Override with Printer File) Command . P3-527
Command . . . . . . . . . . . . . . . . . . . . . P3-383 OVRSAVF (Override with Save File) Command . . P3-544
GRTOBJAUT (Grant Object Authority) Command . P3-385 OVRTAPF (Override with Tape File) Command . . P3-547
GRTUSRAUT (Grant User Authority) Command . . P3-389 PGM (Program) Command . . . . . . . . . . . . . P3-557
GRTUSRPMN (Grant User Permission) Command P3-390 PING Command . . . . . . . . . . . . . . . . . . P3-559
GRTWSOAUT (Grant Workstation Object Authority) POSDBF (Position Database File) Command . . . P3-560
Command . . . . . . . . . . . . . . . . . . . . . P3-391 PRTADPOBJ (Print Adopting Objects) Command . P3-561
HLDCMNDEV (Hold Communications Device) PRTAFPDTA (Print Advanced Function Printer Data)
Command . . . . . . . . . . . . . . . . . . . . . P3-394 Command . . . . . . . . . . . . . . . . . . . . . P3-562
HLDDSTQ (Hold Distribution Queue) Command . . P3-395 PRTCMDUSG (Print Command Usage) Command P3-564
HLDJOB (Hold Job) Command . . . . . . . . . . . P3-396 PRTCMNSEC (Print Communications Security)
HLDJOBQ (Hold Job Queue) Command . . . . . . P3-398 Command . . . . . . . . . . . . . . . . . . . . . P3-566
HLDJOBSCDE (Hold Job Schedule Entry) PRTCMNTRC (Print Communications Trace)
Command . . . . . . . . . . . . . . . . . . . . . P3-399 Command . . . . . . . . . . . . . . . . . . . . . P3-567
HLDOUTQ (Hold Output Queue) Command . . . . P3-400 PRTDEVADR (Print Device Addresses) Command P3-570
HLDRDR (Hold Reader) Command . . . . . . . . P3-401 PRTDOC (Print Document) Command . . . . . . . P3-571
HLDSPLF (Hold Spooled File) Command . . . . . P3-402 PRTDSKINF (Print Disk Information) Command . . P3-581
HLDWTR (Hold Writer) Command . . . . . . . . . P3-404 PRTERRLOG (Print Error Log) Command . . . . . P3-583
IF (If) Command . . . . . . . . . . . . . . . . . . P3-405 PRTINTDTA (Print Internal Data) Command . . . . P3-587
INSFLMSVR (Install FlowMark Server) Command . P3-407 PRTIPSCFG (Print IP over SNA Configuration)
INSNWSAPP (Install Network Server Application) Command . . . . . . . . . . . . . . . . . . . . . P3-589
Command . . . . . . . . . . . . . . . . . . . . . P3-410 PRTJOBDAUT (Print Job Description Authority)
INSPTF (Install Program Temporary Fix) Command P3-413 Command . . . . . . . . . . . . . . . . . . . . . P3-590
INZDKT (Initialize Diskette) Command . . . . . . . P3-416 PRTPUBAUT (Print Publicly Authorized Objects)
INZDSTQ (Initialize Distribution Queue) Command P3-419 Command . . . . . . . . . . . . . . . . . . . . . P3-591
INZOPT (Initialize Optical) Command . . . . . . . P3-421 PRTPVTAUT (Print Private Authorities) Command P3-593
INZPCS (Initialize Client Access) Command . . . . P3-423 PRTQAUT (Print Queue Authority) Command . . . P3-595
INZPFM (Initialize Physical File Member) Command P3-425 PRTSBSDAUT (Print Subsystem Description
INZSYS (Initialize System) Command . . . . . . . P3-427 Authority ) Command . . . . . . . . . . . . . . . P3-596
INZTAP (Initialize Tape) Command . . . . . . . . P3-428 PRTSQLINF (Print Structured Query Language
IPXPING Command . . . . . . . . . . . . . . . . P3-432 Information) Command . . . . . . . . . . . . . . P3-597
LNKDTADFN (Link Data Definition) Command . . P3-433 PRTSWL (Print Stop Word List) Command . . . . P3-598
LODPTF (Load Program Temporary Fix) Command P3-435 | PRTSYSINF (Print System Information) Command P3-599
LODQSTDB (Load Question-and-Answer Database) PRTSYSSECA (Print System Security Attributes)
Command . . . . . . . . . . . . . . . . . . . . . P3-438 Command . . . . . . . . . . . . . . . . . . . . . P3-600
LODRUN (Load and Run Media Program) PRTTRGPGM (Print Trigger Program) Command . P3-601
Command . . . . . . . . . . . . . . . . . . . . . P3-439 PRTUSROBJ (Print User Objects) Command . . . P3-602
MD (Create Directory) Command . . . . . . . . . P3-442 PRTUSRPRF (Print User Profile) Command . . . . P3-603
MKDIR (Create Directory) Command . . . . . . . P3-445 PWRDWNSYS (Power Down System) Command . P3-605
MONMSG (Monitor Message) Command . . . . . P3-448 QRYDOCLIB (Query Document Library) Command P3-608
MOUNT (Add Mounted File System) Command . . P3-451 QRYDST (Query Distribution) Command . . . . . P3-617
MOV (Move) Command . . . . . . . . . . . . . . P3-452 QRYPRBSTS (Query Problem Status) Command . P3-620
MOVDOC (Move Document) Command . . . . . . P3-454 QRYTIEF (Query Technical Information Exchange
MOVE (Move) Command . . . . . . . . . . . . . . P3-456 File) Command . . . . . . . . . . . . . . . . . . P3-622
MOVOBJ (Move Object) Command . . . . . . . . P3-458 | QSH (Start QSH) Command . . . . . . . . . . . . P3-623
MRGMSGCLG (Merge Message Catalog) Command P3-460 RCLACTGRP (Reclaim Activation Group) Command P3-624
MRGMSGF (Merge Message File) Command . . . P3-463 RCLDDMCNV (Reclaim Distributed Data
MRGTCPHT (Merge TCP/IP Host Table) . . . . . P3-465 Management Conversations) Command . . . . . P3-625
NETSTAT Command . . . . . . . . . . . . . . . . P3-467 | RCLDLO (Reclaim Document Library Object)
OPNDBF (Open Database File) . . . . . . . . . . P3-468 | Command . . . . . . . . . . . . . . . . . . . . . P3-626
OPNQRYF (Open Query File) Command . . . . . P3-471 RCLLIB (Reclaim Library) Command . . . . . . . . P3-629
OVRDBF (Override with Database File) Command P3-499 RCLOPT (Reclaim Optical) Command . . . . . . . P3-630
OVRDKTF (Override with Diskette File) Command P3-506 RCLRSC (Reclaim Resources) Command . . . . . P3-631
OVRDSPF (Override with Display File) Command . P3-511 RCLSPLSTG (Reclaim Spool Storage) Command . P3-634
OVRICFDEVE (Override with Intersystem RCLSTG (Reclaim Storage) Command . . . . . . P3-635
Communications Function Program Device Entry) RCLTMPSTG (Reclaim Temporary Storage)
Command . . . . . . . . . . . . . . . . . . . . . P3-515 Command . . . . . . . . . . . . . . . . . . . . . P3-638

vi OS/400 CL Reference - Part 2 (Full Version)


RCVDST (Receive Distribution) Command . . . . P3-640 RMVEMLCFGE (Remove Emulation Configuration
RCVF (Receive File) Command . . . . . . . . . . P3-644 Entry) Command . . . . . . . . . . . . . . . . . P3-721
| RCVJRNE (Receive Journal Entry) Command . . . P3-646 RMVEWCBCDE (Remove Extended Wireless
RCVMSG (Receive Message) Command . . . . . P3-658 Controller Bar Code Entry) Command . . . . . . P3-722
RCVNETF (Receive Network File) Command . . . P3-667 RMVEWCPTCE (Remove Extended Wireless
RCVTIEF (Receive Technical Information Exchange Controller PTC Entry) Command . . . . . . . . . P3-723
File) Command . . . . . . . . . . . . . . . . . . P3-670 RMVEXITPGM (Remove Exit Program) Command P3-724
RD (Remove Directory) Command . . . . . . . . . P3-671 RMVFNTTBLE (Remove Font Table Entry)
REN (Rename) Command . . . . . . . . . . . . . P3-673 Command . . . . . . . . . . . . . . . . . . . . . P3-725
RETURN (Return) Command . . . . . . . . . . . P3-674 RMVFTRACNE (Remove Filter Action Entry)
RGZDLO (Reorganize Document Library Object) Command . . . . . . . . . . . . . . . . . . . . . P3-728
Command . . . . . . . . . . . . . . . . . . . . . P3-675 RMVFTRSLTE (Remove Filter Selection Entry)
RGZPFM (Reorganize Physical File Member) Command . . . . . . . . . . . . . . . . . . . . . P3-729
Command . . . . . . . . . . . . . . . . . . . . . P3-677 RMVICFDEVE (Remove Intersystem
RLSCMNDEV (Release Communications Device) Communications Function Program Device Entry)
Command . . . . . . . . . . . . . . . . . . . . . P3-680 Command . . . . . . . . . . . . . . . . . . . . . P3-730
RLSDSTQ (Release Distribution Queue) Command P3-681 RMVIPIADR (Remove IP over IPX Address)
RLSIFSLCK (Release Integrated File System Locks) Command . . . . . . . . . . . . . . . . . . . . . P3-731
Command . . . . . . . . . . . . . . . . . . . . . P3-682 RMVIPIIFC (Remove IP over IPX Interface)
RLSJOB (Release Job) Command . . . . . . . . . P3-683 Command . . . . . . . . . . . . . . . . . . . . . P3-732
RLSJOBQ (Release Job Queue) Command . . . . P3-684 RMVIPIRTE (Remove IP over IPX Route) Command P3-733
RLSJOBSCDE (Release Job Schedule Entry) RMVIPSIFC (Remove IP over SNA interface)
Command . . . . . . . . . . . . . . . . . . . . . P3-685 Command . . . . . . . . . . . . . . . . . . . . . P3-734
RLSOUTQ (Release Output Queue) Command . . P3-686 RMVIPSLOC (Remove IP over SNA Location Entry)
RLSRDR (Release Reader) Command . . . . . . P3-687 Command . . . . . . . . . . . . . . . . . . . . . P3-735
RLSRMTPHS (Release Remote Phase) Command P3-688 RMVIPSRTE (Remove IP over SNA Route)
RLSSPLF (Release Spooled File) Command . . . P3-689 Command . . . . . . . . . . . . . . . . . . . . . P3-736
RLSWTR (Release Writer) Command . . . . . . . P3-691 RMVIPXCCT (Remove IPX Circuit) Command . . P3-737
RMDIR (Remove Directory) Command . . . . . . . P3-692 RMVJOBQE (Remove Job Queue Entry) Command P3-738
RMVACC (Remove Access Code) Command . . . P3-694 RMVJOBSCDE (Remove Job Schedule Entry)
RMVAJE (Remove Autostart Job Entry) Command P3-695 Command . . . . . . . . . . . . . . . . . . . . . P3-739
RMVALRD (Remove Alert Description) Command . P3-696 | RMVJRNCHG (Remove Journaled Changes)
RMVAUTLE (Remove Authorization List Entry) | Command . . . . . . . . . . . . . . . . . . . . . P3-740
Command . . . . . . . . . . . . . . . . . . . . . P3-697 RMVLANADPI (Remove LAN Adapter Information)
RMVBKP (Remove Breakpoint) Command . . . . P3-698 Command . . . . . . . . . . . . . . . . . . . . . P3-744
RMVCCTRTE (Remove Circuit Route) Command . P3-699 RMVLANADPT (Remove LAN Adapter) Command P3-745
RMVCCTSRV (Remove Circuit Service) Command P3-700 RMVLIBLE (Remove Library List Entry) Command P3-746
RMVBNDDIRE (Remove Binding Directory Entry) RMVLICKEY (Remove License Key Information)
Command . . . . . . . . . . . . . . . . . . . . . P3-702 Command . . . . . . . . . . . . . . . . . . . . . P3-747
RMVCFGLE (Remove Configuration List Entries) RMVLNK (Remove Link) Command . . . . . . . . P3-749
Command . . . . . . . . . . . . . . . . . . . . . P3-703 RMVM (Remove Member) Command . . . . . . . P3-751
RMVCMNE (Remove Communications Entry) RMVMFS (Remove Mounted File System)
Command . . . . . . . . . . . . . . . . . . . . . P3-706 Command . . . . . . . . . . . . . . . . . . . . . P3-752
RMVCNNLE (Remove Connection List Entry) RMVMSG (Remove Message) Command . . . . . P3-753
Command . . . . . . . . . . . . . . . . . . . . . P3-708 RMVMSGD (Remove Message Description)
RMVCOMSNMP (Remove Community for SNMP) Command . . . . . . . . . . . . . . . . . . . . . P3-756
Command . . . . . . . . . . . . . . . . . . . . . P3-709 RMVNCK (Remove Nickname) Command . . . . . P3-757
RMVDIR (Remove Directory) Command . . . . . . P3-710 RMVNETJOBE (Remove Network Job Entry)
RMVDIRE (Remove Directory Entry) Command . . P3-711 Command . . . . . . . . . . . . . . . . . . . . . P3-758
RMVDIRSHD (Remove Directory Shadow System) RMVNETTBLE (Remove Network Table Entry)
Command . . . . . . . . . . . . . . . . . . . . . P3-713 Command . . . . . . . . . . . . . . . . . . . . . P3-759
RMVDLOAUT (Remove Document Library Object RMVNODLE (Remove Node List Entry) Command P3-760
Authority) Command . . . . . . . . . . . . . . . P3-714 RMVNWSSTGL (Remove Network Server Storage
RMVDSTLE (Remove Distribution List Entry) Link) command . . . . . . . . . . . . . . . . . . P3-762
Command . . . . . . . . . . . . . . . . . . . . . P3-716 RMVOPTCTG (Remove Optical Cartridge)
RMVDSTQ (Remove Distribution Queue) Command P3-718 Command . . . . . . . . . . . . . . . . . . . . . P3-763
RMVDSTRTE (Remove Distribution Route) RMVOPTSVR (Remove Optical Server) Command P3-764
Command . . . . . . . . . . . . . . . . . . . . . P3-719 RMVPCLTBLE (Remove Protocol Table Entry)
RMVDSTSYSN (Remove Distribution Secondary Command . . . . . . . . . . . . . . . . . . . . . P3-765
System Name) Command . . . . . . . . . . . . P3-720

Contents vii
RMVPEXDFN (Remove Performance Explorer ROLLBACK (Rollback) Command . . . . . . . . . P3-814
Definition) Command . . . . . . . . . . . . . . . P3-766 | RPCBIND (Start RPC Binder Daemon) Command P3-815
| RMVPFCST (Remove Physical File Constraint) | RPCGEN (Convert RPC Source) Command . . . . P3-816
| Command . . . . . . . . . . . . . . . . . . . . . P3-767 RPLDOC (Replace Document) Command . . . . . P3-817
RMVPFTRG (Remove Physical File Trigger) RQSORDAST (Request Order Assistance)
Command . . . . . . . . . . . . . . . . . . . . . P3-769 Command . . . . . . . . . . . . . . . . . . . . . P3-820
RMVPGM (Remove Program) Command . . . . . P3-771 RRTJOB (Reroute Job) Command . . . . . . . . . P3-821
RMVPJE (Remove Prestart Job Entry) Command . P3-772 RSMBKP (Resume Breakpoint) Command . . . . P3-822
| RMVPTF (Remove Program Temporary Fix) RSMCTLRCY (Resume Controller Recovery)
| Command . . . . . . . . . . . . . . . . . . . . . P3-773 Command . . . . . . . . . . . . . . . . . . . . . P3-823
RMVRDBDIRE (Remove Relational Database RSMDEVRCY (Resume Device Recovery)
Directory Entry) Command . . . . . . . . . . . . P3-775 Command . . . . . . . . . . . . . . . . . . . . . P3-824
RMVREXBUF (Remove REXX Buffer) Command . P3-776 RSMLINRCY (Resume Line Recovery) Command P3-825
RMVRMTDFN (Remove Remote Definition) RSMNWIRCY (Resume Network Interface
Command . . . . . . . . . . . . . . . . . . . . . P3-777 Recovery) Command . . . . . . . . . . . . . . . P3-826
RMVRPYLE (Remove Reply List Entry) Command P3-778 RST (Restore) Command . . . . . . . . . . . . . P3-827
RMVRTGE (Remove Routing Entry) Command . . P3-779 RSTAUT (Restore Authority) Command . . . . . . P3-832
RMVSCHIDXE (Remove Search Index Entry) RSTCFG (Restore Configuration) Command . . . P3-834
Command . . . . . . . . . . . . . . . . . . . . . P3-780 RSTDLO (Restore Document Library Object)
RMVSNILOC (Remove SNA over IPX Location) Command . . . . . . . . . . . . . . . . . . . . . P3-838
Command . . . . . . . . . . . . . . . . . . . . . P3-781 RSTLIB (Restore Library) Command . . . . . . . . P3-844
RMVSOCE (Remove Sphere of Control Entry) RSTLICPGM (Restore Licensed Program)
Command . . . . . . . . . . . . . . . . . . . . . P3-782 Command . . . . . . . . . . . . . . . . . . . . . P3-853
RMVSRVTBLE (Remove Service Table Entry) RSTOBJ (Restore Object) Command . . . . . . . P3-858
Command . . . . . . . . . . . . . . . . . . . . . P3-783 RSTSHF (Restore Bookshelf) Command . . . . . P3-867
| RMVSVRAUTE (Remove Server Authentication RSTS36F (Restore System/36 File) Command . . P3-869
| Entry) Command . . . . . . . . . . . . . . . . . P3-784 RSTS36FLR (Restore System/36 Folder) Command P3-874
RMVTAPCTG (Remove Tape Cartridge) Command P3-785 RSTS36LIBM (Restore System/36 Library Members)
RMVTCPHTE (Remove TCP/IP Host Table Entry) Command . . . . . . . . . . . . . . . . . . . . . P3-878
Command . . . . . . . . . . . . . . . . . . . . . P3-787 RSTUSFCNR (Restore Ultimedia System Facilities
RMVTCPIFC (Remove TCP/IP Interface) Command P3-788 Container) Command . . . . . . . . . . . . . . . P3-882
RMVTCPPORT (Remove TCP/IP Port Restriction) RSTUSRPRF (Restore User Profiles) Command . P3-885
Command . . . . . . . . . . . . . . . . . . . . . P3-789 RTVAUTLE (Retrieve Authorization List Entry)
RMVTCPRSI (Remove TCP/IP Remote System Command . . . . . . . . . . . . . . . . . . . . . P3-889
Information) Command . . . . . . . . . . . . . . P3-790 RTVBCKUP (Retrieve Backup) Command . . . . . P3-892
RMVTCPRTE (Remove TCP/IP Route) Command P3-791 RTVBNDSRC (Retrieve Binder Source) Command P3-894
| RMVTCPTBL (Remove TCP/IP Table) Command . P3-793 RTVCFGSRC (Retrieve Configuration Source)
RMVTRC (Remove Trace) Command . . . . . . . P3-794 Command . . . . . . . . . . . . . . . . . . . . . P3-896
RMVUSFCNNE (Remove Ultimedia System RTVCFGSTS (Retrieve Configuration Status)
Facilities Connection Entry) Command . . . . . . P3-796 Command . . . . . . . . . . . . . . . . . . . . . P3-898
RMVUSFDEVE (Remove Ultimedia System Facilities RTVCLNUP (Retrieve Cleanup) Command . . . . P3-900
Device Entry) Command . . . . . . . . . . . . . P3-797 RTVCLSRC (Retrieve CL Source) Command . . . P3-902
RMVUSFSVRE (Remove Ultimedia System Facilities RTVCURDIR (Retrieve Current Directory) Command P3-903
Server Entry) Command . . . . . . . . . . . . . P3-798 RTVDLOAUT (Retrieve Document Library Object
RMVWSE (Remove Work Station Entry) Command P3-799 Authority) Command . . . . . . . . . . . . . . . P3-904
RNM (Rename) Command . . . . . . . . . . . . . P3-801 RTVDLONAM (Retrieve Document Library Object
RNMCNNLE (Rename Connection List Entry) Name) Command . . . . . . . . . . . . . . . . . P3-908
Command . . . . . . . . . . . . . . . . . . . . . P3-802 RTVDOC (Retrieve Document) Command . . . . . P3-910
RNMDIRE (Rename Directory Entry) Command . . P3-803 RTVDSKINF (Retrieve Disk Information) Command P3-914
RNMDKT (Rename Diskette) Command . . . . . . P3-805 RTVDTAARA (Retrieve Data Area) Command . . . P3-915
RNMDLO (Rename Document Library Object) RTVGRPA (Retrieve Group Attributes) Command . P3-917
Command . . . . . . . . . . . . . . . . . . . . . P3-806 RTVJOBA (Retrieve Job Attributes) Command . . P3-920
RNMDSTL (Rename Distribution List) Command . P3-807 | RTVJRNE (Retrieve Journal Entry) Command . . . P3-925
RNMLANADPI (Rename Local Area Network RTVLIBD (Retrieve Library Description) Command P3-933
Adapter Information) Command . . . . . . . . . P3-808 RTVMBRD (Retrieve Member Description)
RNMM (Rename Member) Command . . . . . . . P3-809 Command . . . . . . . . . . . . . . . . . . . . . P3-934
RNMNCK (Rename Nickname) Command . . . . . P3-810 RTVMSG (Retrieve Message) Command . . . . . P3-938
RNMOBJ (Rename Object) Command . . . . . . . P3-811 RTVNETA (Retrieve Network Attributes) Command P3-941
RNMTCPHTE (Rename TCP/IP Host Table Entry) RTVOBJD (Retrieve Object Description) Command P3-947
Command . . . . . . . . . . . . . . . . . . . . . P3-813

viii OS/400 CL Reference - Part 2 (Full Version)


RTVPDGPRF (Retrieve Print Descriptor Group SBMDKTJOB (Submit Diskette Jobs) Command P3-1105
Profile) Command . . . . . . . . . . . . . . . . . P3-952 SBMFNCJOB (Submit Finance Job) Command . P3-1107
RTVPWRSCDE (Retrieve Power On/Off Schedule SBMJOB (Submit Job) Command . . . . . . . . P3-1109
Entry) Command . . . . . . . . . . . . . . . . . P3-953 SBMNETJOB (Submit Network Job) Command . P3-1116
RTVQMFORM (Retrieve Query Management Form) SBMNWSCMD (Submit Network Server Command)
Command . . . . . . . . . . . . . . . . . . . . . P3-954 Command . . . . . . . . . . . . . . . . . . . . P3-1118
RTVQMQRY (Retrieve Query Management Query) SBMRMTCMD (Submit Remote Command)
Command . . . . . . . . . . . . . . . . . . . . . P3-956 Command . . . . . . . . . . . . . . . . . . . . P3-1121
RTVSWLSRC (Retrieve Stop Word List Source) SETATNPGM (Set Attention Program) Command P3-1124
Command . . . . . . . . . . . . . . . . . . . . . P3-958 SETCSTDTA (Set Customization Data) Command P3-1126
RTVSYSVAL (Retrieve System Value) Command . P3-959 SETKBDMAP (Set Keyboard Map) Command . . P3-1127
| RTVSYSINF (Retrieve System Information) SETOBJACC (Set Object Access) Command . . P3-1129
| Command . . . . . . . . . . . . . . . . . . . . . P3-960 SETTAPCGY (Set Tape Category) Command . . P3-1131
RTVS36A (Retrieve System/36 Attributes) Command P3-961 SIGNOFF (Sign Off) Command . . . . . . . . . P3-1133
| RTVTBSRC (Retrieve Table Source) Command . . P3-963 SLTCMD (Select Command) Command . . . . . P3-1134
RTVUSRPRF (Retrieve User Profile) Command . . P3-965 SNDBRKMSG (Send Break Message) Command P3-1135
RTVUSRPRTI (Retrieve User Print Information) SNDDST (Send Distribution) Command . . . . . P3-1137
Command . . . . . . . . . . . . . . . . . . . . . P3-970 SNDDSTQ (Send Distribution Queue) Command P3-1147
RTVWSCST (Retrieve Work Station Customizing SNDEMLIGC (Send DBCS 3270PC Emulation
Object Source) Command . . . . . . . . . . . . P3-971 Code) Command . . . . . . . . . . . . . . . . P3-1148
RUNBCKUP (Run Backup) Command . . . . . . . P3-973 SNDF (Send File) Command . . . . . . . . . . . P3-1149
RUNLPDA (Run LPDA-2) Command . . . . . . . . P3-974 SNDFNCIMG (Send Finance Diskette Image)
RUNQRY (Run Query) Command . . . . . . . . . P3-977 Command . . . . . . . . . . . . . . . . . . . . P3-1151
RUNRMTCMD (Run Remote Command) Command P3-982 | SNDJRNE (Send Journal Entry) Command . . . P3-1152
RVKACCAUT (Revoke Access Code Authority) SNDMSG (Send Message) Command . . . . . . P3-1154
Command . . . . . . . . . . . . . . . . . . . . . P3-985 SNDNETF (Send Network File) Command . . . . P3-1156
RVKOBJAUT (Revoke Object Authority) Command P3-986 SNDNETMSG (Send Network Message) Command P3-1158
RVKPUBAUT (Revoke Public Authority) Command P3-990 SNDNETSPLF (Send Network Spooled File)
RVKUSRPMN (Revoke User Permission) Command P3-991 Command . . . . . . . . . . . . . . . . . . . . P3-1159
RVKWSOAUT (Revoke Workstation Object SNDNWSMSG (Send Network Server Message)
Authority) Command . . . . . . . . . . . . . . . P3-992 Command . . . . . . . . . . . . . . . . . . . . P3-1162
SAV (Save) Command . . . . . . . . . . . . . . . P3-995 SNDPGMMSG (Send Program Message)
SAVAPARDTA (Save APAR Data) Command . . P3-1002 Command . . . . . . . . . . . . . . . . . . . . P3-1163
SAVCFG (Save Configuration) Command . . . . P3-1003 | SNDPTFORD (Send Program Temporary Fix
SAVCHGOBJ (Save Changed Object) Command P3-1007 | Order) Command . . . . . . . . . . . . . . . . P3-1170
SAVDLO (Save Document Library Object) SNDRCVF (Send/Receive File) Command . . . . P3-1173
Command . . . . . . . . . . . . . . . . . . . . P3-1017 SNDRPY (Send Reply) Command . . . . . . . . P3-1175
SAVLIB (Save Library) Command . . . . . . . . P3-1027 SNDSRVRQS (Send Service Request) Command P3-1177
SAVLICPGM (Save Licensed Program) Command P3-1037 SNDTIEF (Send Technical Information Exchange
SAVOBJ (Save Object) Command . . . . . . . . P3-1041 File) Command . . . . . . . . . . . . . . . . . P3-1178
SAVRST (Save/Restore Objects) Command . . . P3-1051 SNDUSRMSG (Send User Message) Command P3-1179
SAVRSTCFG (Save/Restore Configuration) STATFS (Display Mounted File System
Command . . . . . . . . . . . . . . . . . . . . P3-1054 Information) Command . . . . . . . . . . . . . P3-1183
SAVRSTCHG (Save/Restore Changed Object) STRCLNUP (Start Cleanup) Command . . . . . P3-1184
Command . . . . . . . . . . . . . . . . . . . . P3-1056 STRCMNSVR (Start Communications Server)
SAVRSTDLO (Save/Restore Document Library Command . . . . . . . . . . . . . . . . . . . . P3-1185
Object) Command . . . . . . . . . . . . . . . . P3-1060 | STRCMNTRC (Start Communications Trace)
SAVRSTLIB (Save/Restore Library) Command . P3-1064 | Command . . . . . . . . . . . . . . . . . . . . P3-1186
SAVRSTOBJ (Save/Restore Object) Command . P3-1068 | STRCMTCTL (Start Commitment Control)
SAVSAVFDTA (Save Save File Data) Command P3-1072 | Command . . . . . . . . . . . . . . . . . . . . P3-1189
SAVSECDTA (Save Security Data) Command . P3-1076 STRCPYSCN (Start Copy Screen) Command . . P3-1192
SAVSHF (Save Bookshelf) Command . . . . . . P3-1080 STRDBG (Start Debug) Command . . . . . . . . P3-1194
SAVSTG (Save Storage) Command . . . . . . . P3-1083 STRDBGSVR (Start Debug Server) Command . P3-1199
SAVSYS (Save System) Command . . . . . . . P3-1085 STRDBMON (Start Database Monitor) Command P3-1200
SAVS36F (Save System/36 File) Command . . . P3-1089 STRDBRDR (Start Database Reader) Command P3-1202
SAVS36LIBM (Save System/36 Library Members) STRDIRSHD (Start Directory Shadowing)
Command . . . . . . . . . . . . . . . . . . . . P3-1095 Command . . . . . . . . . . . . . . . . . . . . P3-1204
SAVUSFCNR (Save Ultimedia System Facilities STRDKTRDR (Start Diskette Reader) Command P3-1205
Container) Command . . . . . . . . . . . . . . P3-1099 STRDKTWTR (Start Diskette Writer) Command . P3-1207
SBMDBJOB (Submit Database Jobs) Command P3-1103

Contents ix
| STRDSKRGZ (Start Disk Reorganization) STRTCP (Start TCP/IP) Command . . . . . . . . P3-1294
| Command . . . . . . . . . . . . . . . . . . . . P3-1209 STRTCPIFC (Start TCP/IP Interface) Command . P3-1296
STREDU (Start Education) Command . . . . . . P3-1210 STRTCPPTP (Start Point-to-Point TCP/IP)
STREML3270 (Start 3270 Display Emulation) Command . . . . . . . . . . . . . . . . . . . . P3-1297
Command . . . . . . . . . . . . . . . . . . . . P3-1211 STRTCPSVR (Start TCP/IP Server) Command . P3-1299
STRFMA (Start Font Management Aid) Command P3-1217 STRTIESSN (Start Technical Information Exchange
STRHOSTSVR (Start Host Server) Command . . P3-1218 Session) Command . . . . . . . . . . . . . . . P3-1302
STRIDD (Start Interactive Data Definition Utility) STRTRPMGR (Start Trap Manager) Command . P3-1303
Command . . . . . . . . . . . . . . . . . . . . P3-1220 STRUSF (Start Ultimedia System Facilities)
STRINFSKR (Start InfoSeeker) Command . . . . P3-1221 Command . . . . . . . . . . . . . . . . . . . . P3-1304
STRIPIIFC (Start IP over IPX Interface) Command P3-1223 TFRBCHJOB (Transfer Batch Job) Command . . P3-1305
STRIPSIFC (Start IP over SNA interface) TFRCTL (Transfer Control) Command . . . . . . P3-1307
Command . . . . . . . . . . . . . . . . . . . . P3-1224 TFRGRPJOB (Transfer to Group Job) Command P3-1309
STRIPX (Start IPX) Command . . . . . . . . . . P3-1225 TFRJOB (Transfer Job) Command . . . . . . . . P3-1311
STRIPXCCT (Start IPX Circuit) Command . . . . P3-1226 TFRM36 (Transfer to AS/400 Advanced 36
STRITF (Start Interactive Terminal Facility) Machine) Command . . . . . . . . . . . . . . . P3-1313
Command . . . . . . . . . . . . . . . . . . . . P3-1227 TFRPASTHR (Transfer Pass-Through) Command P3-1316
| STRJRNAP (Start Journal Access Path) Command P3-1228 TFRSECJOB (Transfer Secondary Job) Command P3-1317
| STRJRNPF (Start Journal Physical File) Command P3-1230 TRCCPIC (Trace CPI Communications) Command P3-1318
STRMOD (Start Mode) Command . . . . . . . . P3-1232 TRCICF (Trace ICF) Command . . . . . . . . . P3-1320
STRMSF (Start Mail Server Framework) Command P3-1233 TRCINT (Trace Internal) Command . . . . . . . P3-1322
STRM36 (Start AS/400 Advanced 36 Machine) TRCJOB (Trace Job) Command . . . . . . . . . P3-1326
Command . . . . . . . . . . . . . . . . . . . . P3-1234 TRCREX (Trace REXX) Command . . . . . . . P3-1329
STRM36PRC (Start AS/400 Advanced 36 Machine UNMOUNT (Remove Mounted File System)
Procedure) Command . . . . . . . . . . . . . . P3-1236 Command . . . . . . . . . . . . . . . . . . . . P3-1330
STRNFSSVR (Start Network File System Server) UPDPGM (Update Program) Command . . . . . P3-1331
Command . . . . . . . . . . . . . . . . . . . . P3-1238 UPDSRVPGM (Update Service Program)
| STRNWSAPP (Start Network Server Application) Command . . . . . . . . . . . . . . . . . . . . P3-1335
| Command . . . . . . . . . . . . . . . . . . . . P3-1240 UPDSYSINF (Update System Information)
STROBJCVN (Start Object Conversion) Command P3-1242 Command . . . . . . . . . . . . . . . . . . . . P3-1340
STRPASTHR (Start Pass-Through) Command . P3-1244 VFYAPPCCNN (Verify APPC Connection)
STRPEX (Start Performance Explorer) Command P3-1247 Command . . . . . . . . . . . . . . . . . . . . P3-1341
STRPFRCOL (Start Performance Collection) VFYCMN (Verify Communications) Command . . P3-1343
Command . . . . . . . . . . . . . . . . . . . . P3-1248 VFYIPXCNN (Verify IPX Connection) Command P3-1345
| STRPFRMON (Start Performance Monitor) VFYLNKLPDA (Verify Link Supporting LPDA-2)
| Command . . . . . . . . . . . . . . . . . . . . P3-1249 Command . . . . . . . . . . . . . . . . . . . . P3-1347
STRPGMMNU (Start Programmer Menu) VFYOPCCNN (Verify OptiConnect Connections)
Command . . . . . . . . . . . . . . . . . . . . P3-1254 Command . . . . . . . . . . . . . . . . . . . . P3-1349
| STRPGMPRF (Start Program Profiling) Command P3-1257 VFYOPT (Verify Optical) Command . . . . . . . P3-1350
STRPJ (Start Prestart Jobs) Command . . . . . P3-1258 VFYPRT (Verify Printer) Command . . . . . . . P3-1351
STRPRTEML (Start Printer Emulation) Command P3-1259 VFYTAP (Verify Tape) Command . . . . . . . . P3-1352
STRPRTWTR (Start Printer Writer) Command . . P3-1265 | VFYTCPCNN (Verify TCP/IP Connection)
STRQMPRC (Start Query Management Procedure) | Command . . . . . . . . . . . . . . . . . . . . P3-1353
Command . . . . . . . . . . . . . . . . . . . . P3-1269 VRYCFG (Vary Configuration) Command . . . . P3-1355
STRQMQRY (Start Query Management Query) WAIT (Wait) Command . . . . . . . . . . . . . . P3-1359
Command . . . . . . . . . . . . . . . . . . . . P3-1272 WRKACTJOB (Work with Active Jobs) Command P3-1360
STRQRY (Start Query) Command . . . . . . . . P3-1276 WRKALR (Work with Alerts) Command . . . . . P3-1363
| STRQSH (Start QSH) Command . . . . . . . . . P3-1277 WRKALRD (Work with Alert Descriptions)
STRQST (Start Question and Answer) Command P3-1279 Command . . . . . . . . . . . . . . . . . . . . P3-1366
STRREXPRC (Start REXX Procedure) Command P3-1280 WRKALRTBL (Work with Alert Tables) Command P3-1367
STRRMTSPT (Start Remote Support) Command P3-1282 | WRKAPPNSTS (Work with APPN Status)
STRRMTWTR (Start Remote Writer) Command . P3-1284 | Command . . . . . . . . . . . . . . . . . . . . P3-1369
STRSBS (Start Subsystem) Command . . . . . P3-1286 WRKAUT (Work with Authority) Command . . . P3-1371
STRSCHIDX (Start Search Index) Command . . P3-1288 WRKAUTL (Work with Authorization Lists)
STRSPTN (Start Support Network) Command . . P3-1289 Command . . . . . . . . . . . . . . . . . . . . P3-1372
STRSRVJOB (Start Service Job) Command . . . P3-1290 WRKBNDDIR (Work with Binding Directories)
STRSST (Start System Service Tools) Command P3-1291 Command . . . . . . . . . . . . . . . . . . . . P3-1373
STRS36 (Start System/36) Command . . . . . . P3-1292 WRKBNDDIRE (Work with Binding Directory
STRS36PRC (Start System/36 Procedure) Entries) Command . . . . . . . . . . . . . . . P3-1374
Command . . . . . . . . . . . . . . . . . . . . P3-1293 WRKBPTBL (Work with BOOTP Table) Command P3-1375

x OS/400 CL Reference - Part 2 (Full Version)


WRKCCTRTE (Work with Circuit Routes) WRKF (Work with Files) Command . . . . . . . P3-1422
Command . . . . . . . . . . . . . . . . . . . . P3-1376 WRKFLR (Work with Folders) Command . . . . P3-1424
WRKCCTSRV (Work with Circuit Services) WRKFNTRSC (Work with Font Resources)
Command . . . . . . . . . . . . . . . . . . . . P3-1377 Command . . . . . . . . . . . . . . . . . . . . P3-1425
WRKCFGL (Work with Configuration Lists) WRKFORMDF (Work with Form Definitions)
Command . . . . . . . . . . . . . . . . . . . . P3-1378 Command . . . . . . . . . . . . . . . . . . . . P3-1427
WRKCFGSTS (Work with Configuration Status) WRKFTR (Work with Filters) Command . . . . . P3-1428
Command . . . . . . . . . . . . . . . . . . . . P3-1379 WRKFTRACNE (Work with Filter Action Entries)
WRKCHTFMT (Work with Chart Formats) Command . . . . . . . . . . . . . . . . . . . . P3-1429
Command . . . . . . . . . . . . . . . . . . . . P3-1382 WRKFTRSLTE (Work with Filter Selection Entries)
WRKCLS (Work with Classes) Command . . . . P3-1384 Command . . . . . . . . . . . . . . . . . . . . P3-1430
WRKCMD (Work with Commands) Command . . P3-1386 WRKGSS (Work with Graphics Symbol Sets)
WRKCMTDFN (Work with Commitment Definitions) Command . . . . . . . . . . . . . . . . . . . . P3-1431
Command . . . . . . . . . . . . . . . . . . . . P3-1388 WRKHDWRSC (Work with Hardware Resources)
WRKCNNL (Work with Connection Lists) Command . . . . . . . . . . . . . . . . . . . . P3-1433
Command . . . . . . . . . . . . . . . . . . . . P3-1390 WRKHLDOPTF (Work with Held Optical Files)
WRKCNNLE (Work with Connection List Entries) Command . . . . . . . . . . . . . . . . . . . . P3-1434
Command . . . . . . . . . . . . . . . . . . . . P3-1391 WRKIPXCCT (Work with IPX Circuits) Command P3-1435
WRKCNTINF (Work with Contact Information) WRKIPXD (Work with IPX Descriptions) Command P3-1436
Command . . . . . . . . . . . . . . . . . . . . P3-1392 WRKIPXSTS (Work with IPX Status) Command . P3-1437
WRKCOSD (Work with Class-of-Service WRKJOB (Work with Job) Command . . . . . . P3-1438
Descriptions) Command . . . . . . . . . . . . P3-1393 WRKJOBD (Work with Job Descriptions) Command P3-1440
WRKCSI (Work with Communications Side WRKJOBQ (Work with Job Queues) Command . P3-1441
Information) Command . . . . . . . . . . . . . P3-1394 WRKJOBSCDE (Work with Job Schedule Entries)
WRKCTLD (Work with Controller Descriptions) Command . . . . . . . . . . . . . . . . . . . . P3-1442
Command . . . . . . . . . . . . . . . . . . . . P3-1396 | WRKJRN (Work with Journal) Command . . . . P3-1444
WRKDBFIDD (Work with Database Files Using | WRKJRNA (Work with Journal Attributes)
IDDU) Command . . . . . . . . . . . . . . . . P3-1397 | Command . . . . . . . . . . . . . . . . . . . . P3-1445
WRKDDMF (Work with Distributed Data WRKJRNRCV (Work with Journal Receivers)
Management Files) Command . . . . . . . . . P3-1398 Command . . . . . . . . . . . . . . . . . . . . P3-1446
WRKDEVD (Work with Device Descriptions) WRKLANADPT (Work with LAN Adapters)
Command . . . . . . . . . . . . . . . . . . . . P3-1400 Command . . . . . . . . . . . . . . . . . . . . P3-1447
WRKDEVTBL (Work with Device Tables) WRKLIB (Work with Libraries) Command . . . . P3-1448
Command . . . . . . . . . . . . . . . . . . . . P3-1402 WRKLICINF (Work with License Information)
WRKDIRE (Work with Directory Entries) Command P3-1403 Command . . . . . . . . . . . . . . . . . . . . P3-1449
WRKDIRLOC (Work with Directory Locations) WRKLNK (Work with Object Links) Command . . P3-1451
Command . . . . . . . . . . . . . . . . . . . . P3-1405 WRKMLBSTS (Work with Media Library Status)
WRKDIRSHD (Work with Directory Shadow Command . . . . . . . . . . . . . . . . . . . . P3-1453
Systems) Command . . . . . . . . . . . . . . P3-1406 WRKMNU (Work with Menus) Command . . . . P3-1454
WRKDOC (Work with Documents) Command . . P3-1407 WRKMOD (Work with Modules) Command . . . P3-1456
WRKDOCLIB (Work with Document Libraries) WRKMODD (Work with Mode Descriptions)
Command . . . . . . . . . . . . . . . . . . . . P3-1408 Command . . . . . . . . . . . . . . . . . . . . P3-1458
WRKDOCPRTQ (Work with Document Print WRKMSG (Work with Messages) Command . . P3-1459
Queue) Command . . . . . . . . . . . . . . . P3-1409 WRKMSGD (Work with Message Descriptions)
WRKDPCQ (Work with DSNX/PC Distribution Command . . . . . . . . . . . . . . . . . . . . P3-1461
Queues) Command . . . . . . . . . . . . . . . P3-1410 WRKMSGF (Work with Message Files) Command P3-1462
WRKDSKSTS (Work with Disk Status) Command P3-1411 WRKMSGQ (Work with Message Queues)
WRKDSTL (Work with Distribution Lists) Command P3-1412 Command . . . . . . . . . . . . . . . . . . . . P3-1464
WRKDSTQ (Work with Distribution Queues) WRKM36 (Work with AS/400 Advanced 36
Command . . . . . . . . . . . . . . . . . . . . P3-1413 Machines) Command . . . . . . . . . . . . . . P3-1466
WRKDTAARA (Work with Data Areas) Command P3-1414 WRKM36CFG (Work with AS/400 Advanced 36
WRKDTADCT (Work with Data Dictionaries) Machine Configurations) Command . . . . . . P3-1467
Command . . . . . . . . . . . . . . . . . . . . P3-1416 WRKNCK (Work with Nicknames) Command . . P3-1468
WRKDTADFN (Work with Data Definitions) WRKNETF (Work with Network Files) Command P3-1469
Command . . . . . . . . . . . . . . . . . . . . P3-1417 WRKNETJOBE (Work with Network Job Entries)
WRKDTAQ (Work with Data Queues) Command P3-1418 Command . . . . . . . . . . . . . . . . . . . . P3-1471
WRKEDTD (Work with Edit Descriptions) WRKNETTBLE (Work with Network Table Entry)
Command . . . . . . . . . . . . . . . . . . . . P3-1420 Command . . . . . . . . . . . . . . . . . . . . P3-1472
WRKENVVAR (Work with Environment Variables) WRKNODL (Work with Node Lists) Command . . P3-1473
Command . . . . . . . . . . . . . . . . . . . . P3-1421

Contents xi
WRKNODLE (Work with Node List Entries) WRKPSFCFG (Work with Print Services Facility
Command . . . . . . . . . . . . . . . . . . . . P3-1474 Configurations) Command . . . . . . . . . . . P3-1520
WRKNTBD (Work with NetBIOS Descriptions) WRKQMFORM (Work with Query Management
Command . . . . . . . . . . . . . . . . . . . . P3-1475 Forms) Command . . . . . . . . . . . . . . . . P3-1521
WRKNWID (Work with Network Interface WRKQMQRY (Work with Query Management
Description) Command . . . . . . . . . . . . . P3-1476 Queries) Command . . . . . . . . . . . . . . . P3-1522
WRKNWSALS (Work with Network Server Aliases) WRKQST (Work with Questions) Command . . . P3-1523
Command . . . . . . . . . . . . . . . . . . . . P3-1477 WRKRDBDIRE (Work with Relational Database
WRKNWSD (Work with Network Server Directory Entries) Command . . . . . . . . . . P3-1524
Descriptions) Command . . . . . . . . . . . . P3-1478 WRKRDR (Work with Readers) Command . . . P3-1525
| WRKNWSENR (Work with Network Server User WRKREGINF (Work with Registration Information)
| Enrollment) Command . . . . . . . . . . . . . P3-1479 Command . . . . . . . . . . . . . . . . . . . . P3-1526
WRKNWSSSN (Work with Network Server WRKRMTDFN (Work with Remote Definitions)
Sessions) Command . . . . . . . . . . . . . . P3-1482 Command . . . . . . . . . . . . . . . . . . . . P3-1527
WRKNWSSTG (Work with Network Server WRKRPYLE (Work with System Reply List Entries)
Storage Spaces) Command . . . . . . . . . P3-1483 Command . . . . . . . . . . . . . . . . . . . . P3-1528
| WRKNWSSTS (Work with Network Server Status) WRKRTDCFG (Work with RouteD Configuration)
| Command . . . . . . . . . . . . . . . . . . . . P3-1484 Command . . . . . . . . . . . . . . . . . . . . P3-1529
WRKOBJ (Work with Objects) Command . . . . P3-1486 WRKSBMJOB (Work with Submitted Jobs)
WRKOBJLCK (Work with Object Locks) Command P3-1488 Command . . . . . . . . . . . . . . . . . . . . P3-1530
WRKOBJOWN (Work with Objects by Owner) WRKSBS (Work with Subsystems) Command . . P3-1531
Command . . . . . . . . . . . . . . . . . . . . P3-1490 WRKSBSD (Work with Subsystem Descriptions)
WRKOBJPGP (Work with Objects by Primary Command . . . . . . . . . . . . . . . . . . . . P3-1532
Group) Command . . . . . . . . . . . . . . . . P3-1491 WRKSBSJOB (Work with Subsystem Jobs)
WRKOPTDIR (Work with Optical Directories) Command . . . . . . . . . . . . . . . . . . . . P3-1534
Command . . . . . . . . . . . . . . . . . . . . P3-1492 WRKSCHIDX (Work with Search Indexes)
WRKOPTF (Work with Optical Files) Command . P3-1494 Command . . . . . . . . . . . . . . . . . . . . P3-1535
WRKOPTVOL (Work with Optical Volumes) WRKSCHIDXE (Work with Search Index Entries)
Command . . . . . . . . . . . . . . . . . . . . P3-1496 Command . . . . . . . . . . . . . . . . . . . . P3-1537
WRKOPCACT (Work with OptiConnect Activity) WRKSHRPOOL (Work with Shared Storage Pools)
Command . . . . . . . . . . . . . . . . . . . . P3-1497 Command . . . . . . . . . . . . . . . . . . . . P3-1538
WRKORDINF (Work with Order Information) WRKSOC (Work with Sphere of Control) Command P3-1539
Command . . . . . . . . . . . . . . . . . . . . P3-1498 WRKSPADCT (Work with Spelling Aid Dictionaries)
WRKORDRQS (Work with Order Requests) Command . . . . . . . . . . . . . . . . . . . . P3-1540
Command . . . . . . . . . . . . . . . . . . . . P3-1499 WRKSPLF (Work with Spooled Files) Command P3-1542
WRKOUTQ (Work with Output Queues) Command P3-1500 WRKSPLFA (Work with Spooled File Attributes)
WRKOUTQD (Work with Output Queue Command . . . . . . . . . . . . . . . . . . . . P3-1544
Description) Command . . . . . . . . . . . . . P3-1501 WRKSRVPGM (Work with Service Programs)
WRKOVL (Work with Overlays) Command . . . P3-1502 Command . . . . . . . . . . . . . . . . . . . . P3-1545
WRKPAGDFN (Work with Page Definitions) WRKSRVPVD (Work with Service Providers)
Command . . . . . . . . . . . . . . . . . . . . P3-1503 Command . . . . . . . . . . . . . . . . . . . . P3-1546
WRKPAGSEG (Work with Page Segments) WRKSRVTBLE (Work with Service Table Entry)
Command . . . . . . . . . . . . . . . . . . . . P3-1504 Command . . . . . . . . . . . . . . . . . . . . P3-1547
WRKPCLTBLE (Work with Protocol Table Entry) WRKSYSSTS (Work with System Status)
Command . . . . . . . . . . . . . . . . . . . . P3-1506 Command . . . . . . . . . . . . . . . . . . . . P3-1548
WRKPFCST (Work with Physical File Constraints) WRKSYSVAL (Work with System Values)
Command . . . . . . . . . . . . . . . . . . . . P3-1507 Command . . . . . . . . . . . . . . . . . . . . P3-1549
WRKPFRCOL (Work with Performance Collection) WRKS36 (Work with System/36) Command . . . P3-1551
Command . . . . . . . . . . . . . . . . . . . . P3-1508 WRKS36PGMA (Work with System/36 Program
WRKPGM (Work with Programs) Command . . . P3-1509 Attributes) Command . . . . . . . . . . . . . . P3-1552
WRKPGMTBL (Work with Program Tables) WRKS36PRCA (Work with System/36 Procedure
Command . . . . . . . . . . . . . . . . . . . . P3-1511 Attributes) Command . . . . . . . . . . . . . . P3-1553
WRKPNLGRP (Work with Panel Groups) WRKS36SRCA (Work with System/36 Source
Command . . . . . . . . . . . . . . . . . . . . P3-1512 Attributes) Command . . . . . . . . . . . . . . P3-1554
WRKPRB (Work with Problems) Command . . . P3-1513 WRKTAPCTG (Work with Tape Cartridges)
WRKPRDINF (Work with Product Information) Command . . . . . . . . . . . . . . . . . . . . P3-1555
Command . . . . . . . . . . . . . . . . . . . . P3-1518 WRKTBL (Work with Tables) Command . . . . . P3-1557
WRKPRTSTS (Work with Printing Status) WRKTCPPTP (Work with Point-to-Point TCP/IP)
Command . . . . . . . . . . . . . . . . . . . . P3-1519 Command . . . . . . . . . . . . . . . . . . . . P3-1558

xii OS/400 CL Reference - Part 2 (Full Version)


WRKTCPSTS (Work with TCP/IP Network Status) WRKUSFSVRE (Work with Ultimedia System
Command . . . . . . . . . . . . . . . . . . . . P3-1560 Facilities Server Entries) Command . . . . . . P3-1564
WRKTIE (Work with Technical Information WRKUSRJOB (Work with User Jobs) Command P3-1565
Exchange) Command . . . . . . . . . . . . . . P3-1561 WRKUSRPRF (Work with User Profiles) Command P3-1567
WRKUSFCNNE (Work with Ultimedia System WRKUSRTBL (Work with User Tables) Command P3-1568
Facilities Connection Entries) Command . . . . P3-1562 WRKWTR (Work with Writers) Command . . . . P3-1569
WRKUSFDEVE (Work with Ultimedia System
Facilities Device Entries) Command . . . . . . P3-1563

Part 3. Appendixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P4-1

Appendix A. Expanded Parameter Descriptions . P4-3 Appendix B. Font, Character Identifier, and Other
AUT Parameter . . . . . . . . . . . . . . . . . . P4-3 Values Supported for Different Printers . . . . P4-23
CLS Parameter . . . . . . . . . . . . . . . . . . P4-3 Font Attributes . . . . . . . . . . . . . . . . . . . P4-23
COUNTRY Parameter . . . . . . . . . . . . . . . P4-4 Types of Fonts . . . . . . . . . . . . . . . . . . P4-23
EXCHTYPE Parameter . . . . . . . . . . . . . . P4-7 Font Substitution . . . . . . . . . . . . . . . . . . P4-27
FILETYPE Parameter . . . . . . . . . . . . . . . P4-7 How To Use the Font Substitution Charts . . . P4-27
FRCRATIO Parameter . . . . . . . . . . . . . . P4-8 Font Substitution and the 4019 Printer . . . . . P4-27
IGCFEAT Parameter . . . . . . . . . . . . . . . P4-8 Font Substitution by Font ID Range . . . . . . . P4-34
JOB Parameter . . . . . . . . . . . . . . . . . . P4-9 Character Identifier (CHRID) Values Supported P4-35
LABEL Parameter . . . . . . . . . . . . . . . . P4-10 Lines Per Inch (LPI) Values Supported . . . . . . P4-40
MAXACT Parameter . . . . . . . . . . . . . . . P4-11 Characters Per Inch (CPI) Values Supported . . . P4-40
OBJ Parameter . . . . . . . . . . . . . . . . . P4-11
OBJTYPE Parameter . . . . . . . . . . . . . . P4-12 Appendix C. Parameter Values Used for Testing
OUTPUT Parameter . . . . . . . . . . . . . . . P4-15 and Debugging . . . . . . . . . . . . . . . . . . P4-43
PRTTXT Parameter . . . . . . . . . . . . . . . P4-16 Program-Variable Description . . . . . . . . . . P4-43
REPLACE Parameter . . . . . . . . . . . . . . P4-16 Basing-Pointer Description . . . . . . . . . . . P4-43
Scheduling Priority Parameters (JOBPTY, Subscript Description . . . . . . . . . . . . . . P4-43
OUTPTY, PTYLMT) . . . . . . . . . . . . . . P4-17 Qualified-Name Description . . . . . . . . . . . P4-43
SEV Parameter . . . . . . . . . . . . . . . . . P4-18 Rules for Qualified Name Description . . . . . . . P4-44
SPLNBR Parameter . . . . . . . . . . . . . . . P4-19
TEXT Parameter . . . . . . . . . . . . . . . . . P4-19 Bibliography . . . . . . . . . . . . . . . . . . . . . . H-1
VOL Parameter . . . . . . . . . . . . . . . . . P4-19
WAITFILE Parameter . . . . . . . . . . . . . . P4-20 Index . . . . . . . . . . . . . . . . . . . . . . . . . . X-1

Figures
1. Special Values for Workstation Objects . . . P3-292 5. ASCII Record Length Vlaues (RCDLEN
2. Special Values for Workstation Objects . . . P3-392 Parameter) . . . . . . . . . . . . . . . . . . P3-551
3. ANSI First-Character Forms-Control Codes . P3-534 6. Absolute Block Length (BLKLEN) Ranges . . P3-551
4. EBCDIC Record Length Vlaues (RCDLEN 7. Required RCDLEN/BLKLEN/BUFOFSET
Parameter) . . . . . . . . . . . . . . . . . . P3-551 Relation . . . . . . . . . . . . . . . . . . . P3-553

Tables
1. Lengths of Data Types That Can Be Coded . P1-9 7. OUTFILFMT(*TYPE3) Journal Entry Format P3-142
2. Lengths of Data Types That Cannot Be Coded P1-9 8. OUTFILFMT(*TYPE4) Journal Entry Format P3-143
3. DSPFD Type, File Attribute, Output File, and 9. Range of Values for ENTDTALEN Parameter P3-145
Record Format Combinations . . . . . . . . P3-112 10. Range of Values for NULLINDLEN Parameter P3-146
4. Physical File Field Values . . . . . . . . . . P3-122 11. DSPPRB Fields for Basic Problem Data
5. OUTFILFMT(*TYPE1) Journal Entry Format P3-142 (TYPE(*BASIC)) . . . . . . . . . . . . . . . P3-222
6. OUTFILFMT(*TYPE2) Journal Entry Format P3-142

Contents xiii
12. DSPPRB Fields for Possible Cause Data 30. NULLINDLEN(field-length) Journal Entry
(TYPE(*CAUSE)) . . . . . . . . . . . . . . . P3-224 Format for ENTFMT(*TYPE4) . . . . . . . . P3-655
13. DSPPRB Fields for Program Fix Data 31. NULLINDLEN(*VARLEN field-length) Journal
(TYPE(*FIX)) . . . . . . . . . . . . . . . . . P3-225 Entry Format for ENTFMT(*TYPE3) . . . . . P3-655
14. DSPPRB Fields for User Text Data 32. NULLINDLEN(*VARLEN field-length) Journal
(TYPE(*USRTXT)) . . . . . . . . . . . . . . P3-226 Entry Format for ENTFMT(*TYPE4) . . . . . P3-656
15. DSPPRB Fields for Supporting Data Identifier 33. Keyboard Mapping . . . . . . . . . . . . . . P3-876
Data (TYPE(*SPTDTA)) . . . . . . . . . . . P3-226 34. Keyboard Mapping . . . . . . . . . . . . . P3-1215
16. Valid Sector Size . . . . . . . . . . . . . . . P3-417 35. Actions Taken by the System When an Exit
17. Format for 5.25 Inch Diskette . . . . . . . . P3-418 Program Is Called . . . . . . . . . . . . . P3-1255
18. Keyboard Mapping . . . . . . . . . . . . . . P3-423 36. Keyboard Mapping . . . . . . . . . . . . . P3-1261
19. Language Feature Identifiers . . . . . . . . P3-424 | 37. Trace Code Table . . . . . . . . . . . . . P3-1323
20. Contents of the Files Before the Merge . . . P3-464 38. ISO X.400 Country Codes . . . . . . . . . . . P4-4
21. Contents of the Files After the Merge . . . . P3-464 39. DBCS Features Configurable on the IGCFEAT
22. Contents of the Files Before the Merge . . . P3-464 Parameter . . . . . . . . . . . . . . . . . . . P4-9
23. Contents of the Files After the Merge . . . . P3-464 40. Predefined Values and Default Library
24. Query Field Structure . . . . . . . . . . . . P3-482 Locations for OS/400 Object Types . . . . . P4-12
25. *TYPE1 Journal Entry Format . . . . . . . . P3-653 41. Object Types Used by Commands Containing
26. *TYPE2 Journal Entry Format . . . . . . . . P3-653 the OBJTYPE Parameter . . . . . . . . . . P4-14
27. NULLINDLEN(*ENTFMT) Journal Entry 42. Font Information . . . . . . . . . . . . . . . P4-24
Format for ENTFMT(*TYPE3) . . . . . . . . P3-654 43. Font Substitution . . . . . . . . . . . . . . . P4-28
28. NULLINDLEN(*ENTFMT) Journal Entry 44. Font Substitution by Font ID Range. . . . . . P4-35
Format for ENTFMT(*TYPE4) . . . . . . . . P3-654 45. CHRID Values and Applicable Printers (CHRID
29. NULLINDLEN(field-length) Journal Entry Parameter) . . . . . . . . . . . . . . . . . . P4-35
Format for ENTFMT(*TYPE3) . . . . . . . . P3-655 46. Lines per Page (LPI Parameter) . . . . . . . P4-40
47. Characters per Line (CPI Parameter) . . . . P4-41

xiv OS/400 CL Reference - Part 2 (Full Version)


Part 1. Basic AS/400 Control Language Information

 Copyright IBM Corp. 1997, 1998 P1-1


Chapter 1. Command Definition Statements . . . P1-3 ELEM (Element) Statement . . . . . . . . . . . . . P1-7
Command Definition Statements . . . . . . . . . . . P1-3 PARM (Parameter) Statement . . . . . . . . . . . P1-16
Creating User-Defined Commands . . . . . . . . . . P1-3 PMTCTL (Prompt Control) Statement . . . . . . . P1-27
Command Definition Statement Descriptions . . . . P1-3 QUAL (Qualifier) Statement . . . . . . . . . . . . P1-28
CMD (Command) Statement . . . . . . . . . . . . . P1-4 QUAL (Qualifier) Example . . . . . . . . . . . . . P1-33
DEP (Dependent) Statement . . . . . . . . . . . . . P1-5

P1-2 OS/400 CL Reference - Part 2 (Full Version)


Command Definition Statements

Chapter 1. Command Definition Statements


only refer to parameters that have been previously defined.
Command Definition Statements These statements can appear in any order. The CL Pro-
gramming book contains a complete description of how to
The AS/400 control program lets users define a command
use these statements to define a command.
that calls a program to perform some function. Users can
define commands by using a command definition statement. Only one command can be defined in each source member
The defined command can include the following: in the source file. The CRTCMD command is run to create
Ÿ Keyword notation parameters for passing data to pro- the command definition object from the command definition
grams statements in one source file member. Other users can then
be authorized to use the new command by the Grant Object
Ÿ Default values for omitted parameters
Authority (GRTOBJAUT) command or the Edit Object
Ÿ Parameter validity checking so the program performing Authority (EDTOBJAUT) command.
the function will have correct input
Ÿ Prompt text for prompting interactive users
Command Definition Statement
Descriptions
Creating User-Defined Commands The command definition statement of each command con-
tains one or more of the following command statements:
Users can define a command by entering command definition
statements into a source file and running a Create Command Ÿ CMD (Command)
(CRTCMD) command using the source file as input. One Ÿ DEP (Dependent)
and only one Command (CMD) statement must be some- Ÿ ELEM (Element)
where in the source file. A Parameter (PARM) statement Ÿ PARM (Parameter)
must be provided for each parameter that appears on the Ÿ PMTCTL (Prompt Control)
command being created. If any special keyword relation- Ÿ QUAL (Qualifier)
ships need checking, the Dependent (DEP) statement is These command statements are listed (in alphabetical order)
used to define the relationships. The DEP statement can and described in this section.

 Copyright IBM Corp. 1997, 1998 P1-3


CMD (Command)

CMD (Command) Statement


The Command (CMD) statement specifies the prompt text for the command being created. The prompt text is displayed at a
work station when a user requests prompting while entering the command that is being defined. The CMD statement can be
anywhere in the source file referred to by the Create Command (CRTCMD) command; one and only one CMD statement must
be used in the source file, even if no prompt text is specified for the created command.

┌─\NONE──────────────┐
55──CMD──PROMPT──(──┼─message-identifier─┼──)──────────────────────────────────────────────────────────────────────────────────5%
└─'prompt-text'──────┘

PROMPT Parameter acters, for the prompt text that is shown when the
Specifies the prompt text, if any, that is included in the command is being prompted. If a message having the
heading (title) of the prompt display for the command specified identifier cannot be found in the message file
being defined. The prompt text further describes the specified in the PMTFILE parameter of the Create
name of the command. For example, in the CRTLIB Command (CRTCMD) command, the message identifier
prompt heading, “Create Library (CRTLIB) Prompt,” the itself is used as the prompt text.
words Create Library would be specified as the prompt
'prompt-text': Specify the prompt text that is displayed
text in this PROMPT parameter.
during the command prompting. It must be a character
Note: Prompt text for each of the parameters in this string of no more than 30 characters, enclosed in apos-
command can be specified in the PROMPT trophes.
parameters of the PARM, ELEM, and QUAL
Note: Variables cannot be coded for this parameter.
command definition statements. They specify
the prompt text for the parameters, just as the
PROMPT parameter in the CMD statement spec-
ifies the prompt text for the command (in the
Example
heading). CMD PROMPT(UCDððð1)
*NONE: No prompt text is included in the displayed
heading of the prompt when the command is being This statement describes a command that is prompted with
prompted. additional text in the display heading; the prompt text comes
from the message identified by UCD0001.
message-identifier: Specify the message identifier that
specifies the message, containing no more than 30 char-

P1-4 OS/400 CL Reference - Part 2 (Full Version)


DEP (Dependent)

DEP (Dependent) Statement


The Dependent (DEP) statement defines a required relationship between parameters and parameter values that must be
checked. This relationship can refer to either the specific value of a parameter or parameters or to the required presence of
parameters.

If a parameter has a default value and the parameter is not specified, the checking differs depending on whether the DEP
statement is performing a specification check or a relational check. If a specification check is made on an unspecified param-
eter (checking for the presence of a value for that parameter), the system assumes that no value was specified, and the default
value is not used. If a relational check is made on an unspecified parameter, the default value is used as the parameter value.

55──DEP──CTL──(──┬─\ALWAYS───────────────────────────────────────────────────┬──)───────────────────────────────────────────────5
(1) ───────────────────────────────────────────┤
├─keyword-name───
└─&keyword-name──relational-operator───(1) ─┬─value───────────┬─┘
(2) ┘
└─&keyword-name───
┌──
─────────────────────────────────────────────────────────────┐
5──PARM─── 6┬─keyword-name───
(1) ─(─── (1) ───────────────────────────────────────────┬┴───
(3) ──)─────────────────────────────────────────────5
└─&keyword-name──relational-operator─── (1) ─┬─value───────────┬─┘
(2) ┘
└─&keyword-name───
5──┬─────────────────────────────────────────────────────┬──┬─────────────────────────────────────┬────────────────────────────5%
│ ┌─\ALL─────────────────────────────┐ │ │ ┌─\NONE──────────────┐ │
└─NBRTRUE──(──┴─relational-operator──number-true─┴──)─┘ └─MSGID──(──┴─message-identifier─┴──)─┘
Notes:
1 Must not be defined as TYPE(*NULL).

2 Must not be defined as TYPE(*NULL) or PASSVAL(*NULL).

3 A maximum of 25 repetitions

CTL Parameter The value must be no longer than 32 characters. The


Specifies the controlling conditions that must be true keyword must not be defined as TYPE(*NULL).
before the parameter dependencies defined in the
If the value being tested against has been specified as a
PARM statement must be true. The first keyword speci-
special value or single value (SPCVAL or SNGVAL
fied identifies the controlling parameter. The controlling
parameters of the PARM statement), the to-value must
condition can be specified either by a keyword name
be used rather than the from-value.
only or by a keyword name and a test relationship that
determines whether the controlling condition requires the The keyword name must be preceded by an ampersand
presence of the parameters it is dependent upon. The (&) to indicate that the value of the keyword is tested if
relationship between the controlling parameter and a the relational operator and value are specified; the
specified value can be tested to determine whether the ampersand must not be used if the relational operator
condition specified is met. If it is, the parameters that and value are not specified.
the controlling parameter is dependent upon must meet If the controlling parameter is a qualified name, the first
the requirements specified in the PARM and NBRTRUE qualifier will be used for the compare value. If the con-
statements. trolling parameter is a list, then the first element of the
*ALWAYS: The parameter dependency is always list will be used for the compare value. If the first
checked, regardless of the form of the command. element is a list, then the first element of that list is
used, and so on.
keyword-name: Specify the keyword name of the
parameter for which a value must be specified to control (&keyword-name relational-operator &keyword-name):
dependency. The keyword name is the name of the Specify the keyword name of the controlling parameter
parameter that is specified by the KWD parameter on followed by a relational operator (such as *EQ) and the
the PARM statement defining it. If the keyword is speci- keyword name of another parameter whose value is
fied, the parameter dependency is checked. The compared with the value of the controlling parameter.
keyword must not be defined as TYPE(*NULL). The keywords must not be defined as TYPE(*NULL) or
with PASSVAL(*NULL) specified.
&keyword-name relational-operator value: Specify the
keyword name of the controlling parameter followed by a PARM Parameter
relational operator (such as *LE or *EQ) and a value to Specifies the parameter dependencies that must be
be tested. If the tested condition is met, the parameters tested if the controlling conditions defined by the CTL
that the controlling parameter is dependent upon must parameter are true. The dependencies can be one or all
meet the requirements specified in the PARM statement. of the following:

Chapter 1. Command Definition Statements P1-5


DEP (Dependent)

Ÿ The names of one or more parameters that will be for NBRTRUE, then two, and only two, of the parameter
tested to determine if they are present. dependencies must be true for the PARM statement.
Ÿ One or more test relationships of keyword values to Note: Variables cannot be coded for this parameter.
the values of other keywords or constants. A
MSGID Parameter
maximum of 25 parameters can be specified for the
Specifies the message identifier of an error message in
PARM parameter. Keywords specified in this
a message file that is sent to the user if all the specified
parameter must not be defined as TYPE(*NULL).
parameter dependencies have not been satisfied.
keyword-name: Specify the keyword name of each *NONE: No special message is sent. Instead, a
parameter that must have a value specified for it.
message generated by the command analyzer is sent to
&keyword-name relational-operator value: Specify the the user.
keyword name of each parameter followed by a rela-
message-identifier: Specify the message identifier of the
tional operator and a value to be tested. An ampersand
error message sent to the user if all the dependencies
must precede the keyword name to indicate that the
for this statement are not met. Messages whose identi-
value of the keyword is tested. The value specification
fiers begin with the 3-character prefixes CPF or CPD are
must be no longer than 32 characters.
retrieved from the IBM-supplied message file
If the value being used for testing comparison has been QCPFMSG. All other messages specified here are
specified as a special value or single value (SPCVAL or retrieved from the message file identified by the MSGF
SNGVAL parameters of the PARM statement), the to- parameter on the CRTCMD command which is used to
value must be used rather than the from-value. create the command being defined with these dependen-
cies.
If the controlling parameter is a qualified name, the first
qualifier will be used for the compare value. If the con- Note: Variables cannot be coded for this parameter.
trolling parameter is a list, then the first element of the
list will be used for the compare value. If the first
element is a list, then the first element of that list is Examples
used, and so on. DEP CTL(&TYPE \EQ LIST) PARM(ELEMLIST)
&keyword-name relational-operator &keyword-name:
If TYPE(LIST) is specified, the ELEMLIST parameter must be
Specify the keyword name of one parameter followed by
specified.
a relational operator and the keyword name of another
parameter whose value is compared with the value of DEP CTL(FILE) PARM(VOL LABEL) NBRTRUE(\EQ 2)
the first parameter. A keyword defined with
If the FILE parameter is specified, both the VOL and LABEL
PASSVAL(*NULL) cannot be specified.
parameters must be specified.
NBRTRUE Parameter DEP CTL(GLOOP) PARM(J1 D J2) NBRTRUE(\EQ 1)
Specifies the number of parameter dependencies
defined in the associated PARM statement that must be If the GLOOP parameter is specified, a value must be speci-
true to satisfy the control condition. fied for one (and only one) of the J1, D, and J2 parameters.
*ALL: All the parameter dependencies specified in the DEP CTL(&LIB \EQ MYLIB)
PARM statement must be true to satisfy the control con- PARM((&PASSWORD \eq XYZ5)
dition. (&USRPRF \EQ BðBJ))
NBRTRUE(\GE 1) MSGID(MSGðð1)
relational-operator number-true: Specify a relational
operator and a number that specifies the number of If the LIB parameter equals MYLIB, then the PASSWORD
parameter dependencies that must be true to satisfy the parameter must equal XYZ5, or the USRPRF parameter
specified relation. For example, if (*EQ 2) is specified must equal BOBJ. Otherwise, message MSG001 will be
sent to the user.

P1-6 OS/400 CL Reference - Part 2 (Full Version)


ELEM (Element)

ELEM (Element) Statement


Element (ELEM) statements are used to define the elements of a mixed list (list elements) parameter on a command. A list
parameter is a parameter that accepts multiple values that are passed together as consecutive values pointed to by a single
keyword. The values are preceded by a 2-byte binary value that indicates the number of elements defined for the parameter.
CL programs do not support binary values in variables, but you can use the %BINARY built-in function to examine the length.

A list element is the value that represents one value among a group of values organized in a specific order in a list. If all of the
list elements are not of the same type, one ELEM statement must be used for each element that appears in the list being
defined. If all the elements are of the same type (a simple list), individual ELEM statements are not required. For a simple list,
specify the number of elements in the list on the MAX parameter of the PARM statement.

The order in which the ELEM statements are entered into the source file determines the position of the elements in the list.
The first ELEM statement (for the first list element) must have a statement label that matches TYPE (statement-label) on the
PARM or ELEM statements for the same list. The remaining ELEM statements in the list must be unlabeled. Lists of elements
having different values can be nested to the depth of three levels including the highest level. A maximum of 300 elements can
be included in one list.
Note: The ELEM statement contains certain parameters and predefined values that can be used only when an IBM-supplied
command processing program (CPP) is called by the command being defined. Because there are limitations in some
high-level languages, these values may not be useful in the definition statements of user-defined commands. If the
entire parameter is for IBM-supplied commands only, these parameters and values are identified by placing the phrase,
“(For IBM-supplied commands)” immediately following the parameter keyword or the predefined value to which it
applies.
55──ELEM──TYPE(──┬─\DEC────────────┬──)──┬────────────────────────────────────────┬──┬─────────────────────┬────────────────────5
├─\LGL────────────┤ └─LEN(──┬─length────────────────────┬──)─┘ └─CONSTANT(──value──)─┘
├─\CHAR───────────┤ └─length──decimal-positions─┘
├─\NAME───────────┤
├─\SNAME──────────┤
├─\CNAME──────────┤
├─\PNAME──────────┤
├─\GENERIC────────┤
├─\DATE───────────┤
├─\TIME───────────┤
├─\HEX────────────┤
├─\ZEROELEM───────┤
├─\INT2───────────┤
├─\INT4───────────┤
├─\VARNAME────────┤
└─statement-label─┘
5──┬────────────────────┬──┬────────────────────┬──┬───────────────────────────────────────────────────────────┬────────────────5
│ ┌─\NO──┐ │ └─DFT(────value────)─┘ │ ┌──
───────┐ │
└─RSTD(──┴─\YES─┴──)─┘ ├─VALUES(───6─value─┴───
(1) ──)──────────────────────────────────┤
├─REL(──relational-operator──┬─&keyword-name─┬──)───────────┤
│ └─value─────────┘ │
└─RANGE(──┬─&from-keyword-value─┬──┬─&to-keyword-value─┬──)─┘
└─lower-limit-value───┘ └─upper-limit-value─┘
5──┬───────────────────────────────────────────────────────┬──┬───────────────────────────────────────────────────────┬─────────5
│ ┌──
────────────────────────────────────┐ │ │ ┌──
────────────────────────────────────┐ │
└─SPCVAL(───6─(────from-value────┬──────────┬──)─┴─── 6─(────from-value────┬──────────┬──)─┴───
(1) ──)─┘ └─SNGVAL(─── (1) ──)─┘
└─to-value─┘ └─to-value─┘
5──┬─────────────────────────────┬──┬─────────────────────────────┬──┬────────────────────────┬──┬──────────────────────┬───────5
│ ┌─ð──────────────┐ │ │ ┌─1──────────────┐ │ │ ┌─\YES─┐ │ │ ┌─\YES─┐ │
└─MIN(──┴─minimum-number─┴──)─┘ └─MAX(──┴─maximum-number─┴──)─┘ └─ALWUNPRT(──┴─\NO──┴──)─┘ └─ALWVAR(──┴─\NO──┴──)─┘
5──┬───────────────────┬──┬──────────────────────┬──┬───────────────────────┬──┬────────────────────┬───────────────────────────5
│ ┌─\NO──┐ │ │ ┌─\NO──┐ │ │ ┌─\NO─────┐ │ │ ┌─\NO──┐ │
└─PGM(──┴─\YES─┴──)─┘ └─DTAARA(──┴─\YES─┴──)─┘ └─FILE(──┼─\IN─────┼──)─┘ └─FULL(──┴─\YES─┴──)─┘
├─\OUT────┤
├─\UPD────┤
├─\INOUT──┤
└─\UNSPFD─┘
5──┬────────────────────┬──┬─────────────────────────────────────┬──┬───────────────────────┬──┬────────────────────────┬───────5
│ ┌─\NO──┐ │ │ ┌─\NO───────────────────┐ │ │ ┌─\NO──┐ │ │ ┌─\MONO────┐ │
└─EXPR(──┴─\YES─┴──)─┘ │ │ ┌─\INT2─┐ │ │ └─PASSATR(──┴─\YES─┴──)─┘ └─CASE(──┴─\MIXED───(3) ┴──)─┘
(2)
└─VARY(──┴───\YES──────┼───────┼─┴──)─┘
└─\INT4─┘

Chapter 1. Command Definition Statements P1-7


ELEM (Element)

5──┬───────────────────────────┬──┬────────────────────────────────────┬────────────────────────────────────────────────────────5
│ ┌─\YES────┐ │ │ ┌─\VALUES────────────┐ │
└─DSPINPUT(──┼─\PROMPT─┼──)─┘ └─CHOICE(──┼─\NONE──────────────┼──)─┘
└─\NO─────┘ ├─\PGM───────────────┤
├─message-identifier─┤
└─'choices-text'─────┘
5──┬────────────────────────────────────────────────────┬──┬────────────────────────────────────┬──────────────────────────────5%
│ ┌─\NONE───────────────────────────┐ │ │ ┌─\NONE──────────────┐ │
│ │ ┌─\LIBL/────────┐ │ │ └─PROMPT(──┼─message-identifier─┼──)─┘
└─CHOICEPGM(──┴─┼───────────────┼──program-name─┴──)─┘ └─'prompt-text'──────┘
├─\CURLIB/──────┤
└─library-name/─┘
Notes:
1 A maximum of 300 repetitions

2 *YES is valid only for the following parameter types: *CHAR, *NAME, *SNAME, *CNAME, *PNAME, *GENERIC, *LGL,

*VARNAME, *CMD, *CMDSTR, and *X.


3 This value can be specified only for *CHAR and *PNAME parameter types.

TYPE Parameter Path names are used in the integrated file system. For
Specifies the type of list element being defined. The more information on using the list element *PNAME, see
element can be an integer, a decimal or logical value, or the Integrated File System Introduction book.
a quoted or unquoted character string that can be a
*GENERIC: The list element is a character string that
name, label, date, or time. Enter one of the following
represents a generic name. A generic name contains a
values to specify the type of element.
maximum of 255 characters followed by an asterisk (*)
Note: For more information on names (below), see or 256 characters without an asterisk and must conform
"Rules for Specifying Names" in chapter 2. to the rules for generic names. The name identifies a
group of objects whose names all begin with the charac-
*NAME: The list element is a character string that
ters preceding the *. If an * is not included, the system
represents a basic name. The maximum length of the
assumes that the generic name is a complete object
name is 256 characters; the first character must be A-Z,
name.
$, @, or #. The remaining characters can be the same
as the first character but can also include the numbers 0 *DATE: The list element is a character string that repre-
through 9, underscores (_), and periods (.). The name sents a date. When entering the command, the year
can also be a string of characters starting and ending may be specified in either 2 digits or 4 digits. If a 2-digit
with double quotation marks ("). If a special value is year is specified, the date is assumed to be in the range
used (as in *LIBL or *NONE), it must be specified in the of January 1, 1940 through December 31, 2039. If a
SPCVAL parameter. 4-digit year is specified, the date may be in the range of
August 24, 1928 through May 9, 2071. When the date
*SNAME: The list element is a character string that
is passed to the CPP, it is always passed in the format
represents a simple name. The maximum length of the
name is 256 characters; the first character must be A-Z,
Cyymmdd, where C = century, yy = year, mm = month,
| and dd = day. The century digit is set to 0 for years
$, @, or #. The remaining characters can be the same
| 19xx, and it is set to 1 (one) for years 20xx. When a
as the first but may also include the numbers 0 through
date value is specified in this ELEM statement, it must
9 and underscores (_). Periods (.) are not allowed. If a
| be specified without quotation marks in one of the fol-
special value is used (such as *LIBL or *NONE), it must
| lowing formats: mmddyy, mmddyyyy, or Cyymmdd. If
be specified in the SPCVAL parameter.
the user enters a date when the command is run, it must
*CNAME: The list element is a character string that be entered in the job date format. The job date sepa-
represents a communications name. The maximum rator specifies the optional separator character that must
length of the name is 256 characters; the first character be used when the date is entered. If the separator char-
must be A-Z, $, @, or #. The remaining characters can acter is used, the date must be enclosed in apostrophes.
be the same as the first character but may also include
*TIME: The list element is a character string that repre-
the numbers 0 through 9. Periods (.) and underscores
sents a time. It is in the format hhmmss, where hh =
(_) are not allowed. If a special value is used (such as
hours, mm = minutes, and ss = seconds. It is passed to
*LIBL or *NONE), it must be specified in the SPCVAL
the CPP in a 6-byte character string as hhmmss.
parameter.
Values specified in this statement must be in the format
*PNAME: The list element is a character string that hhmmss. The job time separator specifies the optional
represents a path name. The path name can be separator character that can be used when the time is
enclosed in apostrophes. If the path name contains any entered. If the separator character is used, the time
special characters (not including an asterisk (*)), it must must be enclosed in apostrophes.
be enclosed in apostrophes. The maximum length of
the path name character string is 5000 characters.

P1-8 OS/400 CL Reference - Part 2 (Full Version)


ELEM (Element)

*CHAR: The list element is a character string that


Table 1. Lengths of Data Types That Can Be Coded
optionally can be enclosed in apostrophes. If the char-
acter string contains any special characters (not Default
Data Type Length Maximum Length1
including an asterisk (*)), it must be enclosed in apostro-
phes. The maximum length of the character string is *DEC (15 5) (24 9)
5000 characters. *LGL 1 1
*DEC: The list element is a packed decimal number. *CHAR 32 5000
*LGL: The list element is a logical value, either a one *NAME 10 256
('1') or a zero ('0'). *SNAME 10 256
*HEX: The list element value is in hexadecimal form. *CNAME 10 256
The specified characters must be 0 through F. They are *PNAME 32 5000
converted to hexadecimal (EBCDIC) characters (2 hex
*GENERIC 10 256
digits per byte), right justified, and padded with zeros. If
the value is enclosed in apostrophes, an even number of *HEX 1 256
digits is required. If the value is not enclosed in apostro- *VARNAME 11 11
phes, the number of digits may be odd or even. 1 The maximum length shown here is the maximum length allowed
*ZEROELEM: The list element is always considered to by the Command Definition. The high-level language used as the
CPP for the command may have different maximum lengths for
be a list of zero elements for which no value can be
these data types (for example, *DEC values in CL programs have
specified in the command. It is used to prevent a value a maximum length of (15 9)).
from being entered as an element in a list even though
Whereas the maximum shown here is the maximum for the
the CPP expects one. An element for which
values used in the command when it is run, the maximum length
*ZEROELEM is specified is not prompted, although the of character constants specified in the command definition is
other elements in the parameter are prompted and are limited to 32 characters. This restriction applies to the following
passed to the CPP as a list. parameters: CONSTANT, DFT, VALUES, REL, RANGE,
SPCVAL, and SNGVAL.
*INT2: The list element is an integer that is passed as a
2-byte signed binary number. CL programs do not
support using binary values in variables. For data types whose length cannot be coded, the fol-
lowing are the maximum lengths and the lengths
*INT4: The list element is an integer that is passed as a
passed.
4-byte signed binary number. CL programs do not
support using binary values in variables.
Table 2. Lengths of Data Types That Cannot Be Coded
*VARNAME: (For IBM-supplied commands) The list
Maximum
element is a variable name that is passed as a character
Data Type Length Length Passed
string. The name can contain a maximum of 11 charac-
ters, including the initial ampersand (&). *DATE1 8 7
*TIME2 8 6
statement-label: Specify a qualified name or a mixed list
of values. The statement label specified here by the *ZEROELEM 0 0
TYPE parameter is the statement label that identifies the *INT23 6 2
first of a series of QUAL or ELEM statements that further *INT44 11 4
describe the qualified name or the mixed list being
statement-label5 _ _
defined. The label must be the same as the label speci-
1 If a date is specified, the value is passed as 7 characters.
fied by TYPE(statement-label) on the PARM statement
2 If a time is specified, the value is passed as 6 characters.
for this list.
3 The value must meet the following condition: -215 < value <
LEN Parameter 215-1. The value is passed as a 2-byte signed binary number.
4 The value must meet the following condition: -231 < value <
Specifies the length of the list element value that is
231-1. The value is passed as a 4-byte signed binary number.
passed to the CPP. If TYPE was specified as *INT2, 5 The length of the data accepted and passed is defined by the
*INT4, *DATE, *TIME, *ZEROELEM, or statement-label, ELEM or QUAL statement that the label identifies.
LEN is not allowed. If TYPE(*DEC) was specified, the
decimal length is specified in the form (n1 n2), where n1
specifies the total number of digits in the value (including CONSTANT Parameter
the decimal portion), and n2 specifies the number of Specifies that a value is passed to the CPP as a con-
allowable decimal digits to the right of the decimal point. stant for the list element when the command being
The value for n2 is optional, and zero is assumed if n2 is defined is processed. The value does not appear
not entered. If TYPE is other than *DEC, the decimal externally on the command. If specified, the value must
portion (n2) must be omitted and only the number of satisfy the requirements specified by the TYPE, LEN,
characters must be specified. VALUES, REL, RANGE, SPCVAL, and FULL parame-
ters. As noted in the LEN parameter chart, if a char-

Chapter 1. Command Definition Statements P1-9


ELEM (Element)

acter constant is specified in this parameter, it can be no this list is optional. The DFT parameter is not valid if the
longer than 32 characters. CONSTANT is not valid with CONSTANT parameter is specified. A default cannot be
TYPE(*ZEROELEM), EXPR(*YES), or MAX(>1), or if specified if TYPE(*ZEROELEM) is specified; in that
DFT was coded for ELEM. case, an assumed default is passed.
If a constant is specified for the element being defined, If DFT is not specified, the default assumed is as
no prompt text can be specified for the PROMPT param- follows, depending on the specified element type:
eter of this ELEM statement. However, the other ele-
Assumed Element
ments of the list parameter (of which this list element is
Default Types
a part) are still prompted, and their values (along with
this constant value) are still passed to the CPP as a list. 0 *DEC *INT2 *INT4
Variables cannot be coded for this parameter. *ZEROELEM

RSTD Parameter '0' *LGL


Specifies whether the value entered for the list element zeros *DATE *TIME *HEX
(specified in the ELEM statement) is restricted to only
one of the values given in the VALUES, SPCVAL, or
blanks *CHAR *NAME *SNAME
SNGVAL parameters, or whether the value can be any *CNAME *PNAME *GENERIC
value that satisfies the requirements specified by the
*VARNAME
TYPE, LEN, REL, RANGE, SPCVAL, SNGVAL, and
FULL parameters. An assumed default value is not displayed by the
command prompt; a blank input field is shown instead.
*NO: The value entered for the list element defined by
If a default is specified in the DFT parameter, it is dis-
this ELEM statement can be anything that matches the
played by the prompt exactly as specified.
requirements specified by the TYPE, LEN, REL,
RANGE, SPCVAL, SNGVAL, and FULL parameters in value: Specify the default value that meets the specified
this ELEM statement. requirements or that is one of the values specified in the
SPCVAL, SNGVAL, or VALUES parameters.
*YES: The value entered for the list element in this
ELEM statement is restricted to one of the values in the Variables cannot be coded for this value.
VALUES parameter, or to one of the from-values in the
VALUES Parameter
SPCVAL or SNGVAL parameter. *YES cannot be speci-
Specifies a list of up to 300 constants (fixed values) from
fied if TYPE(statement-label) or TYPE(*ZEROELEM) is
which one constant can be specified as the value of the
specified.
list element. The VALUES parameter is valid only if all
DFT Parameter of the following are true: RSTD(*YES) is specified, both
Specifies the default value that is assigned to the list RANGE and REL are not specified, and each constant
element. That is, the default value is used as the value matches the attributes specified by the TYPE, LEN, and
of the list element if the user omits the parameter that FULL parameters in this ELEM statement. As noted in
represents this list element, or specifies *N for the the LEN parameter chart, character constants specified
element, while coding or entering the command. The in this parameter can be no longer than 32 characters.
default value must satisfy one of the following: Enter the constants (not more than 300) that can be
specified as the value of the list element. The VALUES
Ÿ It must match the element requirements specified by
parameter is not valid for TYPE(statement-label) or for
the TYPE, LEN, REL, RANGE, and FULL parame-
TYPE(*ZEROELEM).
ters.
If this ELEM statement is defining the first element in a
Ÿ It must be one of the from-values in the SPCVAL or
list, the value specified for this parameter cannot be the
SNGVAL parameters.
same as the value specified in the SNGVAL parameter
Ÿ If the default is a character constant, it can have no on either the PARM or ELEM statement that points to
more than 32 characters (as noted in the LEN this ELEM statement.
parameter chart).
REL Parameter
Ÿ If RSTD(*YES) is specified, it must be in the list of Specifies the relationship between the list element value
values in the VALUES parameter or in the list of and the value of another parameter or constant. The
from-values of the SPCVAL or SNGVAL parame- value associated with the referenced keyword, not the
ters. user-specified value, is passed to the CPP.
Ÿ If this ELEM statement itself defines a list, the To specify the relationship, enter one of the following
default value must be specified in the SNGVAL relational operators followed by a constant or the value
parameter. of another parameter.
The DFT parameter is valid only if MIN is 0, which *LT less than
means the element defined by this ELEM statement for *LE less than or equal to

P1-10 OS/400 CL Reference - Part 2 (Full Version)


ELEM (Element)

*EQ equal to | TYPE(*DATE), the to-value must be specified unquoted


*GE greater than or equal to | in mmddyy, mmddyyyy, or Cyymmdd format. If a CL
*GT greater than variable is used for the from-value, its type must be
*NL not less than *CHAR. If this ELEM statement is defining the first
*NE not equal to element in a list, the value specified for the from-value
*NG not greater than cannot be the same as the value specified in the
SNGVAL parameter on either the PARM or ELEM state-
The REL parameter is not valid if TYPE is specified as
ment that points to this ELEM statement.
*LGL, *VARNAME, *ZEROELEM, or statement label; or
if either RANGE or VALUES is specified. The to-value must be no longer than LEN specifies. If
TYPE is *DEC, *INT2, or *INT4, the type of the to-value
If a character type is specified by TYPE(*CHAR), the
must be the same. If TYPE is a character type (such as
EBCDIC value of the character string is used as an
*CHAR, *LGL, or *DATE), the to-value must be a char-
unsigned integer in the comparison. As noted in the
acter string. As noted in the LEN parameter chart, char-
LEN parameter chart, if a character constant is specified
acter constants specified in this parameter can be no
in this parameter, it can be no longer than 32 characters.
longer than 32 characters. If a to-value is not specified,
RANGE Parameter the from-value must be passable.
Specifies the range (the limits) for the value of the list Variables cannot be coded for this element.
element. The list element value must be greater than or
equal to the lower limit value specified, and it must be SNGVAL Parameter
less than or equal to the upper limit value specified. The Specifies a list of up to 300 single values that can be
value tested is the value sent to the CPP, not the user- specified for an element being defined as a statement
specified value. For example, 15 would be valid if label, or that is to have two or more list elements
RANGE was specified as (0 16). (defined by the MAX parameter) in its nested list. Any
one of the single values can be used instead of a nested
For nonnumerical data types, such as *CHAR, the range
list of values or a qualified name that the element is
of values and the data specified will be left-justified and
defined to accept. Each entry specifies a character
padded on the right with blanks. A numeric range
string (a from-value) that can be entered. If an entered
should not be used to define an interval for nonnumer-
character string matches the from-value of one of the
ical data unless leading zeros are specified or the data
entries and the to-value is specified, the data is replaced
is only 1 character in length.
with the to-value and is then passed to the CPP without
The RANGE parameter is not valid if either REL or further checking. If the to-value is omitted, the from-
VALUES is specified, or if TYPE is specified as *LGL, value is passed to the CPP.
*VARNAME, *ZEROELEM, or statement label. As noted
If this ELEM statement defines the first element in a list,
in the LEN parameter chart, character constants speci-
the value specified for the from-value cannot be the
fied in this parameter can be no longer than 32 charac-
same as the value specified in the SNGVAL parameter
ters.
on either the PARM or ELEM statement that points to
SPCVAL Parameter this ELEM statement.
Specifies a list of up to 300 entries that define special The to-value (or the from-value, if the to-value is
values that can be entered for the element defined by omitted) must be passable, as specified in the SPCVAL
this ELEM statement. Each entry specifies a character parameter. As noted in the LEN parameter chart, char-
string (a from-value) that can be entered even though it acter constants specified in this parameter can be no
may not meet all validity checking requirements. If the longer than 32 characters. SNGVAL can be specified
entered character string matches the from-value of one only if MAX is greater than one or TYPE is specified as
of the entries, and the to-value is specified, the string is a statement label; it is not valid for TYPE(*ZEROELEM).
replaced with the to-value and is then passed to the Each single value can only substitute for a list of values
CPP without further checking. If the to-value is omitted, or a qualified name; it cannot be a list element or qual-
the from-value is passed to the CPP. The SPCVAL ifier. It is passed as the first element of the list.
parameter is not valid for TYPE(statement-label) or for
TYPE(*ZEROELEM). If a to-value of *CURLIB is specified, the name of the
current job library is passed to the CPP instead of the
If a to-value of *CURLIB is specified, the name of the value *CURLIB. If the from-value is *CURLIB and no
current job library is passed to the CPP instead of the to-value is specified, or if the to-value is *CURLIB and it
value *CURLIB. If the from-value is *CURLIB and no is enclosed in apostrophes, the value *CURLIB is
to-value is specified, or if the to-value is *CURLIB and it passed to the CPP.
is enclosed in apostrophes, the value *CURLIB is
Variables cannot be coded for this element.
passed to the CPP.
The from-value is a character string, but the to-value can MIN Parameter
be anything that is passable. However, for Specifies the minimum number of values that must be
entered for the list element being defined.

Chapter 1. Command Definition Statements P1-11


ELEM (Element)

For an element that does not allow multiple like values, accepted. A maximum greater than one (1) is not valid
only zero (0) for optional and one (1) for required can be if the CONSTANT parameter is also specified.
specified as the minimum number of values.
ALWUNPRT Parameter
For an element that allows multiple like values because Specifies whether this ELEM statement should accept
a value greater than one (1) is specified in the MAX the hexadecimal characters X'FF' or those in the range
parameter, zero (0) indicates that no values must be of X'00' to X'3F'. This parameter is valid only for
entered; therefore, it is an optional element. A value TYPE(*CHAR) or TYPE(*X).
equal to or greater than one (1) indicates the minimum
*YES: Allows any characters to be sent to the display or
number of values that must be entered for the element.
printer.
Therefore, it is a required element. The value specified
for MIN cannot exceed the value specified for the MAX *NO: Does not allow unprintable characters to be
parameter. passed to the command processing program.
The number specified tells how many list elements are ALWVAR Parameter
required in another list. If MIN is not specified, zero (0) Specifies whether to allow variable names for the
is assumed, meaning that the element is optional. element. If TYPE was specified as *VARNAME,
0: The list element is optional; it does not have to be *ZEROELEM, *NULL, or statement-label, ALWVAR(*NO)
entered. is not allowed.

minimum-number: Specify the minimum number of ele- *YES: Allows the use of variable names for the
ments that must be specified in the nested list. If 1 is element.
the assigned value, it specifies that at least one value is *NO: Does not allow the use of variable names for the
required for the element. If a number greater than one element.
(1) is specified, the element contains a list that must
have at least as many elements as the number speci- PGM Parameter
fied. Specifies whether the list element is a program name.
PGM(*YES) is valid only for a statement-label, *CHAR,
MAX Parameter *NAME, *SNAME, *CNAME, and *GENERIC types. The
Specifies, if this ELEM statement is defining a simple list specification of the PGM(*YES) parameter has no effect
element, the maximum number of elements that this list on the element being defined by the ELEM statement; it
element can have in its nested list. If a value greater only indicates to the compiler that the value for this
than 1 is specified, the element is capable of accepting element is a program name. This information is stored
multiple like values (that is, a simple nested list). All so it can be included in the output of the Display
values entered for this element (at the time the Program References (DSPPGMREF) command.
command is run) must satisfy the validity checking
*NO: The element defined in this ELEM statement is
requirements specified by the values specified in the
not a program name.
other parameters on this ELEM statement.
*YES: The element is a program name.
Note: The values for a nested list are passed consec-
utively, preceded by a 2-byte binary value that DTAARA Parameter
indicates the number of values entered in the list Specifies whether the list element is a data area name.
element by the user. CL programs do not DTAARA(*YES) is valid only for statement-label, *CHAR,
support the handling of binary values in vari- *NAME, *SNAME, *CNAME, and *GENERIC types. The
ables, but you can use the %BINARY built-in specification of the DTAARA(*YES) parameter has no
function to examine the length. effect on the element being defined by the ELEM state-
1: The list element accepts only one value; there is no ment; it only indicates to the CL compiler that the value
nested list. for this element is a data area. This information is
stored so it can be included in the output of the Display
maximum-number: Specify the maximum number of ele- Program References (DSPPGMREF) command.
ments that the list element can accept. The specified
maximum must be greater than or equal to the value *NO: The element defined in this ELEM statement is
specified in MIN, and less than or equal to 300. If the not a data area name.
maximum is greater than one (1) and TYPE is not a *YES: The element is a data area name.
statement label that identifies a QUAL statement or
another ELEM statement, the parameter–which is also FILE Parameter
an element –is a simple list of like values (that is, each Specifies whether the list element is a file name and the
element in the list has the same requirements, such as expected use of the file. The element can be specified
type and length). If TYPE(statement-label) is specified as the name of a file that has a specific use so that, at
and it points to the label of a QUAL statement or another CL compile time, the names can be used to get file ref-
ELEM statement, MAX should only be specified greater erence information about where the files are used. FILE
than 1 if a list of lists or a list of qualified names is to be is valid only if the value for TYPE is statement-label,

P1-12 OS/400 CL Reference - Part 2 (Full Version)


ELEM (Element)

*CHAR, *NAME, *SNAME, *CNAME, or *GENERIC. *YES: The element value passed to the CPP is pre-
The specification in the FILE parameter has no effect on ceded by a field that indicates the number of characters
the list element being defined by the ELEM statement; it actually specified for the parameter. *YES is valid only
only indicates to the CL compiler that the value for this for the following parameter types: *CHAR, *NAME,
element is a file name and what type of file it is. This *SNAME, *CNAME, *PNAME, *GENERIC, *LGL,
information is stored so it can be included in the output *VARNAME, *CMD, *CMDSTR, and *X.
of the DSPPGMREF (Display Program References)
Note: The length value is the actual number of charac-
command. One of the following types of files can be
ters entered for the command parameter with
specified:
trailing blanks removed. The length value
*NO: The list element defined in this ELEM statement is passed may be different than the defined param-
not a file name. eter length or the declared variable length. The
length of the field containing the character string
*IN: The list element is an input file name.
data is determined by the defined length for the
*OUT: The list element is an output file name. parameter or the declared LEN for CL Program
*UPD: The list element is an update file name. variables. The length value defines how many
characters in the character string data field were
*INOUT: The list element value is the name of a file to
actually entered for the command parameter.
be used for both input and output.
Element 2: Value Length
*UNSPFD: The list element value is the name of a file,
but its use cannot be specified. *INT2: The element value is an integer passed as a
2-byte signed binary number.
FULL Parameter
*INT4: The element value is an integer passed as a
Specifies whether the number of characters in the list
4-byte signed binary number.
element must be exactly the same as the number speci-
fied in the LEN parameter (if specified) or its default PASSATR Parameter
length (if LEN is not specified). (For IBM-supplied commands) Specifies whether an attri-
*NO: The number of characters in the list element can bute byte is to be passed to the CPP with the list
be less than that specified by the LEN parameter. element data. PASSATR is not valid for
TYPE(statement-label) or for TYPE(*ZEROELEM).
*YES: The number of characters in the list element
must equal the number specified by the LEN parameter *NO: No attribute byte is passed with the list element.
or the default length for that type. The exact length is *YES: An attribute byte is passed with the list element;
valid only for element types *LGL, *CHAR, *NAME, the attribute byte indicates whether the data value came
*SNAME, *CNAME, *GENERIC, *VARNAME, and *HEX. from the default, the data type of the value, and (if
TYPE(*CHAR) was specified) whether the character
EXPR Parameter
string was enclosed in apostrophes.
Specifies whether the list element can accept an
expression containing a character concatenation. Valid CASE Parameter
character concatenation operators are as follows: Specifies whether the value that is passed to the CPP is
changed from lowercase to uppercase, or is preserved in
Concatenation *CAT or, ||
Blank insertion with concatenation *BCAT or, |>
the case specified on the command parameter.
Blank truncation with concatenation *TCAT or, |< *MONO: The element value is changed from lowercase
to uppercase. Single quoted parameters with apostro-
*NO: The element value cannot be a concatenation phes preserve the case whether or not this value is
expression. specified.
*YES: The element value can be a concatenation *MIXED: The element value is preserved in the case
expression. *YES is not valid if a value is specified for specified on the command parameter. This value can
the CONSTANT parameter. be specified only for *CHAR and *PNAME parameter
VARY Parameter types.
Specifies whether the list element value passed to the DSPINPUT Parameter
CPP is preceded by a length value that indicates the Specifies whether the keyword value is shown (dis-
number of characters entered for the element's value. played) in the job log or on a prompt display.
This parameter may be specified as a single value (*NO) DSPINPUT(*PROMPT) and DSPINPUT(*NO) are valid
or as a list of two values (elements). only for the following element types: *CHAR, *NAME,
*NO: The element value is not preceded by a length *SNAME, *CNAME, *GENERIC, *DEC, *LGL, *INT2,
value. *INT4, *DATE, *TIME, and *HEX.
Element 1: Return Length Value Note: The DSPINPUT parameter will have no effect on
the job log entries for a database reader job, for

Chapter 1. Command Definition Statements P1-13


ELEM (Element)

imbedded commands (for example, a command text for the possible values field. The message file
submitted on the SBMJOB command), or for specified on the PMTFILE parameter of the Create
commands executed using the QCMDEXC or Command (CRTCMD) command is used to find the
QCAEXEC APIs. message.
*YES: The element value is shown both on the prompt 'choices-text': Specify no more than 30 characters,
screen and in the job log. enclosed in apostrophes.
*PROMPT: The element value is shown on the prompt CHOICEPGM Parameter
screen but not in the job log. Specifies the name of the program that is called during
*NO: The element value is not shown in either the job the prompting to fill in the possible choices text and the
log or a prompt screen. When a previously entered permissible values during prompting. This parameter
command is retrieved, the nondisplayed field entries must be specified only if CHOICE(*PGM) is specified.
must be retyped and their previous values are not *NONE: No program is identified to fill in the possible
retrievable. When a job log entry is created, the nondis- choices text and permissible values.
played field is replaced by empty parentheses ().
The possible library values are:
CHOICE Parameter
*LIBL: The library list is used to locate the program
Specifies the text that is displayed to the right of the
name.
prompt line of each parameter on the prompt screen.
Up to 30 characters of text can be displayed. *CURLIB: The current library for the job is used to
locate the program name. If no library is specified
*VALUES: Each possible value is displayed in the pos-
as the current library for the job, the QGPL library is
sible values field, separated by a comma and a space.
used.
If values are specified for the Default, Single value, or
Special value parameters, the first value displayed is the library-name: Specify the name of the library where
default value; the next value is a single value, and the the program name is located.
values following that are special values. If there are too
many values to fit in 30 characters, the last value is fol-
program-name: Specify the name of the program to be
called during prompting to fill in the possible choices text
lowed by three periods.
or to supply a permissible value.
Examples of possible values text follow:
If any exception occurs when the program is called, no
Ÿ If *NO is specified on the RSTD parameter and possible-choices text will be left blank, and the list of
*DEC is specified on the TYPE parameter and the permissible values will be obtained from the command.
RANGE parameter is not specified, the word
PROMPT Parameter
"Number" is displayed in the possible values field.
Specifies the prompt text, if any, that is used for the list
The resulting line will appear in the form: Number,
element being defined in this ELEM statement. The
*XXX, *YYY, *ZZZ...
prompt text describes the element to the user, who may
Ÿ If *NO is specified on the RSTD parameter and enter a response to the information displayed. Prompt
*DEC is specified on the TYPE parameter and the text cannot be specified if TYPE(*ZEROELEM) is speci-
RANGE parameter is specified, the range of pos- fied or if a constant value is specified in the CONSTANT
sible values is displayed in the possible values field. parameter.
The resulting line will appear in the form: a-b,
*NONE: No prompt text is displayed for the list element
*XXX, *YYY, *ZZZ (where a and b are numerals
defined by this ELEM statement. The input field still
defining the range).
asks for this list element, but no text is displayed with it.
Ÿ If *YES is specified on the RSTD parameter, the
possible values displayed are determined by the
message-identifier: Specify the message identifier that
identifies the prompt text message of up to 30 charac-
VALUES parameter, the SNGVAL parameter, and
ters displayed when the program is asking for the list
the SPCVAL parameter. The resulting line will
element. If a message having the specified identifier
appear in the form: *XXX, *YYY, *ZZZ...
cannot be found in the message file contained in the
*NONE: No values are displayed. PMTFILE parameter of the Create Command (CRTCMD)
command, the message identifier itself is used as the
*PGM: A program that is called determines the values
prompt text.
that are displayed. The program that is called is identi-
fied in CHOICEPGM parameter. 'prompt-text': Specify the prompt text displayed when
the program is asking for the list element. The text must
message-identifier: Specify the message ID of the
be a character string of no more than 30 characters,
message used to retrieve the message containing the
enclosed in apostrophes.

P1-14 OS/400 CL Reference - Part 2 (Full Version)


ELEM (Element)

Examples Job: B,I

Example 1: Defining a JOBDESC Parameter ┌─\SAME────────────────────┐


55──RANGE(──┴─lower-value──upper-value─┴──)─────────────────5%
Job: B,I
Command definition statements:
55──JOBDESC(──job-name──number──)───────────────────────────5%
PARM KWD(RANGE) TYPE(L1) DFT(\SAME) +
SNGVAL((\SAME 1ð1))
Command definition statements:
L1: ELEM TYPE(\DEC) MIN(1) REL(\LE 1ðð)
PARM KWD(JOBDESC) TYPE(L1) ELEM TYPE(\DEC) MIN(1) REL(\LE 1ðð)
L1: ELEM TYPE(\NAME) MIN(1)
The parameter named RANGE can be omitted, but, if
ELEM TYPE(\DEC) LEN(2) MIN(1) REL(\LE 6ð)
present, it must be a list of two numbers, neither of which
The parameter named JOBDESC can be omitted, but, if can be greater than 100. Validity checking is performed to
present, it must be a list of two elements. The first element determine that the lower-limit value is less than the upper-
is a name, and the second is a 2-digit number that is less limit value. To allow the CPP to determine whether the value
than or equal to 60. passed is a user-specified value or the default, *SAME is
mapped to 101.
Example 2: Defining a RANGE Parameter

Chapter 1. Command Definition Statements P1-15


PARM (Parameter)

PARM (Parameter) Statement


The Parameter (PARM) statement defines a parameter of a command being created. A parameter is the means by which a
value is passed to the command processing program (CPP). One PARM statement must be used for each parameter that
appears in the command being defined. The order in which the PARM statements are entered into the source file determines
the order in which the parameters must be specified when the command is entered in positional form and the order in which
they are passed to the validity checker and to the CPP. A maximum of 75 parameters can be defined for one command.
Note, however, that commands having a large number of parameters take longer to run, regardless of how many parameters
are actually coded.
Note: The PARM statement contains certain parameters and predefined values that can be used only when IBM-supplied
CPPs are called by the command being defined. Limitations in some high-level languages reduce the usefulness of
these values in the definition statements of user-defined commands. These parameters and values are identified by the
phrase “(For IBM-supplied commands)” that immediately follows the parameter keyword (if the entire parameter is for
IBM-supplied commands only) or the predefined value to which it applies.
55──PARM──KWD──(──keyword-name──)──TYPE──(──┬─\DEC────────────┬──)──┬────────────────────────────────────────┬──────────────────5
├─\LGL────────────┤ └─LEN──(──┬─length1─────────────────┬──)─┘
├─\CHAR───────────┤ ├─length2/length1─────────┤
├─\NAME───────────┤ └─length3/length2/length1─┘
├─\SNAME──────────┤
├─\CNAME──────────┤
├─\PNAME──────────┤
├─\GENERIC────────┤
├─\CMDSTR─────────┤
├─\DATE───────────┤
├─\TIME───────────┤
├─\HEX────────────┤
├─\ZEROELEM───────┤
├─\X──────────────┤
├─\INT2───────────┤
├─\INT4───────────┤
├─\VARNAME────────┤
├─\CMD────────────┤
├─\NULL───────────┤
└─statement-label─┘
5──┬────────────────────────┬──┬───────────────────────┬──┬──────────────────────┬──┬────────────────────┬──────────────────────5
│ ┌─\NO──┐ │ └─CONSTANT──(──value──)─┘ │ ┌─\NO──┐ │ └─DFT(────value────)─┘
└─RTNVAL──(──┴─\YES─┴──)─┘ └─RSTD──(──┴─\YES─┴──)─┘
5──┬───────────────────────────────────────────────────────────┬──┬───────────────────────────────────────────────────────┬─────5
│ ┌──
───────┐ │ │ ┌──
────────────────────────────────────┐ │
├─VALUES(───6─value─┴─── 6─(────from-value────┬──────────┬──)─┴───
(1) ──)──────────────────────────────────┤ └─SPCVAL(─── (1) ──)─┘
├─REL(──relational-operator──┬─&keyword-name─┬──)───────────┤ └─to-value─┘
│ └─value─────────┘ │
└─RANGE(──┬─&from-keyword-value─┬──┬─&to-keyword-value─┬──)─┘
└─lower-limit-value───┘ └─upper-limit-value─┘
5──┬───────────────────────────────────────────────────────┬──┬───────────────────────────────┬─────────────────────────────────5
│ ┌──
────────────────────────────────────┐ │ │ ┌─ð──────────────┐ │
└─SNGVAL(───6─(────from-value────┬──────────┬──)─┴───
(1) ──)─┘ └─MIN──(──┴─minimum-number─┴──)─┘
└─to-value─┘
5──┬───────────────────────────────┬──┬──────────────────────────┬──┬────────────────────────┬──┬─────────────────────┬─────────5
│ ┌─1──────────────┐ │ │ ┌─\YES─┐ │ │ ┌─\YES─┐ │ │ ┌─\NO──┐ │
└─MAX──(──┴─maximum-number─┴──)─┘ └─ALWUNPRT──(──┴─\NO──┴──)─┘ └─ALWVAR──(──┴─\NO──┴──)─┘ └─PGM──(──┴─\YES─┴──)─┘
5──┬────────────────────────┬──┬─────────────────────────┬──┬──────────────────────┬──┬──────────────────────┬──────────────────5
│ ┌─\NO──┐ │ │ ┌─\NO─────┐ │ │ ┌─\NO──┐ │ │ ┌─\NO──┐ │
└─DTAARA──(──┴─\YES─┴──)─┘ └─FILE──(──┼─\IN─────┼──)─┘ └─FULL──(──┴─\YES─┴──)─┘ └─EXPR──(──┴─\YES─┴──)─┘
├─\OUT────┤
├─\UPD────┤
├─\INOUT──┤
└─\UNSPFD─┘
5──┬─────────────────────────────────────┬──┬─────────────────────────┬──┬──────────────────────────┬───────────────────────────5
│ ┌─\NO───────────────────┐ │ │ ┌─\NO──┐ │ │ ┌─\DFT──┐ │
│ │ ┌─\INT2─┐ │ │ └─PASSATR──(──┴─\YES─┴──)─┘ └─PASSVAL──(──┴─\NULL─┴──)─┘
(2) ───┼───────┼─┴──)─┘
└─VARY(──┴───\YES───
└─\INT4─┘
5──┬────────────────────────┬──┬─────────────────────────┬──┬─────────────────────────────┬─────────────────────────────────────5
│ ┌─\MONO────┐ │ │ ┌─\INT2─┐ │ │ ┌─\YES────┐ │
(3) ┴──)─┘ └─LISTDSPL(──┴─\INT4─┴──)─┘ └─DSPINPUT──(──┼─\PROMPT─┼──)─┘
└─CASE(──┴─\MIXED───
└─\NO─────┘

P1-16 OS/400 CL Reference - Part 2 (Full Version)


PARM (Parameter)

5──┬──────────────────────────────────────┬──┬──────────────────────────────────────────────────────┬───────────────────────────5
│ ┌─\VALUES────────────┐ │ │ ┌─\NONE───────────────────────────┐ │
└─CHOICE──(──┼─\NONE──────────────┼──)─┘ │ │ ┌─\LIBL/────────┐ │ │
├─\PGM───────────────┤ └─CHOICEPGM──(──┴─┼───────────────┼──program-name─┴──)─┘
├─message-identifier─┤ ├─\CURLIB/──────┤
└─'choices-text'─────┘ └─library-name/─┘
5──┬───────────────────────────────────┬──┬──────────────────────────────────────────────────────┬──────────────────────────────5
│ ┌─\NONE───────────┐ │ │ ┌─\NONE───────────────────────────┐ │
└─PMTCTL──(──┼─\PMTRQS─────────┼──)─┘ │ │ ┌─\LIBL/────────┐ │ │
└─statement-label─┘ └─PMTCTLPGM──(──┴─┼───────────────┼──program-name─┴──)─┘
├─\CURLIB/──────┤
└─library-name/─┘
5──┬─────────────────────────┬──┬──────────────────────────────────────────────────────────────────┬───────────────────────────5%
│ ┌─\NO──┐ │ │ ┌─\NONE──────────────────────────────────────────┐ │
└─KEYPARM──(──┴─\YES─┴──)─┘ └─PROMPT──(──┴─┬─message-identifier─┬──relative-prompt-number─┴──)─┘
└─'prompt-text'──────┘
Notes:
1 A maximum of 300 repetitions

2 *YES is valid only for the following parameter types: *CHAR, *NAME, *SNAME, *CNAME, *PNAME, *GENERIC, *LGL,

*VARNAME, *CMD, *CMDSTR, and *X. *YES must be specified if PASSATR(*YES) and RTNVAL(*YES) are specified.
3 This value can be specified only on *CHAR and *PNAME parameter types.

KWD Parameter must be A-Z, $, @, or #. The remaining characters can


Specifies the keyword name of the parameter being be the same as the first character but may also include
created. The keyword identifies the parameter in the the numbers 0 through 9. Periods (.) and underscores
command, and it is used when the parameter is entered (_) are not allowed. If a special value is used (such as
in keyword form. Enter the keyword name using no *LIBL or *NONE), it must be specified in the SPCVAL
more than 10 alphanumeric characters, the first char- parameter.
acter being alphabetic.
*PNAME: The parameter value is a character string that
TYPE Parameter represents a path name. The path name can be
Specifies the type of value being defined. The value can enclosed in apostrophes. If the path name contains any
be an integer, a decimal or logical value, or a quoted or special characters (not including an asterisk (*)), it must
unquoted character string that can be a name, label, be enclosed in apostrophes. The maximum length of
date, or time. Enter one of the following values to the path name character string is 5000 characters.
specify the type of parameter. Path names are used in the integrated file system. For
Note: For more information on names (below), see more information on using the parameter value *PNAME,
"Rules for Specifying Names" in chapter 2. see the Integrated File System Introduction book.

*NAME: The parameter value is a character string that *GENERIC: The parameter value is a character string
represents a basic name. The maximum length of the that represents a generic name. A generic name con-
name is 256 characters; the first character must A-Z, $, tains a maximum of 255 characters followed by an
@, or #. The remaining characters can be the same as asterisk (*) or 256 characters without an asterisk and
the first character but can also include the numbers 0 must conform to the rules for generic names. The name
through 9, underscores (_), and periods (.). The name identifies a group of objects whose names all begin with
can also be a string of characters starting and ending the characters preceding the *. If an * is not included,
with double quotation marks ("). If a special value is the system assumes that the generic name is a com-
used (as in *LIBL or *NONE), it must be specified in the plete object name.
SPCVAL parameter. *CMDSTR: The parameter value is a command string
*SNAME: The parameter value element is a character that is checked for validity by the command analyzer. It
string that represents a simple name. The maximum is passed to the CPP as a character string.
length of the name is 256 characters; the first character Note: Selective prompting is not allowed with the
must be A-Z, $, @, or #. The remaining characters can *CMDSTR parameter.
be the same as the first but may also include the
*DATE: The parameter value is a character string that
numbers 0 through 9 and underscores (_). Periods (.)
represents a date. When entering the command, the
are not allowed. If a special value is used (such as
year may be specified with either 2 digits or 4 digits. If a
*LIBL or *NONE), it must be specified in the SPCVAL
2-digit year is specified, the date is assumed to be in the
parameter.
range of January 1, 1940 through December 31, 2039.
*CNAME: The parameter value is a character string that If a 4-digit year is specified, the date may be in the
represents a communications name. The maximum range of August 24, 1928 through May 9, 2071. When it
length of the name is 256 characters; the first character is passed to the CPP, it is always passed in the format

Chapter 1. Command Definition Statements P1-17


PARM (Parameter)

Cyymmdd, where C = century, yy = year, mm = month, *VARNAME: (For IBM-supplied commands) The
| and dd = day. The century digit is set to 0 for years parameter value is a CL variable name that is passed as
| 19xx, and it is set to 1 (one) for years 20xx. When a a character string. The name can contain a maximum of
date value is specified in this PARM statement, it must 11 characters, including the ampersand (&).
| be specified in one of the following formats: mmddyy,
*CMD: (For IBM-supplied commands) The parameter
| mmddyyyy, or Cyymmdd. When a user enters a date in value is a command. For example, the IF command has
the command at run time, it must be entered in the job
a parameter called THEN whose value must be another
date format. The job date separator specifies the
command. The command is checked for validity by the
optional separator character that can be used when the
command analyzer.
date is entered. If the separator character is used, the
date must be enclosed in apostrophes. *NULL: The parameter value is to be a null pointer,
which can be used as a constant place holder. A DEP
*TIME: The parameter value is a character string that
statement or the REL and RANGE keywords of other
represents a time. It is entered in the format hhmmss.
PARM statements may not reference the value of a
It is passed to the CPP in a 6-byte character string as
parameter defined with TYPE(*NULL).
hhmmss. The job time separator specifies the optional
separator character that can be used when the time is statement-label: Specify a qualified name or a mixed list
entered. If the separator character is used, the time of values. The statement label specified here by the
must be enclosed in apostrophes. TYPE parameter is the statement label that identifies the
first of a series of QUAL or ELEM statements that further
*CHAR: The parameter value is a character string that
describe the qualified name or the mixed list being
(optionally) can be enclosed in apostrophes. If the char-
defined by this PARM statement.
acter string contains any special characters (not
including an asterisk (*)), it must be enclosed in apostro- LEN Parameter
phes. The maximum length of the character string is Specifies the length of the parameter value that is
5000 characters. passed to the CPP. LEN is not allowed if TYPE was
specified as *INT2, *INT4, *DATE, *TIME, *CMD,
*DEC: The parameter value is a packed decimal
*ZEROELEM, *NULL, or statement-label. With other
number.
TYPE specifications, this parameter has the following
*LGL: The parameter value is a logical value, either a applications:
one ('1') or a zero ('0').
Ÿ If TYPE(*DEC) was specified, the decimal length is
*HEX: The parameter value is in hexadecimal form. specified in the form (length1 length2), where
The specified characters must be 0 through F. They are length1 specifies the total number of digits in the
converted to hexadecimal (EBCDIC) characters (2 hex value (including the decimal portion), and length2
digits per byte), right-justified, and padded on the left specifies the number of allowable decimal digits to
with zeros. If the value is enclosed in apostrophes, an the right of the decimal point. (The value for
even number of digits is required. If the value is not length2 is optional. Zero is assumed if it is not
enclosed in apostrophes, an even number of digits is not entered.)
required.
Ÿ If TYPE(*CHAR), TYPE(*NAME), TYPE(*SNAME),
*ZEROELEM: The parameter is always considered as a
TYPE(*CNAME), TYPE(*CMDSTR), or
list of zero elements, for which no value can be specified
TYPE(*VARNAME) was specified, only length1 is
in the command. It is used to prevent a value from
specified. It identifies the number of characters
being entered for a parameter that is a list even though
passed.
the CPP expects one. For example, if two commands
use the same CPP, one command could pass a list for a Ÿ If TYPE(*HEX) was specified, only length1 is speci-
parameter and the other command may not have any fied. This length specifies the number of characters
values to pass. The second command would be coded passed after the hexadecimal digits have been con-
with TYPE(*ZEROELEM). verted to character digits. Because 2 hexadecimal
digits are converted to 1 decimal digit, the number
*X: (For IBM-supplied commands) The parameter value
of hexadecimal digits converted is twice the value of
is a character string, variable name, or numeric value.
this length.
The value is passed as a numeric value if it contains
only digits, a "+" or "–" sign, and/or a decimal point; oth- Ÿ If TYPE(*X) was specified, the LEN parameter is
erwise, it is passed as a character string. used as follows:

*INT2: The parameter value is an integer that is passed – For character data, length1 specifies the
as a 2-byte signed binary number. CL programs do not minimum length to be passed. If a longer value
support binary values in variables. is entered, the entire value is passed.

*INT4: The parameter value is an integer that is passed – For decimal data, length2 and length3 specify
as a 4-byte signed binary number. CL programs do not the length and decimal positions for a constant
support binary values in variables.

P1-18 OS/400 CL Reference - Part 2 (Full Version)


PARM (Parameter)

value. If a variable is entered, it is passed


Maximum
according to the variable attributes. Data Type Length Length Passed
– For a logical value, length1 specifies the length statement-label5 _ _
of the value, which is always 1. 1 If a date is specified, the value is passed as 7 characters.
2 If a time is specified, the value is passed as 6 characters.
The default length that is assumed by the system and
3 The value is passed as a 2-byte signed binary number and
the maximum length for each type of parameter value
must meet the following condition:
are shown in the following table:
-215 < or = value < or = 215-1
4 The value is passed as a 4-byte signed binary number and
Default must meet the following condition:
Data Type Length Maximum Length1 -231 < or = value < or = 231-1
5 The length of the data accepted and passed is defined by
*DEC (15 5) (24 9)
the ELEM or QUAL statement that the label identifies.
*LGL 1 1
*CHAR 32 5000
*NAME 10 256 RTNVAL Parameter
*SNAME 10 256 Specifies whether a value is returned by the CPP
through the parameter being defined in this PARM state-
*CNAME 10 256
ment.
*PNAME 32 5000
*NO: No value can be returned in the parameter being
*GENERIC 10 256 defined. The parameter is an input parameter only.
*HEX 1 256
*YES: A value is to be returned by the CPP in the
*X (1 15 5) (256 24 9) parameter. A CL variable name must be specified for
*VARNAME 11 11 the parameter to receive the value (when the command
*CMDSTR 256 20,000 is called). If a variable name is not specified when the
1
command is invoked, a null pointer is passed to the
The maximum length shown here is the maximum length
allowed by the Command Definition. The high-level lan-
CPP.
guage used as the CPP for the command may have dif- Ÿ *YES is valid only if the TYPE parameter was speci-
ferent maximum lengths for these data types (for example,
fied as *DEC, *CHAR, *LGL, or *X. Also, *YES is
*DEC values in CL programs have a maximum length
of (15 9)). valid only on commands that are limited to CL pro-
grams.
Whereas the maximum shown here is the maximum for the
values used in the command when it is run, the maximum Ÿ *YES is not valid with MAX(>1), CONSTANT, DFT,
length of character constants specified in the command defi- RSTD, VALUES, REL, RANGE, SPCVAL, SNGVAL,
nition is limited to 32 characters. This restriction applies to FILE, FULL, EXPR, or ALWVAR(*NO).
the following parameters: CONSTANT, DFT, VALUES,
REL, RANGE, SPCVAL, and SNGVAL. Ÿ RTNVAL(*YES) can be specified if *BPGM, *IPGM,
*BREXX, or *IREXX is specified in the CRTCMD
command that uses the source file containing this
For data types for which length cannot be coded, the fol- PARM statement.
lowing are the maximum lengths and the lengths Ÿ VARY(*YES) must be specified if PASSATR(*YES)
passed. and RTNVAL(*YES) have been specified.

CONSTANT Parameter
Maximum
Data Type Length Length Passed Specifies that a value is passed to the CPP as a con-
stant when the command being defined is processed.
*DATE1 8 7
The parameter does not appear externally on the
*TIME2 8 6 command. The value specified in this parameter (if any)
*ZEROELEM 0 0 must satisfy the requirements specified by the TYPE,
*INT23 6 2 LEN, VALUES, REL, RANGE, SPCVAL, and FULL
parameters. As noted in the LEN parameter chart, if a
*INT44 11 4
character constant is specified in this parameter, it can
*CMD Any Length needed be no longer than 32 characters.
If a constant is specified for the parameter being
defined, no prompt text can be specified for the
PROMPT parameter in the PARM statement, because
the parameter will not be prompted.

Chapter 1. Command Definition Statements P1-19


PARM (Parameter)

The CONSTANT parameter is not valid with specified. If TYPE(*VARNAME) is specified, a default
TYPE(*CMD), TYPE(*NULL), TYPE(*ZEROELEM), special value can be specified; a default variable name
MAX(>1), DFT, RTNVAL(*YES), or EXPR(*YES). cannot be specified.
Variables cannot be coded for this parameter. If DFT is not specified and MIN(0) and RTNVAL(*NO)
are specified, then the default assumed is as follows,
RSTD Parameter
depending on the specified type:
Specifies whether the value entered for the parameter
(specified in the PARM statement) is restricted to only Assumed Parameter
one of the values given in the VALUES, SPCVAL, or Default Types
SNGVAL parameters, or whether the value can be any
0 *DEC *INT2 *INT4
value that satisfies the requirements specified by the
TYPE, LEN, REL, RANGE, SPCVAL, SNGVAL, and *ZEROELEM
FULL parameters. '0' *LGL
*NO: The value entered for the parameter specified by zeros *DATE *TIME *HEX
KWD in this PARM statement can be anything that
matches the requirement specified by parameters TYPE, blanks *CHAR *NAME *SNAME
LEN, REL, RANGE, SPCVAL, SNGVAL and FULL in *CNAME *PNAME *GENERIC
this PARM statement.
*VARNAME *CMDSTR
*YES: The value entered for the parameter specified by
null *CMD *X *NULL
KWD in this PARM statement is restricted to one of the
values in the VALUES parameter, or to one of the from- An assumed default value is not displayed by the
values in the SPCVAL or SNGVAL parameters. *YES command prompt; a blank input field is shown instead.
cannot be specified if TYPE(statement-label), If a default is specified in the DFT parameter, it is dis-
TYPE(*CMD), TYPE(*NULL), TYPE(*ZEROELEM), played by the prompt exactly as specified.
TYPE(*X), or RTNVAL(*YES) is specified.
value: Specify the default value that meets the specified
DFT Parameter requirements or that is one of the values specified in the
Specifies the default value that is assigned to the param- VALUES, SPCVAL, or SNGVAL parameters.
eter if a value is not specified by the user. That is, the Variables cannot be coded for this value.
default value is used as the value of the parameter if the
user omits the parameter while entering the command or VALUES Parameter
if *N is entered as the parameter value. The default Specifies a list of up to 300 constants (fixed values) from
value must satisfy one of the following: which one constant can be entered as the value of the
parameter named in the KWD parameter. The VALUES
Ÿ It must match the requirements specified by the parameter is valid only if all of the following are true:
TYPE, LEN, REL, RANGE, and FULL parameters. RSTD(*YES) is specified, both the RANGE and REL
Ÿ It must be one of the from-values in the SPCVAL or parameters are not specified, and each constant
SNGVAL parameters. matches the attributes specified by the TYPE, LEN, and
FULL parameters. As noted in the LEN parameter chart,
Ÿ If the default is a character constant, it can have no
character constants specified in this parameter can be
more than 32 characters (as noted in the LEN
no longer than 32 characters. Enter the constants (not
parameter chart).
more than 300) that can be specified as the value of the
Ÿ If RSTD(*YES) is specified, it must be in the list of parameter. The VALUES parameter is not valid if
values in the VALUES parameter or in the list of TYPE(*CMD), TYPE(*CMDSTR), TYPE(*X),
from-values of the SPCVAL or SNGVAL parame- TYPE(*NULL), TYPE(statement-label),
ters. TYPE(*VARNAME), or TYPE(*ZEROELEM), or if
RTNVAL(*YES) is specified.
Ÿ It must be a from-value in the SNGVAL parameter if
the parameter being defined is a list of unlike values REL Parameter
or it is a qualified name. This is true when a state- Specifies the relationship between the parameter value
ment label is specified for TYPE; the label is used to of this parameter and the value of a constant or another
identify a QUAL or ELEM statement. parameter. If a keyword is specified, it must be pre-
ceded by an ampersand (&) to indicate that it is the
The DFT parameter is not valid if CONSTANT is speci-
value of the keyword that is to be tested. The value
fied. The DFT parameter is valid only if MIN is 0, which
associated with the referenced keyword, not the user-
means the parameter named in the KWD parameter is
specified value, is the value passed to the CPP. If the
optional. A default cannot be specified if
relationship is with another parameter whose value is a
RTNVAL(*YES) is specified; instead, a null pointer is
list of values or a qualified name, only the first value is
passed for the default. A default cannot be specified if
used in the comparison.
TYPE(*CMD), TYPE(*ZEROELEM), or TYPE(*NULL) is

P1-20 OS/400 CL Reference - Part 2 (Full Version)


PARM (Parameter)

To specify the relationship, enter one of the following As noted in the LEN parameter chart, character con-
relational operators followed by either a constant or the stants specified in this parameter can be no longer than
keyword name (KWD) of the other parameter (which 32 characters.
must be preceded by an &).
Variables can be coded for this element.
*LT less than
SPCVAL Parameter
*LE less than or equal to Specifies a list of up to 300 entries that define special
*EQ equal to values that can be entered on the parameter named in
the KWD parameter. Each entry specifies a character
*GE greater than or equal to string (a from-value) that can be entered even though it
*GT greater than may not meet all validity checking requirements. If the
entered character string matches the from-value of one
*NL not less than
of the entries, and the to-value is specified, the string is
*NE not equal to replaced with the to-value and is then passed to the
CPP without further checking. If the to-value is omitted,
*NG not greater than
the from-value is passed to the CPP. SPCVAL is not
The REL parameter is not valid if RTNVAL(*YES) is valid if TYPE is specified as *CMD, *CMDSTR, *X,
specified, if either RANGE or VALUES is specified, or if *NULL, statement-label, or *ZEROELEM, or if
TYPE is specified as *LGL, *VARNAME, *CMD, RTNVAL(*YES) is specified.
*CMDSTR, *X, *ZEROELEM, *NULL, or a statement
The from-value is a character string, but the to-value can
label.
be anything that is passable. However, for
If a character type is specified by TYPE(*CHAR), the | TYPE(*DATE), the to-value must be specified unquoted
EBCDIC value of the character string is used as an | in mmddyy, mmddyyyy, or Cyymmdd format. If a CL
unsigned integer in the comparison. As noted in the variable is used for the from-value, its type must be
LEN parameter chart, if a character constant is specified *CHAR. The to-value must be no longer than LEN spec-
in this parameter, it can be no longer than 32 characters. ifies and, if TYPE is *DEC, *INT2, or *INT4, the type of
the to-value must be the same; if TYPE is a character
Variables can be coded for this element.
type (such as *CHAR, *LGL, or *DATE), the to-value
RANGE Parameter must be a character string. As noted in the LEN param-
Specifies the range (the limits) for the value of the eter chart, character constants specified in this param-
parameter. The parameter value must be greater than eter can be no longer than 32 characters. If a to-value
or equal to the lower limit value specified, and it must be is not specified, the from-value must be passable.
less than or equal to the upper limit value specified. For If a to-value of *CURLIB is specified, the name of the
example, 15 would be valid if RANGE was specified as current job library is passed to the CPP instead of the
(0 16). value *CURLIB. If the from-value is *CURLIB and no
For nonnumeric data types, such as *CHAR, the range to-value is specified, or if the to-value is *CURLIB and it
of values and the data specified are left-justified and is enclosed in apostrophes, the value *CURLIB is
padded on the right with blanks. A numeric range passed to the CPP.
should not be used to define an interval for nonnumeric Variables cannot be coded for this element.
data unless leading zeros are specified or the data is
only 1 character long. SNGVAL Parameter
Specifies a list of up to 300 single values that can be
Variables can be coded for this element.
specified for a parameter being defined as a mixed list
The upper and lower limits of the range can be specified or as a qualified name (when a statement label is speci-
either by a keyword representing the value or by the fied for TYPE), or specifies that it is to accept two or
value itself. If a keyword is specified, it must be pre- more values as defined by the MAX parameter. Any
ceded by an ampersand (&) to indicate that the value of one of the single values can be used instead of a list of
the keyword is to be tested. The value of its parameter values or a qualified name that the parameter is defined
at the time of the check is used to determine the range. to accept. Each entry specifies a character string (a
The value that is tested is the value passed to the CPP, from-value) that can be entered. If an entered character
not the user-specified value. If the keyword identifies a string matches the from-value of one of the entries and
list of values or a qualified name, only the first value is the to-value is specified, the data is replaced with the
used as the range limit. A keyword may not reference a to-value and is passed to the CPP without further
parameter that is defined with PASSVAL(*NULL), and checking. If the to-value is omitted, the from-value is
RANGE is not valid with PASSVAL(*NULL). passed to the CPP.
The RANGE parameter is not valid if RTNVAL(*YES) is The to-value (or the from-value, if the to-value is
specified, if either REL or VALUES is specified, or if omitted) must be passable, as specified in the SPCVAL
TYPE is specified as *LGL, *VARNAME, *CMD, parameter. As noted in the LEN parameter chart, char-
*CMDSTR, *X, *ZEROELEM, *NULL, or statement label.

Chapter 1. Command Definition Statements P1-21


PARM (Parameter)

acter constants specified in this parameter can be no values entered for this parameter (at the time the
longer than 32 characters. SNGVAL can be specified command is run) must satisfy the validity checking
only if the MAX parameter is greater than 1 or TYPE is requirements specified by the other parameter values on
specified as a statement label of a QUAL or ELEM state- this PARM statement.
ment. Each single value can only substitute for a list of
Note: The values for a list parameter are passed con-
values or a qualified name; it cannot be a list element or
secutively, preceded by a 2-byte binary value
qualifier. It is passed as the first and only element of the
that indicates the number of values entered in
list.
the parameter by the user. CL programs do not
SNGVAL is not valid if RTNVAL(*YES) is specified or if support the handling of binary values in vari-
TYPE is specified as *CMD, *CMDSTR, *NULL, ables.
*ZEROELEM, or *X.
1: The parameter accepts only one value; the param-
If a to-value of *CURLIB is specified, the name of the eter is not a list parameter.
current job library, instead of the value *CURLIB, is
maximum-number: Specify the maximum number of ele-
passed to the CPP. If the from-value is *CURLIB and
ments that the list parameter can accept. The specified
no to-value is specified, or if the to-value is *CURLIB
maximum must be greater than or equal to the value
and it is enclosed in apostrophes, the value *CURLIB is
specified in MIN, and less than or equal to 300. If the
passed to the CPP.
maximum is greater than 1 and TYPE is not a statement
Variables cannot be coded for this element. label that identifies a QUAL or ELEM statement, the
parameter is a simple list of like elements (that is, each
MIN Parameter
element in the list has the same requirements, such as
Specifies the minimum number of values that must be
type and length). If TYPE(statement-label) is specified
entered for the parameter being defined.
and it points to the label of an ELEM or QUAL state-
For a parameter that does not allow multiple like values, ment, MAX should only be specified greater than 1 if a
only zero (0) for optional and 1 for required can be spec- list of lists or a list of qualified names is accepted. A
ified as the minimum number of values. maximum greater than 1 is not valid if TYPE is specified
as *CMD, *CMDSTR, or *NULL, or if RTNVAL(*YES) or
Note: Required parameter statements must precede
CONSTANT is specified.
optional statements. If required parameter state-
ments are not specified first, the system ALWUNPRT Parameter
assumes that the specified parameter is optional, Specifies whether this PARM statement accepts the
and the minimum number of values for required hexadecimal characters X'FF' or those in the range of
parameters is ignored. X'00' to X'3F'. This parameter is valid only for
For a parameter that allows multiple like values TYPE(*CHAR) or TYPE(*X).
(because a value greater than 1 is specified for the MAX *YES: Any characters can be passed to the CPP and
parameter), zero (0) indicates that no values need be sent to the display or printer.
entered; therefore, it is an optional parameter. A value
*NO: Unprintable characters cannot be passed to the
equal to or greater than one (1) indicates the minimum
CPP.
number of values that must be entered for the param-
eter; therefore, it is a required parameter. The value ALWVAR Parameter
exceeds the value specified for the MAX parameter and Specifies whether to allow variable names for the param-
cannot exceed 1 for TYPE(*NULL). eter. If TYPE was specified as *VARNAME,
0: The parameter is optional; it does not have to be *ZEROELEM, *NULL, or statement-label, ALWVAR(*NO)
entered. is not allowed.

minimum-number: Specify the minimum number of ele- *YES: Variable names can be used for the parameter.
ments that must be specified for this parameter (named *NO: Variable names cannot be used for the parameter.
by the KWD parameter). If 1 is the assigned value, it
specifies that at least one value is required for the PGM Parameter
parameter. If a number greater than 1 is specified, the Specifies whether this parameter element is a program
parameter is a list that must have at least as many ele- name. PGM(*YES) is valid only for statement-label,
ments as the number specified. *CHAR, *NAME, *SNAME, *CNAME, and *GENERIC
types. The specification of the PGM(*YES) parameter
MAX Parameter does not have any effect on the parameter element
Specifies, if this PARM statement is defining a simple list being defined by the PARM statement; it only indicates
parameter, the maximum number of list elements that to the compiler that the value for this parameter is a
this list parameter can contain. If a value greater than 1 program name. This information is stored so it can be
is specified, the parameter is capable of accepting mul- included in the output of the Display Program Refer-
tiple like values (that is, a simple list). This support is ences (DSPPGMREF) command.
primarily intended for IBM-supplied commands. All

P1-22 OS/400 CL Reference - Part 2 (Full Version)


PARM (Parameter)

*NO: The parameter defined in this PARM statement is *NO: The number of characters in the parameter can be
not a program name. less than that specified by the LEN parameter.
*YES: The parameter defined in this PARM statement is *YES: The number of characters in the parameter must
a program name. equal the number specified by LEN or the default length
for that type. The exact length is valid only for the fol-
DTAARA Parameter
lowing parameter types: *LGL, *CHAR, *NAME,
Specifies whether the parameter is a data area name.
*SNAME, *CNAME, *GENERIC, *VARNAME, and *HEX.
DTAARA(*YES) is valid only for statement-label, *CHAR,
FULL(*YES) is valid with RTNVAL(*YES).
*NAME, *SNAME, *CNAME, and *GENERIC types. The
specification of the DTAARA(*YES) parameter does not EXPR Parameter
have any effect on the parameter being defined by the Specifies whether the parameter named in the KWD
PARM statement; it only indicates to the compiler that parameter can accept an expression containing a char-
the value for this parameter is a data area. This infor- acter concatenation or a built-in function (%SUBSTRING
mation is stored so it can be included in the output of or %BIN). Valid character concatenation operators are
the Display Program References (DSPPGMREF) as follows:
command.
Concatenation *CAT or, ||
*NO: The parameter defined in this PARM statement is Blank insertion with concatenation *BCAT or, |>
not a data area name. Blank truncation with concatenation *TCAT or, |<
*YES: The parameter defined in this PARM statement is
Restrictions: Expressions are not allowed on parame-
a data area name.
ters where the TYPE parameter specifies *CMDSTR,
FILE Parameter *CMD, *ZEROELEM, *NULL, or statement-label.
Specifies whether the parameter is a file name and the *NO: The parameter value cannot be a concatenation
expected use of the file. The parameter can be speci- expression or a built-in function.
fied as the name of a file that has a specific use so that,
at compile time, the names can be used to get file refer- *YES: The parameter value can be a concatenation
ence information about where the files are used. The expression or a built-in function.
specification in the FILE parameter does not have any VARY Parameter
effect on the operation of the parameter being defined; it Specifies whether the value that is passed to the CPP is
only indicates to the compiler that the value for this preceded by a length value that indicates the number of
parameter is a file name and what type of file it is. This characters entered for the command parameter.
information is stored so it can be included in the output
of the Display Program References (DSPPGMREF) The length value is the actual number of characters
command. The FILE parameter is valid only if *CHAR, entered for the command parameters with trailing blanks
*NAME, *SNAME, *CNAME, *GENERIC, or statement- removed. The length value passed may be different
label is specified for the TYPE parameter. The FILE than the defined parameter length or the declared vari-
parameter is not valid with RTNVAL(*YES). One of the able length. The length of the field containing the char-
following types of files can be specified: acter string data is determined by the defined length for
the parameter or the declared LEN for CL program vari-
*NO: The parameter (named by KWD) is not a file ables. The length value defines how many characters in
name. the character string data field were actually entered for
*IN: The parameter value is an input file name. the command parameter. This parameter may be speci-
fied as a single value (*NO) or as a list of two values
*OUT: The parameter value is an output file name.
(elements).
*UPD: The parameter value is an update file name.
*NO: The parameter value is not preceded by a length
*INOUT: The parameter value is the name of a file that value.
is used for both input and output.
Element 1: Return Length Value:
*UNSPFD: The parameter value is the name of a file,
*YES: The parameter value passed to the CPP is pre-
but its use cannot be specified.
ceded by a field that indicates the number of characters
The use of the file must match the type of file specified. actually specified for the parameter.
For example, if *IN is specified, the file can be used only
Note: *YES is valid only for the following parameter
for input; if *UPD is specified, it can be used only to
types: *CHAR, *NAME, *SNAME, *CNAME,
update existing records.
*PNAME, *GENERIC, *LGL, *VARNAME, *CMD,
FULL Parameter *CMDSTR, and *X. *YES must be specified if
Specifies whether the number of characters in the PASSATR(*YES) and RTNVAL(*YES) are speci-
parameter must be exactly the same as the number fied.
specified in the LEN parameter (if specified) or its default Element 2: Value Length:
length (if LEN is not specified).

Chapter 1. Command Definition Statements P1-23


PARM (Parameter)

*INT2: The parameter value is an integer passed as a DSPINPUT Parameter


2-byte signed binary number. Specifies whether the keyword value is shown in the job
log or on a prompt display. DSPINPUT(*PROMPT) and
*INT4: The parameter value is an integer passed as a
DSPINPUT(*NO) are valid for the following parameter
4-byte signed binary number.
types: *CHAR, *NAME, *SNAME, *CNAME, *GENERIC,
PASSATR Parameter *DEC, *LGL, *INT2, *INT4, *DATE, *TIME, *HEX, and
(For IBM-supplied commands) Specifies whether an attri- *CMDSTR.
bute byte is to be passed to the CPP with the parameter
Note: The DSPINPUT parameter has no effect on the
data.
job log entries for a database reader job, for
*NO: No attribute byte is passed with the parameter. imbedded commands (for example, a command
submitted on the SBMJOB command), or for
*YES: An attribute byte is passed with the parameter;
commands executed using the QCMDEXC or
the attribute byte indicates whether the data value came
QCAEXEC APIs.
from the default, the data type of the value, and, if
TYPE(*CHAR) was specified, whether the character *YES: The parameter value is displayed on the prompt
string was enclosed in apostrophes. display and in the job log.

PASSVAL Parameter *PROMPT: The parameter value is displayed on the


Specifies whether a value is to be passed to the prompt display but not in the job log.
command processing program for this parameter. *NO: The parameter value is shown in neither the job
*NULL is not valid if the parameter is a constant param- log or a prompt display. When a previously entered
eter (a parameter in which a value has been specified command is retrieved, the nondisplay field entries must
for the CONSTANT parameter on the PARM statement, be retyped (their previous values are not retrievable).
a parameter for which TYPE(*ZEROELEM) or When a job log entry is created, the nondisplay field is
TYPE(*NULL) has been specified, or is a list/qualified replaced by empty parentheses ().
name defined by all constant ELEM or QUAL state-
ments). *NULL also is not valid if RTNVAL(*YES) has CHOICE Parameter
been specified or if the value specified for the MIN Specifies the text that is displayed to the right of the
parameter is greater than zero. A DEP statement or the prompt line of each parameter on the prompt screen.
REL and RANGE keywords of other PARM statements Up to 30 characters of text can be displayed.
may not reference the value of a parameter defined with *VALUES: Each possible value is displayed in the pos-
PASSVAL(*NULL). sible values field, separated by a comma and a space.
*DFT: The default value is always passed to the CPP. If values are specified for the Default, Single value, or
Special value parameters, the first value displayed is the
*NULL: A null pointer is passed to the CPP if the
default value; the next value is a single value, and the
parameter is not specified.
values following that are special values. If there are too
CASE Parameter many values to fit in 30 characters, the last value is fol-
Specifies whether the value that is passed to the CPP is lowed by three periods.
changed from lowercase to uppercase, or is preserved in Examples of possible values text follow:
the case specified on the command parameter.
Ÿ If *NO is specified on the RSTD parameter and
*MONO: The parameter value is changed from lower-
*DEC is specified on the TYPE parameter and the
case to uppercase. Parameters with apostrophes pre-
RANGE parameter is not specified, the word
serve the case whether or not this value is specified.
"RANGE" is displayed in the possible values field.
*MIXED: The parameter value is preserved in the case The resulting line will appear in the form: RANGE,
specified on the command parameter. This value can *XXX, *YYY, *ZZZ...
be specified only on *CHAR and *PNAME parameter
Ÿ If *NO is specified on the RSTD parameter and
types.
*DEC is specified on the TYPE parameter and the
LISTDSPL Parameter RANGE parameter is specified, the range of pos-
Specifies whether the displacement to a list within a list sible values is displayed in the possible values field.
is 2-bytes or 4-bytes long. These displacements are The resulting line will appear in the form: a-b,
generated when a parameter being passed to a CPP *XXX, *YYY, *ZZZ (where a and b are numerals
has a list within a list. This parameter is ignored if the defining the range).
value being built for the CPP does not contain a list Ÿ If *YES is specified on the RSTD parameter, the
within a list. possible values displayed are determined by the
*INT2: The displacement value is an integer passed as VALUES parameter, the SNGVAL parameter, and
a 2-byte signed binary number. the SPCVAL parameter. The resulting line will
appear in the form: *XXX, *YYY, *ZZZ...
*INT4: The displacement value is an integer passed as
a 4-byte signed binary number.

P1-24 OS/400 CL Reference - Part 2 (Full Version)


PARM (Parameter)

*NONE: No values are displayed. Ÿ The conditions specified on the referred to PMTCTL
statement have been met.
*PGM: A program that is called determines the values
that are displayed. The program that is called is identi- Ÿ A value was entered for the parameter before the
fied in CHOICEPGM parameter. prompt was called.
message-identifier: Specify the message ID of the PMTCTLPGM Parameter
message used to retrieve the message containing the Specifies the qualified name of the program called to
text for the possible values field. The message file convert the value specified for the parameter into a
specified on the PMTFILE parameter of the Create value used on a PMTCTL statement. This parameter is
Command (CRTCMD) command is used to find the valid only on parameters that are referred to in the CTL
message. parameter of a PMTCTL statement.
'choices-text': Specify no more than 30 characters, *NONE: There is no program to convert the parameter
enclosed in apostrophes. value for prompt control statements. If the parameter is
specified in a PMTCTL statement, the actual value is
CHOICEPGM Parameter
compared in the PMTCTL statement.
Specifies the qualified name of the program that is called
during the prompting to fill in the possible choices text The possible library values are:
and the permissible values during prompting. This
*LIBL: The library list is used to locate the program
parameter must be specified if CHOICE(*PGM) is speci-
name.
fied, and it may not be specified otherwise.
*CURLIB: The current library for the job is used to
*NONE: No program is identified to fill in the possible
locate the program name. If no library is specified
choices text and permissible values.
as the current library for the job, the QGPL library is
The possible library values are: used.
*LIBL: The library list is used to locate the program library-name: Specify the name of the library where
name. the program name is located.
*CURLIB: The current library for the job is used to program-name: Specifies the qualified name of the
locate the program name. If no library is specified program called to convert the parameter value.
as the current library for the job, the QGPL library is
used. KEYPARM Parameter
Specifies whether the parameter is a key parameter.
library-name: Specify the name of the library where Key parameters can be used only if a prompt override
the program name is located.
program is specified on the PMTOVRPGM parameter of
program-name: Specify the name of the program called the CRTCMD or CHGCMD commands. The prompt
during prompting to fill in the possible choices text or a override program overrides the command processing
permissible value. program (CPP) by showing only the key parameters on
the initial prompt display. Values must be input for these
If an exception occurs when the program is called, no
parameters before the remaining parameters are shown.
possible choices text will be left blank, and the list of
The remaining parameters are shown on the prompt
permissible values will be taken from the command.
display with the actual values, instead of *SAME or
PMTCTL Parameter *PRV.
Specifies how prompting is controlled for this parameter. *NO: The parameter is not a key parameter.
Prompting may be conditioned by another parameter,
*YES: The parameter is a key parameter. The following
specified by a PMTCTL statement referred to by label in
rules are followed if *YES is specified:
this parameter, or called for by pressing the F10 key.
*NONE: Specifies that this parameter is always 1. Key parameters must be placed before non-key
prompted, unless it is omitted due to selective parameters in the command definition statement.
prompting. 2. Key parameters appear on the prompt display in the
*PMTRQS: Specifies that this parameter is not same order as they appear in the command defi-
prompted unless: nition statement.
3. Key parameters are valid only if a prompt override
Ÿ The user requests additional parameters.
program is specified on the PMTOVRPGM param-
Ÿ A value was entered for the parameter before the eter of the CRTCMD or CHGCMD commands; if a
prompt was called. prompt override program is not specified, the key
parameters are treated as non-key parameters, and
statement-label: Specifies the label of the PMTCTL
a warning message is issued.
statement that is used to determine whether this param-
eter is prompted. The parameter is not prompted
unless:

Chapter 1. Command Definition Statements P1-25


PARM (Parameter)

4. Key parameters must not be the only parameters in for before parameters having no prompt numbers and
the command definition statement; if they are, a that have PMTCTL(*PMTRQS) coded.
warning message is sent.
'prompt-text' relative-prompt-number: Specify the prompt
PROMPT Parameter text that is displayed when the parameter is prompted.
Specifies the prompt text, if any, that is used for the The text must be a character string of no more than 30
parameter named by the KWD parameter. The prompt characters, enclosed in apostrophes. An optional rela-
text further describes the keyword and input field to the tive prompt number can be specified with the prompt
user, who may enter a response to the information dis- text, the same as for the message identifier option.
played. For example, the prompt text for the TYPE
parameter on the Create Library (CRTLIB) command is: Examples
Library Type (*PROD *TEST):
PARM KWD(X) TYPE(\DEC) LEN(2) MIN(1) REL(\GT 5)
When the prompt for the command is displayed, the
prompt for the TYPE parameter is: The value for the parameter named X, a 2-digit decimal
Library Type (*PROD *TEST): TYPE *PROD number, must be entered. The value must be greater than 5.

The underscored field is the prompt input field where the PARM KWD(CLASS) TYPE(\CHAR) LEN(1)
user enters the value for the TYPE parameter. When DFT(A) VALUES(A B C) RSTD(\YES)
the prompt is displayed, the prompt input field contains
the default value (*PROD in this example). Prompt text The value of the parameter named CLASS must be A, B, or
cannot be specified if TYPE(*ZEROELEM) or C, if entered. If it is not present, A is assumed.
TYPE(*NULL) is specified or if a constant value is speci-
PARM KWD(MAXREC) TYPE(\DEC) LEN(3)
fied in the CONSTANT parameter.
MIN(1) RANGE(&MINREC 999)
*NONE: No prompt text is displayed for the parameter
defined by this PARM statement. This parameter is still The value of the MAXREC parameter must be entered as a
asked for by its keyword name, but no text is displayed decimal number of 3 digits or less, with no digits to the right
with it. of the decimal point. The value must be greater than or
equal to the value entered for parameter MINREC and also
message-identifier relative-prompt-number: Specify the
must be less than or equal to 999.
message identifier that specifies the message that con-
tains the prompt text of up to 30 characters that is dis- PARM KWD(FILES) TYPE(\NAME) MIN(2) MAX(5)
played when the parameter is prompted. If a message
having the specified identifier cannot be found in the The FILES parameter is a homogeneous list that contains 2
message file specified in the PMTFILE parameter of the to 5 names.
Create Command (CRTCMD) command, the message
identifier itself is used as the prompt text. PARM KWD(INVFNAME) TYPE(\NAME) DFT(\ALL)
SNGVAL((\ALL XXX)) VALUES(DEPT1 DEPT2 DEPT3)
Optionally, a relative prompt number can be specified FILE(\UPD) MIN(ð) MAX(3) RSTD(\YES)
with the message identifier. The relative prompt number PROMPT(USRððð2 1)
specifies the order in which parameter keywords are to
be asked for. This order affects only the order of The value of the parameter named INVFNAME can be a list
prompting, not the order in which the parameters are of up to three file names of which DEPT1, DEPT2, DEPT3,
passed to the CPP. Parameters having prompt numbers and *ALL are the valid choices. If *ALL is entered, no other
are asked for before parameters having no prompt values can be entered for the parameter. If this parameter is
numbers. Parameters having no prompt numbers and omitted, file name XXX is passed to the command pro-
that do not have PMTCTL(*PMTRQS) coded are asked cessing program. If this parameter is entered through the
prompt, the prompt text, as stored in the message file, is dis-
played and *ALL is listed as the default.

P1-26 OS/400 CL Reference - Part 2 (Full Version)


PMTCTL (Prompt Control)

PMTCTL (Prompt Control) Statement


The Prompt Control (PMTCTL) statement specifies a condition that is tested to determine if prompting is done for the parame-
ters whose PARM statement refers to the PMTCTL statement.

The PMTCTL statement (or the first PMTCTL statement if there is more than one) must have a statement label that matches
the label referred to in the PMTCTL parameter of one or more PARM statements in the command definition source.

55──PMTCTL──CTL──(──keyword-name──)──COND──(──┬─\SPCFD───────────────────────────┬──)───────────────────────────────────────────5
├─\UNSPCFD─────────────────────────┤
│ ┌──
───────────────────────────┐ │
└──6─relational-operator-value─┴───
(1) ─┘

5──┬───────────────────────────────────────────────┬──┬────────────────────────┬───────────────────────────────────────────────5%
│ ┌─\ALL───────────────────────┐ │ │ ┌─\AND─┐ │
└─NBRTRUE──(──┴─relational-operator-number─┴──)─┘ └─LGLREL──(──┴─\OR──┴──)─┘
Note:
1 A maximum of 50 repetitions

CTL Parameter parameter. Valid values are *GT, *EQ, *GE, *NL, *LT,
Specifies the name of the parameter that controls the *NE, *LE, and *NG.
prompting. The value of the parameter specified here is
LGLREL Parameter
compared to the value specified in the COND parameter.
Specifies, when multiple PMTCTL statements are in a
If the PMTCTLPGM parameter is coded for the param-
group, the logical relationship of the statement to the
eter specified here, the value returned by the program
previous statements in the group. This parameter is not
specified in the PMTCTLPGM parameter is compared to
allowed on the first PMTCTL statement in a group.
the values specified in the COND parameter. If the
parameter specified here is a list or qualified name, only *AND: This statement is in an AND relationship of the
the first list element or qualifier is compared. statement to the previous statements in the group.

COND Parameter *OR: This statement is in an OR relationship with the


Specifies the condition against which the parameter previous PMTCTL statement or statements. Statements
specified in the CTL parameter is tested. Up to 50 con- in an OR relationship are evaluated after AND relation-
ditions can be specified. ships are evaluated.

*SPCFD: The condition is true, including the default


value, if it is specified for the control parameter. Example
*UNSPCFD: The condition is true only if the control A: PMTCTL CTL(TYPE) COND((\EQ \) (\EQ \LIST)) NBTRUE(\EQ 1)
parameter is not specified. It is not true if the default
value is specified. If TYPE(*) or TYPE(*LIST) is specified, the parameters which
reference this PMTCTL statement are selected for prompting.
relational-operator-value: Specify the relational operator
B: PMTCTL CTL(P1) COND((\EQ \ALL)
and value used to compare the value of the control
PMTCTL CTL(P1) COND((\EQ \SOME) LGLREL(\OR)
parameter to the value specified in the COND param-
PMTCTL CTL(P2) COND((\EQ \ALL) LGLREL(\AND)
eter. Valid values are *GT, *EQ, *NL, *LT, *NE, *LE, PMTCTL CTL(P1) COND((\EQ \NONE) LGLREL(\OR)
and *NG. PMTCTL CTL(P2) COND((\NE \ALL) LGLREL(\AND)
NBRTRUE Parameter
The parameters which refers to this group of PMTCTL state-
Specifies the number of conditions (indicated in the
ments are selected for prompting if any of the following con-
COND parameter) that must be true if the parameter is
ditions exist:
prompted.
Ÿ *ALL is specified for P1.
*ALL: All the conditions must be true.
Ÿ *SOME is specified for P1 and *ALL is specified for P2.
relational-operator-value: Specify the relational operator
and number used to compare the number of conditions Ÿ *NONE is specified for P1 and *ALL is not specified for
that are true to the number specified in the NBRTRUE P2.

Chapter 1. Command Definition Statements P1-27


QUAL (Qualifier)

QUAL (Qualifier) Statement


The Qualifier (QUAL) statement describes one part of a qualified name. If a name is the allowed value of a parameter or list
element defined in a PARM or ELEM statement, it can be changed to a qualified name by using a QUAL statement for each
qualifier used to qualify the name.

The order in which the QUAL statements are entered into the source file determines the positional order in which the qualifiers
must be specified and passed to the validity checker and the command processing program (CPP).

The QUAL statement (or only the first QUAL statement if there is more than one) must have a statement label that matches the
statement label value that must be specified in a PARM or ELEM statement for which the qualifier is being defined. The
| qualifiers for the parameter or list element are then entered on the command in the form value3/value2/value1 where values 1
| through 3 are qualifiers described by a QUAL statement.
Note: In the System/38 environment, the values are passed in sequential order with periods as delimiters. An example of this
form is value1.value2.value3.

The values are passed with each value padded to its defined length and with the delimiters (slashes or periods) removed.
Note: The QUAL statement contains certain parameters and predefined values that can be used only when IBM-supplied
CPPs are called by the command being defined. Limitations in some high-level languages reduce the usefulness of
these values in the definition statements of user-defined commands. These parameters and values are identified by the
phrase “(For IBM-supplied commands)” that immediately follows the parameter keyword (if the entire parameter is for
IBM-supplied commands only) or the predefined value to which it applies.
(P) ──┬───────────────────────┬──┬──────────────────────┬───────────────5
55──QUAL──TYPE──(──┬─\NAME────┬──)──┬───────────────────┬───
├─\SNAME───┤ └─LEN──(──length──)─┘ └─CONSTANT──(──value──)─┘ │ ┌─\NO──┐ │
├─\CNAME───┤ └─RSTD──(──┴─\YES─┴──)─┘
├─\GENERIC─┤
├─\CHAR────┤
├─\INT2────┤
└─\INT4────┘
5──┬────────────────────────────────────────────────────────────┬──┬───────────────────────────────────────────────┬────────────5
│ ┌──
───────┐ │ └─SPCVAL──(──┬─from-value──────────────────┬──)─┘
└─DFT──(──┬─VALUES───6─value─┴───
(1) ────────────────────────┬──)─┘ │ ┌──
──────────────────────┐ │
├─REL──relational-operator-value──────────────┤ └──6─from-value──to-value─┴───
(1) ─┘
└─RANGE──lower-limit-value──upper-limit-value─┘
5──┬──────────────────────────┬──┬────────────────────────┬──┬──────────────────┬──┬──────────────────────┬─────────────────────5
│ ┌─\YES─┐ │ │ ┌─\YES─┐ │ │ ┌─ð─┐ │ │ ┌─\NO──┐ │
└─ALWUNPRT──(──┴─\NO──┴──)─┘ └─ALWVAR──(──┴─\NO──┴──)─┘ └─MIN──(──┴─1─┴──)─┘ └─FULL──(──┴─\YES─┴──)─┘
5──┬──────────────────────┬──┬──────────────────────┬──┬─────────────────────────┬──┬─────────────────────────────┬─────────────5
│ ┌─\NO──┐ │ │ ┌─\NO──┐ │ │ ┌─\NO──┐ │ │ ┌─\YES────┐ │
└─EXPR──(──┴─\YES─┴──)─┘ └─VARY──(──┴─\YES─┴──)─┘ └─PASSATR──(──┴─\YES─┴──)─┘ └─DSPINPUT──(──┼─\PROMPT─┼──)─┘
└─\NO─────┘
5──┬──────────────────────────────────────┬──┬──────────────────────────────────────────────────────┬───────────────────────────5
│ ┌─\VALUES────────────┐ │ │ ┌─\NONE───────────────────────────┐ │
└─CHOICE──(──┼─\NONE──────────────┼──)─┘ │ │ ┌─\LIBL/────────┐ │ │
├─\PGM───────────────┤ └─CHOICEPGM──(──┴─┼───────────────┼──program-name─┴──)─┘
├─message-identifier─┤ ├─\CURLIB/──────┤
└─'choices-text'─────┘ └─library-name/─┘
5──┬──────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\NONE──────────────┐ │
└─PROMPT──(──┼─message-identifier─┼──)─┘
└─'prompt-text'──────┘
Notes:
1 A maximum of 300 repetitions

P All parameters preceding this point can be specified in positional form.

TYPE Parameter *NAME: The qualifier is a character string that repre-


Specifies the type of qualifier used to qualify a param- sents a name. The maximum length of the name is 256
eter name or list element name. The qualifier can be a characters. The first character must be alphabetic
name or generic name, a quoted or unquoted character (including the special characters $, #, or @), and the
string, or an integer. Enter one of the following options remaining characters must be alphanumeric, a period, or
to specify the type of qualifier. The first qualifier for any an underscore. The name must be a string of charac-
qualified name must have a type of name (*NAME) or ters starting and ending with double quotation marks (").
generic name (*GENERIC).

P1-28 OS/400 CL Reference - Part 2 (Full Version)


QUAL (Qualifier)

If a special value is used (as in *LIBL or *NONE), it must


Default
be specified in the SPCVAL parameter. Data Type Length Maximum Length1
*SNAME: The qualifier is a character string that repre- *INT44 11
sents a name. The maximum length of the name is 256 1 The maximum length shown here is the maximum length allowed
characters. The first character must be alphabetic by Command Definition. The high-level language used as the
(including the special characters $, @, or #), and the CPP for the command may have a different maximum lengths for
remaining characters must be A through Z, 0 through 9, these data types (for example, *DEC values in CL programs have
or $, #, or @. Periods (.) are not allowed. If a special a maximum length of (15 9)).
value is used (as in *LIBL or *NONE), it should be speci- 2 Whereas the maximum shown here is the maximum for values
fied in the SPCVAL parameter. used in the command when it is run, the maximum length of char-
acter constants specified in the command definition is limited to
*CNAME: The qualifier is a character string that repre- 32 characters. This restriction applies to the following parame-
sents a name. The maximum length of the name is 256 ters: CONSTANT, DFT, VALUES, REL, RANGE, and SPCVAL.
characters. The first character must be alphabetic 3 For *INT2, length cannot be specified; its assumed length is 6.
(including the special characters $, #, or @), and the The value must meet the following condition: -215< value < 2
15-1. The value is passed as a 2-byte signed binary number.
remaining characters must be A through Z, 0 through 9,
4 For *INT4, length cannot be specified; its assumed length is 11.
$, #, or @. Periods (.) and underscores (__) are not
The value must meet the following condition: -231< value < 2
allowed. If a special value is used (as in *LIBL or 31-1. The value is passed as a 4-byte signed binary number.
*NONE), it must be specified in the SPCVAL parameter.
*GENERIC: The qualifier is a character string that CONSTANT Parameter
represents a generic name. A generic name contains a Specifies that a value is passed to the CPP as a con-
maximum of 255 characters followed by an asterisk (*) stant for the qualifier when the command being defined
or 256 characters without an asterisk. The name identi- is processed; the qualifier does not appear externally on
fies a group of objects whose names all begin with the the command. If specified, the value must satisfy the
characters preceding the *. If an asterisk (*) is not requirements specified by the TYPE, LEN, VALUES,
included, the system assumes that the generic name is REL, RANGE, and SPCVAL parameters. (As noted in
a complete object name. the LEN parameter chart, if a character constant is spec-
*CHAR: The qualifier is a character string that can ified in this parameter, it can be no longer than 32 char-
(optionally) be enclosed in apostrophes. If the character acters.)
string contains any special characters (not including an If a constant is specified in this QUAL statement, and
asterisk (*)), it must be enclosed in apostrophes. The other QUAL statements immediately follow it, they must
maximum length of the character string is 5000 charac- also be defined as constants, unless a label precedes
ters. one of them. A label indicates the beginning of a new
*INT2: The qualifier is an integer that is passed as a group of QUAL statements, which can be defined differ-
2-byte signed binary number. CL programs do not ently.
support binary values in variables. Also, if a constant is specified for the qualifier being
*INT4: The qualifier is an integer that is passed as a defined, no prompt text can be specified for the
4-byte signed binary number. CL programs do not PROMPT parameter of this QUAL statement. However,
support binary values in variables. any other qualifiers or groups of qualifiers are still
prompted, and their values are still passed to the CPP
LEN Parameter as a qualified name.
Specifies the length of the qualifier, if its data type is
*NAME, *GENERIC, or *CHAR. The default length that The CONSTANT parameter is not valid if the DFT
is assumed by the system and the maximum length for parameter is specified or if *YES is specified on the
each type of qualifier are shown in the following table: EXPR parameter.
Variables cannot be coded for this parameter.
Default
Data Type Length Maximum Length1 RSTD Parameter
Specifies whether the value entered for the qualifier is
*NAME 10 2562
restricted to only one of the values given in the VALUES
*SNAME 10 2562 or SPCVAL parameters, or whether any value can be
*CNAME 10 2562 used that satisfies the requirements specified by the
*GENERIC 10 2562 TYPE, LEN, REL, RANGE, and SPCVAL parameters.
*CHAR 32 50002 *NO: The value entered for the qualifier defined by this
QUAL statement can be anything that satisfies the
*INT23 6
requirements specified by the TYPE, LEN, REL,
RANGE, and SPCVAL parameters in this QUAL state-
ment.

Chapter 1. Command Definition Statements P1-29


QUAL (Qualifier)

*YES: The value entered for the qualifier defined by this the relationship, enter one of the following relational
QUAL statement is restricted to one of the values in the operators followed by a constant or the value of another
VALUES parameter, or to one of the from-values in the parameter.
SPCVAL parameters.
*LT less than
DFT Parameter *LE less than or equal to
Specifies the default value assigned to the qualifier if a *EQ equal to
value is not specified by the user. The default value *GE greater than or equal to
must satisfy one of the following: *GT greater than
*NL not less than
Ÿ It must match the qualifier requirements specified by
*NE not equal to
the TYPE, LEN, REL, and RANGE parameters.
*NG not greater than
Ÿ It must be one of the from-values in the SPCVAL
The REL parameter is not valid if either RANGE or
parameter.
VALUES is specified. If a character type is specified by
Ÿ If RSTD(*YES) is specified, it must be in the list of TYPE(*CHAR), the EBCDIC value of the character string
values in the VALUES parameter or in the list of is used as an unsigned integer in the comparison. As
from-values in the SPCVAL parameter. noted in the LEN parameter chart, if a character con-
Ÿ If the default is a character constant, it can have no stant is specified in this parameter, it can be no longer
more than 32 characters as noted in the LEN than 32 characters.
parameter chart. RANGE Parameter
The DFT parameter is valid only if the MIN parameter is Specifies the range (limits) for the value of the qualifier.
0, which means the qualifier defined by this QUAL state- The qualifier value must be greater than or equal to the
ment for this list is optional. A default is not meaningful lower limit value specified, and it must be less than or
on this QUAL statement if it is the first one (defining the equal to the upper limit value specified. For example, 15
first part) for a qualified name and if a default is speci- would be valid if the RANGE parameter was specified as
fied on the PARM or ELEM statement that this QUAL (0 16). For nonnumeric data types, such as *CHAR, the
statement further defines. range of values and the data specified is left-justified
and padded on the right with blanks. A numerical range
If DFT is not specified, it has a default of its own: a should not be used to define an interval for nonnumeric
blank (␣) if TYPE was specified as *CHAR, *NAME, data unless leading zeros are specified or the data is
*SNAME, *CNAME, or *GENERIC; or a zero (0) if TYPE only 1 character in length. The RANGE parameter is
was specified as *INT2 or *INT4. An assumed default not valid if either the REL or VALUES parameter is
value is not displayed by the command prompt; a blank specified. As noted in the LEN parameter chart, char-
input field is shown instead. If a default is specified in acter constants specified in this parameter can be no
the DFT parameter, it is displayed by the prompt exactly longer than 32 characters.
as specified.
SPCVAL Parameter
The DFT parameter is not valid if the CONSTANT
Specifies a list of up to 300 entries that define special
parameter is specified.
values that can be entered on the parameter named in
value: Specify the default value that meets the specified the KWD parameter on the PARM statement. Each
requirements or that is one of the values specified in the entry specifies a character string (a from-value) that can
SPCVAL or VALUES parameters. be entered even though it may not meet all validity
Variables cannot be coded for this value. checking requirements. If the entered character string
matches the from-value of one of the entries, and the
VALUES Parameter to-value is specified, the string is replaced with the to-
Specifies a list of up to 300 constants (fixed values) from value and is then passed to the CPP without further
which one constant can be entered as the value of the checking. If the to-value is omitted, the from-value is
qualifier. The VALUES parameter is valid only if all of passed to the CPP. The from-value is a character
the following are true: RSTD(*YES) is specified, both string, but the to-value can be anything that is passable.
RANGE and REL are not specified, and the constant If a CL variable is used for the from-value, its type must
matches the attributes specified by the TYPE and LEN be *CHAR.
parameters in this QUAL statement. As noted in the
However, the first qualifier can only have special to-
LEN parameter chart, character constants specified in
values with the from-values that are a name, a generic
this parameter can be no longer than 32 characters.
name, or an asterisk, followed by a name, such as *ALL.
Enter the constants (not more than 300) that can be
specified as the value of the qualifier. Each to-value must be passable to the CPP. The to-
value must be no longer than the LEN parameter speci-
REL Parameter
fies and, if TYPE is *INT2 or *INT4, the type of the
Specifies the relationship between the qualifier value and
to-value must be the same; if TYPE is a character type
the value of another parameter or constant. To specify

P1-30 OS/400 CL Reference - Part 2 (Full Version)


QUAL (Qualifier)

(such as *CHAR or *NAME), the to-value must be a EXPR Parameter


character string. As noted in the LEN parameter chart, Specifies whether the qualifier can accept an expression
character constants specified in this parameter can be containing a character concatenation. Valid character
no longer than 32 characters. If a to-value is not speci- concatenation operators are as follows:
fied, the from-value must be passable.
Concatenation *CAT or, ||
If a to-value of *CURLIB is specified, the name of the Blank insertion with concatenation *BCAT or, |>
current job library is passed to the CPP instead of the Blank truncation with concatenation *TCAT or, |<
value *CURLIB. If the from-value is *CURLIB and no
to-value is specified, or if the to-value is *CURLIB and it *NO: The qualifier value cannot be a concatenation
is enclosed in apostrophes, the value *CURLIB is expression.
passed to the CPP. *YES: The qualifier value can be a concatenation
Variables cannot be coded for this value. expression.

ALWUNPRT Parameter VARY Parameter


Specifies whether this QUAL statement should accept Specifies whether the qualifier value passed to the CPP
the hexadecimal characters X'FF' or those in the range is preceded by a length value that indicates the number
of X'00' to X'3F'. This parameter is valid only for of characters entered for the qualifier's value.
TYPE(*CHAR) or TYPE(*X). *NO: The qualifier value is not preceded by a length
*YES: Any characters can be sent to the display or value.
printer. *YES: The qualifier value passed to the CPP is pre-
*NO: Unprintable characters cannot be passed to the ceded by a 2-byte binary length field that indicates the
command processing program. number of characters actually specified for the qualifier.
The data is passed in a field of the length specified by
ALWVAR Parameter LEN or by the default length. *YES is valid only for the
Specifies whether to allow variable names for the qual- following qualifier types: *CHAR, *NAME, *SNAME,
ifier. If TYPE was specified as *VARNAME, *CNAME, or *GENERIC. If a CL variable is specified for
*ZEROELEM, *NULL, or statement-label, ALWVAR(*NO) this qualifier, the 2-byte binary length field contains the
is not allowed. length of the variable value with trailing blanks removed,
*YES: Variable names can be used for the qualifier. not the declared length of the CL variable.
*NO: Variable names cannot be used for the qualifier. PASSATR Parameter
(For IBM-supplied commands) Specifies whether an attri-
MIN Parameter
bute byte is to be passed to the CPP with the qualifier.
Specifies whether the qualifier being defined in this
QUAL statement is required or optional. If MIN is not *NO: No attribute byte is passed with the qualifier.
specified, 0 is assumed, which means the qualifier is *YES: An attribute byte is passed with the qualifier; the
optional. If a required qualified name is needed, MIN(1) attribute byte indicates whether the data value came
must be coded on both the first QUAL statement and on from the default, the data type of the value, and, if
the PARM or ELEM statement that references it. TYPE(*CHAR) was specified, whether the character
0: The qualifier is optional on the name being qualified. string was enclosed in apostrophes.
1: The qualifier is required on the name being qualified; DSPINPUT Parameter
it must be entered. Specifies whether the keyword value is shown in the job
log or on a prompt screen.
FULL Parameter
Specifies whether the number of characters in the qual- Note: The DSPINPUT parameter will have no effect on
ifier value must be exactly the same as the number the job log entries for a database reader job, for
specified in the LEN parameter (if specified) or its default imbedded commands (for example, a command
length (if LEN is not specified). submitted on the SBMJOB command), or for
commands executed using the QCMDEXC or
*NO: The number of characters in the qualifier value
QCAEXEC APIs.
can be less than that specified by the LEN parameter.
*YES: The parameter value is shown on the prompt
*YES: The number of characters in the qualifier value
display and in the job log.
must equal the number specified by the LEN parameter
or the default length for that type. The exact length is *PROMPT: The parameter value is shown on the
valid only for the *CHAR, *NAME, and *GENERIC qual- prompt display but not in the job log.
ifier types. *NO: The parameter value is not shown either in the job
log or on a prompt display. When a previously entered
command is retrieved, the nondisplay field entries must
be retyped (their previous values are not retrievable).

Chapter 1. Command Definition Statements P1-31


QUAL (Qualifier)

When a job log entry is created, the nondisplay field is and the permissible values during prompting. This
replaced by empty parentheses (). parameter must be specified if CHOICE(*PGM) is speci-
fied, and may not be specified otherwise.
CHOICE Parameter
Specifies the text that is displayed to the right of the *NONE: No program is identified to fill in the possible
prompt line of each parameter on the prompt screen. choices text and permissible values.
Up to 30 characters of text can be displayed. The possible library values are:
*VALUES: Each possible value is displayed in the pos-
*LIBL: The library list is used to locate the program
sible values field, separated by a comma and a space.
name.
If values are specified for the Default, Single value, or
Special value parameters, the first value displayed is the *CURLIB: The current library for the job is used to
default value; the next value is a single value, and the locate the program name. If no library is specified
values following that are special values. If there are too as the current library for the job, the QGPL library is
many values to fit in 30 characters, the last value is fol- used.
lowed by three periods. library-name: Specify the name of the library where
Examples of possible values text follow: the program name is located.

Ÿ If *NO is specified on the RSTD parameter and program-name: Specify the name of the program to be
*DEC is specified on the TYPE parameter and the called during prompting to fill in the possible choices text
RANGE parameter is not specified, the word or a permissible value.
"RANGE" is displayed in the possible values field. If an exception occurs when the program is called, no
The resulting line will appear in the form: RANGE, possible choices text is left blank, and the list of permis-
*XXX, *YYY, *ZZZ... sible values is taken from the command.
Ÿ If *NO is specified on the RSTD parameter and
PROMPT Parameter
*DEC is specified on the TYPE parameter and the
Specifies the prompt text, if any, that is used for the
RANGE parameter is specified, the range of pos-
qualifier (defined in this QUAL statement). The
sible values is displayed in the possible values field.
PROMPT parameter is not allowed for the first qualifier
The resulting line will appear in the form: a-b,
or for a qualifier for which the CONSTANT parameter is
*XXX, *YYY, *ZZZ (where a and b are numerals
specified. The prompt text for the first qualifier comes
defining the range).
from the PARM or ELEM statement PROMPT parameter
Ÿ If *YES is specified on the RSTD parameter, the that points to the qualifier. The prompt text describes
possible values displayed are determined by the the qualifier input field to the user, who may enter a
VALUES parameter, the SNGVAL parameter, and response to the information displayed.
the SPCVAL parameter. The resulting line will
*NONE: No prompt text is shown for the qualifier
appear in the form: *XXX, *YYY, *ZZZ...
defined by this QUAL statement. This qualifier is still
*NONE: No values are displayed. prompted by an input field, but no text is shown with it.

*PGM: A program that is called determines the values message-identifier: Specify the message identifier that
that are displayed. The program that is called is identi- specifies the message containing the prompt text of up
fied in CHOICEPGM parameter. to 30 characters that is shown. When the program is
prompting for the qualifier. If a message having the
message-identifier: Specify the message ID of the specified identifier cannot be found in the message file
message used to retrieve the message containing the
specified in the PMTFILE parameter of the Create
text for the possible values field. The message file
Command (CRTCMD) command, the message identifier
specified on the PMTFILE parameter of the Create
itself is used as the prompt text.
Command (CRTCMD) command is used to find the
message. 'prompt-text': Specify the prompt text that is shown
when the program is prompting the qualifier. The text
'choices-text': Specify no more than 30 characters, must be a character string of no more than 30 charac-
enclosed in apostrophes.
ters, enclosed in apostrophes.
CHOICEPGM Parameter
Specifies the qualified name of the program that is called
during the prompting to fill in the possible choices text

P1-32 OS/400 CL Reference - Part 2 (Full Version)


QUAL (Qualifier)

QUAL (Qualifier) Example


Example 1: Defining a SPLFILE Parameter

Job: B,I

┌─\─────────────────────────────────────────────┐
55──SPLFILE(──┼─file-name─────────────────────────────────────┼──)─────────────────────────────────────────────────────────────5%
├─file-name─────────────────────────────────────┤
└───┬─────────────────────────────┬──job-name───┘
└─┬─────────────┬──user-name/─┘
└─job-number/─┘

Command definition statements:

PARM KWD(SPLFILE) TYPE(L1) DFT(\) SNGVAL(\)


L1: ELEM TYPE(\NAME) MIN(1) /\For file name \/
ELEM TYPE(Q1) /\For job name \/
Q1: QUAL TYPE(\NAME) MIN(1) /\For job name \/
QUAL TYPE(\NAME) /\For user name \/
QUAL TYPE(\CHAR) LEN(6) /\For job number \/

The SPLFILE parameter is optional and, if not specified, defaults to an asterisk (*). Otherwise, the value consists of a two-
element list. The first element is a file name and it is required. The second element is a qualified job name. The first qualifier
is required; the last two qualifiers are optional.

Example 2: Defining a DTAMBRS Parameter

Job: B,I

┌─\ALL──────────────────────────────────────────────────────────┐
│ ┌──
────────────────────────────────────────────────────────┐ │
│ │ ┌─\CURLIB/──────┐ ┌─\NONE───────┐ │ │
6 (1)
55──DTAMBRS(──┴───┼───────────────┼──physical-file-name──┼─────────────┼─┴────┴──)─────────────────────────────────────────────5%
└─library-name/─┘ └─member-name─┘
Note:
1 A maximum of 32 repetitions

Command definition statements:

PARM KWD(DTAMBRS) TYPE(L1) DFT(\ALL) MAX(32) +


SNGVAL(\ALL)
L1: ELEM TYPE(Q1) MIN(1)
ELEM TYPE(\NAME) MIN(ð) MAX(32) SNGVAL(\NONE) +
DFT(\NONE)
Q1: QUAL TYPE(\NAME) MIN(1)
QUAL TYPE(\NAME) DFT(\CURRENT) SPCVAL(\CURRENT)

The parameter named DTAMBRS is optional and, if not specified, defaults to *ALL. Otherwise, the value consists of a list,
each element of which is itself a list. Each sublist consists of a qualified file name optionally followed by one or more member
names. If no member name is specified, *NONE is taken as the default. If no library qualifier is specified for the physical file,
*CURRENT is taken as the default. This means that the library is the one currently indicated by the qualified physical file
name saved in the description of the logical file to which this DTAMBRS parameter applies. Each sublist can contain one file
name and up to 32 member names. Up to 32 such sublists can appear as the value of DTAMBRS.

Chapter 1. Command Definition Statements P1-33


QUAL (Qualifier)

P1-34 OS/400 CL Reference - Part 2 (Full Version)


Part 2. OS/400 CL Commands

Chapter 2. OS/400 Command Descriptions . . . P3-11 DSPDDMF (Display Distributed Data Management
DMPCLPGM (Dump Control Language Program) File) Command . . . . . . . . . . . . . . . . . . P3-75
Command . . . . . . . . . . . . . . . . . . . . . P3-12 DSPDEVD (Display Device Description) Command P3-77
DMPDLO (Dump Document Library Object) DSPDIRE (Display Directory Entries) Command . . P3-78
Command . . . . . . . . . . . . . . . . . . . . . P3-13 DSPDKT (Display Diskette) Command . . . . . . . P3-82
| DMPJOB (Dump Job) Command . . . . . . . . . . P3-14 DSPDLOAUD (Display Document Library Object
DMPJOBINT (Dump Job Internal) Command . . . P3-16 Audit) Command . . . . . . . . . . . . . . . . . P3-83
DMPOBJ (Dump Object) Command . . . . . . . . P3-17 DSPDLOAUT (Display Document Library Object
DMPSYSOBJ (Dump System Object) Command . P3-18 Authority) Command . . . . . . . . . . . . . . . P3-85
DMPTAP (Dump Tape) Command . . . . . . . . . P3-22 DSPDLONAM (Display Document Library Object
DMPTRC (Dump Trace) Command . . . . . . . . P3-26 Name) Command . . . . . . . . . . . . . . . . . P3-87
DO (Do) Command . . . . . . . . . . . . . . . . . P3-27 DSPDOC (Display Document) Command . . . . . P3-89
DSCJOB (Disconnect Job) Command . . . . . . . P3-28 DSPDSTL (Display Distribution List) Command . . P3-90
DSPACC (Display Access Code) Command . . . . P3-30 DSPDSTLOG (Display Distribution Log) Command P3-93
DSPACCAUT (Display Access Code Authority) DSPDSTSRV (Display Distribution Services)
Command . . . . . . . . . . . . . . . . . . . . . P3-31 Command . . . . . . . . . . . . . . . . . . . . . P3-97
DSPACTPJ (Display Active Prestart Jobs) Command P3-32 DSPDTAARA (Display Data Area) Command . . . P3-98
DSPACTPRFL (Display Active Profile List) Command P3-33 DSPDTADCT (Display Data Dictionary) Command P3-100
DSPACTSCD (Display Activation Schedule) DSPEDTD (Display Edit Description) Command . . P3-102
Command . . . . . . . . . . . . . . . . . . . . . P3-34 DSPEWCBCDE (Display Extended Wireless
DSPAPPNINF (Display APPN Information) Command P3-35 Controller Bar Code Entry) Command . . . . . . P3-103
DSPAUDJRNE (Display Audit Journal Entries) DSPEWCM (Display Extended Wireless Controller
Command . . . . . . . . . . . . . . . . . . . . . P3-37 Member) Command . . . . . . . . . . . . . . . . P3-104
DSPAUT (Display Authority) Command . . . . . . P3-40 DSPEWCPTCE (Display Extended Wireless
DSPAUTHLR (Display Authority Holder) Command P3-41 Controller PTC Entry) Command . . . . . . . . . P3-105
DSPAUTL (Display Authorization List) Command . P3-42 DSPEWLM (Display Extended Wireless Line
DSPAUTLDLO (Display Authorization List Document Member) Command . . . . . . . . . . . . . . . . P3-106
Library Objects) Command . . . . . . . . . . . . P3-44 DSPEXPSCD (Display Expiration Schedule)
DSPAUTLOBJ (Display Authorization List Objects) Command . . . . . . . . . . . . . . . . . . . . . P3-107
Command . . . . . . . . . . . . . . . . . . . . . P3-45 DSPFD (Display File Description) Command . . . P3-108
DSPAUTUSR (Display Authorized Users) Command P3-47 DSPFFD (Display File Field Description) Command P3-114
DSPBCKSTS (Display Backup Status) Command . P3-48 | DSPFLR (Display Folder) Command . . . . . . . . P3-117
DSPBCKUP (Display Backup Options) Command . P3-49 DSPFNTTBL (Display Font Table) Command . . . P3-119
DSPBCKUPL (Display Backup List) Command . . P3-50 | DSPFNTRSCA (Display Font Resource Attributes)
DSPBKP (Display Breakpoints) Command . . . . . P3-51 | Command . . . . . . . . . . . . . . . . . . . . . P3-120
DSPBNDDIR (Display Binding Directory) Command P3-52 DSPHDWRSC (Display Hardware Resources)
DSPCCTRTE (Display Circuit Route) Command . P3-54 Command . . . . . . . . . . . . . . . . . . . . . P3-121
DSPCCTSRV (Display Circuit Service) Command . P3-55 DSPHFS (Display Hierarchical File Systems)
DSPCDEFNT (Display Coded Font) Command . . P3-57 Command . . . . . . . . . . . . . . . . . . . . . P3-124
DSPCFGL (Display Configuration List) Command . P3-59 DSPHLPDOC (Display Help Document) Command P3-125
DSPCLS (Display Class) Command . . . . . . . . P3-60 DSPIGCDCT (Display DBCS Conversion Dictionary)
DSPCMD (Display Command) Command . . . . . P3-61 Command . . . . . . . . . . . . . . . . . . . . . P3-126
DSPCNNL (Display Connection List) Command . . P3-62 DSPIPLA (Display IPL Attributes) Command . . . P3-128
DSPCNNSTS (Display Connection Status) Command P3-63 DSPIPXCCT (Display IPX Circuit) Command . . . P3-129
DSPCOSD (Display Class-of-Service Description) DSPIPXD (Display IPX Description) Command . . P3-130
Command . . . . . . . . . . . . . . . . . . . . . P3-64 DSPJOB (Display Job) Command . . . . . . . . . P3-131
DSPCPCST (Display Check Pending Constraint) DSPJOBD (Display Job Description) Command . . P3-133
Command . . . . . . . . . . . . . . . . . . . . . P3-65 DSPJOBLOG (Display Job Log) Command . . . . P3-134
DSPCSI (Display Communications Side Information) DSPJOBTBL (Display Job Tables) Command . . . P3-136
Command . . . . . . . . . . . . . . . . . . . . . P3-66 | DSPJRN (Display Journal) Command . . . . . . . P3-137
DSPCTLD (Display Controller Description) Command P3-67 | DSPJRNRCVA (Display Journal Receiver Attributes)
DSPCURDIR (Display Current Directory) Command P3-68 | Command . . . . . . . . . . . . . . . . . . . . . P3-148
DSPDBG (Display Debug) Command . . . . . . . P3-69 DSPKBDMAP (Display Keyboard Map) Command P3-149
DSPDBGWCH (Display Debug Watches) Command P3-70 DSPLANADPP (Display Local Area Network Adapter
DSPDBR (Display Database Relations) Command P3-71 Profile) Command . . . . . . . . . . . . . . . . . P3-150

 Copyright IBM Corp. 1997, 1998 P3-1


DSPLANMLB (Display LAN Media Library) DSPPGMREF (Display Program References)
Command . . . . . . . . . . . . . . . . . . . . . P3-151 Command . . . . . . . . . . . . . . . . . . . . . P3-213
DSPLANSTS (Display Local Area Network Status) DSPPGMVAR (Display Program Variable)
Command . . . . . . . . . . . . . . . . . . . . . P3-152 Command . . . . . . . . . . . . . . . . . . . . . P3-216
DSPLIB (Display Library) Command . . . . . . . . P3-153 DSPPRB (Display Problem) Command . . . . . . P3-218
DSPLIBD (Display Library Description) Command . P3-155 DSPPSFCFG (Display Print Services Facility
DSPLIBL (Display Library List) Command . . . . . P3-156 Configuration) Command . . . . . . . . . . . . . P3-228
DSPLICKEY (Display License Key Information) DSPPTF (Display Program Temporary Fix)
Command . . . . . . . . . . . . . . . . . . . . . P3-157 Command . . . . . . . . . . . . . . . . . . . . . P3-229
DSPLIND (Display Line Description) Command . . P3-159 DSPPWRSCD (Display Power On/Off Schedule)
DSPLNK (Display Object Links) Command . . . . P3-161 Command . . . . . . . . . . . . . . . . . . . . . P3-231
DSPLOG (Display Log) Command . . . . . . . . . P3-163 DSPRCDLCK (Display Record Locks) Command . P3-232
DSPMFSINF (Display Mounted File System DSPRCYAP (Display Recovery for Access Paths)
Information) Command . . . . . . . . . . . . . . P3-166 Command . . . . . . . . . . . . . . . . . . . . . P3-233
DSPMNUA (Display Menu Attributes) Command . P3-167 DSPRDBDIRE (Display Relational Database
DSPMOD (Display Module) Command . . . . . . . P3-168 Directory Entry) Command . . . . . . . . . . . . P3-234
DSPMODD (Display Mode Description) Command P3-170 DSPRMTDFN (Display Remote Definition)
DSPMODSRC (Display Module Source) Command P3-171 Command . . . . . . . . . . . . . . . . . . . . . P3-236
DSPMODSTS (Display Mode Status) Command . P3-172 DSPSAVF (Display Save File) Command . . . . . P3-238
DSPMSG (Display Messages) Command . . . . . P3-173 DSPSBSD (Display Subsystem Description)
DSPMSGD (Display Message Descriptions) Command . . . . . . . . . . . . . . . . . . . . . P3-239
Command . . . . . . . . . . . . . . . . . . . . . P3-175 DSPSECA (Display Security Attributes) Command P3-240
DSPM36 (Display AS/400 Advanced 36 Machine) DSPSECAUD (Display Security Auditing Values)
Command . . . . . . . . . . . . . . . . . . . . . P3-177 Command . . . . . . . . . . . . . . . . . . . . . P3-241
DSPM36CFG (Display AS/400 Advanced 36 DSPSFWRSC (Display Software Resources)
Machine Configuration) Command . . . . . . . . P3-178 Command . . . . . . . . . . . . . . . . . . . . . P3-242
DSPNCK (Display Nickname) Command . . . . . P3-179 DSPSOCSTS (Display Sphere of Control Status)
DSPNETA (Display Network Attributes) Command P3-181 Command . . . . . . . . . . . . . . . . . . . . . P3-244
DSPNODGRP (Display Node Group) Command . P3-182 DSPSPLF (Display Spooled File) Command . . . . P3-245
DSPNTBD (Display NetBIOS Description) Command P3-183 DSPSRVA (Display Service Attributes) Command . P3-246
DSPNWID (Display Network Interface Description) DSPSRVPGM (Display Service Program) Command P3-247
Command . . . . . . . . . . . . . . . . . . . . . P3-184 DSPSRVSTS (Display Service Status) Command . P3-249
DSPNWSALS (Display Network Server Alias) DSPSYSSTS (Display System Status) Command . P3-250
Command . . . . . . . . . . . . . . . . . . . . . P3-185 DSPSYSVAL (Display System Value) Command . P3-251
DSPNWSA (Display Network Server Attributes) DSPS36 (Display System/36) Command . . . . . . P3-252
Command . . . . . . . . . . . . . . . . . . . . . P3-186 | DSPTAP (Display Tape) Command . . . . . . . . P3-253
| DSPNWSD (Display Network Server Description) DSPTAPCGY (Display Tape Category) Command P3-255
| Command . . . . . . . . . . . . . . . . . . . . . P3-187 DSPTAPCTG (Display Tape Cartridge) Command P3-256
DSPNWSSSN (Display Network Server Session) DSPTAPSTS (Display Tape Status) Command . . P3-258
Command . . . . . . . . . . . . . . . . . . . . . P3-188 DSPTRC (Display Trace) Command . . . . . . . . P3-259
DSPNWSSTC (Display Network Server Statistics) DSPTRCDTA (Display Trace Data) Command . . P3-260
Command . . . . . . . . . . . . . . . . . . . . . P3-189 DSPTM (Display Trademarks) Command . . . . . P3-261
DSPNWSUSR (Display Network Server Users) DSPUDFS (Display User-Defined File System)
Command . . . . . . . . . . . . . . . . . . . . . P3-191 Command . . . . . . . . . . . . . . . . . . . . . P3-262
| DSPNWSUSRA (Display Network Server User DSPUSRPMN (Display User Permission) Command P3-263
| Attributes) Command . . . . . . . . . . . . . . . P3-192 DSPUSRPRF (Display User Profile) Command . . P3-264
DSPOBJAUT (Display Object Authority) Command P3-193 DSPUSRPRTI (Display User Print Information)
| DSPOBJD (Display Object Description) Command P3-195 Command . . . . . . . . . . . . . . . . . . . . . P3-267
DSPOPCLNK (Display OptiConnect Link Status) DSPWSUSR (Display Work Station User) Command P3-268
Command . . . . . . . . . . . . . . . . . . . . . P3-198 DUPDKT (Duplicate Diskette) Command . . . . . P3-269
DSPOPT (Display Optical) Command . . . . . . . P3-199 DUPOPT (Duplicate Optical) Command . . . . . . P3-271
DSPOPTLCK (Display Optical Locks) Command . P3-202 | DUPTAP (Duplicate Tape) Command . . . . . . . P3-272
DSPOPTSVR (Display Optical Server) Command . P3-203 EDTAUTL (Edit Authorization List) Command . . . P3-276
DSPOVR (Display Override) Command . . . . . . P3-204 EDTBCKUPL (Edit Backup List) Command . . . . P3-277
DSPPDGPRF (Display Print Descriptor Group EDTCPCST (Edit Check Pending Constraints)
Profile) Command . . . . . . . . . . . . . . . . . P3-206 Command . . . . . . . . . . . . . . . . . . . . . P3-278
DSPPFM (Display Physical File Member) Command P3-207 EDTDLOAUT (Edit Document Library Object
DSPPGM (Display Program) Command . . . . . . P3-209 Authority) Command . . . . . . . . . . . . . . . P3-279
DSPPGMADP (Display Programs that Adopt) EDTDOC (Edit Document) Command . . . . . . . P3-280
Command . . . . . . . . . . . . . . . . . . . . . P3-211

P3-2 OS/400 CL Reference - Part 2 (Full Version)


EDTIGCDCT (Edit DBCS Conversion Dictionary) ENDPFRCOL (End Performance Collection)
Command . . . . . . . . . . . . . . . . . . . . . P3-281 Command . . . . . . . . . . . . . . . . . . . . . P3-338
EDTLIBL (Edit Library List) Command . . . . . . . P3-283 ENDPFRMON (End Performance Monitor)
EDTOBJAUT (Edit Object Authority) Command . . P3-284 Command . . . . . . . . . . . . . . . . . . . . . P3-339
EDTQST (Edit Questions and Answers) Command P3-285 ENDPGM (End Program) Command . . . . . . . . P3-340
EDTRBDAP (Edit Rebuild of Access Paths) | ENDPGMPRF (End Program Profiling) Command . P3-341
Command . . . . . . . . . . . . . . . . . . . . . P3-286 ENDPJ (End Prestart Jobs) Command . . . . . . . P3-342
EDTRCYAP (Edit Recovery for Access Paths) ENDPRTEML (End Printer Emulation) Command . P3-344
Command . . . . . . . . . . . . . . . . . . . . . P3-287 ENDRCV (End Receive) Command . . . . . . . . P3-345
EDTS36PGMA (Edit System/36 Program Attributes) ENDRDR (End Reader) Command . . . . . . . . . P3-346
Command . . . . . . . . . . . . . . . . . . . . . P3-288 ENDRMTSPT (End Remote Support) Command . P3-347
EDTS36PRCA (Edit System/36 Procedure ENDRQS (End Request) Command . . . . . . . . P3-348
Attributes) Command . . . . . . . . . . . . . . . P3-289 ENDSBS (End Subsystem) Command . . . . . . . P3-349
EDTS36SRCA (Edit System/36 Source Attributes) ENDSRVJOB (End Service Job) Command . . . . P3-351
Command . . . . . . . . . . . . . . . . . . . . . P3-290 ENDSYS (End System) Command . . . . . . . . . P3-352
EDTWSOAUT (Edit Workstation Object Authority) ENDS36 (End System/36) Command . . . . . . . P3-354
Command . . . . . . . . . . . . . . . . . . . . . P3-291 ENDTCP (End TCP/IP) Command . . . . . . . . . P3-355
EJTEMLOUT (Eject Emulation Output) Command . P3-293 ENDTCPCNN (End TCP/IP Connection) Command P3-357
ELSE (Else) Command . . . . . . . . . . . . . . . P3-294 ENDTCPIFC (End TCP/IP Interface) Command . . P3-359
EMLPRTKEY (Emulate Printer Key) Command . . P3-296 ENDTCPPTP (End Point-to-Point TCP/IP) Command P3-360
ENDBCHJOB (End Batch Job) Command . . . . . P3-297 ENDTCPSVR (End TCP/IP Server) Command . . P3-362
ENDCLNUP (End Cleanup) Command . . . . . . . P3-298 ENDTIESSN (End Technical Information Exchange
ENDCMNSVR (End Communications Server) Session) Command . . . . . . . . . . . . . . . . P3-364
Command . . . . . . . . . . . . . . . . . . . . . P3-299 ENDTRPMGR (End Trap Manager) Command . . P3-365
ENDCMNTRC (End Communications Trace) ENDUSF (End Ultimedia System Facilities)
Command . . . . . . . . . . . . . . . . . . . . . P3-300 Command . . . . . . . . . . . . . . . . . . . . . P3-366
ENDCMTCTL (End Commitment Control) Command P3-301 ENDWTR (End Writer) Command . . . . . . . . . P3-367
ENDCPYSCN (End Copy Screen) Command . . . P3-302 ERASE (Remove Link) Command . . . . . . . . . P3-368
ENDCTLRCY (End Controller Recovery) Command P3-303 EXPORTFS (Change Network File System Export)
ENDDBG (End Debug) Command . . . . . . . . . P3-304 Command . . . . . . . . . . . . . . . . . . . . . P3-370
ENDDBGSVR (End Debug Server) Command . . . P3-305 FILDOC (File Document) Command . . . . . . . . P3-371
ENDDBMON (End Database Monitor) Command . P3-306 GENCAT (Merge Message Catalog) Command . . P3-379
ENDDEVRCY (End Device Recovery) Command . P3-307 GO (Go to Menu) Command . . . . . . . . . . . . P3-380
ENDDIRSHD (End Directory Shadowing) Command P3-308 GOTO (Go To) Command . . . . . . . . . . . . . P3-382
ENDDO (End Do) Command . . . . . . . . . . . . P3-309 GRTACCAUT (Grant Access Code Authority)
| ENDDSKRGZ (End Disk Reorganization) Command P3-310 Command . . . . . . . . . . . . . . . . . . . . . P3-383
ENDGRPJOB (End Group Job) Command . . . . P3-311 GRTOBJAUT (Grant Object Authority) Command . P3-385
ENDHOSTSVR (End Host Server) Command . . . P3-312 GRTUSRAUT (Grant User Authority) Command . . P3-389
ENDINP (End Input) Command . . . . . . . . . . P3-313 GRTUSRPMN (Grant User Permission) Command P3-390
ENDIPIIFC (End IP over IPX Interface) Command P3-314 GRTWSOAUT (Grant Workstation Object Authority)
ENDIPSIFC (End IP over SNA Interface) Command P3-315 Command . . . . . . . . . . . . . . . . . . . . . P3-391
ENDIPX (End IPX) Command . . . . . . . . . . . P3-316 HLDCMNDEV (Hold Communications Device)
ENDIPXCCT (End IPX Circuit) Command . . . . . P3-317 Command . . . . . . . . . . . . . . . . . . . . . P3-394
ENDJOB (End Job) Command . . . . . . . . . . . P3-318 HLDDSTQ (Hold Distribution Queue) Command . . P3-395
ENDJOBABN (End Job Abnormal) Command . . . P3-321 HLDJOB (Hold Job) Command . . . . . . . . . . . P3-396
| ENDJRNAP (End Journal Access Path) Command P3-323 HLDJOBQ (Hold Job Queue) Command . . . . . . P3-398
| ENDJRNPF (End Journal Physical File) Command P3-324 HLDJOBSCDE (Hold Job Schedule Entry)
ENDLINRCY (End Line Recovery) Command . . . P3-325 Command . . . . . . . . . . . . . . . . . . . . . P3-399
ENDMOD (End Mode) Command . . . . . . . . . P3-326 HLDOUTQ (Hold Output Queue) Command . . . . P3-400
ENDMSF (End Mail Server Framework) Command P3-328 HLDRDR (Hold Reader) Command . . . . . . . . P3-401
ENDM36 (End AS/400 Advanced 36 Machine) HLDSPLF (Hold Spooled File) Command . . . . . P3-402
Command . . . . . . . . . . . . . . . . . . . . . P3-329 HLDWTR (Hold Writer) Command . . . . . . . . . P3-404
ENDNFSSVR (End Network File System Server) IF (If) Command . . . . . . . . . . . . . . . . . . P3-405
Command . . . . . . . . . . . . . . . . . . . . . P3-330 INSFLMSVR (Install FlowMark Server) Command . P3-407
ENDNWIRCY (End Network Interface Recovery) INSNWSAPP (Install Network Server Application)
Command . . . . . . . . . . . . . . . . . . . . . P3-332 Command . . . . . . . . . . . . . . . . . . . . . P3-410
ENDNWSAPP (End Network Server Application) INSPTF (Install Program Temporary Fix) Command P3-413
Command . . . . . . . . . . . . . . . . . . . . . P3-333 INZDKT (Initialize Diskette) Command . . . . . . . P3-416
ENDPASTHR (End Pass-Through) Command . . . P3-335 INZDSTQ (Initialize Distribution Queue) Command P3-419
ENDPEX (End Performance Explorer) Command . P3-336 INZOPT (Initialize Optical) Command . . . . . . . P3-421

Part 2. OS/400 CL Commands P3-3


INZPCS (Initialize Client Access) Command . . . . P3-423 PRTQAUT (Print Queue Authority) Command . . . P3-595
INZPFM (Initialize Physical File Member) Command P3-425 PRTSBSDAUT (Print Subsystem Description
INZSYS (Initialize System) Command . . . . . . . P3-427 Authority ) Command . . . . . . . . . . . . . . . P3-596
INZTAP (Initialize Tape) Command . . . . . . . . P3-428 PRTSQLINF (Print Structured Query Language
IPXPING Command . . . . . . . . . . . . . . . . P3-432 Information) Command . . . . . . . . . . . . . . P3-597
LNKDTADFN (Link Data Definition) Command . . P3-433 PRTSWL (Print Stop Word List) Command . . . . P3-598
LODPTF (Load Program Temporary Fix) Command P3-435 | PRTSYSINF (Print System Information) Command P3-599
LODQSTDB (Load Question-and-Answer Database) PRTSYSSECA (Print System Security Attributes)
Command . . . . . . . . . . . . . . . . . . . . . P3-438 Command . . . . . . . . . . . . . . . . . . . . . P3-600
LODRUN (Load and Run Media Program) PRTTRGPGM (Print Trigger Program) Command . P3-601
Command . . . . . . . . . . . . . . . . . . . . . P3-439 PRTUSROBJ (Print User Objects) Command . . . P3-602
MD (Create Directory) Command . . . . . . . . . P3-442 PRTUSRPRF (Print User Profile) Command . . . . P3-603
MKDIR (Create Directory) Command . . . . . . . P3-445 PWRDWNSYS (Power Down System) Command . P3-605
MONMSG (Monitor Message) Command . . . . . P3-448 QRYDOCLIB (Query Document Library) Command P3-608
MOUNT (Add Mounted File System) Command . . P3-451 QRYDST (Query Distribution) Command . . . . . P3-617
MOV (Move) Command . . . . . . . . . . . . . . P3-452 QRYPRBSTS (Query Problem Status) Command . P3-620
MOVDOC (Move Document) Command . . . . . . P3-454 QRYTIEF (Query Technical Information Exchange
MOVE (Move) Command . . . . . . . . . . . . . . P3-456 File) Command . . . . . . . . . . . . . . . . . . P3-622
MOVOBJ (Move Object) Command . . . . . . . . P3-458 | QSH (Start QSH) Command . . . . . . . . . . . . P3-623
MRGMSGCLG (Merge Message Catalog) Command P3-460 RCLACTGRP (Reclaim Activation Group) Command P3-624
MRGMSGF (Merge Message File) Command . . . P3-463 RCLDDMCNV (Reclaim Distributed Data
MRGTCPHT (Merge TCP/IP Host Table) . . . . . P3-465 Management Conversations) Command . . . . . P3-625
NETSTAT Command . . . . . . . . . . . . . . . . P3-467 | RCLDLO (Reclaim Document Library Object)
OPNDBF (Open Database File) . . . . . . . . . . P3-468 | Command . . . . . . . . . . . . . . . . . . . . . P3-626
OPNQRYF (Open Query File) Command . . . . . P3-471 RCLLIB (Reclaim Library) Command . . . . . . . . P3-629
OVRDBF (Override with Database File) Command P3-499 RCLOPT (Reclaim Optical) Command . . . . . . . P3-630
OVRDKTF (Override with Diskette File) Command P3-506 RCLRSC (Reclaim Resources) Command . . . . . P3-631
OVRDSPF (Override with Display File) Command . P3-511 RCLSPLSTG (Reclaim Spool Storage) Command . P3-634
OVRICFDEVE (Override with Intersystem RCLSTG (Reclaim Storage) Command . . . . . . P3-635
Communications Function Program Device Entry) RCLTMPSTG (Reclaim Temporary Storage)
Command . . . . . . . . . . . . . . . . . . . . . P3-515 Command . . . . . . . . . . . . . . . . . . . . . P3-638
OVRICFF (Override with Intersystem RCVDST (Receive Distribution) Command . . . . P3-640
Communications Function File) Command . . . . P3-523 RCVF (Receive File) Command . . . . . . . . . . P3-644
OVRMSGF (Override with Message File) Command P3-526 | RCVJRNE (Receive Journal Entry) Command . . . P3-646
| OVRPRTF (Override with Printer File) Command . P3-527 RCVMSG (Receive Message) Command . . . . . P3-658
OVRSAVF (Override with Save File) Command . . P3-544 RCVNETF (Receive Network File) Command . . . P3-667
OVRTAPF (Override with Tape File) Command . . P3-547 RCVTIEF (Receive Technical Information Exchange
PGM (Program) Command . . . . . . . . . . . . . P3-557 File) Command . . . . . . . . . . . . . . . . . . P3-670
PING Command . . . . . . . . . . . . . . . . . . P3-559 RD (Remove Directory) Command . . . . . . . . . P3-671
POSDBF (Position Database File) Command . . . P3-560 REN (Rename) Command . . . . . . . . . . . . . P3-673
PRTADPOBJ (Print Adopting Objects) Command . P3-561 RETURN (Return) Command . . . . . . . . . . . P3-674
PRTAFPDTA (Print Advanced Function Printer Data) RGZDLO (Reorganize Document Library Object)
Command . . . . . . . . . . . . . . . . . . . . . P3-562 Command . . . . . . . . . . . . . . . . . . . . . P3-675
PRTCMDUSG (Print Command Usage) Command P3-564 RGZPFM (Reorganize Physical File Member)
PRTCMNSEC (Print Communications Security) Command . . . . . . . . . . . . . . . . . . . . . P3-677
Command . . . . . . . . . . . . . . . . . . . . . P3-566 RLSCMNDEV (Release Communications Device)
PRTCMNTRC (Print Communications Trace) Command . . . . . . . . . . . . . . . . . . . . . P3-680
Command . . . . . . . . . . . . . . . . . . . . . P3-567 RLSDSTQ (Release Distribution Queue) Command P3-681
PRTDEVADR (Print Device Addresses) Command P3-570 RLSIFSLCK (Release Integrated File System Locks)
PRTDOC (Print Document) Command . . . . . . . P3-571 Command . . . . . . . . . . . . . . . . . . . . . P3-682
PRTDSKINF (Print Disk Information) Command . . P3-581 RLSJOB (Release Job) Command . . . . . . . . . P3-683
PRTERRLOG (Print Error Log) Command . . . . . P3-583 RLSJOBQ (Release Job Queue) Command . . . . P3-684
PRTINTDTA (Print Internal Data) Command . . . . P3-587 RLSJOBSCDE (Release Job Schedule Entry)
PRTIPSCFG (Print IP over SNA Configuration) Command . . . . . . . . . . . . . . . . . . . . . P3-685
Command . . . . . . . . . . . . . . . . . . . . . P3-589 RLSOUTQ (Release Output Queue) Command . . P3-686
PRTJOBDAUT (Print Job Description Authority) RLSRDR (Release Reader) Command . . . . . . P3-687
Command . . . . . . . . . . . . . . . . . . . . . P3-590 RLSRMTPHS (Release Remote Phase) Command P3-688
PRTPUBAUT (Print Publicly Authorized Objects) RLSSPLF (Release Spooled File) Command . . . P3-689
Command . . . . . . . . . . . . . . . . . . . . . P3-591 RLSWTR (Release Writer) Command . . . . . . . P3-691
PRTPVTAUT (Print Private Authorities) Command P3-593 RMDIR (Remove Directory) Command . . . . . . . P3-692

P3-4 OS/400 CL Reference - Part 2 (Full Version)


RMVACC (Remove Access Code) Command . . . P3-694 RMVJOBSCDE (Remove Job Schedule Entry)
RMVAJE (Remove Autostart Job Entry) Command P3-695 Command . . . . . . . . . . . . . . . . . . . . . P3-739
RMVALRD (Remove Alert Description) Command . P3-696 | RMVJRNCHG (Remove Journaled Changes)
RMVAUTLE (Remove Authorization List Entry) | Command . . . . . . . . . . . . . . . . . . . . . P3-740
Command . . . . . . . . . . . . . . . . . . . . . P3-697 RMVLANADPI (Remove LAN Adapter Information)
RMVBKP (Remove Breakpoint) Command . . . . P3-698 Command . . . . . . . . . . . . . . . . . . . . . P3-744
RMVCCTRTE (Remove Circuit Route) Command . P3-699 RMVLANADPT (Remove LAN Adapter) Command P3-745
RMVCCTSRV (Remove Circuit Service) Command P3-700 RMVLIBLE (Remove Library List Entry) Command P3-746
RMVBNDDIRE (Remove Binding Directory Entry) RMVLICKEY (Remove License Key Information)
Command . . . . . . . . . . . . . . . . . . . . . P3-702 Command . . . . . . . . . . . . . . . . . . . . . P3-747
RMVCFGLE (Remove Configuration List Entries) RMVLNK (Remove Link) Command . . . . . . . . P3-749
Command . . . . . . . . . . . . . . . . . . . . . P3-703 RMVM (Remove Member) Command . . . . . . . P3-751
RMVCMNE (Remove Communications Entry) RMVMFS (Remove Mounted File System)
Command . . . . . . . . . . . . . . . . . . . . . P3-706 Command . . . . . . . . . . . . . . . . . . . . . P3-752
RMVCNNLE (Remove Connection List Entry) RMVMSG (Remove Message) Command . . . . . P3-753
Command . . . . . . . . . . . . . . . . . . . . . P3-708 RMVMSGD (Remove Message Description)
RMVCOMSNMP (Remove Community for SNMP) Command . . . . . . . . . . . . . . . . . . . . . P3-756
Command . . . . . . . . . . . . . . . . . . . . . P3-709 RMVNCK (Remove Nickname) Command . . . . . P3-757
RMVDIR (Remove Directory) Command . . . . . . P3-710 RMVNETJOBE (Remove Network Job Entry)
RMVDIRE (Remove Directory Entry) Command . . P3-711 Command . . . . . . . . . . . . . . . . . . . . . P3-758
RMVDIRSHD (Remove Directory Shadow System) RMVNETTBLE (Remove Network Table Entry)
Command . . . . . . . . . . . . . . . . . . . . . P3-713 Command . . . . . . . . . . . . . . . . . . . . . P3-759
RMVDLOAUT (Remove Document Library Object RMVNODLE (Remove Node List Entry) Command P3-760
Authority) Command . . . . . . . . . . . . . . . P3-714 RMVNWSSTGL (Remove Network Server Storage
RMVDSTLE (Remove Distribution List Entry) Link) command . . . . . . . . . . . . . . . . . . P3-762
Command . . . . . . . . . . . . . . . . . . . . . P3-716 RMVOPTCTG (Remove Optical Cartridge)
RMVDSTQ (Remove Distribution Queue) Command P3-718 Command . . . . . . . . . . . . . . . . . . . . . P3-763
RMVDSTRTE (Remove Distribution Route) RMVOPTSVR (Remove Optical Server) Command P3-764
Command . . . . . . . . . . . . . . . . . . . . . P3-719 RMVPCLTBLE (Remove Protocol Table Entry)
RMVDSTSYSN (Remove Distribution Secondary Command . . . . . . . . . . . . . . . . . . . . . P3-765
System Name) Command . . . . . . . . . . . . P3-720 RMVPEXDFN (Remove Performance Explorer
RMVEMLCFGE (Remove Emulation Configuration Definition) Command . . . . . . . . . . . . . . . P3-766
Entry) Command . . . . . . . . . . . . . . . . . P3-721 | RMVPFCST (Remove Physical File Constraint)
RMVEWCBCDE (Remove Extended Wireless | Command . . . . . . . . . . . . . . . . . . . . . P3-767
Controller Bar Code Entry) Command . . . . . . P3-722 RMVPFTRG (Remove Physical File Trigger)
RMVEWCPTCE (Remove Extended Wireless Command . . . . . . . . . . . . . . . . . . . . . P3-769
Controller PTC Entry) Command . . . . . . . . . P3-723 RMVPGM (Remove Program) Command . . . . . P3-771
RMVEXITPGM (Remove Exit Program) Command P3-724 RMVPJE (Remove Prestart Job Entry) Command . P3-772
RMVFNTTBLE (Remove Font Table Entry) | RMVPTF (Remove Program Temporary Fix)
Command . . . . . . . . . . . . . . . . . . . . . P3-725 | Command . . . . . . . . . . . . . . . . . . . . . P3-773
RMVFTRACNE (Remove Filter Action Entry) RMVRDBDIRE (Remove Relational Database
Command . . . . . . . . . . . . . . . . . . . . . P3-728 Directory Entry) Command . . . . . . . . . . . . P3-775
RMVFTRSLTE (Remove Filter Selection Entry) RMVREXBUF (Remove REXX Buffer) Command . P3-776
Command . . . . . . . . . . . . . . . . . . . . . P3-729 RMVRMTDFN (Remove Remote Definition)
RMVICFDEVE (Remove Intersystem Command . . . . . . . . . . . . . . . . . . . . . P3-777
Communications Function Program Device Entry) RMVRPYLE (Remove Reply List Entry) Command P3-778
Command . . . . . . . . . . . . . . . . . . . . . P3-730 RMVRTGE (Remove Routing Entry) Command . . P3-779
RMVIPIADR (Remove IP over IPX Address) RMVSCHIDXE (Remove Search Index Entry)
Command . . . . . . . . . . . . . . . . . . . . . P3-731 Command . . . . . . . . . . . . . . . . . . . . . P3-780
RMVIPIIFC (Remove IP over IPX Interface) RMVSNILOC (Remove SNA over IPX Location)
Command . . . . . . . . . . . . . . . . . . . . . P3-732 Command . . . . . . . . . . . . . . . . . . . . . P3-781
RMVIPIRTE (Remove IP over IPX Route) Command P3-733 RMVSOCE (Remove Sphere of Control Entry)
RMVIPSIFC (Remove IP over SNA interface) Command . . . . . . . . . . . . . . . . . . . . . P3-782
Command . . . . . . . . . . . . . . . . . . . . . P3-734 RMVSRVTBLE (Remove Service Table Entry)
RMVIPSLOC (Remove IP over SNA Location Entry) Command . . . . . . . . . . . . . . . . . . . . . P3-783
Command . . . . . . . . . . . . . . . . . . . . . P3-735 | RMVSVRAUTE (Remove Server Authentication
RMVIPSRTE (Remove IP over SNA Route) | Entry) Command . . . . . . . . . . . . . . . . . P3-784
Command . . . . . . . . . . . . . . . . . . . . . P3-736 RMVTAPCTG (Remove Tape Cartridge) Command P3-785
RMVIPXCCT (Remove IPX Circuit) Command . . P3-737 RMVTCPHTE (Remove TCP/IP Host Table Entry)
RMVJOBQE (Remove Job Queue Entry) Command P3-738 Command . . . . . . . . . . . . . . . . . . . . . P3-787

Part 2. OS/400 CL Commands P3-5


RMVTCPIFC (Remove TCP/IP Interface) Command P3-788 RSTUSFCNR (Restore Ultimedia System Facilities
RMVTCPPORT (Remove TCP/IP Port Restriction) Container) Command . . . . . . . . . . . . . . . P3-882
Command . . . . . . . . . . . . . . . . . . . . . P3-789 RSTUSRPRF (Restore User Profiles) Command . P3-885
RMVTCPRSI (Remove TCP/IP Remote System RTVAUTLE (Retrieve Authorization List Entry)
Information) Command . . . . . . . . . . . . . . P3-790 Command . . . . . . . . . . . . . . . . . . . . . P3-889
RMVTCPRTE (Remove TCP/IP Route) Command P3-791 RTVBCKUP (Retrieve Backup) Command . . . . . P3-892
| RMVTCPTBL (Remove TCP/IP Table) Command . P3-793 RTVBNDSRC (Retrieve Binder Source) Command P3-894
RMVTRC (Remove Trace) Command . . . . . . . P3-794 RTVCFGSRC (Retrieve Configuration Source)
RMVUSFCNNE (Remove Ultimedia System Command . . . . . . . . . . . . . . . . . . . . . P3-896
Facilities Connection Entry) Command . . . . . . P3-796 RTVCFGSTS (Retrieve Configuration Status)
RMVUSFDEVE (Remove Ultimedia System Facilities Command . . . . . . . . . . . . . . . . . . . . . P3-898
Device Entry) Command . . . . . . . . . . . . . P3-797 RTVCLNUP (Retrieve Cleanup) Command . . . . P3-900
RMVUSFSVRE (Remove Ultimedia System Facilities RTVCLSRC (Retrieve CL Source) Command . . . P3-902
Server Entry) Command . . . . . . . . . . . . . P3-798 RTVCURDIR (Retrieve Current Directory) Command P3-903
RMVWSE (Remove Work Station Entry) Command P3-799 RTVDLOAUT (Retrieve Document Library Object
RNM (Rename) Command . . . . . . . . . . . . . P3-801 Authority) Command . . . . . . . . . . . . . . . P3-904
RNMCNNLE (Rename Connection List Entry) RTVDLONAM (Retrieve Document Library Object
Command . . . . . . . . . . . . . . . . . . . . . P3-802 Name) Command . . . . . . . . . . . . . . . . . P3-908
RNMDIRE (Rename Directory Entry) Command . . P3-803 RTVDOC (Retrieve Document) Command . . . . . P3-910
RNMDKT (Rename Diskette) Command . . . . . . P3-805 RTVDSKINF (Retrieve Disk Information) Command P3-914
RNMDLO (Rename Document Library Object) RTVDTAARA (Retrieve Data Area) Command . . . P3-915
Command . . . . . . . . . . . . . . . . . . . . . P3-806 RTVGRPA (Retrieve Group Attributes) Command . P3-917
RNMDSTL (Rename Distribution List) Command . P3-807 RTVJOBA (Retrieve Job Attributes) Command . . P3-920
RNMLANADPI (Rename Local Area Network | RTVJRNE (Retrieve Journal Entry) Command . . . P3-925
Adapter Information) Command . . . . . . . . . P3-808 RTVLIBD (Retrieve Library Description) Command P3-933
RNMM (Rename Member) Command . . . . . . . P3-809 RTVMBRD (Retrieve Member Description)
RNMNCK (Rename Nickname) Command . . . . . P3-810 Command . . . . . . . . . . . . . . . . . . . . . P3-934
RNMOBJ (Rename Object) Command . . . . . . . P3-811 RTVMSG (Retrieve Message) Command . . . . . P3-938
RNMTCPHTE (Rename TCP/IP Host Table Entry) RTVNETA (Retrieve Network Attributes) Command P3-941
Command . . . . . . . . . . . . . . . . . . . . . P3-813 RTVOBJD (Retrieve Object Description) Command P3-947
ROLLBACK (Rollback) Command . . . . . . . . . P3-814 RTVPDGPRF (Retrieve Print Descriptor Group
| RPCBIND (Start RPC Binder Daemon) Command P3-815 Profile) Command . . . . . . . . . . . . . . . . . P3-952
| RPCGEN (Convert RPC Source) Command . . . . P3-816 RTVPWRSCDE (Retrieve Power On/Off Schedule
RPLDOC (Replace Document) Command . . . . . P3-817 Entry) Command . . . . . . . . . . . . . . . . . P3-953
RQSORDAST (Request Order Assistance) RTVQMFORM (Retrieve Query Management Form)
Command . . . . . . . . . . . . . . . . . . . . . P3-820 Command . . . . . . . . . . . . . . . . . . . . . P3-954
RRTJOB (Reroute Job) Command . . . . . . . . . P3-821 RTVQMQRY (Retrieve Query Management Query)
RSMBKP (Resume Breakpoint) Command . . . . P3-822 Command . . . . . . . . . . . . . . . . . . . . . P3-956
RSMCTLRCY (Resume Controller Recovery) RTVSWLSRC (Retrieve Stop Word List Source)
Command . . . . . . . . . . . . . . . . . . . . . P3-823 Command . . . . . . . . . . . . . . . . . . . . . P3-958
RSMDEVRCY (Resume Device Recovery) RTVSYSVAL (Retrieve System Value) Command . P3-959
Command . . . . . . . . . . . . . . . . . . . . . P3-824 | RTVSYSINF (Retrieve System Information)
RSMLINRCY (Resume Line Recovery) Command P3-825 | Command . . . . . . . . . . . . . . . . . . . . . P3-960
RSMNWIRCY (Resume Network Interface RTVS36A (Retrieve System/36 Attributes) Command P3-961
Recovery) Command . . . . . . . . . . . . . . . P3-826 | RTVTBSRC (Retrieve Table Source) Command . . P3-963
RST (Restore) Command . . . . . . . . . . . . . P3-827 RTVUSRPRF (Retrieve User Profile) Command . . P3-965
RSTAUT (Restore Authority) Command . . . . . . P3-832 RTVUSRPRTI (Retrieve User Print Information)
RSTCFG (Restore Configuration) Command . . . P3-834 Command . . . . . . . . . . . . . . . . . . . . . P3-970
RSTDLO (Restore Document Library Object) RTVWSCST (Retrieve Work Station Customizing
Command . . . . . . . . . . . . . . . . . . . . . P3-838 Object Source) Command . . . . . . . . . . . . P3-971
RSTLIB (Restore Library) Command . . . . . . . . P3-844 RUNBCKUP (Run Backup) Command . . . . . . . P3-973
RSTLICPGM (Restore Licensed Program) RUNLPDA (Run LPDA-2) Command . . . . . . . . P3-974
Command . . . . . . . . . . . . . . . . . . . . . P3-853 RUNQRY (Run Query) Command . . . . . . . . . P3-977
RSTOBJ (Restore Object) Command . . . . . . . P3-858 RUNRMTCMD (Run Remote Command) Command P3-982
RSTSHF (Restore Bookshelf) Command . . . . . P3-867 RVKACCAUT (Revoke Access Code Authority)
RSTS36F (Restore System/36 File) Command . . P3-869 Command . . . . . . . . . . . . . . . . . . . . . P3-985
RSTS36FLR (Restore System/36 Folder) Command P3-874 RVKOBJAUT (Revoke Object Authority) Command P3-986
RSTS36LIBM (Restore System/36 Library Members) RVKPUBAUT (Revoke Public Authority) Command P3-990
Command . . . . . . . . . . . . . . . . . . . . . P3-878 RVKUSRPMN (Revoke User Permission) Command P3-991

P3-6 OS/400 CL Reference - Part 2 (Full Version)


RVKWSOAUT (Revoke Workstation Object SNDNWSMSG (Send Network Server Message)
Authority) Command . . . . . . . . . . . . . . . P3-992 Command . . . . . . . . . . . . . . . . . . . . P3-1162
SAV (Save) Command . . . . . . . . . . . . . . . P3-995 SNDPGMMSG (Send Program Message)
SAVAPARDTA (Save APAR Data) Command . . P3-1002 Command . . . . . . . . . . . . . . . . . . . . P3-1163
SAVCFG (Save Configuration) Command . . . . P3-1003 | SNDPTFORD (Send Program Temporary Fix
SAVCHGOBJ (Save Changed Object) Command P3-1007 | Order) Command . . . . . . . . . . . . . . . . P3-1170
SAVDLO (Save Document Library Object) SNDRCVF (Send/Receive File) Command . . . . P3-1173
Command . . . . . . . . . . . . . . . . . . . . P3-1017 SNDRPY (Send Reply) Command . . . . . . . . P3-1175
SAVLIB (Save Library) Command . . . . . . . . P3-1027 SNDSRVRQS (Send Service Request) Command P3-1177
SAVLICPGM (Save Licensed Program) Command P3-1037 SNDTIEF (Send Technical Information Exchange
SAVOBJ (Save Object) Command . . . . . . . . P3-1041 File) Command . . . . . . . . . . . . . . . . . P3-1178
SAVRST (Save/Restore Objects) Command . . . P3-1051 SNDUSRMSG (Send User Message) Command P3-1179
SAVRSTCFG (Save/Restore Configuration) STATFS (Display Mounted File System
Command . . . . . . . . . . . . . . . . . . . . P3-1054 Information) Command . . . . . . . . . . . . . P3-1183
SAVRSTCHG (Save/Restore Changed Object) STRCLNUP (Start Cleanup) Command . . . . . P3-1184
Command . . . . . . . . . . . . . . . . . . . . P3-1056 STRCMNSVR (Start Communications Server)
SAVRSTDLO (Save/Restore Document Library Command . . . . . . . . . . . . . . . . . . . . P3-1185
Object) Command . . . . . . . . . . . . . . . . P3-1060 | STRCMNTRC (Start Communications Trace)
SAVRSTLIB (Save/Restore Library) Command . P3-1064 | Command . . . . . . . . . . . . . . . . . . . . P3-1186
SAVRSTOBJ (Save/Restore Object) Command . P3-1068 | STRCMTCTL (Start Commitment Control)
SAVSAVFDTA (Save Save File Data) Command P3-1072 | Command . . . . . . . . . . . . . . . . . . . . P3-1189
SAVSECDTA (Save Security Data) Command . P3-1076 STRCPYSCN (Start Copy Screen) Command . . P3-1192
SAVSHF (Save Bookshelf) Command . . . . . . P3-1080 STRDBG (Start Debug) Command . . . . . . . . P3-1194
SAVSTG (Save Storage) Command . . . . . . . P3-1083 STRDBGSVR (Start Debug Server) Command . P3-1199
SAVSYS (Save System) Command . . . . . . . P3-1085 STRDBMON (Start Database Monitor) Command P3-1200
SAVS36F (Save System/36 File) Command . . . P3-1089 STRDBRDR (Start Database Reader) Command P3-1202
SAVS36LIBM (Save System/36 Library Members) STRDIRSHD (Start Directory Shadowing)
Command . . . . . . . . . . . . . . . . . . . . P3-1095 Command . . . . . . . . . . . . . . . . . . . . P3-1204
SAVUSFCNR (Save Ultimedia System Facilities STRDKTRDR (Start Diskette Reader) Command P3-1205
Container) Command . . . . . . . . . . . . . . P3-1099 STRDKTWTR (Start Diskette Writer) Command . P3-1207
SBMDBJOB (Submit Database Jobs) Command P3-1103 | STRDSKRGZ (Start Disk Reorganization)
SBMDKTJOB (Submit Diskette Jobs) Command P3-1105 | Command . . . . . . . . . . . . . . . . . . . . P3-1209
SBMFNCJOB (Submit Finance Job) Command . P3-1107 STREDU (Start Education) Command . . . . . . P3-1210
SBMJOB (Submit Job) Command . . . . . . . . P3-1109 STREML3270 (Start 3270 Display Emulation)
SBMNETJOB (Submit Network Job) Command . P3-1116 Command . . . . . . . . . . . . . . . . . . . . P3-1211
SBMNWSCMD (Submit Network Server Command) STRFMA (Start Font Management Aid) Command P3-1217
Command . . . . . . . . . . . . . . . . . . . . P3-1118 STRHOSTSVR (Start Host Server) Command . . P3-1218
SBMRMTCMD (Submit Remote Command) STRIDD (Start Interactive Data Definition Utility)
Command . . . . . . . . . . . . . . . . . . . . P3-1121 Command . . . . . . . . . . . . . . . . . . . . P3-1220
SETATNPGM (Set Attention Program) Command P3-1124 STRINFSKR (Start InfoSeeker) Command . . . . P3-1221
SETCSTDTA (Set Customization Data) Command P3-1126 STRIPIIFC (Start IP over IPX Interface) Command P3-1223
SETKBDMAP (Set Keyboard Map) Command . . P3-1127 STRIPSIFC (Start IP over SNA interface)
SETOBJACC (Set Object Access) Command . . P3-1129 Command . . . . . . . . . . . . . . . . . . . . P3-1224
SETTAPCGY (Set Tape Category) Command . . P3-1131 STRIPX (Start IPX) Command . . . . . . . . . . P3-1225
SIGNOFF (Sign Off) Command . . . . . . . . . P3-1133 STRIPXCCT (Start IPX Circuit) Command . . . . P3-1226
SLTCMD (Select Command) Command . . . . . P3-1134 STRITF (Start Interactive Terminal Facility)
SNDBRKMSG (Send Break Message) Command P3-1135 Command . . . . . . . . . . . . . . . . . . . . P3-1227
SNDDST (Send Distribution) Command . . . . . P3-1137 | STRJRNAP (Start Journal Access Path) Command P3-1228
SNDDSTQ (Send Distribution Queue) Command P3-1147 | STRJRNPF (Start Journal Physical File) Command P3-1230
SNDEMLIGC (Send DBCS 3270PC Emulation STRMOD (Start Mode) Command . . . . . . . . P3-1232
Code) Command . . . . . . . . . . . . . . . . P3-1148 STRMSF (Start Mail Server Framework) Command P3-1233
SNDF (Send File) Command . . . . . . . . . . . P3-1149 STRM36 (Start AS/400 Advanced 36 Machine)
SNDFNCIMG (Send Finance Diskette Image) Command . . . . . . . . . . . . . . . . . . . . P3-1234
Command . . . . . . . . . . . . . . . . . . . . P3-1151 STRM36PRC (Start AS/400 Advanced 36 Machine
| SNDJRNE (Send Journal Entry) Command . . . P3-1152 Procedure) Command . . . . . . . . . . . . . . P3-1236
SNDMSG (Send Message) Command . . . . . . P3-1154 STRNFSSVR (Start Network File System Server)
SNDNETF (Send Network File) Command . . . . P3-1156 Command . . . . . . . . . . . . . . . . . . . . P3-1238
SNDNETMSG (Send Network Message) Command P3-1158 | STRNWSAPP (Start Network Server Application)
SNDNETSPLF (Send Network Spooled File) | Command . . . . . . . . . . . . . . . . . . . . P3-1240
Command . . . . . . . . . . . . . . . . . . . . P3-1159 STROBJCVN (Start Object Conversion) Command P3-1242

Part 2. OS/400 CL Commands P3-7


STRPASTHR (Start Pass-Through) Command . P3-1244 VFYAPPCCNN (Verify APPC Connection)
STRPEX (Start Performance Explorer) Command P3-1247 Command . . . . . . . . . . . . . . . . . . . . P3-1341
STRPFRCOL (Start Performance Collection) VFYCMN (Verify Communications) Command . . P3-1343
Command . . . . . . . . . . . . . . . . . . . . P3-1248 VFYIPXCNN (Verify IPX Connection) Command P3-1345
| STRPFRMON (Start Performance Monitor) VFYLNKLPDA (Verify Link Supporting LPDA-2)
| Command . . . . . . . . . . . . . . . . . . . . P3-1249 Command . . . . . . . . . . . . . . . . . . . . P3-1347
STRPGMMNU (Start Programmer Menu) VFYOPCCNN (Verify OptiConnect Connections)
Command . . . . . . . . . . . . . . . . . . . . P3-1254 Command . . . . . . . . . . . . . . . . . . . . P3-1349
| STRPGMPRF (Start Program Profiling) Command P3-1257 VFYOPT (Verify Optical) Command . . . . . . . P3-1350
STRPJ (Start Prestart Jobs) Command . . . . . P3-1258 VFYPRT (Verify Printer) Command . . . . . . . P3-1351
STRPRTEML (Start Printer Emulation) Command P3-1259 VFYTAP (Verify Tape) Command . . . . . . . . P3-1352
STRPRTWTR (Start Printer Writer) Command . . P3-1265 | VFYTCPCNN (Verify TCP/IP Connection)
STRQMPRC (Start Query Management Procedure) | Command . . . . . . . . . . . . . . . . . . . . P3-1353
Command . . . . . . . . . . . . . . . . . . . . P3-1269 VRYCFG (Vary Configuration) Command . . . . P3-1355
STRQMQRY (Start Query Management Query) WAIT (Wait) Command . . . . . . . . . . . . . . P3-1359
Command . . . . . . . . . . . . . . . . . . . . P3-1272 WRKACTJOB (Work with Active Jobs) Command P3-1360
STRQRY (Start Query) Command . . . . . . . . P3-1276 WRKALR (Work with Alerts) Command . . . . . P3-1363
| STRQSH (Start QSH) Command . . . . . . . . . P3-1277 WRKALRD (Work with Alert Descriptions)
STRQST (Start Question and Answer) Command P3-1279 Command . . . . . . . . . . . . . . . . . . . . P3-1366
STRREXPRC (Start REXX Procedure) Command P3-1280 WRKALRTBL (Work with Alert Tables) Command P3-1367
STRRMTSPT (Start Remote Support) Command P3-1282 | WRKAPPNSTS (Work with APPN Status)
STRRMTWTR (Start Remote Writer) Command . P3-1284 | Command . . . . . . . . . . . . . . . . . . . . P3-1369
STRSBS (Start Subsystem) Command . . . . . P3-1286 WRKAUT (Work with Authority) Command . . . P3-1371
STRSCHIDX (Start Search Index) Command . . P3-1288 WRKAUTL (Work with Authorization Lists)
STRSPTN (Start Support Network) Command . . P3-1289 Command . . . . . . . . . . . . . . . . . . . . P3-1372
STRSRVJOB (Start Service Job) Command . . . P3-1290 WRKBNDDIR (Work with Binding Directories)
STRSST (Start System Service Tools) Command P3-1291 Command . . . . . . . . . . . . . . . . . . . . P3-1373
STRS36 (Start System/36) Command . . . . . . P3-1292 WRKBNDDIRE (Work with Binding Directory
STRS36PRC (Start System/36 Procedure) Entries) Command . . . . . . . . . . . . . . . P3-1374
Command . . . . . . . . . . . . . . . . . . . . P3-1293 WRKBPTBL (Work with BOOTP Table) Command P3-1375
STRTCP (Start TCP/IP) Command . . . . . . . . P3-1294 WRKCCTRTE (Work with Circuit Routes)
STRTCPIFC (Start TCP/IP Interface) Command . P3-1296 Command . . . . . . . . . . . . . . . . . . . . P3-1376
STRTCPPTP (Start Point-to-Point TCP/IP) WRKCCTSRV (Work with Circuit Services)
Command . . . . . . . . . . . . . . . . . . . . P3-1297 Command . . . . . . . . . . . . . . . . . . . . P3-1377
STRTCPSVR (Start TCP/IP Server) Command . P3-1299 WRKCFGL (Work with Configuration Lists)
STRTIESSN (Start Technical Information Exchange Command . . . . . . . . . . . . . . . . . . . . P3-1378
Session) Command . . . . . . . . . . . . . . . P3-1302 WRKCFGSTS (Work with Configuration Status)
STRTRPMGR (Start Trap Manager) Command . P3-1303 Command . . . . . . . . . . . . . . . . . . . . P3-1379
STRUSF (Start Ultimedia System Facilities) WRKCHTFMT (Work with Chart Formats)
Command . . . . . . . . . . . . . . . . . . . . P3-1304 Command . . . . . . . . . . . . . . . . . . . . P3-1382
TFRBCHJOB (Transfer Batch Job) Command . . P3-1305 WRKCLS (Work with Classes) Command . . . . P3-1384
TFRCTL (Transfer Control) Command . . . . . . P3-1307 WRKCMD (Work with Commands) Command . . P3-1386
TFRGRPJOB (Transfer to Group Job) Command P3-1309 WRKCMTDFN (Work with Commitment Definitions)
TFRJOB (Transfer Job) Command . . . . . . . . P3-1311 Command . . . . . . . . . . . . . . . . . . . . P3-1388
TFRM36 (Transfer to AS/400 Advanced 36 WRKCNNL (Work with Connection Lists)
Machine) Command . . . . . . . . . . . . . . . P3-1313 Command . . . . . . . . . . . . . . . . . . . . P3-1390
TFRPASTHR (Transfer Pass-Through) Command P3-1316 WRKCNNLE (Work with Connection List Entries)
TFRSECJOB (Transfer Secondary Job) Command P3-1317 Command . . . . . . . . . . . . . . . . . . . . P3-1391
TRCCPIC (Trace CPI Communications) Command P3-1318 WRKCNTINF (Work with Contact Information)
TRCICF (Trace ICF) Command . . . . . . . . . P3-1320 Command . . . . . . . . . . . . . . . . . . . . P3-1392
TRCINT (Trace Internal) Command . . . . . . . P3-1322 WRKCOSD (Work with Class-of-Service
TRCJOB (Trace Job) Command . . . . . . . . . P3-1326 Descriptions) Command . . . . . . . . . . . . P3-1393
TRCREX (Trace REXX) Command . . . . . . . P3-1329 WRKCSI (Work with Communications Side
UNMOUNT (Remove Mounted File System) Information) Command . . . . . . . . . . . . . P3-1394
Command . . . . . . . . . . . . . . . . . . . . P3-1330 WRKCTLD (Work with Controller Descriptions)
UPDPGM (Update Program) Command . . . . . P3-1331 Command . . . . . . . . . . . . . . . . . . . . P3-1396
UPDSRVPGM (Update Service Program) WRKDBFIDD (Work with Database Files Using
Command . . . . . . . . . . . . . . . . . . . . P3-1335 IDDU) Command . . . . . . . . . . . . . . . . P3-1397
UPDSYSINF (Update System Information) WRKDDMF (Work with Distributed Data
Command . . . . . . . . . . . . . . . . . . . . P3-1340 Management Files) Command . . . . . . . . . P3-1398

P3-8 OS/400 CL Reference - Part 2 (Full Version)


WRKDEVD (Work with Device Descriptions) WRKLANADPT (Work with LAN Adapters)
Command . . . . . . . . . . . . . . . . . . . . P3-1400 Command . . . . . . . . . . . . . . . . . . . . P3-1447
WRKDEVTBL (Work with Device Tables) WRKLIB (Work with Libraries) Command . . . . P3-1448
Command . . . . . . . . . . . . . . . . . . . . P3-1402 WRKLICINF (Work with License Information)
WRKDIRE (Work with Directory Entries) Command P3-1403 Command . . . . . . . . . . . . . . . . . . . . P3-1449
WRKDIRLOC (Work with Directory Locations) WRKLNK (Work with Object Links) Command . . P3-1451
Command . . . . . . . . . . . . . . . . . . . . P3-1405 WRKMLBSTS (Work with Media Library Status)
WRKDIRSHD (Work with Directory Shadow Command . . . . . . . . . . . . . . . . . . . . P3-1453
Systems) Command . . . . . . . . . . . . . . P3-1406 WRKMNU (Work with Menus) Command . . . . P3-1454
WRKDOC (Work with Documents) Command . . P3-1407 WRKMOD (Work with Modules) Command . . . P3-1456
WRKDOCLIB (Work with Document Libraries) WRKMODD (Work with Mode Descriptions)
Command . . . . . . . . . . . . . . . . . . . . P3-1408 Command . . . . . . . . . . . . . . . . . . . . P3-1458
WRKDOCPRTQ (Work with Document Print WRKMSG (Work with Messages) Command . . P3-1459
Queue) Command . . . . . . . . . . . . . . . P3-1409 WRKMSGD (Work with Message Descriptions)
WRKDPCQ (Work with DSNX/PC Distribution Command . . . . . . . . . . . . . . . . . . . . P3-1461
Queues) Command . . . . . . . . . . . . . . . P3-1410 WRKMSGF (Work with Message Files) Command P3-1462
WRKDSKSTS (Work with Disk Status) Command P3-1411 WRKMSGQ (Work with Message Queues)
WRKDSTL (Work with Distribution Lists) Command P3-1412 Command . . . . . . . . . . . . . . . . . . . . P3-1464
WRKDSTQ (Work with Distribution Queues) WRKM36 (Work with AS/400 Advanced 36
Command . . . . . . . . . . . . . . . . . . . . P3-1413 Machines) Command . . . . . . . . . . . . . . P3-1466
WRKDTAARA (Work with Data Areas) Command P3-1414 WRKM36CFG (Work with AS/400 Advanced 36
WRKDTADCT (Work with Data Dictionaries) Machine Configurations) Command . . . . . . P3-1467
Command . . . . . . . . . . . . . . . . . . . . P3-1416 WRKNCK (Work with Nicknames) Command . . P3-1468
WRKDTADFN (Work with Data Definitions) WRKNETF (Work with Network Files) Command P3-1469
Command . . . . . . . . . . . . . . . . . . . . P3-1417 WRKNETJOBE (Work with Network Job Entries)
WRKDTAQ (Work with Data Queues) Command P3-1418 Command . . . . . . . . . . . . . . . . . . . . P3-1471
WRKEDTD (Work with Edit Descriptions) WRKNETTBLE (Work with Network Table Entry)
Command . . . . . . . . . . . . . . . . . . . . P3-1420 Command . . . . . . . . . . . . . . . . . . . . P3-1472
WRKENVVAR (Work with Environment Variables) WRKNODL (Work with Node Lists) Command . . P3-1473
Command . . . . . . . . . . . . . . . . . . . . P3-1421 WRKNODLE (Work with Node List Entries)
WRKF (Work with Files) Command . . . . . . . P3-1422 Command . . . . . . . . . . . . . . . . . . . . P3-1474
WRKFLR (Work with Folders) Command . . . . P3-1424 WRKNTBD (Work with NetBIOS Descriptions)
WRKFNTRSC (Work with Font Resources) Command . . . . . . . . . . . . . . . . . . . . P3-1475
Command . . . . . . . . . . . . . . . . . . . . P3-1425 WRKNWID (Work with Network Interface
WRKFORMDF (Work with Form Definitions) Description) Command . . . . . . . . . . . . . P3-1476
Command . . . . . . . . . . . . . . . . . . . . P3-1427 WRKNWSALS (Work with Network Server Aliases)
WRKFTR (Work with Filters) Command . . . . . P3-1428 Command . . . . . . . . . . . . . . . . . . . . P3-1477
WRKFTRACNE (Work with Filter Action Entries) WRKNWSD (Work with Network Server
Command . . . . . . . . . . . . . . . . . . . . P3-1429 Descriptions) Command . . . . . . . . . . . . P3-1478
WRKFTRSLTE (Work with Filter Selection Entries) | WRKNWSENR (Work with Network Server User
Command . . . . . . . . . . . . . . . . . . . . P3-1430 | Enrollment) Command . . . . . . . . . . . . . P3-1479
WRKGSS (Work with Graphics Symbol Sets) WRKNWSSSN (Work with Network Server
Command . . . . . . . . . . . . . . . . . . . . P3-1431 Sessions) Command . . . . . . . . . . . . . . P3-1482
WRKHDWRSC (Work with Hardware Resources) | WRKNWSSTS (Work with Network Server Status)
Command . . . . . . . . . . . . . . . . . . . . P3-1433 | Command . . . . . . . . . . . . . . . . . . . . P3-1484
WRKHLDOPTF (Work with Held Optical Files) WRKOBJ (Work with Objects) Command . . . . P3-1486
Command . . . . . . . . . . . . . . . . . . . . P3-1434 WRKOBJLCK (Work with Object Locks) Command P3-1488
WRKIPXCCT (Work with IPX Circuits) Command P3-1435 WRKOBJOWN (Work with Objects by Owner)
WRKIPXD (Work with IPX Descriptions) Command P3-1436 Command . . . . . . . . . . . . . . . . . . . . P3-1490
WRKIPXSTS (Work with IPX Status) Command . P3-1437 WRKOBJPGP (Work with Objects by Primary
WRKJOB (Work with Job) Command . . . . . . P3-1438 Group) Command . . . . . . . . . . . . . . . . P3-1491
WRKJOBD (Work with Job Descriptions) Command P3-1440 WRKOPTDIR (Work with Optical Directories)
WRKJOBQ (Work with Job Queues) Command . P3-1441 Command . . . . . . . . . . . . . . . . . . . . P3-1492
WRKJOBSCDE (Work with Job Schedule Entries) WRKOPTF (Work with Optical Files) Command . P3-1494
Command . . . . . . . . . . . . . . . . . . . . P3-1442 WRKOPTVOL (Work with Optical Volumes)
| WRKJRN (Work with Journal) Command . . . . P3-1444 Command . . . . . . . . . . . . . . . . . . . . P3-1496
| WRKJRNA (Work with Journal Attributes) WRKOPCACT (Work with OptiConnect Activity)
| Command . . . . . . . . . . . . . . . . . . . . P3-1445 Command . . . . . . . . . . . . . . . . . . . . P3-1497
WRKJRNRCV (Work with Journal Receivers) WRKORDINF (Work with Order Information)
Command . . . . . . . . . . . . . . . . . . . . P3-1446 Command . . . . . . . . . . . . . . . . . . . . P3-1498

Part 2. OS/400 CL Commands P3-9


WRKORDRQS (Work with Order Requests) WRKSBSJOB (Work with Subsystem Jobs)
Command . . . . . . . . . . . . . . . . . . . . P3-1499 Command . . . . . . . . . . . . . . . . . . . . P3-1534
WRKOUTQ (Work with Output Queues) Command P3-1500 WRKSCHIDX (Work with Search Indexes)
WRKOUTQD (Work with Output Queue Command . . . . . . . . . . . . . . . . . . . . P3-1535
Description) Command . . . . . . . . . . . . . P3-1501 WRKSCHIDXE (Work with Search Index Entries)
WRKOVL (Work with Overlays) Command . . . P3-1502 Command . . . . . . . . . . . . . . . . . . . . P3-1537
WRKPAGDFN (Work with Page Definitions) WRKSHRPOOL (Work with Shared Storage Pools)
Command . . . . . . . . . . . . . . . . . . . . P3-1503 Command . . . . . . . . . . . . . . . . . . . . P3-1538
WRKPAGSEG (Work with Page Segments) WRKSOC (Work with Sphere of Control) Command P3-1539
Command . . . . . . . . . . . . . . . . . . . . P3-1504 WRKSPADCT (Work with Spelling Aid Dictionaries)
WRKPCLTBLE (Work with Protocol Table Entry) Command . . . . . . . . . . . . . . . . . . . . P3-1540
Command . . . . . . . . . . . . . . . . . . . . P3-1506 WRKSPLF (Work with Spooled Files) Command P3-1542
WRKPFCST (Work with Physical File Constraints) WRKSPLFA (Work with Spooled File Attributes)
Command . . . . . . . . . . . . . . . . . . . . P3-1507 Command . . . . . . . . . . . . . . . . . . . . P3-1544
WRKPFRCOL (Work with Performance Collection) WRKSRVPGM (Work with Service Programs)
Command . . . . . . . . . . . . . . . . . . . . P3-1508 Command . . . . . . . . . . . . . . . . . . . . P3-1545
WRKPGM (Work with Programs) Command . . . P3-1509 WRKSRVPVD (Work with Service Providers)
WRKPGMTBL (Work with Program Tables) Command . . . . . . . . . . . . . . . . . . . . P3-1546
Command . . . . . . . . . . . . . . . . . . . . P3-1511 WRKSRVTBLE (Work with Service Table Entry)
WRKPNLGRP (Work with Panel Groups) Command . . . . . . . . . . . . . . . . . . . . P3-1547
Command . . . . . . . . . . . . . . . . . . . . P3-1512 WRKSYSSTS (Work with System Status)
WRKPRB (Work with Problems) Command . . . P3-1513 Command . . . . . . . . . . . . . . . . . . . . P3-1548
WRKPRDINF (Work with Product Information) WRKSYSVAL (Work with System Values)
Command . . . . . . . . . . . . . . . . . . . . P3-1518 Command . . . . . . . . . . . . . . . . . . . . P3-1549
WRKPRTSTS (Work with Printing Status) WRKS36 (Work with System/36) Command . . . P3-1551
Command . . . . . . . . . . . . . . . . . . . . P3-1519 WRKS36PGMA (Work with System/36 Program
WRKPSFCFG (Work with Print Services Facility Attributes) Command . . . . . . . . . . . . . . P3-1552
Configurations) Command . . . . . . . . . . . P3-1520 WRKS36PRCA (Work with System/36 Procedure
WRKQMFORM (Work with Query Management Attributes) Command . . . . . . . . . . . . . . P3-1553
Forms) Command . . . . . . . . . . . . . . . . P3-1521 WRKS36SRCA (Work with System/36 Source
WRKQMQRY (Work with Query Management Attributes) Command . . . . . . . . . . . . . . P3-1554
Queries) Command . . . . . . . . . . . . . . . P3-1522 WRKTAPCTG (Work with Tape Cartridges)
WRKQST (Work with Questions) Command . . . P3-1523 Command . . . . . . . . . . . . . . . . . . . . P3-1555
WRKRDBDIRE (Work with Relational Database WRKTBL (Work with Tables) Command . . . . . P3-1557
Directory Entries) Command . . . . . . . . . . P3-1524 WRKTCPPTP (Work with Point-to-Point TCP/IP)
WRKRDR (Work with Readers) Command . . . P3-1525 Command . . . . . . . . . . . . . . . . . . . . P3-1558
WRKREGINF (Work with Registration Information) WRKTCPSTS (Work with TCP/IP Network Status)
Command . . . . . . . . . . . . . . . . . . . . P3-1526 Command . . . . . . . . . . . . . . . . . . . . P3-1560
WRKRMTDFN (Work with Remote Definitions) WRKTIE (Work with Technical Information
Command . . . . . . . . . . . . . . . . . . . . P3-1527 Exchange) Command . . . . . . . . . . . . . . P3-1561
WRKRPYLE (Work with System Reply List Entries) WRKUSFCNNE (Work with Ultimedia System
Command . . . . . . . . . . . . . . . . . . . . P3-1528 Facilities Connection Entries) Command . . . . P3-1562
WRKRTDCFG (Work with RouteD Configuration) WRKUSFDEVE (Work with Ultimedia System
Command . . . . . . . . . . . . . . . . . . . . P3-1529 Facilities Device Entries) Command . . . . . . P3-1563
WRKSBMJOB (Work with Submitted Jobs) WRKUSFSVRE (Work with Ultimedia System
Command . . . . . . . . . . . . . . . . . . . . P3-1530 Facilities Server Entries) Command . . . . . . P3-1564
WRKSBS (Work with Subsystems) Command . . P3-1531 WRKUSRJOB (Work with User Jobs) Command P3-1565
WRKSBSD (Work with Subsystem Descriptions) WRKUSRPRF (Work with User Profiles) Command P3-1567
Command . . . . . . . . . . . . . . . . . . . . P3-1532 WRKUSRTBL (Work with User Tables) Command P3-1568
WRKWTR (Work with Writers) Command . . . . P3-1569

P3-10 OS/400 CL Reference - Part 2 (Full Version)


Chapter 2. OS/400 Command Descriptions

 Copyright IBM Corp. 1997, 1998 P3-11


DMPCLPGM

DMPCLPGM (Dump Control Language Program) Command


Pgm: B,I

55──DMPCLPGM───────────────────────────────────────────────────────────────────────────────────────────────────────────────────5%

Purpose PGM
DCL . . .
The Dump CL Program (DMPCLPGM) command dumps all DCL . . .
variables (declared in the CL program in which the command MONMSG MSGID(CPF9999) EXEC(GOTO DUMP)
is processed) and all messages on the program's message Ÿ
queue to a spooled printer file (QPPGMDMP). This Ÿ
Ÿ
command is valid only in a CL program; after the program is
RETURN
dumped, it continues processing.
DUMP: DMPCLPGM
ENDPGM
Restriction: The user of this command must have read
authority for the program. This CL program monitors for the function check message
CPF9999. If a function check occurs in the program, control
There are no parameters for this command.
is passed to the command at label DUMP. This causes a
dump of the program's message queue and causes the pro-
Example gram's variables to be printed. This dump can be used to
determine the cause of the function check.

P3-12 OS/400 CL Reference - Part 2 (Full Version)


DMPDLO

DMPDLO (Dump Document Library Object) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──DMPDLO──DLO(──┬─\SYSOBJNAM──────────────┬──)──┬─────────────────────────────────────────────────────────────────┬──────────5%
├─\INT────────────────────┤ │ ┌─\NONE───────┐ │
└─document-or-folder-name─┘ ├─FLR(──┴─folder-name─┴──)────────────────────────────────────────┤
│ ┌─\NONE───┐ │
(1) ─system-object-name──)──SYSOBJATR(──┼─\INTDOC─┼──)─┘
└─SYSOBJNAM(───
└─\DST────┘
Note:
1 The SYSOBJNAM parameter is valid only when DLO(*SYSOBJNAM) is specified.

Purpose FLR
Specifies the name of the folder that contains the docu-
The Dump Document Library Object (DMPDLO) command is ment.
used primarily for problem analysis. It copies the contents
Note: A folder name can be entered in this parameter
and/or attributes of folders, documents, or internal document
only if a folder or document name is entered in
library system objects to a spooled printer file named
the DLO parameter.
QPSRVDMP. If the printed output is not spooled, and the
printer is not available, the printer file (QPSRVDMP) is over- *NONE: The object is not in a folder.
ridden. folder-name: Specify the name of the folder that con-
tains the folder or document being dumped.
Restrictions:
1. This command is shipped with public *EXCLUDE SYSOBJNAM
authority and the QPGMR, QSYSOPR, QSRV, and Specifies the system object name. This parameter is
QSRVBAS user profiles have private authorities to use valid only when DLO(*SYSOBJNAM) or
the command. DOCL(*SYSOBJNAM) is specified. A full ten characters
must be specified.
2. The user must have read authority to a document or
folder to dump it. SYSOBJATR
Specifies attributes of the object being dumped. A value
3. The user must have *ALLOBJ authority to dump internal
other than *NONE applies only to documents, and can
system objects.
be entered in this parameter only if *SYSOBJNAM is
Note: To see the parameter and value descriptions for this specified on the DLO parameter.
command, refer to the online help text. For more
*NONE: No attributes are specified for the object.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. *INTDOC: The object being dumped is an internal docu-
ment.

Required Parameters *DST: The object being dumped is a distribution docu-


ment.
DLO
Specifies the document library object being dumped.
Examples
*SYSOBJNAM: A system object name is used to iden-
tify the document or folder being dumped. This value Example 1: Dumping a Document
must be used to dump an internal or distribution docu- DMPDLO DLO(KAREN) FLR(PEGGY)
ment, or a document that is not in a folder.
*INT: Internal document library system objects are This command dumps a document or a folder named
dumped. KAREN which is located in the folder named PEGGY.

document-or-folder-name: Specify the name of the doc- Example 2: Specifying a System Object Name
ument or folder being dumped.
DMPDLO DLO(\SYSOBJNAM) SYSOBJNAM(BHZMð52634)

Optional Parameters This command dumps the document library object identified
by the system object name BHZM052634.

Chapter 2. OS/400 Command Descriptions P3-13


DMPJOB

| DMPJOB (Dump Job) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──DMPJOB──┬─────────────────────────────────────────────────────────────────────────────┬──┬───────────────────────┬──────────5
│ ┌─\ALL───────────────────────────────────────────────────────────┐ │ │ ┌─\ALL──┐ │
└─PGM(──┼─\NONE──────────────────────────────────────────────────────────┼──)─┘ └─JOBARA(──┴─\NONE─┴──)─┘
│ ┌──
─────────────────────────────────────────────────────────┐ │
│ │ ┌─\ALL/─────────┐ ┌─\LAST──────┐ │ │
└──6─(──┼───────────────┼──program-name───
(1) ─┼────────────┼──)─┴───
(2) ─┘
└─library-name/─┘ ├─\FIRST─────┤
├─\ALL───────┤
└─call-level─┘
5──┬──────────────────────┬──┬──────────────────────┬──────────────────────────────────────────────────────────────────────────5%
| │ ┌─\YES─┐ │ │ ┌─\YES─┐ │
| └─ADROBJ(──┴─\NO──┴──)─┘ └─JOBTHD(──┴─\NO──┴──)─┘
Notes:
1 Both the library qualifier of *ALL and a recursion level cannot be specified.

2 A maximum of 10 repetitions

Purpose *ALL: All libraries on the system are searched. If


*ALL is specified, a call level cannot be specified.
The Dump Job (DMPJOB) command dumps the basic data
library-name: Specify the name of the library to be
structures, or specific calls of the current job or of the job
searched.
being serviced as a result of the Start Service Job
(STRSRVJOB) command. The information is dumped to a program-name: Specify the name of the called program
spooled printer file (QPSRVDMP) to be printed. If the user to dump. Up to 10 characters for the program name can
had specified SPOOL(*NO) on either the CHGPRTF be specified.
command or the OVRPRTF command, then the output is not
Element 2: Program Call Levels
spooled but printed directly; and, if the printer is not avail-
able, then this command overrides the print job and spools *LAST: The last call with the specified name is
the output. When the user specifies SPOOL(*NO) on one of dumped.
the two commands above, the user must specify *FIRST: The first call with the specified name is
QPSRVDMP as the printer file. The dump includes for- dumped.
| matted information about the specified programs, and dumps
| of specified OS/400 system objects, system objects, and *ALL: All calls with the specified name are dumped.
| threads associated with the job. call-level: Specify the level of call for a program with
multiple calls in the stack. If *ALL is specified for the
Restriction: This command is shipped with public library name, the call level cannot be specified.
*EXCLUDE authority and the QPGMR, QSYSOPR, QSRV,
and QSRVBAS user profiles have private authorities to use JOBARA
the command. Specifies whether the job structure areas of the process
are dumped. Job structure areas consist of the fol-
Note: To see the parameter and value descriptions for this
lowing:
command, refer to the online help text. For more
information about printing the help text, refer to Ÿ Work Control Block
“Printing CL Command Descriptions” in Chapter 1.
Ÿ Library Search List
Ÿ Job Temporary Library
Optional Parameters
Ÿ Job Local Data Area
PGM
Ÿ Spool Control Block
Specifies which program to dump. Either a single value
or a list of values (10 maximum) can be specified. Ÿ Data Management Communications Queue
*ALL: All programs on the call stack are dumped. Ÿ Service Communication Object
*NONE: No programs are dumped. Only the lists of Ÿ Process Definition Template
called and activated programs are dumped. Ÿ Process Lock List
Element 1: Program Name Ÿ Machine Interface (MI) Response Queue
The name of the dumped program can be qualified by
*ALL: The job structure areas are dumped.
one of the following library values:

P3-14 OS/400 CL Reference - Part 2 (Full Version)


DMPJOB

*NONE: The job structure areas are not dumped. | *YES: The thread list and information is dumped.

ADROBJ | *NO: The thread list and information is not dumped.


Specifies whether objects addressed from the program
storage of a program being dumped are also dumped. If Examples
*NONE is specified for the PGM parameter, no
addressed objects are dumped. Example 1: Dumping Programs
*YES: The addressed objects are dumped. DMPJOB PGM((QGPL/UPDATE \FIRST) (PAYROLL/MASTER \ALL))
JOBARA(\ALL) ADROBJ(\NO)
*NO: The addressed objects are not dumped.

| JOBTHD This command dumps the first occurrence of QGPL/UPDATE


| Specifies whether the list and information of the threads in the call stack and all occurrences of PAYROLL/MASTER.
| in the job is dumped. Thread information consists of the The job structure areas are dumped.
| following:
Example 2: Dumping Entire Job Structure
| Ÿ Thread Control Block (TCB), only of the thread DMPJOB
| running the DMPJOB.
| Ÿ Thread ID This command dumps the entire job structure.

| Ÿ Thread handler Example 3: Dumping Lists of Called and Activated Pro-


| Ÿ Thread execution status (hexadecimal value) grams
DMPJOB PGM(\NONE) JOBARA(\NONE)
| Ÿ Thread wait status (hexadecimal value)
| Ÿ Thread stack This command dumps the lists of programs called and acti-
vated.

Chapter 2. OS/400 Command Descriptions P3-15


DMPJOBINT

DMPJOBINT (Dump Job Internal) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──DMPJOBINT──────────────────────────────────────────────────────────────────────────────────────────────────────────────────5%

Purpose and QSRVBAS user profiles have private authorities to use


the command.
The Dump Job Internal (DMPJOBINT) command dumps the
machine internal data related to the machine process of the There are no parameters for this command.
current job or the job being serviced as a result of the Start
Service Job (STRSRVJOB) command. This data is for use
Example
by IBM service representatives. When the internal data is
dumped, a dump identifier is sent in a message to the user DMPJOBINT
who sent the DMPJOBINT command. The Print Internal
This command dumps, for the job in which the command is
Data (PRTINTDTA) command can be used to print the dump
entered, the machine internal data associated with the job. A
output.
message with the dump identifier is sent to the user entering
Restriction: This command is shipped with public the command.
*EXCLUDE authority and the QPGMR, QSYSOPR, QSRV,

P3-16 OS/400 CL Reference - Part 2 (Full Version)


DMPOBJ

DMPOBJ (Dump Object) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(1) ─)────
55──DMPOBJ──OBJ(──┼───────────────┼──object-name──)──OBJTYPE(──object-type─── (P) ────────────────────────────────────────────5%
├─\CURLIB/──────┤
└─library-name/─┘
Notes:
1 A list of the valid OS/400 object types for this command is in Appendix A.

P All parameters preceding this point can be specified in positional form.

Purpose The name of the object can be qualified by one of the


following library values:
The Dump Object (DMPOBJ) command dumps the contents
and/or attributes of the specified OS/400 system object to a *LIBL: All libraries in the job's library list are
spooled printer file named QPSRVDMP. Whether the con- searched until the first match is found.
tents and/or attributes can be dumped depends upon the *CURLIB: The current library for the job is
object type. If the user had specified SPOOL(*NO) on either searched. If no library is specified as the current
the CHGPRTF command or the OVRPRTF command, then library for the job, the QGPL library is used.
the output is not spooled but printed directly; and, if the
library-name: Specify the name of the library to be
printer is not available, then this command overrides the print
searched.
job and spools the output. When the user specifies
SPOOL(*NO) on one of the two commands above, the user object-name: Specify the name of the object being
must specify QPSRVDMP as the printer file. Any library or dumped. Only the OS/400 system objects that are
an OS/400 system object that is stored in a library can be stored in libraries can be dumped. Refer to the
dumped, but only one object can be specified at a time on OBJTYPE parameter for the valid types of objects.
this command.
OBJTYPE
Restrictions: Specifies the object type of the OS/400 system object
being dumped. Any one of the OS/400 system object
1. This command is shipped with public *EXCLUDE
types can be specified. More information on this param-
authority.
eter is in Appendix A, “Expanded Parameter
2. The following user profiles have private authorities to Descriptions.”
use the command:
Ÿ QPGMR Examples
Ÿ QSYSOPR
Example 1: Dumping File Contents
Ÿ QSRV
DMPOBJ OBJ(ORDENT/ORDERIN) OBJTYPE(\FILE)
Ÿ QSRVBAS
This command dumps the contents of the file named
Note: To see the parameter and value descriptions for this
ORDERIN that is stored in the ORDENT library.
command, refer to the online help text. For more
information about printing the help text, refer to Example 2: Dumping a Program
“Printing CL Command Descriptions” in Chapter 1.
DMPOBJ OBJ(MYPROG) OBJTYPE(\PGM)

Required Parameters This command dumps the first copy of the program
MYPROG that is found in the library list. The dump is
OBJ spooled to the printer output file QPSRVDMP.
Specifies the qualified name of the OS/400 system
object being dumped.

Chapter 2. OS/400 Command Descriptions P3-17


DMPSYSOBJ

DMPSYSOBJ (Dump System Object) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──DMPSYSOBJ──┬──────────────────────────────────────────┬──┬───────────────────────────────┬──────────────────────────────────5
│ ┌─\PCS────────────────────────┐ │ │ ┌─\NONE────────┐ │
└─OBJ(──┼─\MCHCTX─────────────────────┼──)─┘ └─CONTEXT(──┼─\MCHCTX──────┼──)─┘
├─\ALL────────────────────────┤ └─context-name─┘
├─generic\-system-object-name─┤
└─system-object-name──────────┘
5──┬───────────────────────────────────────────────────────────────────────────┬──┬─────────────────────────────────────┬───────5
│ ┌─\ALL────────────────────┐ │ │ ┌─\NONE───────────────┐ │
(1) ─┴─MI-object-type-in-hex───
├─TYPE(─── (2) ┴──)──SUBTYPE(──┤ SUBTYPE Details ├──)─┤ │ │ ┌──
──────────────┐ │ │
(3) 6 (4)
└─OBJTYPE(────┬─\ALL────────┬──)────────────────────────────────────────────┘ └─OFFSET(──┴───offset-value─┴────┴──)─┘
└─object-type─┘
(P) ──────────────────────────────────────────────────────────────────────────────5%
5──┬─────────────────────────────────────────┬───
│ ┌─\────────────────────────┐ │
│ │ ┌─\──────┐ │ │
└─SPACE(──┴─offset-value──┼────────┼─┴──)─┘
└─length─┘
SUBTYPE Details:
┌─\ALL─────────────────────┐
├──┴─MI-object-subtype-in-hex─┴─────────────────────────────────────────────────────────────────────────────────────────────────┤
Notes:
1 To code the following parameters positionally, they must be coded in this order, using *N for those not being specified:

TYPE, SUBTYPE, and OBJTYPE.


2 To specify an MI system object type, refer to the TYPE parameter description for a list of the valid MI type codes.

3 A list of the valid OS/400 object types for this command is in Appendix A.

4 A maximum of 50 repetitions

P All parameters preceding this point can be specified in positional form.

Purpose OBJ
Specifies which of the MI system objects are being
The Dump System Object (DMPSYSOBJ) command is used dumped. The name of a specific object, the generic
primarily for problem analysis. It dumps the contents and/or name of a group of objects, the process control space of
attributes of machine interface (MI) system objects to a the job, the machine context, or all of the MI objects in a
spooled printer file named QPSRVDMP. If the user had context can be specified. If a library name is specified,
specified SPOOL(*NO) on either the CHGPRTF command or the library is dumped, but not the objects in it.
the OVRPRTF command, then the output is not spooled but
If OBJ(QTEMP) is specified along with either
printed directly; and, if the printer is not available, then this
OBJTYPE(*LIB) or TYPE(04) SUBTYPE(01), the tempo-
command overrides the print job and spools the output.
rary job context associated with the job that this
When the user specifies SPOOL(*NO) on one of the two
command is entered from, or the job being serviced as a
commands above, the user must specify QPSRVDMP as the
result of the Start Service Job (STRSRVJOB) command,
printer file. Any MI object that is stored in any library
is dumped. In either case, the CONTEXT parameter is
(context) or that is addressable through an object can be
ignored.
dumped. A specific object, a generic group, or all of the MI
objects in a context can be specified. The dump operation *PCS: The process control space of the current job or
can also be limited to objects of a specified type and, that of the job being serviced as a result of the Start
optionally, of a specified subtype. Service Job (STRSRVJOB) command is dumped.
OBJ(*PCS) can be used with the OFFSET and SPACE
Restrictions: parameters to dump objects in the job structure. If
1. This command is shipped with public *EXCLUDE OBJ(*PCS) is specified, the CONTEXT, TYPE,
authority and the QPGMR, QSYSOPR, QSRV, and SUBTYPE, and OBJTYPE parameters are ignored.
QSRVBAS user profiles have private authorities to use *MCHCTX: The machine context (which contains a list
the command. of the objects in the context) is dumped. If
2. The user must have use authority to the object and read OBJ(*MCHCTX) is specified, all the other parameters in
authority to the program and the user profile. this command are ignored.
*ALL: All the MI system objects in the specified context
are dumped if they match the requirements specified in
Optional Parameters

P3-18 OS/400 CL Reference - Part 2 (Full Version)


DMPSYSOBJ

TYPE and SUBTYPE (for MI objects), or OBJTYPE (for TYPE


the OS/400 system objects). Specifies the type of MI objects to be dumped.
generic*-system-object-name: Specify the OS/400 *ALL: All MI object types in the specified context that
system or MI generic object name that identifies the have the specified name (if used) are dumped.
group of MI system objects to be dumped. An MI object
MI-object-type-in-hex: Specify the hexadecimal value
name can have up to 30 characters in it. A generic
that specifies the type of MI system objects to be
name is a character string of one or more characters fol-
dumped. The following table shows the MI system
lowed by an asterisk (*); for example, ABC*. The
objects and their hexadecimal type codes. The value
asterisk substitutes for any valid characters. A generic
must be specified with both characters, but it does not
name specifies all objects with names that begin with the
have to be enclosed in apostrophes.
generic prefix for which the user has authority. If an
asterisk is not included with the generic (prefix) name,
MI Type Code
the system assumes it to be the complete object name. MI System Object
If the complete object name is specified, and multiple
libraries are searched, multiple objects can be dumped Access group 01
Program 02
only if *ALL or *ALLUSR library values can be specified
Module 03
for the name. For more information on the use of Context (library)1 04
generic names, refer to “Generic Object Names” in Byte string space 06
Chapter 2. Journal space 07
User profile1 08
system-object-name: Specify the name of the OS/400
Journal port 09
system or MI object that is to be dumped. Up to 30
Queue 0A
characters can be entered. If more than one object has Data space 0B
the same name, all objects having that name and Data space index 0C
matching the attributes specified by the CONTEXT Cursor 0D
parameter, and either the TYPE and SUBTYPE parame- Index 0E
ters or the OBJTYPE parameter are dumped. If a spe- Commit block 0F
cific object is being dumped, the CONTEXT, TYPE, and Logical unit (device) description1 10
Network (line) description1 11
SUBTYPE parameters or the CONTEXT and OBJTYPE
Controller (control unit) description1 12
parameters should be specified.
Dump space 13
CONTEXT Class of Service space 14
Mode Description space 15
Specifies which context or library the objects to be
Network interface description1 16
dumped are found in. Connection list 17
*NONE: The object specified by the OBJ parameter is Queue space 18
not in any context. *NONE is valid only if *PCS or Space 19
Process control space 1A
*MCHCTX is specified or assumed for the OBJ param-
Authorization list space 1B
eter, or if OBJ(QTEMP) is specified along with either
Dictionary space 1C
OBJTYPE(*LIB) or TYPE(04) SUBTYPE(01). Machine context 81
*MCHCTX: The objects to be dumped are in the
1 If this object is specified for TYPE, then
machine context. The following OS/400 system object
CONTEXT(*MCHCTX) must also be specified.
types, whose MI system object names are given in
parentheses, can reside only in the machine context:
library (context), user profile, device (logical unit) SUBTYPE
description, network interface description, line (network) Specifies the subtype of the specified MI objects to be
description, and control unit (controller) description. dumped, or specifies that all subtypes are being
These types are included in the table given in the TYPE dumped.
parameter description. *MCHCTX is valid only if one of *ALL: All the subtypes of the specified MI objects are
these five object types is dumped. dumped.
context-name: Specify the name of the context con- MI-object-subtype-in-hex: Specify the specific subtype of
taining the objects being dumped. The name of a the MI system objects to be dumped. Valid values
library, such as QGPL or QTEMP, can be specified. If range from 00 through FF. However, the subtype speci-
QTEMP is specified, the objects to be dumped are in the fied must be for an MI object actually in the specified
temporary job context associated with the job that this context. If TYPE(*ALL) is specified, a specific subtype
command is entered from or the job being serviced as a cannot be specified.
result of the Start Service Job (STRSRVJOB) command.
OBJTYPE
Specifies the object type of the OS/400 system objects
to have their associated MI system objects dumped. If

Chapter 2. OS/400 Command Descriptions P3-19


DMPSYSOBJ

this parameter is specified, the TYPE or SUBTYPE that points to a location in the associated space
parameters cannot be specified. More information on of the object addressed by the system pointer.
this parameter is in Appendix A, “Expanded Parameter
Descriptions.” The result of step 2b or 2c is a space pointer that is
used to perform step 2 again if there is another offset. If
*ALL: The specified MI objects of all OS/400 system the last offset has been used, the final result is a
object types are dumped. location contained in a space pointer that is used as
object-type: Specify the specific OS/400 system object follows:
type whose associated MI system objects are to be
Ÿ If the resulting location contains a system pointer
dumped.
and the SPACE parameter is not specified, the
OFFSET system object pointed to by the system pointer is
Specifies a list of values to use as offsets to indirectly dumped. If the SPACE parameter is specified, the
address a single object that is being dumped. The SPACE specification determines the portion of the
values must be positive hexadecimal values or zeros system object that is dumped.
that, when added to a pointer, result in valid addresses. Ÿ If the resulting location contains a space pointer and
If an offset of zero is added to a system pointer, the the SPACE parameter is not specified, the portion of
result is a space pointer to the start of the space associ- the space that starts at the location pointed to by
ated with the object that is addressed by the system the space pointer is dumped. If the SPACE param-
pointer. (In this discussion, the associated space of a eter is specified, the SPACE specification deter-
space object is the space itself.) mines the portion of the space to be dumped.
Note: The OFFSET and SPACE parameters cannot be
The following chart shows the offsets into the process
specified if *ALL or a generic object name is
control space (PCS) at which there are pointers to the
specified for the OBJ, TYPE, SUBTYPE, or
components of a job structure. If one of these offsets is
OBJTYPE parameters.
specified, OBJ(*PCS) must be specified or assumed.
*NONE: No offset is specified. The object located
Object Object Offset
through the context is dumped. (Descriptive Name and Abbreviation) Name
offset-value: Specify the list of offsets to pointers to use Data management communications queue QDMCQ 20
to address the object or space to be dumped. The (DMCQ)
Job temporary context (QTEMP) QTEMP 40
values specified in this parameter are used as follows:
MI response queue (MIRQ) QMIRQ 80
Process definition template (PDT) PDT 60
1. The first offset is added to a space pointer that Process access group (PAG) PAG 60 100
points to the associated space of the object located Spooling control block (SCB) QSPSCB 200
through the context. The result is a space pointer Work control block table (WCBT) QWCBT 10
that points to a location further into the space.
a. If only one offset value is specified in this SPACE
parameter, step 2 is not done and the dump Specifies the area of a space or associated space to be
operation, as indicated by the rest of the dumped. The space is pointed to by the final pointer
parameters in the command, is taken. determined by the OFFSET parameter. If the OFFSET
parameter is not specified, the final pointer is a system
b. If more than one offset is specified in this pointer to the specified object in the context. See Note
parameter, step 2 is repeated for each addi- in the OFFSET parameter description.
tional offset given.
Element 1: Offset Value
2. Regarding the location pointed to by the space
pointer produced in the previous step: *: If the final pointer is a system pointer, the object
pointed to by that pointer is dumped. If the final pointer
a. If the location does not contain another pointer, is a space pointer, the portion of the space that starts at
the command is ended, an error message is the location pointed to by that pointer is dumped.
sent to the user, and no dump operation is
done. offset-value: Specify the value to add to the final pointer
to point to the beginning of the area to dump. The value
b. If the location contains a space pointer, the specified must be a positive hexadecimal value, ranging
(next) offset is added to it. The result is from 00000000 through 00FFFFFF, and, when added to
another space pointer that points to either the the final pointer, results in a valid address.
same space or a different space or associated
space. Element 2: Length

c. If the location contains a system pointer, the *: The rest of the space pointed to as a result of the
associated space pointer is set from the system offset value is being dumped.
pointer, and the (next) offset is added to the length: Specify a positive hexadecimal value ranging
space pointer. The result is a space pointer from 00000001 through 00FFFFFF that specifies the

P3-20 OS/400 CL Reference - Part 2 (Full Version)


DMPSYSOBJ

length of the area to be dumped. If the length specified This command dumps the device description for work station
is greater than the actual length of the space, only the WS1, which is stored in the machine context.
actual space available is dumped.
Example 3: Dumping Process Control Space
DMPSYSOBJ OBJ(\PCS) SPACE(ð 2Að)
Examples
This command dumps the work control block from the space
Example 1: Dumping Indexes
associated with the process control space for the job.
DMPSYSOBJ CONTEXT(QTEMP) TYPE(ðE)
Example 4: Specifying Offset Values
This command dumps the contents and attributes of all the
DMPSYSOBJ OBJ(\PCS) OFFSET(6ð Eð 1ð 1ð) SPACE(ð 2ð)
indexes in the temporary job context to a spooled file for
printing. MI indexes are identified by the type code 0E. This command dumps the second call entry of the process
automatic storage area (offset 60 E0) for a length of 32 bytes
Example 2: Dumping a Device Description
(SPACE(0 20)). If the third call level is dumped, OFFSET(60
DMPSYSOBJ OBJ(WS1) CONTEXT(\MCHCTX) OBJTYPE(\DEVD) E0 10 10 10) is specified.

Chapter 2. OS/400 Command Descriptions P3-21


DMPTAP

DMPTAP (Dump Tape) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──DMPTAP──DEV(──device-name──)──┬────────────────────────────────┬────────────────────────────────────────────────────────────5
│ ┌─\MOUNTED──────────┐ │
└─VOL(──┴─volume-identifier─┴──)─┘
5──┬────────────────────────────────────────────────────────────────────────────────┬───────────────────────────────────────────5
│ ┌─\FIRST─────────────────────┐ ┌─\ONLY────────────────────┐ │
(1) ─┬─┴─start-file-sequence-number─┴──┼──────────────────────────┼─┬──)─┘
└─SEQNBR(───
│ ├─\LAST────────────────────┤ │
│ └─end-file-sequence-number─┘ │
├─\ALL─────────────────────────────────────────────────────────┤
└─\SEARCH──────────────────────────────────────────────────────┘
5──┬───────────────────────────────────────────┬───(P) ──┬────────────────────────────────────┬─────────────────────────────────────5
│ ┌─\NONE────────────────────┐ │ │ ┌─\BASIC─────────────┐ │
(1) ─┼─file-identifier──────────┼──)─┘
└─LABEL(─── (2) ─┼─\ALL───────────────┼──)─┘
└─TYPE(───
└─generic\-file-identifier─┘ ├─\NONE──────────────┤
│ ┌──
─────────────┐ │
└──6─┬─\HDRLBL─┬─┴───
(3) ─┘
├─\DTABLK─┤
└─\TLRLBL─┘
5──┬──────────────────────────────────────────────────────────┬──┬────────────────────────┬──┬───────────────────────┬──────────5
│ ┌─\FIRST───────────┐ ┌─\ONLY──────────┐ │ │ ┌─\YES─┐ │ │ ┌─\EBCDIC─┐ │
(2) ─┴─\NO──┴──)─┘ └─CODE(──┴─\ASCII──┴──)─┘
└─DTABLK(──┬─┴─start-data-block─┴──┼────────────────┼─┬──)─┘ └─VOLLBL(───
│ ├─\LAST──────────┤ │
│ └─end-data-block─┘ │
├─\ALL─────────────────────────────────────┤
└─\LAST────────────────────────────────────┘
5──┬─────────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\REWIND─┐ │
└─ENDOPT(──┼─\LEAVE──┼──)─┘
└─\UNLOAD─┘
Notes:
1 SEQNBR(*SEARCH) and LABEL(*NONE) are mutually exclusive.

2 TYPE(*NONE) and VOLLBL(*NO) are mutually exclusive.

P All parameters preceding this point can be specified in positional form.

3 A maximum of 3 repetitions

Purpose Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more
The DMPTAP (Dump Tape) command dumps label informa- information about printing the help text, refer to
tion, data blocks, or both from standard labeled tapes or “Printing CL Command Descriptions” in Chapter 1.
tapes with no labels to a spooled printer file named
QPTAPDMP. This command allows the user to dump one or
more data files from the tape volume, writing the information Required Parameters
to a printer file. DEV
Specifies the name of the device in which the volume
The tape volume being dumped must be on the specified
being dumped is placed. The volume may or may not
device. After the DMPTAP command is entered, as much of
be labeled. Specify the name of the tape or media
the tape as necessary is read before the requested informa-
library device.
tion is printed.

Data files on secured tapes can be dumped by the security Optional Parameters
officer only; any user can dump label information on secured
tapes. VOL
Specifies one or more volume identifiers used by the file.
When the default values for the parameters of the DMPTAP More information on this parameter is in Appendix A,
command are used, the tape label areas and a minimal “Expanded Parameter Descriptions.”
amount of data from the first file are printed. This command
Note: If the device specified is a media library device,
can help determine the record format of a data file on a tape
then the volume specified should be the cartridge
with no label, or it can determine the exact contents of all
identifier to be mounted and used.
label information for a labeled data file.

P3-22 OS/400 CL Reference - Part 2 (Full Version)


DMPTAP

*MOUNTED: The volume on the specified device is the LABEL parameter value; when a match is found, the
dumped. The volume may or may not be labeled. Note data file is dumped. If VOLLBL(*NO) is specified and
that VOL(*MOUNTED) and LABEL(*NONE) must be the last operation on the device specified
specified to dump a volume that is not labeled. For a ENDOPT(*LEAVE) (the tape is positioned at the location
media library device, the volume to be used is the next where the last operation ended), the file search begins
cartridge in the category mounted by the Set Tape Cate- with the first data file beyond the current tape position.
gory (SETTAPCGY) command. If VOLLBL(*YES) is specified or ENDOPT(*LEAVE) was
not used for the last operation (or if the tape was manu-
volume-identifier: Specify the identifier of the labeled
ally rewound since an ENDOPT(*LEAVE) operation), the
volume being dumped. This value can be specified only
search begins with the first data file on the volume.
for dumping a labeled volume. If the tape on the speci-
SEQNBR(*SEARCH) is not valid when LABEL(*NONE)
fied device has a different volume identifier than the one
is specified, and cannot be used to dump a tape volume
specified in this parameter, or if it is not labeled, an error
that is not labeled.
message is sent to the user of the DMPTAP command
and the tape is not dumped. LABEL
Specifies the identifier of the specific data files that are
SEQNBR
dumped. The file identifier for a tape data file is stored
Specifies the range of sequence numbers for the data
on labels ahead of and following the data in the file.
files that are dumped. If SEQNBR(*ALL) is specified,
then all data files on the tape are dumped. If a range of *NONE: All data files on the volume in the specified
sequence numbers is specified, then only data files in SEQNBR range are dumped. Note that
that range of data file sequence numbers are dumped. VOL(*MOUNTED) and LABEL(*NONE) must be used to
The data files dumped may be further restricted by using dump a tape volume that is not labeled.
the LABEL parameter.
file-identifier: Specify the data file identifier (17 alphanu-
The sequence number for a labeled tape data file is meric characters maximum) of the data files being
stored on labels ahead of and following the data in the dumped. The system compares the LABEL identifier
file. For a volume that is not labeled, the data file with the data file identifier on the labels of each file in
sequence number is determined by the number of tape the range specified by the SEQNBR parameter. All data
markers from the beginning of the tape. This parameter files with an identifier that matches the LABEL identifier
can be specified as a list of two values (Elements 1 and are dumped; any data file with an identifier that does not
2) or as a single value (*ALL or *SEARCH). match the LABEL identifier is not dumped.
Element 1: First File to Dump generic*-file-identifier: Specify a character string for a
generic label identifier (17 alphanumeric characters
*FIRST: The range of data files being dumped begins
maximum), which contains at least one character fol-
with the first file on the tape volume, regardless of its
lowed by an asterisk (*). Any tape file that has a file
sequence number.
identifier with the same prefix as the generic data-file-
start-file-sequence-number: The range of data files identifier is dumped. A generic name is a character
being dumped begins with the data file with the specified string of one or more characters followed by an asterisk
sequence number. Specify a number that is less than or (*); for example, ABC*. The asterisk substitutes for any
| equal to the end-file-sequence-number value. Valid valid characters. A generic name specifies all objects
| values range from 1 through 16777215. with names that begin with the generic prefix for which
Element 2: Last File to Dump the user has authority. If an asterisk is not included with
the generic (prefix) name, the system assumes it to be
*ONLY: Only a single data file (specified by the start-
the complete object name. If the complete object name
file-sequence-number) is dumped.
is specified, and multiple libraries are searched, multiple
*LAST: The range of data files being dumped begins objects can be dumped only if *ALL or *ALLUSR library
with the start-file-sequence-number data file and ends values can be specified for the name. For more infor-
with the last data file on the end of the reel. mation on the use of generic names, refer to “Generic
Object Names” in Chapter 2.
end-file-sequence-number: The range of data files being
dumped ends with the specified sequence number data TYPE
file. Specify a number that is greater than or equal to Specifies the type of information that is being dumped.
| the start-file-sequence number. Valid values range from The dump may consist of the data file header labels or
| 1 thorugh 16777215. trailer labels (for a labeled tape volume only), data
Other Single Values blocks from the data portion of the file, or all three types
of information. If the tape volume on the device is not
*ALL: All data files on the volume on the specified
labeled, only *BASIC, *ALL, or *DTABLK can be speci-
device are dumped.
fied or an error message is sent to the user of the
*SEARCH: The volume that is on the device is DMPTAP command and the volume is not dumped.
searched for a data file with an identifier that matches

Chapter 2. OS/400 Command Descriptions P3-23


DMPTAP

*BASIC: For a standard-labeled volume, the dump *LAST: The range of data blocks that are dumped
includes header labels and the data blocks specified by starts with the data block specified by the start-data-
the DTABLK parameter. For a volume that is not block value and goes to the last block in the file.
labeled, only the data blocks (DTABLK parameter) are
end-data-block: Specify the number of the last data
dumped.
block to dump within each file. If this number is less
*ALL: For a standard-labeled volume, the dump than the number specified for the start-data-block part of
includes header labels, trailer labels, and data blocks. the DTABLK parameter, an error message is sent to the
For a volume that is not labeled, TYPE(*ALL) dumps user who requested the dump, and the tape is not
only data blocks (since there are no labels). dumped. If the end-data-block value is larger than the
actual number of data blocks in the data file, then all
*NONE: No data file is dumped. If TYPE(*NONE) is
blocks from the start-block number to the end of the file
specified, the tape volume being dumped must be
are dumped (with no error messages).
labeled, and VOLLBL(*NO) cannot be specified, or an
error message is sent to the user of the DMPTAP Other Single Values
command.
*ALL: All data blocks in the specified data files on this
*HDRLBL: The data file header labels are dumped. volume are dumped. If a data file is continued from
Header labels are immediately ahead of the data in the another volume or continues onto another volume, only
file that they apply to. All header labels for the specified the part of the data file that is stored on this volume is
data files are dumped, including user-specified header dumped.
labels (if any exist). TYPE(*HDRLBL) is not valid for
*LAST: Only the last data block in the data file is
volumes that are not labeled.
dumped.
*DTABLK: One or more data blocks from the file data
VOLLBL
are dumped. The blocks within the data file that are
Specifies whether volume labels are dumped. This
dumped are specified by the DTABLK parameter.
parameter is ignored for volumes that are not labeled.
*TLRLBL: All data file trailer labels are dumped. Trailer
*YES: All volume labels (including user-specified labels)
labels immediately follow the data in the file to which
are dumped.
they apply. All the trailer labels for the specified data
files are dumped, including user-specified trailer labels (if *NO: No volume labels are dumped; the volume printout
any exist). TYPE(*TLRLBL) is not valid for volumes that does, however, include the volume identifier of a labeled
are not labeled. volume and other basic information for any dumped
tape.
DTABLK
Specifies which data blocks are dumped. This param- CODE
eter is used to limit the amount of tape file data dumped Specifies the character code used. The code can be
to the printer. If neither TYPE(*BASIC) nor TYPE(*ALL) either extended binary-coded decimal interchange code
is specified and the TYPE parameter value does not (*EBCDIC) or the American National Standard Code for
include *DTABLK, this parameter is ignored. Information Interchange (*ASCII).
This parameter can be specified as a list of two values *EBCDIC: The tape contains data in the EBCDIC char-
(Elements 1 and 2) or as a single value (*ALL or acter code. The dump output contains the hexadecimal
*LAST). value and the EBCDIC character equivalent of each data
byte.
Element 1: First Block to Dump
*ASCII: The tape contains data in the ASCII character
*FIRST: The data blocks being dumped begins with the
code. The dump output contains the hexadecimal value
first block in the data file.
and the ASCII character equivalent of each data byte.
start-data-block: Specify the number of the first data
block within each file that is dumped. If this number is ENDOPT
greater than the number specified for the end-data-block Specifies whether the tape is rewound only or rewound
portion of the DTABLK parameter, an error message is and unloaded after the operation ends.
sent to the user who requested the dump, and the tape *REWIND: The tape is automatically rewound, but not
is not dumped. If the start-data-block value is larger unloaded, after the operation has ended.
than the actual number of data blocks in the data file,
*LEAVE: The tape does not rewind or unload after the
then the last data block in the file is dumped (with no
operation ends. It remains at the current position on the
error messages).
tape drive.
Element 2: Last Block to Dump
*UNLOAD: The tape is automatically rewound and
*ONLY: Only the data block specified by the first part of unloaded after the operation ends.
the DTABLK parameter is dumped.

P3-24 OS/400 CL Reference - Part 2 (Full Version)


DMPTAP

Example This command dumps information from the tape volume that
is on device QTAPE2. Data blocks 3 through 7 within the
DMPTAP DEV(QTAPE2) SEQNBR(5) TYPE(\DTABLK)
data file specified by sequence number 5 are dumped to a
DTABLK(3 7)
printer file.

Chapter 2. OS/400 Command Descriptions P3-25


DMPTRC

DMPTRC (Dump Trace) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─┬───────────────────────────┬──┬─────────────────────────────────────────────────────┬─────5
55──DMPTRC──MBR(──member-name──)────
│ ┌─QPFRDATA─────┐ │ │ ┌─QSYS/─────────┐ ┌─QCTL───────────┐ │
└─LIB(──┴─library-name─┴──)─┘ └─JOBQ(──┬─┼───────────────┼──┴─job-queue-name─┴─┬──)─┘
│ ├─\LIBL/────────┤ │
│ ├─\CURLIB/──────┤ │
│ └─library-name/─┘ │
└─\NONE─────────────────────────────────┘
5──┬─────────────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\BLANK────────┐ │
└─TEXT(──┴─'description'─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose JOBQ
Specifies the qualified name of the job queue on which
The Dump Trace (DMPTRC) command copies data from the this job is placed. The name of the job queue can be
vertical microcode (VMC) trace table to a database file. The qualified by one of the following library values:
user can optionally run the job interactively or submit it as a
batch job. QSYS: The IBM-supplied system library, QSYS, is
used to locate the job queue.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more *LIBL: All libraries in the job's library list are
information about printing the help text, refer to searched until the first match is found.
“Printing CL Command Descriptions” in Chapter 1. *CURLIB: The current library for the job is
searched. If no library is specified as the current
library for the job, the QGPL library is used.
Required Parameters
library-name: Specify the name of the library to be
MBR searched.
Specifies the member name of the database file where
the trace table data is dumped. If STRPFRMON was QCTL: The IBM-supplied controlling subsystem QCTL
used to collect the trace data, the same name that was is used.
specified on the Start Performance Monitor job-queue-name: Specify the name of the job queue.
(STRPFRMON) command should be used. If Perfor-
mance Tools/400 is installed, this is a requirement for *NONE: No job is submitted. The DMPTRC request
the reporting function of the Print Transaction Report runs interactively.
(PRTTNSRPT) command. TEXT
Specifies the text that briefly describes the database
Optional Parameters member. More information on this parameter is in
Appendix A, “Expanded Parameter Descriptions.”
LIB
*BLANK: Text is not specified.
Specifies the library where the database file for trace
data is located. If the file is not found in the specified 'description': Specify no more than 50 characters of text,
library, the system automatically creates it in that library. enclosed in apostrophes.
The name of the database file can be qualified by one of
the following library values: Example
QPFRDATA: The data is located in the DMPTRC MBR(TUESAM)
IBM-supplied performance data library, QPFRDATA.
This command causes existing VMC trace data to be written
library-name: Specify the name of the library to be to the member TUESAM in library QPFRDATA. The file
searched. used is QAPMDMPT. The request is submitted to the job
queue QCTL in library QSYS. It runs as a batch job.

P3-26 OS/400 CL Reference - Part 2 (Full Version)


DO

DO (Do) Command
Pgm: B,I

55──DO─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────5%

Purpose Examples
The Do (DO) command allows the user to group commands Example 1: Processing a Group of Commands
within a CL program. It is used with the ENDDO command DO
to identify a group of commands that are run together as a Ÿ
group. Usually, the DO command specifies the starting of a Ÿ (group of CL commands)
group of commands that are run as a result of a decision Ÿ
made by the processing of an IF command. However, the ENDDO
DO command does not have to be associated with an IF
command. When used with an IF command, the DO The commands between the DO and ENDDO commands are
command can be either the true part of the decision (that is, processed once, as a group of commands.
the value of the THEN parameter of the IF command), or the
false part of a decision (on the ELSE command). Every Do Example 2: Processing a Group of Commands
group must be ended by the ENDDO command. Do groups If &SWITCH DO
can be nested within other Do groups, but each group must Ÿ
have an ENDDO command to end its level of nesting. Ÿ (group of CL commands)
Ÿ
Restriction: This command is valid only within a CL ENDDO
program. Up to 10 levels of Do groups can be nested within
each other. The commands between the DO and ENDDO commands are
processed if the value in the logical variable &SWITCH is '1'.
There are no parameters for this command. If &SWITCH is not '1', then control passes immediately to the
next command following the ENDDO command.

Chapter 2. OS/400 Command Descriptions P3-27


DSCJOB

DSCJOB (Disconnect Job) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──┬────────────────────────────────────────────────────────┬────5
55──DSCJOB──┬──────────────────────┬──┬─────────────────────┬───
│ ┌─\NOLIST─┐ │ │ ┌─\DEVD─┐ │ └─JOB(──┬─\─────────────────────────────────────────┬──)─┘
└─LOG(──┴─\LIST───┴──)─┘ └─DROP(──┼─\YES──┼──)─┘ └─┬─────────────────────────────┬──job-name─┘
└─\NO───┘ └─┬─────────────┬──user-name/─┘
└─job-number/─┘
5──┬────────────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\SELECT─┐ │
└─DUPJOBOPT(──┴─\MSG────┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *DEVD: The value specified on the DROP parameter of


the work station's device description is assumed.
The Disconnect Job (DSCJOB) command allows the interac-
*YES: The switched line is disconnected when the job
tive user to disconnect all the jobs at the work station and
is disconnected if no other work stations are signed on
return to the sign-on display.
the line.
Restrictions: *NO: The switched line is not disconnected when the
1. A job being disconnected must be an interactive job. job is disconnected.

2. A job which is being held cannot be disconnected. JOB


Specifies the name of a job being disconnected from a
3. A pass-through job cannot be disconnected unless the
work station. The job or jobs that are disconnected from
user has used the system request to return the source
a work station can be reconnected when the user again
system from the pass-through target.
signs on the same work station.
4. A user must have *JOBCTL authority to disconnect a
A job identifier is a qualified name with up to three ele-
job.
ments. For example:
5. A job cannot be disconnected if PC organizer is active. job-name
Note: To see the parameter and value descriptions for this user-name/job-name
command, refer to the online help text. For more job-number/user-name/job-name
information about printing the help text, refer to More information on this parameter is in Appendix A,
“Printing CL Command Descriptions” in Chapter 1. “Expanded Parameter Descriptions.”
Note: The user must have *JOBCTL authority to
Optional Parameters specify the name of an active or interactive job.
LOG job-name: Specify the name of the job that is being dis-
Specifies whether the job log for this interactive job is connected. If no job qualifier is given, all jobs currently
deleted or is included in the job's spooled output for in the system are searched for the name of the job. If
printing. This entry takes precedence over the LOG duplicates of the specified name are found, a qualified
parameter value specified for the job. This parameter job name must be specified. The qualified job name
only has meaning if the disconnected job is canceled includes the user name and/or the job number.
due to exceeding the disconnect time interval. The time user-name: Specify the name of the user who owns the
interval is defined by the system value QDSCJOBITV. job. Specifying the user as a qualifier is necessary only
*NOLIST: An intermediate representation of the if a duplicate job name exists for different users. If a
program listing is not created. duplicate job name exists for the same user, the job
must be qualified with the job number.
*LIST: The job log is spooled for printing with the job's
spooled output. job-number: Specify the job number. Specifying the job
number as a qualifier is necessary only if a duplicate job
DROP name exists for the same user.
Specifies whether the switched line attached to the work
station is disconnected (dropped) if no other work DUPJOBOPT
stations on the same line are signed on. This parameter Specifies the action taken when duplicate jobs are found
is ignored if the work station is attached to a non- by this command.
switched line.

P3-28 OS/400 CL Reference - Part 2 (Full Version)


DSCJOB

*SELECT: The selection display is shown when dupli- Example 2: Disconnecting Job Without Releasing
cate jobs are found during an interactive session. Other- Switched Line
wise, a message is issued. DSCJOB LOG(\LIST) DROP(\NO)
*MSG: A message is issued when duplicate jobs are
found. This command disconnects the interactive job, but the
switched line is not released. If the job is ended due to the
QDSCJOBITV system value, the job log is included with the
Examples job's spooled output.

Example 1: Disconnecting All Interactive Jobs Example 3: Deleting Information in Job Log
DSCJOB DSCJOB LOG(\NOLIST) DROP(\DEVD) JOB(123497/DEPT1/DSPð4)

This command enables the user of the work station to dis- This command disconnects the interactive job
connect all the interactive jobs associated with the work 123497/DEPT1/DSP04 and any other jobs on that work
station. The switched line is dropped only if that is specified station, for example, secondary jobs or group jobs. If the job
in the work station device description of this work station and is disconnected when the disconnect interval in the
if no other work station on this line is active. If the job is QDSCJOBITV system value is reached, the job is ended and
disconnected when the disconnect interval in the the job log is not included with the job's spooled output. The
QDSCJOBITV system value is reached, the job is ended and work station device description is checked to determine
the job log is not included with the job's spooled output. whether the switched line is disconnected.

Chapter 2. OS/400 Command Descriptions P3-29


DSPACC

DSPACC (Display Access Code) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──────────────────────────────────────────────────────────────────────────────────────5%
55──DSPACC──┬────────────────────────┬───
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose job's spooled output. More information on this param-


eter is in Appendix A, “Expanded Parameter
The Display Access Code (DSPACC) command shows the Descriptions.”
access codes currently defined in the system. The display
*: Output requested by an interactive job is shown on
shows both the access code number and the descriptive text
the display. Output requested by a batch job is printed
associated with the access code. The entries on the display
with the job's spooled output.
are shown in numeric order from the lowest number to the
highest number. *PRINT: The output is printed with the job's spooled
output.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more
information about printing the help text, refer to Example
“Printing CL Command Descriptions” in Chapter 1. DSPACC

This command, if entered interactively, displays all access


Optional Parameters
codes currently on the system.
OUTPUT
Specifies whether the output from the command is
shown at the requesting workstation or printed with the

P3-30 OS/400 CL Reference - Part 2 (Full Version)


DSPACCAUT

DSPACCAUT (Display Access Code Authority) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ───────────────────────────────────────5%
55──DSPACCAUT──┬────────────────────────────────────────┬──┬────────────────────────┬───
│ ┌─\CURRENT─────────────────┐ │ │ ┌─\──────┐ │
└─USER(──┼─\ALL─────────────────────┼──)─┘ └─OUTPUT(──┴─\PRINT─┴──)─┘
│ ┌──
───────────────────┐ │
└──6─user-profile-name─┴───
(1) ─┘

Notes:
1 A maximum of 300 repetitions

P All parameters preceding this point can be specified in positional form.

Purpose played, as well as the access codes to which those


users have authority.
The Display Access Code Authority (DSPACCAUT)
user-profile-name: Specify the name of the user profile
command shows the access codes to which a user or group
for which the access codes are displayed. Up to 300
of users currently have authority. The display shows a list of
user profile names can be specified.
user profile names, as well as the access codes to which
each user is authorized. The access codes are in numeric OUTPUT
sequence for each user. Specifies whether the output from the command is
Note: To see the parameter and value descriptions for this shown at the requesting workstation or printed with the
command, refer to the online help text. For more job's spooled output. More information on this param-
information about printing the help text, refer to eter is in Appendix A, “Expanded Parameter
“Printing CL Command Descriptions” in Chapter 1. Descriptions.”
*: Output requested by an interactive job is shown on
the display. Output requested by a batch job is printed
Optional Parameters with the job's spooled output.
USER *PRINT: The output is printed with the job's spooled
Specifies the user profile name for which authorized output.
access codes are displayed.
*CURRENT: The user profile that is currently running is
Example
used.
DSPACCAUT USER(\CURRENT) OUTPUT(\PRINT)
*ALL: All user profile names for users in the system
distribution directory with access code authority are dis- This command prints all access codes to which the current
user is authorized.

Chapter 2. OS/400 Command Descriptions P3-31


DSPACTPJ

DSPACTPJ (Display Active Prestart Jobs) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ─┬────────────────────────┬─────────────────5%
55──DSPACTPJ──SBS(──subsystem-name──)──PGM(──┼───────────────┼──program-name──)────
├─\CURLIB/──────┤ │ ┌─\──────┐ │
└─library-name/─┘ └─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose library-name: Specify the name of the library to be


searched.
The Display Active Prestart Jobs (DSPACTPJ) command dis-
plays statistics and performance information for active pre- program-name: Specify the name of the program in the
start jobs associated with a prestart job entry in an active active prestart jobs.
subsystem. All information on the display is collected from
the time the prestart job entry is started (either at subsystem Optional Parameters
startup or when the STRPJ command is run for this entry), or
from the time the reset key is pressed. OUTPUT
Specifies whether the output from the command is being
Restriction: This command is restricted to a user with *USE shown at the requesting work station or printed with the
authority. job's spooled output. More information on this param-
Note: To see the parameter and value descriptions for this eter is in Appendix A, “Expanded Parameter
command, refer to the online help text. For more Descriptions.”
information about printing the help text, refer to *: Output requested by an interactive job is shown on
“Printing CL Command Descriptions” in Chapter 1. the display. Output requested by a batch job is printed
with the job's spooled output.
Required Parameters *PRINT: The output is printed with the job's spooled
output.
SBS
Specifies the name of the active subsystem that contains
the active prestart jobs. Examples
PGM Example 1: Displaying Job Information
Specifies the qualified name of the program in the active DSPACTPJ SBS(PJSBS) PGM(QGPL/PGM1)
prestart job entry.
The name of the program can be qualified by one of the This command displays information for the prestart job entry
following library values: in subsystem PJSBS with program PGM1 in the QGPL
library.
*LIBL: All libraries in the job's library list are
searched until the first match is found. Example 2: Printing Job Information
*CURLIB: The current library for the job is DSPACTPJ SBS(PJSBS) PGM(QGPL/PGM2) OUTPUT(\PRINT)
searched. If no library is specified as the current
This command prints active prestart job information for the
library for the job, the QGPL library is used.
prestart job entry in the active subsystem PJSBS with
program PGM2 in the QGPL library.

P3-32 OS/400 CL Reference - Part 2 (Full Version)


DSPACTPRFL

DSPACTPRFL (Display Active Profile List) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──────────────────────────────────────────────────────────────────────────────────5%
55──DSPACTPRFL──┬────────────────────────┬───
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Optional Parameter


The Display Active Profile List (DSPACTPRFL) command OUTPUT
displays the list of user profiles that will always be consid- Specifies whether the output from the command is
ered active and therefore will not be disabled by the Analyze shown at the requesting workstation or printed with the
Profile Activity (ANZPRFACT) command function. Those job's spooled output. More information on this param-
IBM user profiles which are never considered to be inactive eter is in Appendix A, “Expanded Parameter
will not be listed. This information was gathered from the Descriptions.”
Change Active Profile List (CHGACTPRFL) command. If the *: The output is displayed (if requested by an interactive
Display Active Profile List (DSPACTPRFL) command is job) or printed with the job's spooled output (if requested
issued before the CHGACTPRFL command, an empty by a batch job).
report will be produced.
*PRINT: The output is printed with the job's spooled
You must have *ALLOBJ special authority to run this output.
command.
Note: To see the parameter and value descriptions for this Example
command, refer to the online help text. For more DSPACTPRFL OUTPUT(\PRINT)
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. The list of profiles that are always considered active by the
Analyze Profile Activity(ANZPRFACT) are printed with the
job's spooled output.

Chapter 2. OS/400 Command Descriptions P3-33


DSPACTSCD

DSPACTSCD (Display Activation Schedule) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ───────────────────────────────────────────────────────────────────────────────────5%
55──DSPACTSCD──┬────────────────────────┬───
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose OUTPUT
Specifies whether the output from the command is
The Display Activation Schedule (DSPACTSCD) command shown at the requesting workstation or printed with the
displays user profiles and their enable and disable time, the job's spooled output. More information on this param-
days the profiles will be activated and the job schedule entry eter is in Appendix A, “Expanded Parameter
numbers for the corresponding job schedule entries. This Descriptions.”
information is in file QASECACT in library QUSRSYS and
*: The output is displayed (if requested by an interactive
was gathered from the Change Activation Schedule Entry
job) or printed with the job's spooled output (if requested
(CHGACTSCDE) command.
by a batch job).
Restrictions: *PRINT: The output is printed with the job's spooled
output.
You must have *ALLOBJ special authority to use this
command.
Example
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more DSPACTSCD OUTPUT(\PRINT)
information about printing the help text, refer to
The activation schedule is printed with the job's spooled
“Printing CL Command Descriptions” in Chapter 1.
output.

Optional Parameter

P3-34 OS/400 CL Reference - Part 2 (Full Version)


DSPAPPNINF

DSPAPPNINF (Display APPN Information) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──┬──────────────────────────┬──┬──────────────────────────┬───────────────────5
55──DSPAPPNINF──┬────────────────────────────┬───
│ ┌─\TOPOLOGY─┐ │ │ ┌─\ALL──────┐ │ │ ┌─\ENDPNT─┐ │
└─INFTYPE(──┼─\LCLNODE──┼──)─┘ └─NODES(──┼─\ACTIVE───┼──)─┘ └─SSNTYPE(──┴─\INMSSN─┴──)─┘
└─\SSN──────┘ └─\INACTIVE─┘
5──┬────────────────────────────────────────────────────────┬──┬──────────────────────────────────────────┬─────────────────────5
└─JOB(────┬─────────────────────────────┬──job-name────)─┘ │ ┌─\ALL────────────────────────┐ │
└─┬─────────────┬──user-name/─┘ └─CTL(──┴─controller-description-name─┴──)─┘
└─job-number/─┘
5──┬──────────────────────────┬──┬───────────────────────────────────────────┬──────────────────────────────────────────────────5
│ ┌─\────────┐ │ │ ┌─\LIBL/────────┐ │
└─OUTPUT(──┼─\PRINT───┼──)─┘ └─OUTFILE(──┼───────────────┼──file-name──)─┘
└─\OUTFILE─┘ ├─\CURLIB/──────┤
└─library-name/─┘
5──┬───────────────────────────────────────────┬───────────────────────────────────────────────────────────────────────────────5%
│ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │
└─OUTMBR(──┼─────────────┼──┴─\ADD─────┴──)─┘
└─member-name─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *ALL: Information about all nodes in the network is


printed or displayed.
The Display APPN Information (DSPAPPNINF) command
*ACTIVE: Information about all network nodes that have
provides the user with Advanced Peer-to-Peer Networking
at least one active link is printed or displayed.
(APPN) network information which is used to assist in
problem analysis. The user specifies one basic type of *INACTIVE: Information about all network nodes that
network information being shown, printed, or stored in an have no active links is printed or displayed.
output file: information about the network topology, the local
SSNTYPE
directory, or session information. More information on APPN
Specifies which type of session information is shown.
functions is in found in the APPN Support book.
This parameter is valid only when INFTYPE(*SSN) is
Note: To see the parameter and value descriptions for this specified.
command, refer to the online help text. For more
*ENDPNT: Information about sessions for which the
information about printing the help text, refer to
local node is a session end point is shown or printed.
“Printing CL Command Descriptions” in Chapter 1.
*INMSSN: Information about intermediate sessions
being routed through the local node is shown or printed.
Optional Parameters
JOB
INFTYPE Specifies the name of the job for which session informa-
Specifies the type of information that is shown or printed. tion is shown or printed. If OUTPUT(*) is specified and
*TOPOLOGY: The contents of the topology database is no job name is specified, a list of APPN job names run
shown or printed. This consists of the set of all nodes in since the most recent initial program load (IPL) of the
the network, their characteristics, and the set of link des- system is shown. A job name can be selected from that
tination nodes along with the characteristics of the con- list. If OUTPUT(*PRINT) or OUTPUT(*OUTFILE) is
necting links for each node. specified without a job name, the session information for
all APPN jobs is printed or stored in a specified output
*LCLNODE: The contents of the local directory is
file.
shown or printed. This consists of the local node and
the names of all remote control points for which informa- A job identifier is a special value or a qualified name
tion exists in the local directory. with up to three elements. For example:
*SSN: Information about intermediate sessions or ses- job-name
sions that have the local node as a session end point is user-name/job-name
shown or printed. job-number/user-name/job-name
This parameter is valid only if SSNTYPE(*ENDPNT) is
NODES
specified.
Specifies which set of nodes will be displayed. This
parameter is only valid when INFTYPE(*TOPOLOGY) is
specified.

Chapter 2. OS/400 Command Descriptions P3-35


DSPAPPNINF

More information on this parameter is in Appendix A, OUTMBR


“Expanded Parameter Descriptions.” Specifies the name of the database file member to which
the output is directed. This parameter is valid only if
CTL
OUTPUT(*OUTFILE) is specified.
Specifies the controller description name for which inter-
mediate session information is displayed or printed. This Element 1: Member to Receive Output
parameter is valid only if SSNTYPE(*INMSSN) is speci- *FIRST: The requested APPN information is stored in
fied. the first file member.
*ALL: Intermediate session information for all control- member-name: Specify the name of the output file
lers will be displayed or printed. member used to store the requested APPN information.
controller-description-name: Specify the name of the The member name can be from 1 to 10 characters in
controller description for which intermediate information length.
will be displayed or printed. Element 2: Operation to Perform on Member
OUTPUT *REPLACE: The system clears the existing member
Specifies whether the output from the command is and adds the new records.
shown at the requesting workstation or printed with the
*ADD: The system adds the new records to the end of
job's spooled output. More information on this param-
the existing records.
eter is in Appendix A, “Expanded Parameter
Descriptions.”
*: The requested data is shown on the display station.
Examples
*PRINT: The output is printed with the job's spooled Example 1: Printing a List
output. DSPAPPNINF INFTYPE(\TOPOLOGY)
*OUTFILE: The output is directed to the database file NODES(\ALL) OUTPUT(\PRINT)
specified on the OUTFILE parameter.
This command prints the list of all nodes currently existing in
OUTFILE the APPN network, the set of links destination nodes associ-
Specifies the qualified name of the output file that is ated with each node, and the link characteristics for each
used to store the requested APPN information. This link.
parameter is valid only if OUTPUT(*OUTFILE) is speci-
fied. Example 2: Showing a List of PCIDs

The name of the file can be qualified by one of the fol- DSPAPPNINF INFTYPE(\SSN) SSNTYPE(\ENDPNT)
lowing library values: JOB(APPNJOB/USERPROF/ððððð1) OUTPUT(\)

*LIBL: All libraries in the job's library list are This command shows a list of procedure correlation session
searched until the first match is found. identifiers (PCIDs) associated with the job name
APPNJOB/USERPROF/000001. From this list, the user can
*CURLIB: The current library for the job is
specify an option to show additional information about a
searched. If no library is specified as the current
session.
library for the job, the QGPL library is used.
library-name: Specify the name of the library to be Example 3: Storing Contents of a Directory
searched. DSPAPPNINF INFTYPE(\LCLNODE) OUTPUT(\OUTFILE)
OUTFILE(USERLIB/APPNFILE) OUTMBR(\FIRST, \REPLACE)
file-name: Specify the name of the file that is used to
store the requested APPN information. This command stores the contents of the local directory in
the first member of an output file named
USERLIB/APPNFILE. If information already exists in this
member, the new information replaces the existing informa-
tion.

P3-36 OS/400 CL Reference - Part 2 (Full Version)


DSPAUDJRNE

DSPAUDJRNE (Display Audit Journal Entries) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──DSPAUDJRNE──┬─────────────────────────┬──┬───────────────────────────────────┬──────────────────────────────────────────────5
│ ┌──
──────┐ │ │ ┌─\ALL──────────────┐ │
│ │┌─AF─┐│ │ └─USRPRF(──┴─user-profile-name─┴──)─┘
6 (1) ──)─┘
└─ENTTYP(───┼─CA─┼┴───
├─CD─┤
├─CO─┤
├─CP─┤
├─DO─┤
├─JS─┤
├─ND─┤
├─NE─┤
├─OR─┤
├─OW─┤
├─PG─┤
├─PO─┤
├─PW─┤
├─SF─┤
├─SV─┤
├─YC─┤
├─YR─┤
├─ZC─┤
└─ZR─┘
5──┬────────────────────────────────────────────────────────────────────────────────────────────────────────┬───────────────────5
│ ┌─\CURRENT───────────────────────────────────────────────────────────────────────────────┐ │
└─JRNRCV(──┼─\CURCHAIN──────────────────────────────────────────────────────────────────────────────┼──)─┘
│ ┌─\CURRENT────────────────────────────────┐ │
│ ┌─\LIBL/────────┐ │ ┌─\LIB/─────────┐ │ │
└─┼───────────────┼──start-journal-receiver──┴─┼───────────────┼──end-journal-receiver─┴─┘
├─\CURLIB/──────┤ ├─\CURLIB/──────┤
└─library-name/─┘ └─library-name/─┘
5──┬────────────────────────────────────────────────┬──┬──────────────────────────────────────────┬─────────────────────────────5
│ ┌─\FIRST───────────────────────┐ │ │ ┌─\LAST────────────────────┐ │
└─FROMTIME(──┴─starting-date──starting-time─┴──)─┘ └─TOTIME(──┴─ending-date──ending-time─┴──)─┘
5──┬────────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\PRINT─┐ │
└─OUTPUT(──┴─\──────┴──)─┘
Note:
1 A maximum of 20 repetitions.

Purpose ENTTYP
Specifies the journal entry types to be included in the
The Display Audit Journal Entries (DSPAUDJRNE) command report.
allows you to generate security journal audit reports. The
AF: Authorization failure entries.
reports are based on the audit entry types and the user
profile specified on the command. Reports can be limited to CA: Change authority entries.
specific time frames and detached journal receivers can be CD: Command string entries.
searched. The reports are directed to the active display or a
spooled file. CO: Create object entries.
CP: Change user profile entries.
Restrictions:
DO: Delete object entries.
You must have *ALLOBJ and *AUDIT special authorities to JS: Actions against jobs entries.
use this command.
ND: Directory search filter violations.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more NE: End point filter violations.
information about printing the help text, refer to OR: Object restored entries.
“Printing CL Command Descriptions” in Chapter 1.
OW: Object ownership changed entries.
PG: Change of an object's primary group.
Optional Parameters
PO: Printed output entries.
PW: Invalid password entries.

Chapter 2. OS/400 Command Descriptions P3-37


DSPAUDJRNE

SF: Action on spooled files entries. ending-journal-receiver: Specify the name and library of
the last journal receiver from which entries are searched.
SV: System values changed entries.
YC: DLO object read entries. FROMTIME
Specifies the date and time of the first journal entry to be
YR: DLO object changed entries. searched.
ZC: Object read entries. *FIRST: The first journal entry in the journal receiver
ZR: Object changed entries. becomes the starting point for the range of entries to be
searched.
USRPRF
Journal entries created for a user profile's actions are Element 1: Starting entry date
included in the report. starting-date: Specify the starting date. The starting
*ALL: The report will include entries for all user profiles. date and time of the first journal entry occurring at or
after the specified starting date and time becomes the
user-profile-name: Specify the name of the user profile starting point for the range of entries to be searched.
whose journal entries are to be included in the report.
Element 2: Starting entry time
JRNRCV
Specifies the name of the starting (first) and ending (last)
starting-time: Specify the starting time. The starting
date and time of the first journal entry occurring at or
journal receivers whose journal entries are searched.
after the specified starting date and time becomes the
Note: If the maximum number of receivers (256) in the starting point for the range of entries to be searched.
range is surpassed, an error occurs and no
journal entries are converted. TOTIME
Specifies the creation date and time of the last journal
*CURRENT: Journal entries in the currently attached
entry to be searched.
journal receiver are searched.
*LAST: The last journal entry in the journal receiver
*CURCHAIN: Journal entries in the currently attached
becomes the ending point for the range of entries to be
journal receiver chain are searched. If there is a break
searched.
in the chain, the receiver range is from the most recent
break in the chain through the receiver that is attached Element 1: Ending entry date
when starting to convert journal entries. ending-date: Specify the ending date. The ending date
Element 1: Starting Journal Receiver and time of the first journal entry occurring at or before
the specified ending time on the specified ending date
The name of the staring journal receiver can be qualified
becomes the ending point for the range of entries to be
by one of the following library values:
searched.
*LIBL: The library list is used to locate the journal Element 2: Ending entry time
receiver.
ending-time: Specify the ending time. The ending date
*CURLIB: The current library for the job is used to and time of the first journal entry occurring at or before
locate the journal receiver. If no library is specified the specified ending time on the specified ending date
as the current library for the job, QGPL is used. becomes the ending point for the range of entries to be
library-name: Specify the library where the journal searched.
receiver is located.
OUTPUT
starting-journal-receiver: Specify the name and library of Specifies whether the output from the command is
the first journal receiver from which entries are searched. shown at the requesting workstation or printed with the
job's spooled output. More information on this param-
Element 2: Ending Journal Receiver *CURRENT:
eter is in Appendix A, “Expanded Parameter
The journal receiver that is currently attached is used.
Descriptions.”
The name of the ending journal receiver can be qualified
*PRINT: The output is printed with the job's spooled
by one of the following library values:
output.
*LIBL: The library list is used to locate the journal *: The output is shown (if requested by an interactive
receiver. job) or printed with the job's spooled output (if requested
*CURLIB: The current library for the job is used to by a batch job).
locate the journal receiver. If no library is specified
as the current library for the job, QGPL is used. Example
library-name: Specify the library where the journal DSPAUDJRNE ENTTYP(AF) OUTPUT(\)
receiver is located.

P3-38 OS/400 CL Reference - Part 2 (Full Version)


DSPAUDJRNE

A report containing all 'Authority Failure' audit records in the


current journal receiver will be displayed on the active work-
station.

Chapter 2. OS/400 Command Descriptions P3-39


DSPAUT

DSPAUT (Display Authority) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─────────────────────────────────────────────────────────5%
55──DSPAUT──OBJ(──'object-path-name'──)──┬────────────────────────┬───
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Optional Parameter


The Display Authority (DSPAUT) command shows the list of OUTPUT
authorized users of an object and their authorities for the Specifies whether the output from the command is
object. If the object is secured by an authorization list, the shown at the requesting work station or printed with the
name of the authorization list is also shown. job's spooled output.
*: Output requested by an interactive job is shown on
The following are shown for the specified object:
the display. Output requested by a batch job is printed
Ÿ The object path name. with the job's spooled output.
Ÿ The name of the object's owner.
*PRINT: The output is printed with the job's spooled
Ÿ The name of the object's primary group.
output.
Ÿ The name of the authorization list securing the object.
Ÿ A list of all the users who are authorized to use the
object. Examples
Ÿ The authorities that each user has for the object.
Example 1: Displaying Users and Authorities
The user entering the command must have object manage-
ment authority for the object. If an object does not have an DSPAUT OBJ('/QSYS.LIB/ARLIB.LIB/PROG1.PGM')
owner name associated with it, no authorities for the object
This command shows the authorized users and their authori-
are shown.
ties for the object named PROG1 to the user who entered
For more information about integrated file system commands, the command, if that user has object management authority
see the Integrated File System Introduction book. for the object. PROG1 is a program located in the library
named ARLIB. The system assumes * for the device that
Note: To see the parameter and value descriptions for this shows the output list. If the command was entered in the
command, refer to the online help text. For more batch subsystem, the output is placed in the default output
information about printing the help text, refer to queue for the job. If the command was entered in the inter-
“Printing CL Command Descriptions” in Chapter 1. active subsystem, the output is shown on the device where
the user entered the command.
Required Parameter Example 2: Printing List of Users
OBJ
Specifies the path name of the object for which the DSPAUT OBJ('/MYDIR/MYOBJECT')
OUTPUT(\PRINT)
authorized users and their authorities are displayed. For
more information on specifying path names, refer to This command causes the list of authorized users of
Chapter 2, “Path Names (*PNAME).” MYOBJECT in the MYDIR directory to be printed.

P3-40 OS/400 CL Reference - Part 2 (Full Version)


DSPAUTHLR

DSPAUTHLR (Display Authority Holder) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──────────────────────────5
55──DSPAUTHLR──┬──────────────────────────┬──┬────────────────────────────────────────────────────┬───
│ ┌─\────────┐ │ │ ┌─\LIBL/────────┐ │
└─OUTPUT(──┼─\PRINT───┼──)─┘ └─OUTFILE(──┼───────────────┼──database-file-name──)─┘
└─\OUTFILE─┘ ├─\CURLIB/──────┤
└─library-name/─┘
5──┬───────────────────────────────────────────┬───────────────────────────────────────────────────────────────────────────────5%
│ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │
└─OUTMBR(──┴─member-name─┴──┼──────────┼──)─┘
└─\ADD─────┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *CURLIB: The current library for the job is


searched. If no library is specified as the current
The Display Authority Holder (DSPAUTHLR) command library for the job, the QGPL library is used.
shows a list of authority holders. The list shows the name of
library-name: Specify the name of the library to be
the object that the authority holder secures, the name of the
searched.
library where the object is found, the object type, the owner
of the object, and the primary group of the object. database-file-name: Specify the name of the database
Note: To see the parameter and value descriptions for this file that receives the output of the display.
command, refer to the online help text. For more OUTMBR
information about printing the help text, refer to Specifies the name of the database file member to which
“Printing CL Command Descriptions” in Chapter 1. the output is directed.
Element 1: Member to Receive Output
Optional Parameters *FIRST: The first member in the file receives the output.
OUTPUT If OUTMBR(*FIRST) is specified and the member does
Specifies whether the output from the command is not exist, the system creates a member with the name of
shown at the requesting work station, printed with the the file specified on the OUTFILE parameter. If the
job's spooled output, or directed to a database file. member already exists, the user has the option to add
More information on this parameter is in Appendix A, new records to the end of the existing member or clear
“Expanded Parameter Descriptions.” the member and then add the new records.
*: Output requested by an interactive job is shown on member-name: Specify the file member that receives
the display. Output requested by a batch job is printed the output. If OUTMBR(member-name) is specified and
with the job's spooled output. the member does not exist, the system creates it. If the
member already exists, the user has the option to add
*PRINT: The output is printed with the job's spooled
new records to the end of the existing member or clear
output.
the member and then add the new records.
*OUTFILE: The output is directed to the database file
Element 2: Operation to Perform on Member
specified on the OUTFILE parameter.
*REPLACE: The system clears the existing member
OUTFILE and adds the new records.
Specifies the name of the database file to which the
output of the display is directed. If this file does not *ADD: The system adds the new records to the end of
exist, this command creates a database file in the speci- the existing records.
fied library. If the file is created by this function, the text
is 'Outfile for DSPAUTHLR' and the public authority is Example
*EXCLUDE.
DSPAUTHLR OUTPUT(\PRINT)
The name of the database file can be qualified by one of
the following library values: This command sends the display of the authority holder list
to the printer.
*LIBL: All libraries in the job's library list are
searched until the first match is found.

Chapter 2. OS/400 Command Descriptions P3-41


DSPAUTL

DSPAUTL (Display Authorization List) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─────────────────────────────────────────────────5
55──DSPAUTL──AUTL(──authorization-list-name──)──┬──────────────────────────┬───
│ ┌─\────────┐ │
└─OUTPUT(──┼─\PRINT───┼──)─┘
└─\OUTFILE─┘
5──┬────────────────────────────────────────────────────┬──┬───────────────────────────────────────────┬───────────────────────5%
│ ┌─\LIBL/────────┐ │ │ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │
└─OUTFILE(──┼───────────────┼──database-file-name──)─┘ └─OUTMBR(──┴─member-name─┴──┼──────────┼──)─┘
├─\CURLIB/──────┤ └─\ADD─────┘
└─library-name/─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *OUTFILE: The output is directed to the database file


specified on the OUTFILE parameter.
The Display Authorization List (DSPAUTL) command shows
the list of users (and their levels of authority) that make up OUTFILE
the authorization list. Specifies the name of the database file to which the
output of the display is directed. If the OUTFILE does
The owner of the authorization list, and any user who is not not exist, this command creates a database file in the
specified as *EXCLUDE on the authority list, can view the specified library. If the file is created by this function,
whole list of users and their authorities when they display an the descriptive text is 'Outfile for DSPAUTL' and the
authorization list. The authority to see the list may be from a public authority is *EXCLUDE. The database format
user's group profile or may have been adopted. (QSYDSAUT) of the output file is the same as that used
in the IBM-supplied database file QAOBJAUT.
When an authorization list is first shown, the specific authori-
The name of the database file can be qualified by one of
ties shown are determined by the level of detailed informa-
the following library values:
tion specified on the USROPT parameter in the user profile.
*LIBL: All libraries in the job's library list are
When the DSPAUTL command is used to display an authori- searched until the first match is found.
zation list, the user specifies the name of the authorization
list, whether the authorization list should be shown on the *CURLIB: The current library for the job is
display or sent to a printer, or (optionally) whether the output searched. If no library is specified as the current
should be sent to an OUTFILE. library for the job, the QGPL library is used.

Note: To see the parameter and value descriptions for this library-name: Specify the name of the library to be
command, refer to the online help text. For more searched.
information about printing the help text, refer to database-file-name: Specify the name of the database
“Printing CL Command Descriptions” in Chapter 1. file that receives the output of the display.

OUTMBR
Required Parameter Specifies the name of the database file member to which
AUTL the output is directed.
Specifies the name of the authorization list to be shown. Element 1: Member to Receive Output
*FIRST: The first member in the file receives the output.
Optional Parameters If OUTMBR(*FIRST) is specified and the member does
not exist, the system creates a member with the name of
OUTPUT the file specified on the OUTFILE parameter. If the
Specifies whether the output is sent to the display, to a member already exists, the option exists to add new
printer file, or to a database file. More information on records to the end of the existing outfile member or clear
this parameter is in Appendix A, “Expanded Parameter the member and add the new records.
Descriptions.”
member-name: Specify the file member that receives
*: Output requested by an interactive job is shown on the output. If OUTMBR(member-name) is specified and
the display. Output requested by a batch job is printed the member does not exist, the system creates it. If the
with the job's spooled output. member already exists, the option exists to add new
*PRINT: The output is printed with the job's spooled
output.

P3-42 OS/400 CL Reference - Part 2 (Full Version)


DSPAUTL

records to the end of the existing outfile member or clear Example


the member and add the new records.
DSPAUTL AUTL(DEPT48X) OUTPUT(\PRINT)
Element 2: Operation to Perform on Member
This command sends the display of the authorization list to
*REPLACE: The system clears the existing member
the printer.
and adds the new records.
*ADD: The system adds the new records to the end of
the existing records.

Chapter 2. OS/400 Command Descriptions P3-43


DSPAUTLDLO

DSPAUTLDLO (Display Authorization List Document Library Objects) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ───────────────────────────────────────────────5%
55──DSPAUTLDLO──AUTL(──authorization-list-name──)──┬────────────────────────┬───
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose AUTL
Specifies the name of the authorization list whose list of
The Display Authorization List Document Library Objects documents and folders is displayed.
(DSPAUTLDLO) command shows the list of documents and
folders whose access security is specified by the authori-
zation list specified in the AUTL parameter. Optional Parameters
OUTPUT
Restrictions:
Specifies whether the output from the command is
1. If a user on the list has authority other than *EXCLUDE, shown at the requesting workstation or printed with the
or is not on the list and public authority is something job's spooled output. More information on this param-
other than *EXCLUDE, that user is authorized to display eter is in Appendix A, “Expanded Parameter
the documents and folders. Descriptions.”
2. If the user is not authorized to the document or folder *: Output requested by an interactive job is shown on
because access authorities are private, the document the display. Output requested by a batch job is printed
library object is marked "not authorized" in the text field. with the spooled output of the job.
Note: To see the parameter and value descriptions for this *PRINT: The output is printed with the job's spooled
command, refer to the online help text. For more output.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1.
Example
DSPAUTLDLO AUTL(PAYROLL) OUTPUT(\PRINT)
Required Parameters
This command sends the display output for the authorization
list named PAYROLL to a printer.

P3-44 OS/400 CL Reference - Part 2 (Full Version)


DSPAUTLOBJ

DSPAUTLOBJ (Display Authorization List Objects) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──────────────────────────────────────────────5
55──DSPAUTLOBJ──AUTL(──authorization-list-name──)──┬──────────────────────────┬───
│ ┌─\────────┐ │
└─OUTPUT(──┼─\PRINT───┼──)─┘
└─\OUTFILE─┘
5──┬────────────────────────────────────────────────────┬──┬───────────────────────────────────────────┬───────────────────────5%
│ ┌─\LIBL/────────┐ │ │ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │
└─OUTFILE(──┼───────────────┼──database-file-name──)─┘ └─OUTMBR(──┴─member-name─┴──┼──────────┼──)─┘
├─\CURLIB/──────┤ └─\ADD─────┘
└─library-name/─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose does not exist, this command creates a database file in


the specified library. If the file is created by this func-
The Display Authorization List Objects (DSPAUTLOBJ) tion, the text is 'Outfile for DSPAUTLOBJ' and the public
command shows the list of objects that are secured by the authority is *EXCLUDE.
authorization list specified in the AUTL parameter. If a user
The name of the database file can be qualified by one of
is on the list with authority other than *EXCLUDE, or is not
the following library values:
on the list and public authority is something other than
*EXCLUDE, the user is authorized to display the objects. If *LIBL: All libraries in the job's library list are
the user is not authorized to an object because of private searched until the first match is found.
authorities, the object is marked not authorized in the text
*CURLIB: The current library for the job is
field.
searched. If no library is specified as the current
Note: To see the parameter and value descriptions for this library for the job, the QGPL library is used.
command, refer to the online help text. For more
library-name: Specify the name of the library to be
information about printing the help text, refer to
searched.
“Printing CL Command Descriptions” in Chapter 1.
database-file-name: Specify the name of the database
file that receives the output of the display.
Required Parameter
OUTMBR
AUTL
Specifies the name of the database file member to which
Specifies the name of the authorization list whose list of
the output is directed.
objects is shown.
Element 1: Member to Receive Output

Optional Parameters *FIRST: The first member in the file receives the output.
If OUTMBR(*FIRST) is specified and the member does
OUTPUT not exist, the system creates a member with the name of
Specifies whether the output from the command is the file specified on the OUTFILE parameter. If the
shown at the requesting work station, printed with the member already exists, the user has the option to add
job's spooled output, or directed to a database file. new records to the end of the existing member or to
More information on this parameter is in Appendix A, clear the existing member and then add the new
“Expanded Parameter Descriptions.” records.

*: Output requested by an interactive job is shown on member-name: Specify the file member that receives
the display. Output requested by a batch job is printed the output. If OUTMBR(member-name) is specified and
with the job's spooled output. the member does not exist, the system creates it.

*PRINT: The output is printed with the job's spooled Element 2: Operation to Perform on Member
output. *REPLACE: The system clears the existing member
*OUTFILE: The output is directed to the database file and adds the new records.
specified on the OUTFILE parameter. *ADD: The system adds the new records to the end of
the existing records.
OUTFILE
Specifies the qualified name of the database file to
which the output of the display is directed. If this file Example

Chapter 2. OS/400 Command Descriptions P3-45


DSPAUTLOBJ

DSPAUTLOBJ AUTL(PAYROLL) OUTFILE(\LIBL/PAYROLL) This command places the output in the database file
OUTMBR(DARL \REPLACE) PAYROLL, member name DARL. If member DARL already
exists, the system clears it and adds the new records.

P3-46 OS/400 CL Reference - Part 2 (Full Version)


DSPAUTUSR

DSPAUTUSR (Display Authorized Users) Command

Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─────────────────────────────────────────────────────────5%
55──DSPAUTUSR──┬──────────────────────┬──┬────────────────────────┬───
│ ┌─\USRPRF─┐ │ │ ┌─\──────┐ │
└─SEQ(──┴─\GRPPRF─┴──)─┘ └─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose OUTPUT
Specifies whether the output from the command is
The Display Authorized Users (DSPAUTUSR) command dis- shown at the requesting work station or printed with the
plays or prints the names of the authorized system users, in job's spooled output. More information on this param-
alphabetic order. The following information is provided for eter is in Appendix A, “Expanded Parameter
each user: the group profile of which the user is a member, Descriptions.”
the most recent password change date, whether the user
*: Output requested by an interactive job is shown on
profile has a password, and the text of the user profile.
the display. Output requested by a batch job is printed
Note: While this command is searching for user profile with the job's spooled output.
information to display, another job cannot change
*PRINT: The output is printed with the job's spooled
user profiles (for example, with the Change User
output.
Profile (CHGUSRPRF) command).

Restriction: The list of system users contains only the Examples


names of the user profiles to which the user of this command
has at least read (*READ) authority. Example 1: Displaying Authorized Users and Group
Profile Names
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more DSPAUTUSR
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. This command shows the list of authorized users and their
group profile names. The list is in alphabetic sequence by
user profile name. OUTPUT(*) is also assumed; the list is
Optional Parameters shown on the display or printed depending on whether the
command was submitted at a work station or as part of the
SEQ
batch input stream.
Specifies whether the list of system users is in alpha-
betic sequence by user profile name or by group profile Example 2: Printing Output
name.
DSPAUTUSR SEQ(\GRPPRF) OUTPUT(\PRINT)
*USRPRF: The list is in alphabetic sequence by user
profile name. This command causes authorized system user profile names
*GRPPRF: The list is in alphabetic sequence by group and their group profile names to be printed. The output is
profile name. The members of each group are listed in printed in alphabetic sequence by group profile name.
alphabetical order by user profile name.

Chapter 2. OS/400 Command Descriptions P3-47


DSPBCKSTS

DSPBCKSTS (Display Backup Status) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ───────────────────────────────────────────────────────────────────────────────────5%
55──DSPBCKSTS──┬────────────────────────┬───
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified positionally.

Purpose OUTPUT
Specifies whether the backup status is displayed or
The Display Backup Status (DSPBCKSTS) command allows printed.
the user to display information about the tape sets used for
*: The output is displayed if requested by an interactive
backup and what was saved on each of them. Only informa-
job, or printed with the job's spooled output if requested
tion about backups performed using the backup options is
by a batch job.
displayed.
*PRINT: The output is printed with the job's spooled
Note: To see the parameter and value descriptions for this
output.
command, refer to the online help text. For more
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. Example
DSPBCKST OUTPUT(\PRINT)
Optional Parameters
This command prints the backup status.

P3-48 OS/400 CL Reference - Part 2 (Full Version)


DSPBCKUP

DSPBCKUP (Display Backup Options) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ────────────────────────────────────────────────────────5%
55──DSPBCKUP──BCKUPOPT(──┬─\DAILY───┬──)──┬────────────────────────┬───
├─\WEEKLY──┤ │ ┌─\──────┐ │
└─\MONTHLY─┘ └─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified positionally.

Purpose OUTPUT
Specifies whether the backup options are displayed or
The Display Backup Options (DSPBCKUP) command allows printed.
the user to display the options in one of the predefined
*: The output is displayed if requested by an interactive
backups. More information on backup is in the Backup and
job, or printed with the job's spooled output if requested
Recovery book.
by a batch job.
Note: To see the parameter and value descriptions for this
*PRINT: The output is printed with the job's spooled
command, refer to the online help text. For more
output.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1.
Examples
Required Parameters Example 1: Displaying Backup Options
BCKUPOPT DSPBCKUP BCKUPOPT(\DAILY)
Specifies the backup options to be displayed.
This command displays the daily backup options.
*DAILY: The daily backup options are displayed.
*WEEKLY: The weekly backup options are displayed. Example 2: Printing Backup Options

*MONTHLY: The monthly backup options are displayed. DSPBCKUP BCKUPOPT(\MONTHLY) OUTPUT(\PRINT)

This command prints the monthly backup options.


Optional Parameters

Chapter 2. OS/400 Command Descriptions P3-49


DSPBCKUPL

DSPBCKUPL (Display Backup List) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIB─┐
(P) ─────────────────────────────────────────────────────────────5%
55──DSPBCKUPL──BCKUPL(──┴─\FLR─┴──)──┬────────────────────────┬───
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified positionally.

Purpose OUTPUT
Specifies whether the backup list is displayed or printed.
The Display Backup List (DSPBCKUPL) command allows the
*: The output is displayed if requested by an interactive
user to view libraries and folders for backup. More informa-
job, or printed with the job's spooled output if requested
tion on backup is in the Backup and Recovery book.
by a batch job.
Note: To see the parameter and value descriptions for this
*PRINT: The output is printed with the job's spooled
command, refer to the online help text. For more
output.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1.
Examples
Required Parameters Example 1: Displaying a Library Backup List
BCKUPL DSPBCKUPL BCKUPL(\LIB)
Specifies the backup list to display.
This command displays the library backup list.
*LIB: The library backup list is displayed.
*FLR: The folder backup list is displayed. Example 2: Printing a Folder Backup List
DSPBCKUPL BCKUPL(\FLR) OUTPUT(\PRINT)
Optional Parameters This command prints the folder backup list.

P3-50 OS/400 CL Reference - Part 2 (Full Version)


DSPBKP

DSPBKP (Display Breakpoints) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──┬──────────────────────────────────┬────────────────────────────────────────────────5%
55──DSPBKP──┬────────────────────────┬───
│ ┌─\──────┐ │ │ ┌─\DFTPGM─────────────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘ └─PGM(──┼─\ALL────────────────┼──)─┘
│ ┌──
──────────────┐ │
└──6─program-name─┴───
(1) ─┘

Notes:
P All parameters preceding this point can be specified in positional form.

1 A maximum of 20 repetitions

Purpose *: Output requested by an interactive job is shown on


the display. Output requested by a batch job is printed
The Display Breakpoints (DSPBKP) command shows the with the job's spooled output.
locations of all the breakpoints currently set in the specified
*PRINT: The output is printed with the job's spooled
programs running in the debug mode. The breakpoints and
output.
the names of the program variables associated with each
breakpoint are shown. PGM
Specifies which programs in the debug mode have their
Restrictions: breakpoint locations and associated program variables
1. This command is valid only in the debug mode. To start shown.
debug mode, refer to the STRDBG (Start Debug) *DFTPGM: The breakpoint locations in the default
command. program are shown.
2. This command cannot be used to display breakpoints in *ALL: The breakpoint locations in the programs cur-
a bound program. rently in the debug mode are shown.
Note: To see the parameter and value descriptions for this program-name: Specify the names of from 1 through 20
command, refer to the online help text. For more programs already in the debug mode whose breakpoint
information about printing the help text, refer to locations are to be shown.
“Printing CL Command Descriptions” in Chapter 1.

Example
Optional Parameters
DSPBKP
OUTPUT
Specifies whether the output from the command is Assuming that program MYPROG is the default program in
shown at the requesting display station or printed with an interactive debug session, this command shows all of the
the job's spooled output. More information on this breakpoint locations that are currently set in MYPROG. The
parameter is in Appendix A, “Expanded Parameter names of the program variables associated with each break-
Descriptions.” point are also shown.

Chapter 2. OS/400 Command Descriptions P3-51


DSPBNDDIR

DSPBNDDIR (Display Binding Directory) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐ ┌─\────────┐
(P)───────────────────────────────5
55──DSPBNDDIR──BNDDIR(──┼───────────────┼──binding-directory-name──)──OUTPUT(──┼──────────┼──)───
├─\CURLIB/──────┤ ├─\PRINT───┤
├─\USRLIBL/─────┤ └─\OUTFILE─┘
└─library-name/─┘
┌─\LIBL/────────┐ ┌─\FIRST──────┐ ┌─\REPLACE─┐
5──OUTFILE(──┼───────────────┼────database-file-name────)──OUTMBR(──┴─member-name─┴──┴─\ADD─────┴──)───────────────────────────5%
├─\CURLIB/──────┤
├─\USRLIBL/─────┤
└─library-name/─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *: Output requested by an interactive job is shown on


the display. Output requested by a batch job is printed
The Display Binding Directory (DSPBNDDIR) command dis- with the job's spooled output.
plays the contents of a binding directory.
*PRINT: The output is printed with the job's spooled
Restrictions: output.

1. You must have *USE authority to the library where the *OUTFILE: The output is directed to the database file
binding directory is located. specified on the OUTFILE parameter.

2. You must have object operational and *READ authority OUTFILE


to the binding directory. Specifies the qualified name of the database file to
which the output of the display is directed. If the
Note: To see the parameter and value descriptions for this
OUTFILE does not exist, this command creates a data-
command, refer to the online help text. For more
base file in the specified library. The public authority of
information about printing the help text, refer to
the file is the same as the create authority specified for
“Printing CL Command Descriptions” in Chapter 1.
the library in which the file is created. The record format
of the output file is the same as that used in the
Required Parameters IBM-supplied database file. The IBM-supplied database
file and record format follows:
BNDDIR
Specifies the binding directory to be displayed. File QABNDBND
The name of the binding directory can be qualified by Record Format QBNDSPBD
one of the following library values:
The name of the database file can be qualified by one of
*LIBL: All libraries in the job's library list are the following library values:
searched until the first match is found.
*LIBL: All libraries in the job's library list are
*CURLIB: The current library for the job is searched until the first match is found.
searched. If no library is specified as the current
*CURLIB: The current library for the job is
library for the job, the QGPL library is used.
searched. If no library is specified as the current
*USRLIBL: Only the libraries in the user portion of library for the job, the QGPL library is used.
the job's library list are searched.
*USRLIBL: Only the libraries in the user portion of
library-name: Specify the name of the library to be the job's library list are searched.
searched.
library-name: Specify the name of the library to be
binding-directory-name: Specify the name of the binding searched.
directory to be displayed.
database-file-name: Specify the name of the database
OUTPUT file that receives the output of the display.
Specifies whether the output from the command is
OUTMBR
shown at the requesting workstation or printed with the
Specifies the name of the database file member to which
job's spooled output. More information on this param-
the output of the display is directed. If a member
eter is in Appendix A, “Expanded Parameter
already exists, and *REPLACE is specified, the system
Descriptions.”
clears it and adds the new records. If the member does

P3-52 OS/400 CL Reference - Part 2 (Full Version)


DSPBNDDIR

not exist and a member name is not specified, the Element 2: Operation to Perform on Member
system creates a member with the name of the file spec-
*REPLACE: The system clears the existing member
ified in the OUTFILE parameter. If a member name is
and adds the new records.
specified, but the member does not exist, the system
creates it. *ADD: The system adds the new records to the end of
the existing records.
Element 1: Member to Receive Output
*FIRST: The first member in the file receives the output.
If OUTMBR(*FIRST) is specified and the member does
Example
not exist, the system creates a member with the name of DSPBNDDIR BNDDIR(STORE)
the file specified on the OUTFILE parameter.
This command displays a binding directory named STORE.
member-name: Specify the file member that receives
the output. If OUTMBR(member-name) is specified and
the member does not exist, the system creates it.

Chapter 2. OS/400 Command Descriptions P3-53


DSPCCTRTE

DSPCCTRTE (Display Circuit Route) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─────────────────────────────────────5%
55──DSPCCTRTE──CCTNAME(──IPX-circuit-name──)──RMTNETNBR(──remote-IPX-network-number──)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose IPX-circuit-name: Specify the name of the IPX circuit for


which the route is being displayed. The IPX circuit
The Display Circuit Route (DSPCCTRTE) command is used name can be 1 to 18 characters in length.
to display a static route that has been configured for Internet-
work Packet Exchange (IPX). The route must have been RMTNETNBR
previously configured using the Add Circuit Route Specifies the remote IPX network number or system that
(ADDCCTRTE) CL command or by selecting Option 1 from this route connects to. The remote IPX network number
the Work with Circuit Routes display. is usually the internal IPX network number of the remote
server or router. The remote IPX network number is a
Note: To see the parameter and value descriptions for this 4-byte hexadecimal number ranging from 00000001
command, refer to the online help text. For more through FFFFFFFE.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. 'FFFFFFFE'X is allowed in this case since this value is
for the "designated" router in an IPX network and this
AS/400 might be the designated router.
Required Parameters remote-IPX-network-number: Specify the remote IPX
CCTNAME network number of the remote network or system.
Specifies the unique name of the circuit for which this
static route was defined. The circuit is usually an X.25
Example
SVC on demand type circuit. The static route is only
associated with this circuit. The circuit must have been DSPCCTRTE CCTNAME(CIRCUIT2)
previously configured using the Add IPX Circuit RMTNETNBR(ð23D62A7)
(ADDIPXCCT) CL command or by selecting option 1
from the Work with IPX Circuits display. This command displays a static route from the IPX configura-
tion that is associated with a circuit named CIRCUIT2 and a
remote IPX network number of '023D62A7'X.

P3-54 OS/400 CL Reference - Part 2 (Full Version)


DSPCCTSRV

DSPCCTSRV (Display Circuit Service) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──────────────────────5%
55──DSPCCTSRV──CCTNAME(──IPX-circuit-name──)──SRVNAME(──service-name──)──SRVTYPE(──┬─\ADVPRTSVR──┬──)────
├─\ARCHIVEQ───┤
├─\ARCHIVESVR─┤
├─\FILESVR────┤
├─\JOBQ───────┤
├─\JOBSVR─────┤
├─\NTWENHINTG─┤
├─\PRTQ───────┤
├─\PRTSVR─────┤
├─\RMTBRGSVR──┤
└─\SVRMAP─────┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose include any English upper-case character A-Z, 0-9, and


any character in the 7-bit ASCII code page 1009 except:
The Display Circuit Service (DSPCCTSRV) command dis-
plays the definition of a static service that had been previ- forward slash (/)
ously configured for a circuit in the Internetwork Packet backward slash (\)
Exchange (IPX) configuration. semicolon (;)
colon (:)
A static service is uniquely identified by the combination of comma (,)
the circuit name (CCTNAME), service name (SRVNAME) asterisk (*)
and service type (SRVTYPE) values. The service must have question mark (?)
been previously configured using the Add Circuit Service
>
(ADDCCTSRV) CL command or by selecting Option 1 from
>Specifies the name of the service available on the
the Work with Circuit services display.
remote >system. This is a required parameter. Charac-
Note: To see the parameter and value descriptions for this ters allowed for this >parameter include any English
command, refer to the online help text. For more upper-case character A-Z, 0-9, and a >yet to be deter-
information about printing the help text, refer to mined set of special values (???). >This value is stored
“Printing CL Command Descriptions” in Chapter 1. in ASCII format so it must be translatable >from EBCDIC
to ASCII.
Required Parameters service-name: Specify the name of the remote system's
service. The service name can be 1 to 48 characters.
CCTNAME The name is null character terminated. Therefore, the
Specifies the unique name of the circuit for which this actual length of the service name can only be 47 charac-
static service is being Sends. The circuit is usually an ters plus the null terminating character.
X.25 SVC on demand type circuit. The static service is
associated only with this circuit. The circuit must have SRVTYPE
been previously configured using the Add IPX circuit Specifies the type of service available on the remote
(ADDIPXCCT) command or by selecting Option 1 from system. A set of special values are allowed including
the Work with IPX Circuits display. Specifies the unique *PRTQ and *FILESVR that represent the well known
name of the circuit for this static service. The circuit is server type values. Users can also enter a variable
usually an X.25 SVC on demand type circuit. The static value for 2 byte hexadecimal value.
service is associated only with this circuit. The circuit Note: The hex values of '0000'X through '8000'X and
must have been previously configured using the Add IPX 'FFFF'X are reserved service type values.
Circuit (ADDIPXCCT) command or by selecting Option 1
from the Work with Circuits display. Any of the following special values and their hex values
are valid: >
IPX-circuit-name: Specify the name of the IPX circuit >Specifies the type of service available on the remote
which the service is defined to. The IPX circuit name >system. This is a required parameter value. A >set of
must be 1 to 18 characters in length. special values are allowed including *PRTQ and
SRVNAME *FILESVR >that represent the well known server type
Specifies the name of the service available on the values. >Users can also enter a variable value for 2
remote system. Characters allowed for this parameter byte >hexadecimal value. >

Chapter 2. OS/400 Command Descriptions P3-55


DSPCCTSRV

Note: The hex values of '0000'X through '8000'X and


'FFFF'X are >reserved service type values. >The set of
*PRTQ: A print queue server type is available. The hex
allowed special values and their hex values are: >
value of '0003'X is used.
Note: >The full set of special values for service type
*PRTSVR: A print server type is available. The hex
will be >forthcoming once we obtain the list of
value of '0007'X is used.
well known service >type values from Novell. >
*RMTBRGSVR: A remote bridge server type is avail-
*ADVPRTSVR: An advertising print server type is avail-
able. The hex value of '0024'X is used.
able. The hex value of '0047'X is used.
*ARCHIVEQ: An archive queue server type is available.
*SVRMAP: The AS/400 port mapping server is avail-
The hex value of '0008'X is used.
able for mapping service names to port numbers. The
*ARCHIVESVR: An archive server type is available. hex value of '0899'X is used.
The hex value of '0009'X is used.
*FILESVR: A file server type is available. The hex
value of '0004'X is used. Example
*JOBQ: A job queue server type is available. The hex
value of '000A'X is used. DSPCCTSRV CCTNAME(CIRCUIT2)
SRVNAME(FILEPRINTER1)
*JOBSVR: A job server type is availale. The hex value SRVTYPE(\FILESVR)
of '0005'X is used.
This command displays a static service that had been
*NTWENHINTG: A NetWare Enhanced Integration for
defined to a circuit named CIRCUIT2 in the IPX configuration
the AS/400 server type is available.
with a service name of FILEPRINTER and a service type of
file server.
The hex value of '08B0'X is used.

P3-56 OS/400 CL Reference - Part 2 (Full Version)


DSPCDEFNT

DSPCDEFNT (Display Coded Font) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ────────────────────────────────5
55──DSPCDEFNT──CDEFNT(──┼───────────────┼──┬─\FNTCHRSET──────┬──)──┬────────────────────────┬───
├─\CURLIB/──────┤ └─coded-font-name─┘ │ ┌─\──────┐ │
├─\USRLIBL/─────┤ └─OUTPUT(──┴─\PRINT─┴──)─┘
├─\ALLUSR/──────┤
├─\ALL/─────────┤
├─\DBCSFNTLIB/──┤
└─library-name/─┘
(1) ───────────────────────────────────────────────────────────────────────────────5%
5──┬────────────────────────────────────────┬───
└─FNTCHRSET(──font-character-set-name──)─┘
Notes:
P All parameters preceding this point can be specified in positional form.

1 If CDEFNT(*FNTCHRSET) is specified, a font character set name must be specified for FNTCHRSET.

Purpose *USRLIBL: Only the libraries listed in the user


portion of the job's library list are searched.
The Display Coded Font (DSPCDEFNT) command displays a
*ALLUSR: All user libraries are searched.
coded font from the specified library. The font character set
and code page pairs are displayed along with the indication *ALL: All libraries in the system, including QSYS,
whether they are marked as resident in the printer or need to are searched.
be down loaded by the system. *DBCSFNTLIB: Specifies that the DBCS font
libraries QFNT61, QFNT62, QFNT63, QFNT64, and
The optional parameter FNTCHRSET allows the user to find
QFNT65 will be searched.
all coded fonts that contain a particular font character set
within it. The user would specify this parameter when they library-name: Specify a library name. Only the
change a FCS and do not know which coded fonts the FCS library named in this parameter is searched.
is referenced in. The user would specify
*FNTCHRSET: All coded fonts which contain the font
CDEFNT(*FNTCHRSET) and
character set specified by the FNTCHRSET parameter
FNTCHRSET(font-character-set) to get this information dis-
are displayed.
played.
coded-font-name: Specify the name of the coded font
See the Printer Device Programming manual for information being displayed.
on marking font character set and code pages as resident in
the 3130 printer.
Optional Parameters
Restrictions:
OUTPUT
1. The PSF/400 feature is required to use this command. Specifies whether the output from the command is dis-
Note: To see the parameter and value descriptions for this played at the requesting work station or printed with the
command, refer to the online help text. For more job's spooled output.
information about printing the help text, refer to The possible values are:
“Printing CL Command Descriptions” in Chapter 1.
*: The output is displayed (if requested by an interactive
job) or printed with job's spooled output (if requested by
Required Parameter a batch job).

CDEFNT *PRINT: The output is printed with the job's spooled


Specifies the name and library of the coded font to be output.
displayed. FNTCHRSET
The possible library values are: Specifies the font character set name to search for in the
coded font objects. All coded fonts which contain the
*LIBL: All libraries in the job's library list are font character set specified by the FNTCHRSET param-
searched until the first match is found. eter are displayed or printed.
*CURLIB: Only the libraries in the current library for font-character-set-name: Specify the name of the font
the job are searched. If no library is specified as character set to be searched for.
the current library for the job, QGPL is used.

Chapter 2. OS/400 Command Descriptions P3-57


DSPCDEFNT

Examples Example 2: Display Coded Fonts that contain Font Char-


acter Set
Example 1: Display a Coded Font
DSPCDEFNT CDEFNT(\ALL/\FNTCHRSET) FNTCHRSET(CðG16F6ð)
DSPCDEFNT CDEFNT(QFNT61/XðG16B)
This command displays all the coded fonts (searches all
This command displays the coded font X0G16B in library libraries) that contain the font character set C0G16F60.
QFNT61. The display will show font character set and code Because this can be a CPU intensive search, it is recom-
page pairs within the coded font and whether they are mended that it be run in batch mode.
marked as resident.

P3-58 OS/400 CL Reference - Part 2 (Full Version)


DSPCFGL

DSPCFGL (Display Configuration List) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──────────────────────────────────────────────────5%
55──DSPCFGL──CFGL(──configuration-list-name──)──┬────────────────────────┬───
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose OUTPUT
Specifies whether the output from the command is
The Display Configuration List (DSPCFGL) command dis- shown at the requesting workstation or printed with the
plays the entries of a configuration list. Output is directed to job's spooled output. More information on this param-
a display or a spooled printer file as indicated by the eter is in Appendix A, “Expanded Parameter
OUTPUT parameter and job type. Descriptions.”
Note: To see the parameter and value descriptions for this *: Output requested by an interactive job is shown on
command, refer to the online help text. For more the display. Output requested by a batch job is printed
information about printing the help text, refer to with the job's spooled output.
“Printing CL Command Descriptions” in Chapter 1.
*PRINT: The output is printed with the job's spooled
output.
Required Parameters
CFGL Example
Specifies the name of the configuration list being dis- DSPCFGL CFGL(CONFIGð1)
played.
This command displays the configuration list named
CONFIG01.
Optional Parameters

Chapter 2. OS/400 Command Descriptions P3-59


DSPCLS

DSPCLS (Display Class) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ──────────────────────────────────────────────5%
55──DSPCLS──CLS(──┼───────────────┼──class-name──)──┬────────────────────────┬───
├─\CURLIB/──────┤ │ ┌─\──────┐ │
└─library-name/─┘ └─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *CURLIB: The current library for the job is


searched. If no library is specified as the current
The Display Class (DSPCLS) command is used during library for the job, the QGPL library is used.
system set-up when work is divided on the system or when
library-name: Specify the name of the library to be
the user wants to know the run attributes such as job priority
searched.
and time slice of a class.
class-name: Specify the name of the class that has its
Restriction: The user, typically a system operator or system attributes displayed.
administrator, must have object operational authority for the
class before its attributes can be displayed.
Optional Parameters
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more OUTPUT
information about printing the help text, refer to Specifies whether the output from the command is dis-
“Printing CL Command Descriptions” in Chapter 1. played at the requesting work station or printed with the
job's spooled output. More information on this param-
eter is in Appendix A, “Expanded Parameter
Required Parameters Descriptions.”
CLS *: Output requested by an interactive job is shown on
Specifies the qualified name of the class that has its the display. Output requested by a batch job is printed
attributes displayed. More information on this parameter with the job's spooled output.
is in Appendix A, “Expanded Parameter Descriptions.”
*PRINT: The output is printed with the job's spooled
The name of the class can be qualified by one of the output.
following library values:

*LIBL: All libraries in the job's library list are Example


searched until the first match is found.
DSPCLS CLS(CLASS1) OUTPUT(\PRINT)

This command directs the attributes of class CLASS1 to the


job's output spooling queue to be printed.

P3-60 OS/400 CL Reference - Part 2 (Full Version)


DSPCMD

DSPCMD (Display Command) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ────────────────────────────────────────────5%
55──DSPCMD──CMD(──┼───────────────┼──command-name──)──┬────────────────────────┬───
├─\CURLIB/──────┤ │ ┌─\──────┐ │
└─library-name/─┘ └─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose command-name: Specify the name of the command


values being displayed.
The Display Command (DSPCMD) command shows some of
the values that were specified for parameters in the Create
Command (CRTCMD) command. Optional Parameters
Note: To see the parameter and value descriptions for this OUTPUT
command, refer to the online help text. For more Specifies whether the output from the command is
information about printing the help text, refer to shown at the requesting workstation or printed with the
“Printing CL Command Descriptions” in Chapter 1. job's spooled output. More information on this param-
eter is in Appendix A, “Expanded Parameter
Descriptions.”
Required Parameters
*: Output requested by an interactive job is shown on
CMD the display. Output requested by a batch job is printed
Specifies the qualified name of the user-defined or with the job's spooled output.
IBM-supplied command.
*PRINT: The output is printed with the job's spooled
The name of the command can be qualified by one of output.
the following library values:

*LIBL: All libraries in the job's library list are Example


searched until the first match is found. DSPCMD CMD(PAYROLL)
*CURLIB: The current library for the job is
searched. If no library is specified as the current This command shows all current user-assigned parameter
library for the job, the QGPL library is used. values for the user-defined command PAYROLL at the
display station.
library-name: Specify the name of the library to be
searched.

Chapter 2. OS/400 Command Descriptions P3-61


DSPCNNL

DSPCNNL (Display Connection List) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──────────────────────────────────────────────────────5%
55──DSPCNNL──CNNL(────connection-list────)──┬────────────────────────┬───
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose job's spooled output. More information on this param-


eter is in Appendix A, “Expanded Parameter
The Display Connection List (DSPCNNL) command displays Descriptions.”
a connection list and its entries.
*: The output is displayed (if requested by an interactive
Note: To see the parameter and value descriptions for this job) or printed with the job's spooled output (if requested
command, refer to the online help text. For more by a batch job).
information about printing the help text, refer to
*PRINT: The output is printed with the job's spooled
“Printing CL Command Descriptions” in Chapter 1.
output.

Required Parameters Example


CNNL DSPCNNL CNNL(MYCNNL)
Specifies the name of the connection list.
This command displays information about the connection list
named MYCNNL. The information is displayed on the work
Optional Parameters station from which the command was submitted. If the
OUTPUT command is entered from a batch job, the output from the
Specifies whether the output from the command is display is printed with the job's spooled output. All entries
shown at the requesting workstation or printed with the associated with the connection list are displayed.

P3-62 OS/400 CL Reference - Part 2 (Full Version)


DSPCNNSTS

DSPCNNSTS (Display Connection Status) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──DSPCNNSTS──DEVD(──device-description-name──)──┬────────────────────────┬───────────────────────────────────────────────────5%
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘

Purpose DEVD
Specifies the name of the network device description
The Display Connection Status (DSPCNNSTS) command whose active connections are being displayed.
shows current information about connection-oriented proto-
cols used by, and all acceptable inbound routing data speci-
fied for, network devices. If one or more connections are Optional Parameters
active, the connection characteristics are shown for each. OUTPUT
Specifies whether the output from the command is
Restrictions:
shown at the requesting workstation or printed with the
1. The user must have operational authority to the device job's spooled output. More information on this param-
specified on the DEVD parameter. eter is in Appendix A, “Expanded Parameter
2. This command is valid for all network devices, but Descriptions.”
connection-oriented status is provided only for devices *: Output requested by an interactive job is shown on
with a link type of X.25. the display. Output requested by a batch job is printed
Note: To see the parameter and value descriptions for this with the job's spooled output.
command, refer to the online help text. For more *PRINT: The output is printed with the job's spooled
information about printing the help text, refer to output.
“Printing CL Command Descriptions” in Chapter 1.

Example
Required Parameters DSPCNNSTS DEVD(PRTR48X) OUTPUT(\PRINT)

This command prints the status of all active connections for


device PRTR48X.

Chapter 2. OS/400 Command Descriptions P3-63


DSPCOSD

DSPCOSD (Display Class-of-Service Description) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ────────────────────────────────────────5%
55──DSPCOSD──COSD(──class-of-service-description-name──)──┬────────────────────────┬───
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose job's spooled output. More information on this param-


eter is in Appendix A, “Expanded Parameter
The Display Class-of-Service Description (DSPCOSD) Descriptions.”
command displays a class-of-service description. Output is
*: Output requested by an interactive job is shown on
directed to a display or a spooled printer file as indicated by
the display. Output requested by a batch job is printed
the OUTPUT parameter and job type.
with the job's spooled output.
Note: To see the parameter and value descriptions for this
*PRINT: The output is printed with the job's spooled
command, refer to the online help text. For more
output.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1.
Example
Required Parameters DSPCOSD COSD(COSD1) OUTPUT(\PRINT)

COSD This command prints the class-of-service description COSD1.


Specifies the name of the class-of-service description. The information is displayed on the work station from which
the command was submitted (unless *PRINT was not speci-
fied, in which case the information is sent to a spooled
Optional Parameters printer file associated with the user's job). If the command is
OUTPUT entered from a batch job, the output from the display is
Specifies whether the output from the command is printed with the job's spooled output on a printer.
shown at the requesting workstation or printed with the

P3-64 OS/400 CL Reference - Part 2 (Full Version)


DSPCPCST

DSPCPCST (Display Check Pending Constraint) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ─┬────────────────────────┬──────────────5%
55──DSPCPCST──FILE(──┼───────────────┼──physical-file──)──CST(──constraint-name──)────
├─\CURLIB/──────┤ │ ┌─\──────┐ │
└─library-name/─┘ └─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose library-name: Specify the name of the library to be


searched.
The Display Check Pending Constraint (DSPCPCST)
command can be used to show the records that are possibly physical-file: Specify the name of the physical file.
in violation of established referential constraints (check CST
pending). Specifies the name of the constraint relationship that is
defined for the dependent file.
Restrictions: Only referential constraints that are disabled
can be shown. OUTPUT
Note: To see the parameter and value descriptions for this Specifies whether the output from the command is
command, refer to the online help text. For more shown at the requesting workstation or printed with the
information about printing the help text, refer to job's spooled output. More information on this param-
“Printing CL Command Descriptions” in Chapter 1. eter is in Appendix A, “Expanded Parameter
Descriptions.”
*: The output requested by an interactive job is shown
Required Parameters on the display. The output requested by a batch job is
FILE printed with the job's spooled output.
Specifies the dependent file on which the referential con- *PRINT: The output is printed with the job's spooled
straint is defined. output.
The name of the physical file can be qualified by one of
the following library values:
Example
*LIBL: All libraries in the job's library list are DSPCPCST FILE(ADMN/PERSONNEL) CST(1994hires)
searched until the first match is found. OUTPUT(\PRINT)
*CURLIB: The current library for the job is
This command prints a list of records that are in check
searched. If no library is specified as the current
pending for the referential constraint named 1994hires on the
library for the job, the QGPL library is used.
dependent file PERSONNEL in the ADMN library.

Chapter 2. OS/400 Command Descriptions P3-65


DSPCSI

DSPCSI (Display Communications Side Information) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ─┬────────────────────────┬───────────────────────────────────5%
55──DSPCSI──CSI(──┼───────────────┼──side-information-name──)────
├─\CURLIB/──────┤ │ ┌─\──────┐ │
└─library-name/─┘ └─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Optional Parameters


The Display Communications Side Information (DSPCSI) OUTPUT
command is used to display or print the specified side infor- Specifies whether the output from the command is
mation object. shown at the requesting workstation or printed with the
job's spooled output. More information on this param-
Note: To see the parameter and value descriptions for this
eter is in Appendix A, “Expanded Parameter
command, refer to the online help text. For more
Descriptions.”
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. *: Output requested by an interactive job is shown on
the display. Output requested by a batch job is printed
with the job's spooled output.
Required Parameters
*PRINT: The output is printed with the job's spooled
CSI output.
Specifies the name of the side information object to be
displayed. An object name must be specified.
Examples
The name of the side information object can be qualified
by one of the following library values: Example 1: Locating an Object

*LIBL: All libraries in the job's library list are DSPCSI CSI(SIDEOBJ)
searched until the first match is found.
This command locates the first side information object named
*CURLIB: The current library for the job is SIDEOBJ in the library list and displays the side information.
searched. If no library is specified as the current
library for the job, the QGPL library is used. Example 2: Printing Side Information
library-name: Specify the name of the library to be DSPCSI CSI(QGPL/SIDEOBJ) OUTPUT(\PRINT)
searched.
This command prints the side information contained in the
side-information-name: Specify the name of the object object SIDEOBJ in library QGPL with the job's spooled
that contains the desired side information. This is the output.
Common Programming Interface (CPI)-Communications
symbolic destination name (sym_dest_name).

P3-66 OS/400 CL Reference - Part 2 (Full Version)


DSPCTLD

DSPCTLD (Display Controller Description) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──────────────5%
55──DSPCTLD──CTLD(──controller-description-name──)──┬────────────────────────┬──┬────────────────────────────┬───
│ ┌─\──────┐ │ │ ┌─\ALL───────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘ └─OPTION(──┼─\BASIC─────┼──)─┘
├─\SWTLINLST─┤
├─\DEV───────┤
├─\RMTID─────┤
├─\APPN──────┤
└─\TMRRTY────┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose OPTION
Specifies the displays to be shown.
The Display Controller Description (DSPCTLD) command
*ALL: All displays that apply to this controller are
displays a controller description. Output is directed to a
shown.
display or spooled printer file as indicated by the OUTPUT
and OPTION parameters as well as the job type. *BASIC: The basic displays that apply to this controller
are shown, but additional information displays are not
Note: To see the parameter and value descriptions for this
shown.
command, refer to the online help text. For more
information about printing the help text, refer to *SWTLINLST: The switched line list displays that apply
“Printing CL Command Descriptions” in Chapter 1. to this switched or switched network backup (SNBU)
controller are shown.

Required Parameters *DEV: The device attachment displays that apply to this
controller are shown.
CTLD
*RMTID: The remote identifiers for switched binary syn-
Specifies the name of the controller description being
chronous communications (BSC) controllers are dis-
displayed.
played.
*APPN: The advanced peer-to-peer networking (APPN)
Optional Parameters values for this controller are displayed.
OUTPUT *TMRRTY: The timer and retry options for this controller
Specifies whether the output from the command is are displayed.
shown at the requesting workstation or printed with the
job's spooled output. More information on this param-
eter is in Appendix A, “Expanded Parameter Example
Descriptions.” DSPCTLD CTLD(CONTROLð1)
*: Output requested by an interactive job is shown on The command displays information about the controller
the display. Output requested by a batch job is printed description named CONTROL01. The information is dis-
with the job's spooled output. played on the work station from which the command was
*PRINT: The output is printed with the job's spooled submitted. If the command is entered from a batch job, the
output. output from the display is printed with the job's spooled
output.

Chapter 2. OS/400 Command Descriptions P3-67


DSPCURDIR

DSPCURDIR (Display Current Directory) Command


Job: B,I Pgm: B,I REXX: B,I

(P) ───────────────────────────────────────────────────────────────────────────────────5%
55──DSPCURDIR──┬────────────────────────┬───
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose OUTPUT
Specifies whether the output from the command is
The Display Current Directory (DSPCURDIR) command is shown at the requesting workstation or printed with the
used to display the name of the current working directory. job's spooled output. More information on this param-
eter is in Appendix A, “Expanded Parameter
Restrictions: Descriptions.”
Ÿ The user must have *X authority to the current directory. *: Output requested by an interactive job is shown on
Ÿ The user must have *RX authority to each directory in the display. Output requested by a batch job is printed
the path. with the job's spooled output.
Note: To see the parameter and value descriptions for this *PRINT: The output is printed with the job's spooled
command, refer to the online help text. For more output.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1.
Example
DSPCURDIR
Optional Parameters
This command displays the name of the current working
directory.

P3-68 OS/400 CL Reference - Part 2 (Full Version)


DSPDBG

DSPDBG (Display Debug) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──────────────────────────────────────────────────────────────────────────────────────5%
55──DSPDBG──┬────────────────────────┬───
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose information about printing the help text, refer to


“Printing CL Command Descriptions” in Chapter 1.
The Display Debug (DSPDBG) command shows the current
status of debug mode. It shows the following:
Optional Parameter
Ÿ The call stack, indicating which programs are currently
being debugged OUTPUT
Specifies whether the output from the command is
Ÿ The instruction number of the calling instruction or the
shown at the requesting display station or printed with
instruction number of each breakpoint at which a
the job's spooled output. More information on this
program is stopped
parameter is in Appendix A, “Expanded Parameter
Ÿ The recursion level Descriptions.”

Programs that are in debug mode but have not been called *: Output requested by an interactive job is shown on
are also shown. the display. Output requested by a batch job is printed
with the job's spooled output.
Restrictions: *PRINT: The output is printed with the job's spooled
1. This command is valid only in debug mode. To start output.
debug mode, see the Start Debug (STRDBG) command.
2. This command cannot be used if the user is servicing Example
another job, and that job is on a job queue, or is being DSPDBG
held, suspended, or ended.
3. This command cannot be used to show the procedures If entered interactively, this command shows the current attri-
of a bound program on the stack. Use the Display Job butes of debug mode at the display station. Also shown are
(DSPJOB) command to show those procedures. the breakpoints at which any of the programs being
debugged are stopped, the recursion levels of the programs
4. This command cannot be used to show bound programs that are currently active, and the names of the programs that
that are being debugged. have not been called.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more

Chapter 2. OS/400 Command Descriptions P3-69


DSPDBGWCH

DSPDBGWCH (Display Debug Watches) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──DSPDBGWCH──────────────────────────────────────────────────────────────────────────────────────────────────────────────────5%

Purpose Example
DSPDBGWCH
The Display Debug Watches (DSPDBGWCH) command
shows the list of debug watches that have been set by This command shows the current debug watches that have
system debug support, for all processes on the system. This been set by the system debug support.
does not include watches that have been set in the Dedi-
cated Service Tool (DST) support of the system.

P3-70 OS/400 CL Reference - Part 2 (Full Version)


DSPDBR

DSPDBR (Display Database Relations) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ─────────────5
55──DSPDBR──FILE(──┼───────────────┼──┬─\ALL───────────────┬──)──┬─────────────────────────────────────────────┬───
├─\CURLIB/──────┤ ├─generic\-file-name─┤ │ ┌─\NONE───────┐ │
├─\USRLIBL/─────┤ └─file-name──────────┘ ├─MBR(──┴─member-name─┴──)────────────────────┤
├─\ALLUSR/──────┤ └─RCDFMT(──┬─\NONE───────────────────────┬──)─┘
├─\ALL/─────────┤ ├─\ALL────────────────────────┤
└─library-name/─┘ ├─record-format-name──────────┤
└─generic\-record-format-name─┘
5──┬──────────────────────────┬──┬──────────────────────────────────────────────────────┬───────────────────────────────────────5
│ ┌─\────────┐ │ │ ┌─\LIBL/────────┐ │
(1) ─)─┘
└─OUTPUT(──┼─\PRINT───┼──)─┘ └─OUTFILE(──┼───────────────┼──database-file-name───
└─\OUTFILE─┘ ├─\CURLIB/──────┤
└─library-name/─┘
5──┬─────────────────────────────────────────────┬─────────────────────────────────────────────────────────────────────────────5%
│ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │
(2) ─┴─member-name─┴──┼──────────┼──)─┘
└─OUTMBR(───
└─\ADD─────┘
Notes:
P All parameters preceding this point can be specified in positional form.

1 If OUTPUT(*OUTFILE) is specified, a file name must be specified for OUTFILE.

2 If OUTFILE is not specified, OUTBMR must not be specified.

Purpose – The names of all the file members that are


dependent on the specified member, their library
The Display Database Relations (DSPDBR) command gives names, and the type of sharing
relational information about database files. The information
– The names of all the files that are dependent on the
identifies the physical and logical files that are dependent on
specified record format, and their library names
a specific file, files that use a specific record format, or file
members that are dependent on a specific file member. This Restrictions:
command is used to display or print the information, or to
place the information in a database output file (an OUTFILE). 1. To show each file specified, the user must have object
This command does not apply to device files. operational authority for the file. Also, of the libraries
specified by the library qualifier, only the libraries for
If the information is put in a database output file, the record which the user has *USE authority are searched for the
format that is used is named QWHDRDBR. The fields in files.
record format QWHDRDBR are the same as the fields in the 2. To create an OUTFILE, the user must have *USE
IBM-supplied format QWHDRDBR in file QADSPDBR in the authority to the Create Physical File (CRTPF) command
library QSYS. The following information is contained in the and *ADD authority to the library. To use an existing
database output file: OUTFILE, the user must have operational (*OPR) and
Ÿ For each file specified in the command, the database *ADD authority to the file.
record contains: 3. The user must have object management and delete
– The name of the specified file, its library name, and authority also, if *REPLACE is specified.
the file type of the specified file Note: To see the parameter and value descriptions for this
– The name of the record format used for the file, if a command, refer to the online help text. For more
name is specified for RCDFMT information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1.
– The information retrieval date(s) for the file informa-
tion; the latest date contains the most accurate
information, if changes have been made to the files Required Parameters
Ÿ One of the following is also included in the record: FILE
– The names of all the files that are dependent on the Specifies the qualified name of the database file or the
specified file for access path sharing or data generic name of several database files about which rela-
sharing; the names of the libraries containing the tional information is shown. This parameter can also
files and the type of sharing are also included specify that all files in the specified library or libraries
(*LIBL/*ALL, for example), or all files in all libraries
(*ALL/*ALL), have relational information about them

Chapter 2. OS/400 Command Descriptions P3-71


DSPDBR

shown. Only the libraries in the specified library qualifier file-name: Specify the full name of the database file that
that the user either owns or is authorized to use are has its relational information shown.
searched for the files.
The name of the file can be qualified by one of the fol- Optional Parameters
lowing library values:
MBR
*LIBL: All libraries in the job's library list are Specifies the name of the member in a database file
searched until the first match is found. whose dependent information is shown, printed, or
*CURLIB: The current library for the job is placed in a database file.
searched. If no library is specified as the current *NONE: No information about the file member's
library for the job, the QGPL library is used. relations is provided. File relations or record format
*USRLIBL: Only the libraries in the user portion of relations are provided.
the job's library list are searched. member-name: Specify the name of the database file
*ALL: All libraries in the system, including QSYS, member whose relations information is provided. If a
are searched. member name is specified, either one file name or a
generic file name must be specified. If MBR is specified,
*ALLUSR: All user libraries are searched. All RCDFMT cannot be specified.
libraries with names that do not begin with the letter
Q are searched except for the following: RCDFMT
#CGULIB #DFULIB #RPGLIB #SEULIB Specifies the name of the record format of the database
#COBLIB #DSULIB #SDALIB file member whose relations information is provided. If
RCDFMT is specified, MBR cannot be specified.
Although the following Qxxx libraries are provided
by IBM, they typically contain user data that *NONE: No record format relations information is pro-
changes frequently. Therefore, these libraries are vided.
considered user libraries and are also searched: *ALL: Relations information about all record formats in
| QDSNX QPFRDATA QUSRBRM QUSRSYS the specified files is provided.
| QGPL QRCL QUSRIJS QUSRVxRxMx record-format-name: Specify the full name of the record
| QGPL38 QS36F QUSRINFSKR format whose relations information is provided.
| QMQMDATA QUSER38 QUSRNOTES
| QMQMPROC QUSRADSM QUSRRDARS generic*-record-format-name: Specify the generic name
of the record format or several record formats in the
Note: A different library name, of the form
specified files whose relations information is provided. A
QUSRVxRxMx, can be created by the user
generic name is a character string of one or more char-
for each release that IBM supports. VxRxMx
acters followed by an asterisk (*); for example, ABC*.
is the version, release, and modification level
The asterisk substitutes for any valid characters. A
of the library.
generic name specifies all objects with names that begin
library-name: Specify the name of the library to be with the generic prefix for which the user has authority.
searched. If an asterisk is not included with the generic (prefix)
name, the system assumes it to be the complete object
*ALL: All files in the specified library (or in all libraries
name. If the complete object name is specified, and
identified in the library qualifier to which the user has
multiple libraries are searched, multiple objects can be
access) have their relational information shown.
displayed only if *ALL or *ALLUSR library values can be
generic*-file-name: Specify the name of the database specified for the name. For more information on the use
file or the generic name of several database files in the of generic names, refer to “Generic Object Names” in
specified library qualifier that have relational information Chapter 2.
shown. A generic name is a character string of one or
more characters followed by an asterisk (*); for example, OUTPUT
ABC*. The asterisk substitutes for any valid characters. Specifies whether the output from the command is
A generic name specifies all objects with names that shown at the requesting work station, printed with the
begin with the generic prefix for which the user has job's spooled output, or placed in a database file. More
authority. If an asterisk is not included with the generic information on this parameter is in Appendix A,
(prefix) name, the system assumes it to be the complete “Expanded Parameter Descriptions.”
object name. If the complete object name is specified, *: Output requested by an interactive job is shown on
and multiple libraries are searched, multiple objects can the display. Output requested by a batch job is printed
be displayed only if *ALL or *ALLUSR library values can with the job's spooled output.
be specified for the name. For more information on the
*PRINT: The output is printed with the job's spooled
use of generic names, refer to “Generic Object Names”
output on a printer.
in Chapter 2.

P3-72 OS/400 CL Reference - Part 2 (Full Version)


DSPDBR

*OUTFILE: The output is sent to the database file spec- *ADD: If a member exists, the system adds the new
ified on the OUTFILE parameter. records to the end of the existing records.

OUTFILE
Specifies the qualified name of the database output file Examples
where the specified relational information is stored. If
the specified file does not exist, the system creates a In the following examples, assume that there is an interactive
database file and member in the specified library. environment and that the user of the command is authorized
When creating the database output file, the current date, to access all relevant libraries and objects.
time, and system name must be included. The system
Example 1: Displaying Database Relations Information
name is the name of the source system, not the target
system. DSPDBR FILE(LIBRARY1/FILE1) RCDFMT(FORMAT1)
If the file is created, the text is "Outfile for DSPDBR" and This command shows a list of the names and database
the public authority is *EXCLUDE. relations information for all files that use the FORMAT1
Note: The outfile format must be the same as format and are associated with FILE1 in LIBRARY1.
QWHDRDBR of system file QADSPDBR in the Because the environment is interactive, the output is shown
QSYS library. at the work station running this command.
The name of the database output file can be qualified by Example 2: Displaying Database Relations Information
one of the following library values:
DSPDBR FILE(LIB1/FILE1)
*LIBL: All libraries in the job's library list are
searched until the first match is found. This command shows database relations information for all
files that are dependent on FILE1 in LIB1 for data sharing. It
*CURLIB: The current library for the job is is shown at the work station running this command.
searched. If no library is specified as the current
library for the job, the QGPL library is used. Example 3: Displaying Database Relations Information
library-name: Specify the name of the library to be DSPDBR FILE(LIB1/FILE1) MBR(MEMBER1)
searched.
This command shows database relations information for all
database-file-name: Specify the name of the database members that are dependent on MEMBER1 in FILE1 in LIB1
file where the relational information is stored. If the for data sharing or access path sharing. They are shown at
specified file is not found, a file and a file member are the work station running this command.
created in the specified library, or in the current library if
its name is not qualified. This file can be used when
other DSPDBR commands are entered. The Additional Considerations
IBM-supplied database file, QADSPDBR, cannot be
specified. When the DSPDBR command is entered, the database is
searched for the specified relationships and a record is gen-
OUTMBR erated for each relationship (dependency) that is found. The
Specifies the name of the database file member to which records are placed in the printer device file named
the output is directed. QPDSPDBR. If OUTPUT(*PRINT) is specified on the
Element 1: Member to Receive Output command, the records are listed on the printer in the fol-
lowing order:
*FIRST: The first member in the file receives the output.
If OUTMBR(*FIRST) is specified and the member does Ÿ Header information, which lists the DSPDBR command
not exist, the system creates a member with the name of input values and the files identified in the database that
the file specified in the OUTFILE parameter. match the command's request.
Ÿ The names of the files that are dependent on the files
member-name: Specify the name of the file member identified by the FILE parameter. A file can be
that receives the output. If OUTMBR(member-name) is dependent on another file for its access path or its data.
specified and the member does not exist, the system This information is listed when neither MBR nor
creates it. If the member exists, the user has the option RCDFMT is specified.
to add records to the end of the existing member or to Ÿ If a member name was specified in the MBR parameter,
clear the existing member before adding the new the names of the file members that are dependent on a
records. member in the file (a member can be dependent on
Element 2: Operation to Perform on Member another member for its access path or its data).
Ÿ The names of the database files that are dependent on
*REPLACE: If a member exists, the system clears it
a record format of the specified files, if a record format
and adds the new records.
name was specified in the RCDFMT parameter.

Chapter 2. OS/400 Command Descriptions P3-73


DSPDBR

If the DSPDBR command is entered interactively and


OUTPUT(*) is specified or assumed, the records in the
printer device file are shown instead of printed.

P3-74 OS/400 CL Reference - Part 2 (Full Version)


DSPDDMF

DSPDDMF (Display Distributed Data Management File) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ────────────────────────────────5%
55──DSPDDMF──FILE(──┼───────────────┼──┬─\ALL───────────────┬──)──┬────────────────────────┬───
├─\CURLIB/──────┤ ├─file-name──────────┤ │ ┌─\──────┐ │
├─\USRLIBL/─────┤ └─generic\-file-name─┘ └─OUTPUT(──┴─\PRINT─┴──)─┘
├─\ALL/─────────┤
├─\ALLUSR/──────┤
└─library-name/─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Note: A different library name, of the form


QUSRVxRxMx, can be created by the user
The Display Distributed Data Management File (DSPDDMF) for each release that IBM supports. VxRxMx
command is used to display or print information, such remote is the version, release, and modification level
file name and remote system location, about a specified dis- of the library.
tributed data management (DDM) file.
library-name: Specify the name of the library to be
Note: To see the parameter and value descriptions for this searched.
command, refer to the online help text. For more
information about printing the help text, refer to *ALL: All files in the library or libraries specified by the
“Printing CL Command Descriptions” in Chapter 1. library qualifier have their descriptions shown.
file-name: Specify the name of the file whose
description is shown.
Required Parameter
generic*-file-name: Specify the generic name of the file.
FILE A generic name is a character string of one or more
Specifies the qualified name of the DDM file whose characters followed by an asterisk (*); for example,
description is being changed. ABC*. The asterisk substitutes for any valid characters.
The name of the DDM file can be qualified by one of the A generic name specifies all objects with names that
following library values: begin with the generic prefix for which the user has
authority. If an asterisk is not included with the generic
*LIBL: All libraries in the job's library list are (prefix) name, the system assumes it to be the complete
searched until the first match is found. object name. If the complete object name is specified,
*CURLIB: The current library for the job is and multiple libraries are searched, multiple objects can
searched. If no library is specified as the current be displayed only if *ALL or *ALLUSR library values can
library for the job, the QGPL library is used. be specified for the name. For more information on the
use of generic names, refer to “Generic Object Names”
*USRLIBL: Only the libraries in the user portion of
in Chapter 2.
the job's library list are searched.
*ALL: All libraries in the system, including QSYS,
are searched. Optional Parameter
*ALLUSR: All user libraries are searched. All OUTPUT
libraries with names that do not begin with the letter Specifies whether the output from the command is
Q are searched except for the following: shown at the requesting work station or printed with the
job's spooled output. More information on this param-
#CGULIB #DFULIB #RPGLIB #SEULIB
eter is in Appendix A, “Expanded Parameter
#COBLIB #DSULIB #SDALIB
Descriptions.”
Although the following Qxxx libraries are provided
*: Output requested by an interactive job is shown on
by IBM, they typically contain user data that
the display. Output requested by a batch job is printed
changes frequently. Therefore, these libraries are
with the job's spooled output.
considered user libraries and are also searched:
| QDSNX QPFRDATA QUSRBRM QUSRSYS *PRINT: The output is printed with the job's spooled
| QGPL QRCL QUSRIJS QUSRVxRxMx output.
| QGPL38 QS36F QUSRINFSKR
| QMQMDATA QUSER38 QUSRNOTES
| QMQMPROC QUSRADSM QUSRRDARS
Example
DSPDDMF

Chapter 2. OS/400 Command Descriptions P3-75


DSPDDMF

This command shows the Display DDM File display.

P3-76 OS/400 CL Reference - Part 2 (Full Version)


DSPDEVD

DSPDEVD (Display Device Description) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──────────────────5%
55──DSPDEVD──DEVD(──device-description-name──)──┬────────────────────────┬──┬────────────────────────────┬───
│ ┌─\──────┐ │ │ ┌─\ALL───────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘ └─OPTION(──┼─\BASIC─────┼──)─┘
├─\SWTLINLST─┤
├─\MODE──────┤
├─\AUXDEV────┤
├─\MLBRSC────┤
└─\USRDFNOPT─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose OPTION
Specifies the displays to be shown.
The Display Device Description (DSPDEVD) command dis-
*ALL: All displays that apply to this device type are
plays a device description. Output is directed to a display or
shown.
a spooled printer file as indicated by the output and option
parameters, and job type. *BASIC: The basic displays that apply to this device
type are shown, but additional information displays are
Note: To see the parameter and value descriptions for this
not shown.
command, refer to the online help text. For more
information about printing the help text, refer to *SWTLINLST: The display showing a list of switched
“Printing CL Command Descriptions” in Chapter 1. lines for this local area network (LAN) printer device is
shown.

Required Parameter *MODE: The display showing mode attachments to this


advanced program-to-program communications (APPC)
DEVD device is shown.
Specifies the name of the device description being dis-
*AUXDEV: The display showing auxiliary devices for
played.
this 5292 model 2 is shown.
*MLBRSC: The display showing associated device
Optional Parameters resources for this tape media library device is shown.
OUTPUT *USRDFNOPT: A list of user-defined options to be used
Specifies whether the output from the command is by user applications or user-specified programs that
shown at the requesting workstation or printed with the process spooled files is displayed.
job's spooled output. More information on this param-
eter is in Appendix A, “Expanded Parameter
Descriptions.” Example
DSPDEVD DEVD(WRKSTNð1)
*: Output requested by an interactive job is shown on
the display. Output requested by a batch job is printed This command displays information about the device
with the job's spooled output. description named WRKSTN01. The information is displayed
*PRINT: The output is printed with the job's spooled on the work station from which the command was submitted.
output. If the command is entered from a batch job, the output from
the display is printed with the job's spooled output.

Chapter 2. OS/400 Command Descriptions P3-77


DSPDIRE

DSPDIRE (Display Directory Entries) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──────────────────────────────────────────5
55──DSPDIRE──┬──────────────────────────────────────┬──┬──────────────────────────┬───
│ ┌─\ALL──────────────────┐ │ │ ┌─\────────┐ │
├─USRID(──┴─user-ID──user-address─┴──)─┤ └─OUTPUT(──┼─\PRINT───┼──)─┘
└─USER(──┬─\CURRENT──────────┬──)──────┘ └─\OUTFILE─┘
└─user-profile-name─┘
5──┬────────────────────────────────────────────────────┬──┬───────────────────────────────────────────┬────────────────────────5
│ ┌─\LIBL/────────┐ │ │ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │
└─OUTFILE(──┼───────────────┼──database-file-name──)─┘ └─OUTMBR(──┴─member-name─┴──┼──────────┼──)─┘
├─\CURLIB/──────┤ └─\ADD─────┘
└─library-name/─┘
5──┬────────────────────────┬──┬───────────────────────────┬──┬────────────────────────┬────────────────────────────────────────5
│ ┌─\BASIC─┐ │ │ ┌─\TYPE1─┐ │ │ ┌─\LCL───┐ │
└─DETAIL(──┴─\FULL──┴──)─┘ └─OUTFILFMT(──┼─\TYPE2─┼──)─┘ └─OUTDTA(──┴─\ALL───(1) ┴──)─┘
└─\TYPE3─┘
5──┬────────────────────────────────────────────────────┬──────────────────────────────────────────────────────────────────────5%
│ ┌─\SYSVAL──────────────────────────┐ │
└─CMDCHRID(──┼─\DEVD────────────────────────────┼──)─┘
└─graphic-character-set──code-page─┘
Notes:
1 When OUTPUT(*) is specified, both local and shadowed data is displayed.

P All parameters preceding this point can be specified in positional form.

Purpose USRID
Specifies the user ID and address of the user for whom
The Display Directory Entries (DSPDIRE) command is used the directory entries are displayed, printed, or written to
to display, print, or create a database file for some or all a database file. If the USRID parameter is specified, the
system distribution directory entries. The database file USER parameter cannot be specified.
output is displayed, printed, or created based on the fol-
For displayed output, if the user ID and address specify
lowing:
an entry that has only one description, the directory
Ÿ For displayed output, when the USRID or the USER details for that entry are displayed. If several
parameters apply to more than one directory entry, the descriptions are associated with the specified user ID
system provides a list of entries. When these parame- and address, a list of matching user IDs and addresses
ters uniquely identify a directory entry, the system pro- is displayed from which the user can select a user ID
vides the details for the entry. and address to view the details.
Ÿ For printed or database file output, if the USRID param- For printed output or database file output, the full direc-
eter specifies the full directory, the DETAIL parameter tory details, including all descriptions for that user ID and
determines whether a list of the entries or the full details address, are printed or sent to a database file. More
for each entry is the output. If the USRID or the USER information on specifying the user ID and address is in
parameters specify a user ID or profile, the full details for the SNA Distribution Services book.
that user are sent to the output.
*ALL: All entries in the system distribution directory are
The DSPDIRE command does not update the directory. displayed, printed, or directed to a database file. The
That function is provided interactively with display support by entries are provided in alphabetical order by user ID and
the Work with Directory Entries (WRKDIRE) command, the address. If the output is directed to a printed list or
Add Directory Entry (ADDDIRE) command, the Remove output file, the DETAIL parameter specifies whether a
Directory Entry (RMVDIRE) command, the Change Directory list of user IDs, addresses, and descriptions is the output
Entry (CHGDIRE) command, and the Rename Directory or if the full directory detail is the output.
Entry (RNMDIRE) command. Element 1: User ID
Note: To see the parameter and value descriptions for this user-ID: Specify the user ID of the user for whom an
command, refer to the online help text. For more existing directory entry is displayed, printed, or directed
information about printing the help text, refer to to a database file.
“Printing CL Command Descriptions” in Chapter 1.
Element 2: User Address
user-address: Specify the user address of the user for
Optional Parameters whom an existing directory entry is displayed, printed, or
directed to a database file.

P3-78 OS/400 CL Reference - Part 2 (Full Version)


DSPDIRE

USER library-name: Specify the name of the library to be


Specifies a user profile for which directory entries are searched.
displayed, printed, or written to a database file. If the
USER parameter is specified, the USRID parameter
database-file-name: Specify the name of the database
file that receives the output of the display. If the data-
cannot be specified.
base file is qualified with *LIBL but the system cannot
For displayed output, if the profile specifies an entry that find the file, one is created in the user's default library, if
has only one description associated with it, the directory specified. If the default library is not specified, the file is
details for that entry are displayed. If multiple created in the QGPL library.
descriptions are associated with the specified profile, a
list of all the user IDs and addresses matching the OUTMBR
profile is displayed. The user can then select a user ID Specifies the name of the database file member to which
and address to view the details. the output is directed. If a member already exists, the
system uses the second element of this parameter to
*CURRENT: The user profile that is currently running is
determine whether the member is cleared before the
used.
new records are added. If the member does not exist
user-profile-name: Specify a user profile name whose and a member name is not specified, the system creates
corresponding directory entry details are the output. a member with the name of the output file specified on
the OUTFILE parameter. If an output file member name
OUTPUT
is specified, but the member does not exist, the system
Specifies whether the output from the command is
creates it.
shown at the requesting workstation, printed with the
job's spooled output or written to an output file. More Element 1: Member to Receive Output
information on this parameter is in Appendix A, *FIRST: The first member in the file receives the output.
“Expanded Parameter Descriptions.” If OUTMBR(*FIRST) is specified and the member does
*: Output requested by an interactive job is shown on not exist, the system creates a member with the name of
the display. If the command is run as part of a batch the file specified on the OUTFILE parameter.
job, the output is printed with the job's spooled output. member-name: Specify the file member that receives
*PRINT: The output is printed with the job's spooled the output. If OUTMBR(member-name) is specified and
output. the member does not exist, the system creates it.

*OUTFILE: The output is directed to the database file Element 2: Operation to Perform on Member
specified on the OUTFILE parameter. *REPLACE: The system clears the existing member
and adds the new records.
OUTFILE
Specifies the qualified name of the database file to *ADD: The system adds the new records to the end of
which the output of the display is directed. If the data- the existing records.
base file does not exist, this command creates it in the
DETAIL
specified library. If no library is specified, the database
Specifies how much detail is printed or directed to the
file is created in the user default library specified in the
database file. This parameter is not used when the
user profile. If no default library is specified, the data-
output is directed to a display (OUTPUT(*)) or when a
base output file is created in the QGPL library.
specific user ID or profile is specified.
If the database file is qualified with *LIBL but the system
*BASIC: The output is a list of all user IDs, addresses,
cannot find the file, the database file is created in the
and descriptions contained in the directory.
user's default library, if it is specified in the user profile.
If the default library is not specified, the file is created in *FULL: The output is the full set of details for the user
the QGPL library. in the directory. When USRID(*ALL) is specified, the
printed list contains a page for each unique user ID and
See the OUTFILFMT parameter for the valid output file
address from the directory, with all of the details for that
types and their names. More information on defining the
entry. Multiple descriptions for a user ID and address
format of database files as output files is in the Office
are included with the details. For a database file, a
Services Concepts and Programmer’s Guide book.
record is created for each unique user ID, address, and
The name of the database file can be qualified by one of description, containing all of the details for each entry.
the following library values: When several descriptions exist for a user ID and
address, a full record is the output for each description,
*LIBL: All libraries in the job's library list are
and only the description field is different.
searched until the first match is found.
When a user ID and address or user profile name is
*CURLIB: The current library for the job is
specified on an input parameter, the printed list contains
searched. If no library is specified as the current
one page of output with all descriptions included with the
library for the job, the QGPL library is used.
details for the user ID and address. The output file has

Chapter 2. OS/400 Command Descriptions P3-79


DSPDIRE

a full detail record for each description. Only the code-page: Specify the code page. Valid values range
description field is different between the records. from 1 through 9999.

OUTFILFMT
Specifies the format of the output file. Examples
*TYPE1: The format is defined by model output file Example 1: Showing the Display for One Description
QAOSDIRO in library QSYS with record format name
OSDIRE. This format does not include the new directory DSPDIRE USRID(HURST NEWYORK)
fields added since Release 2.0.
This command shows the Display Directory Entry Details
*TYPE2: The output file format is defined by model display for user ID and address HURST NEWYORK if this
output files QAOSDIRB and QAOSDIRF in library QSYS. user ID has only one description associated with it. If more
If DETAIL(*BASIC) is specified, the output file contains than one description exists, the Display Directory Entries
only the basic fields, and the model output file display is shown with all entries for the user ID and address.
QAOSDIRB is used with the record format name
Example 2: Printing Directory Information
OSDIRB. If DETAIL(*FULL) is specified, the output file
contains all of the detail fields, and the model output file DSPDIRE USER(JONES) OUTPUT(\PRINT)
QAOSDIRF is used with the record format name
This command prints the full directory details for user profile
OSDIRF.
JONES. If there is more than one description in the directory
*TYPE3: The output file contains all the detail fields and for JONES, the printed output contains each description.
the X.400 originator/recipient (O/R) name. The model
output file QAOSDIRX in library QSYS is used with the Example 3: Sending Full Details to a Database File
record format name OSDIRX. DSPDIRE OUTPUT(\OUTFILE) OUTFILE(MYLIB/DIRLIST)
OUTMBR(\FIRST \REPLACE)
OUTDTA
DETAIL(\FULL)
Specifies the type of data to include as output to the
value specified on the OUTPUT parameter. This param- This command sends a record to the database file DIRLIST
eter is not used when the output is directed to a display in library MYLIB for each entry in the directory. This record
(OUTPUT(*)) or when a specific user ID or profile is contains the full details for each user. The format of the
specified. output file is the one used prior to Release 3.0 because of
*LCL: Locally-defined data is included. Shadowed data the default of OUTFILFMT(*TYPE1). If the file does not
is not included. exist, it is created. If the file does exist, it is replaced.
*ALL: All directory entry data is included. This includes Example 4: Sending Basic Information to a Database
locally-defined data and shadowed data. File
CMDCHRID DSPDIRE OUTPUT(\OUTFILE) OUTFILE(MYLIB/DIRLIST)
Specifies the character identifier (graphic character set DETAIL(\BASIC) OUTFILFMT(\TYPE2)
and code page) for data being specified as parameter
values on this command. This character identifier This command sends a record to the database file named
(CHRID) is related to the display device used to specify DIRLIST in the MYLIB library for each entry in the directory.
the command. More information about CHRID pro- The data contains only the basic fields, user ID, address, and
cessing is in the Application Display Programming book. description. If the file named DIRLIST in the MYLIB library
already exists for releases 1.0 or 2.0 data (see Example 2),
*SYSVAL: The system determines the graphic char- an error occurs; otherwise, the file is be created in the
acter set and code page values for the command param- Release 3.0 format.
eters from the QCHRID system values.
*DEVD: The system determines the graphic character
set and code page values for the command parameter
Additional Considerations
from the display device description where the command Error messages are returned when errors are encountered
is entered. This option is valid only when specified from while processing the DSPDIRE command. If the command
an interactive job. If this value is specified in an interac- is entered interactively, error messages are displayed at the
tive CL program or a batch job, an error message is work station. When a batch job enters the command, error
sent. messages are returned, and the job that runs the command
Element 1: Character Set is responsible for processing them.
graphic-character-set: Specify the graphic character set If the USRID parameter specifies the user ID and address of
values used to create the command parameters. Valid a user not currently in the directory, an error message is
values range from 1 through 9999. returned. Likewise, if a user profile not contained in the
Element 2: Code Page

P3-80 OS/400 CL Reference - Part 2 (Full Version)


DSPDIRE

directory is specified on the USER parameter, an error


message is returned.

Chapter 2. OS/400 Command Descriptions P3-81


DSPDKT

DSPDKT (Display Diskette) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─┬─────────────────────────────────────┬──┬───────────────────────┬─────────────────────────5
55──DSPDKT──DEV(──device-name──)────
│ ┌─\ALL─────────────────┐ │ │ ┌─\LABELS─┐ │
└─LABEL(──┴─data-file-identifier─┴──)─┘ └─DATA(──┴─\SAVRST─┴──)─┘
5──┬────────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *ALL: All data file identifiers on the diskette specified by


the DEV parameter are shown.
The Display Diskette (DSPDKT) command shows the volume
data-file-identifier: Specify the data file identifier (17
label and data file identifier information that is on the
alphanumeric characters maximum) of the data file that
diskette. Information about the objects saved to the diskette
is shown. (For data files in the basic, H-, or I-format, the
can also be shown. The information can be printed or shown
identifier can contain up to 8 characters.)
on a display device.
DATA
If a user specifies DATA(*SAVRST), information is retrieved Specifies the type of information that is shown.
which includes a description of each object saved to the
diskette and summary information about all saved objects. *LABELS: Volume and data file identifiers are shown.

Note: When showing diskettes with labels that are not IBM *SAVRST: Shows the save or restore summary infor-
standard labels, unpredictable results may occur. To mation about the command and each saved object.
initialize the diskette, run the Initialize Diskette OUTPUT
(INZDKT) command with CHECK(*NO) specified. Specifies whether the output from the command is
Note: To see the parameter and value descriptions for this shown at the requesting work station or printed with the
command, refer to the online help text. For more job's spooled output on a printer. More information on
information about printing the help text, refer to this parameter is in Appendix A, “Expanded Parameter
“Printing CL Command Descriptions” in Chapter 1. Descriptions.”
*: Output requested by an interactive job is shown on
Required Parameters the display. Output requested by a batch job is printed
with the job's spooled output.
DEV
*PRINT: The output is printed with the job's spooled
Specifies the name of the device on which the volume
output.
being displayed is located.
Note: Each file on the diskette that was created by the
Save (SAV) command is printed as a separate
Optional Parameters listing.
LABEL
Specifies the data file identifier, or all the identifiers, of
the data files on the diskette being shown. The data file Example
identifier is stored in a label in the volume label area of DSPDKT DEV(DKTð1)
the diskette, and it specifies the identifier of the file that
exists on the diskette. This command shows the volume label and all the data file
identifiers for the diskette in device DKT01.

P3-82 OS/400 CL Reference - Part 2 (Full Version)


DSPDLOAUD

DSPDLOAUD (Display Document Library Object Audit) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──DSPDLOAUD──DLO(──┬─\ALL─────────────────────────┬──)──┬──────────────────────────┬───(P) ──┬──────────────────────────────┬─────5
(1) ─────────────────────┤
├─\ROOT─── │ ┌─\NONE───────┐ │ (4) ─object-name──)─┘
└─SYSOBJNAM(───
├─\SYSOBJNAM───────────────────┤ (2) ─────┼──)─┘
└─FLR(──┼─\ANY───
└─document-library-object-name─┘ (3) ────┤
├─\ROOT───
└─folder-name─┘
5──┬──────────────────────────┬──┬────────────────────┬──┬─────────────────────────┬────────────────────────────────────────────5
│ ┌─\────────┐ │ │ ┌─\FLR─┐ │ │ ┌─\CURRENT─┐ │
└─OUTPUT(──┼─\PRINT───┼──)─┘ └─TYPE(──┼─\DOC─┼──)─┘ └─LEVEL(──┴─\ALL───(5) ──┴──)─┘
└─\OUTFILE─┘ └─\ALL─┘
5──┬────────────────────────────────────────────────────┬──┬───────────────────────────────────────────┬───────────────────────5%
│ ┌─\LIBL/────────┐ │ │ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │
└─OUTFILE(──┼───────────────┼──database-file-name──)─┘ └─OUTMBR(──┴─member-name─┴──┼──────────┼──)─┘
├─\CURLIB/──────┤ └─\ADD─────┘
└─library-name/─┘
Notes:
1 DLO(*ROOT) is valid only when FLR(*NONE) is specified.

2 FLR(*ANY) is valid only when DLO(*ALL) and OUTPUT(*PRINT) or OUTPUT(*OUTFILE) is specified.

3 FLR(*ROOT) is valid only when DLO(*ALL) is specified.

4 The SYSOBJNAM parameter is valid only when DLO(*SYSOBJNAM) is specified.

5 LEVEL(*ALL) is valid only when DLO(*ALL), FLR( folder-name), and OUTPUT(*PRINT) or OUTPUT(*OUTFILE) are speci-

fied.
P All parameters preceding this point can be specified in positional form.

Purpose document-library-object-name: Specify the document


library object for which the auditing level is displayed.
The Display Document Library Object Audit (DSPDLOAUD)
command allows the user to display the auditing level of a
document or folder. Optional Parameters
FLR
Restrictions:
Specifies the folder containing the document library
1. You must have at least *USE authority to the document object whose auditing level is displayed.
or folder or have *ALLOBJ or *AUDIT special authority to
*NONE: The document or folder is not contained in a
display the auditing level of the document or folder.
folder.
2. You must be enrolled in the system distribution directory
*ANY: The auditing levels of all DLOs on the system
unless you have *ALLOBJ or *AUDIT authority.
are displayed.
Note: To see the parameter and value descriptions for this
*ROOT: The auditing level of all first-level folders is dis-
command, refer to the online help text. For more
played.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. folder-name: Specify the name of the folder that con-
tains the document library object for which the auditing
level is displayed.
Required Parameters
SYSOBJNAM
DLO Specifies the system object name. This parameter is
Specifies the name of the document or folder whose valid only when DLO(*SYSOBJNAM) is specified. Ten
auditing value is displayed. characters must be specified.
*ALL: The auditing levels for all DLOs in the specified
OUTPUT
folder are displayed.
Specifies whether the output from this command is dis-
*ROOT: The auditing level for the *ROOT level folder is played, printed, or directed to a database file. More
displayed. The *ROOT level folder contains the default information on this parameter is in Appendix A,
auditing level for all new first-level folders. “Expanded Parameter Descriptions.”
*SYSOBJNAM: The auditing level for the document or *: Output requested by an interactive job is shown on
folder with the system object name specified on the the display. Output requested by a batch job is printed
SYSOBJNAM parameter is displayed. with the job's spooled output.

Chapter 2. OS/400 Command Descriptions P3-83


DSPDLOAUD

*PRINT: The output is printed with the job's spooled library-name: Specify the name of the library to be
output. searched.
*OUTFILE: The output is directed to the database file database-file-name: Specify the name of the database
specified on the OUTFILE parameter. file to which the output from the command is directed.
TYPE OUTMBR
Specifies whether the documents or folders contained in Specifies the name of the database file member to which
the folder specified on the FLR parameter are displayed. the output from the command is directed. If the member
This parameter is valid when FLR(folder-name) is speci- already exists, the system uses the value specified on
fied and is defaulted in all other cases. When the second element of this parameter to determine
DLO(*ALL) FLR(*ANY) is specified, TYPE(*ALL) is used. whether the member is cleared before the new records
When DLO(*ALL) FLR(*ROOT) is specified, TYPE(*FLR) are added. If the member does not exist and a member
is used. When DLO(*ALL) FLR(*NONE) is specified, name is not specified, the system creates a member
TYPE(*DOC) is used. When a single object is specified using the name of the output file specified on the
on the command, the TYPE parameter is ignored. OUTFILE parameter. If an output file member name is
*FLR: The folders contained in the specified folder are specified but the member does not exist, the system
displayed. creates it.

*DOC: The documents contained in the specified folder Element 1: Member to Receive Output
are displayed. *FIRST: The first member in the database file is used.
*ALL: The documents and folders contained in the member-name: Specify the file member that receives
specified folder are displayed. the output. If OUTMBR(member-name) is specified and
the member does not exist, the system creates it.
LEVEL
Specifies whether documents and folders at nested Element 2: Operation to Perform on Member
levels in the specified folder are displayed.
*REPLACE: The system clears the existing member
*CURRENT: Only the documents and folders at the and adds the new records.
current level are included in the output.
*ADD: The system adds the new records to the end of
*ALL: The documents and folders at all levels are the existing records.
included in the output.

OUTFILE Examples
Specifies the name of the database file to which the
output of the command is directed. If the output file Example 1: Displaying an Auditing Level
does not exist, the command creates a database file in DSPDLOAUD DLO(MYDOC) FLR(MYFLR)
the specified library. If the command creates the file, the
text associated with the file is "Output file for This command displays the auditing level of document
DSPDLOAUD". The public authority is the same as the MYDOC in folder MYFLR.
create authority specified for the library in which the file
is created. Example 2: Printing Auditing Levels
DSPDLOAUD DLO(\ALL) FLR(\ROOT) OUTPUT(\PRINT)
The name of the database file can be qualified by one of
the following library values: This command prints the auditing levels of all first-level
*LIBL: All libraries in the job's library list are folders on the system.
searched until the first match is found.
Example 3: Listing all Auditing Levels
*CURLIB: The current library for the job is
DSPDLOAUD DLO(\ALL) FLR(\ANY)
searched. If no library is specified as the current
OUTPUT(\OUTFILE) OUTFILE(MYLIB/MYFILE)
library for the job, the QGPL library is used.
This command lists the auditing levels of all DLOs on the
system in the output file MYFILE in library MYLIB.

P3-84 OS/400 CL Reference - Part 2 (Full Version)


DSPDLOAUT

DSPDLOAUT (Display Document Library Object Authority) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─┬──────────────────────────────┬──┬────────────────────────┬──────5%
55──DSPDLOAUT──DLO(──┬─\SYSOBJNAM───────────────────┬──)────
├─\ROOT────────────────────────┤ │ ┌─\NONE───────┐ │ │ ┌─\──────┐ │
└─document-library-object-name─┘ (1) ─┴─folder-name─┴──)───┤ └─OUTPUT(──┴─\PRINT─┴──)─┘
├─FLR(───
└─SYSOBJNAM(───(2) ─object-name──)─┘

Notes:
P All parameters preceding this point can be specified in positional form.

1 FLR is not valid when DLO(*ROOT) is specified.

2 The SYSOBJNAM parameter is valid only when DLO(*SYSOBJNAM) is specified.

Purpose *SYSOBJNAM: The system object names specified in


the SYSOBJNAM parameter are displayed.
The Display Document Library Object Authority
*ROOT: The public authority value of the *ROOT folder
(DSPDLOAUT) command shows the list of authorized users
is displayed.
of an object and their assigned authorities.
document-library-object-name: Specify the user-
The following information is displayed for the specified docu- assigned name of the document or folder to be dis-
ment or folder: played. Up to 12 characters can be specified.
Ÿ The name of the document library object
Ÿ The owner of the document or folder Optional Parameters
Ÿ The primary group (if there is one) FLR
Ÿ The name of the authorization list securing the document Specifies the name of the folder that contains the docu-
or folder (if there is one) ment.

Ÿ Personal status of the document or folder *NONE: A folder name is not specified. If DLO(name)
is specified and the object is located in a folder,
Ÿ Specific user authority for the document or folder FLR(*NONE) cannot be specified.
Ÿ The authority given to the users with no specific folder-name: Specify the name of the folder that con-
authority for the document or folder tains the object. The name can consist of a series of
Ÿ If a function key is pressed, access codes attached to folder names if the folder that contains the object is
the document library object are displayed. located in another folder. Up to 63 characters can be
specified.
Restrictions:
SYSOBJNAM
1. A user must have *USE authority to the document or Specifies the system object name. A full 10 characters
folder to display that user's authority information about must be specified. This parameter is valid only when
the document or folder. DLO(*SYSOBJNAM) is specified.
2. If the user has *ALL or *ALLOBJ authority to the docu-
OUTPUT
ment or library object, the user sees all authority infor-
Specifies whether the output from the command is
mation.
shown at the requesting workstation or printed with the
3. The user must have *ALLOBJ special authority to job's spooled output. More information on this param-
display the *ROOT folder public authority. eter is in Appendix A, “Expanded Parameter
Note: To see the parameter and value descriptions for this Descriptions.”
command, refer to the online help text. For more *: Output requested by an interactive job is shown on
information about printing the help text, refer to the display. Output requested by a batch job is printed
“Printing CL Command Descriptions” in Chapter 1. with the job's spooled output.
*PRINT: The output is printed with the job's spooled
Required Parameters output.

DLO
Specifies the name of the document or folder to be dis- Example
played. DSPDLOAUT DLO(DOCA) FLR(MYFLR) OUTPUT(\PRINT)

Chapter 2. OS/400 Command Descriptions P3-85


DSPDLOAUT

This command prints for DOCA in folder MYFLR a list of all This command prints only the user's authorities if the user of
authorized users and their authorities if the user of this this command has *USE authority. Access codes are also
command has *ALL authority to DOCA in folder MYFLR. shown.

P3-86 OS/400 CL Reference - Part 2 (Full Version)


DSPDLONAM

DSPDLONAM (Display Document Library Object Name) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─┬─────────────────────────────────────────┬──┬────────────────────────┬───────────5
55──DSPDLONAM──DLO(──┬─\DOCID────────┬──)────
├─\LADNTSP──────┤ │ ┌─\NONE───────┐ │ │ ┌─\DOC───┐ │
├─\SYSOBJNAM────┤ (1) ─┴─folder-name─┴──)──────────────┤ └─OBJCLS(──┼─\FLR───┼──)─┘
├─FLR(───
├─document-name─┤ │ ┌─\NONE───────┐ │ (5) ┘
└─\DST───
└─folder-name───┘ ├─DOCID(───(2) ─┴─document-ID─┴──)────────────┤
│ ┌─\NONE──────────┐ │
├─LADNTSP(─── (3) ─┴─LADN-timestamp─┴──)───────┤
│ ┌─\NONE──────────────┐ │
└─SYSOBJNAM(─── (4) ─┴─system-object-name─┴──)─┘

5──┬────────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘
Notes:
P All parameters preceding this point can be specified in positional form.

1 FLR(*NONE) must be specified if *DOCID, *LADNTSP, or *SYSOBJNAM is specified on the DLO parameter.

2 Valid only if DLO(*DOCID) is specified.

3 Valid only if DLO(*LADNTSP) is specified.

4 Valid only if DLO(*SYSOBJNAM) is specified.

5 Valid only if DLO(*LADNTSP) or DLO(*SYSOBJNAM) is specified.

Purpose folder-name: Specify the user-assigned name of the


folder.
The Display Document Library Object Name (DSPDLONAM)
command shows a list of names for a folder, filed document,
or distribution document. Optional Parameters
FLR
Restrictions:
Specifies the name of the folder where the object speci-
1. A user must have *USE authority to the filed document fied on the DLO parameter is located.
or folder to display the various forms of the name.
*NONE: The name of the folder that contains the object
2. Users must have *ALLOBJ authority to display the is not specified, the object is not contained in a folder, or
various forms of the name for a distribution document. the object is specified using the DOCID, LADNTSP, or
Note: To see the parameter and value descriptions for this SYSOBJNAM parameter.
command, refer to the online help text. For more folder-name: Specify the name of the folder that con-
information about printing the help text, refer to tains the object.
“Printing CL Command Descriptions” in Chapter 1.
Note: FLR(*NONE) must be specified if the object is a
first-level folder.
Required Parameters DOCID
DLO Specifies the library-assigned name of the document or
Specifies the name of the document or folder for which folder.
the various forms of the name are displayed or printed. *NONE: The object is not identified using its library-
*DOCID: The library-assigned name specified on the assigned name.
DOCID parameter is used to identify the document or document-ID: Specify the library-assigned name of the
folder. document or folder object. Library-assigned names are
*LADNTSP: The timestamp from the library-assigned 16 to 24 characters in length in the format
document name (LADN) specified on the LADNTSP YYYYMMDDHHMNSSHSSNSNSNSN, where:
parameter is used to identify the document or folder.
YYYY = year
*SYSOBJNAM: The system object name specified on MM = month
the SYSOBJNAM parameter is used to identify the docu- DD = day
ment or folder. HH = hour
document-name: Specify the user-assigned name of the MN = minute
document. SS = second
HS = hundredths of a second

Chapter 2. OS/400 Command Descriptions P3-87


DSPDLONAM

SNSNSNSN = system name (from 1 through 8 char- OBJCLS


acters in length or omitted) Specifies the class of the object to locate.

LADNTSP *DOC: The object is a filed document.


Specifies the LADN timestamp of the document or *FLR: The object is a folder.
folder.
*DST: The object is a distribution document.
*NONE: The object is not identified using its LADN
timestamp. OUTPUT
Specifies whether the output from the command is
LADN-timestamp: Specify the LADN timestamp of the shown at the requesting workstation or printed with the
document or folder. The LADN timestamp is 16
job's spooled output. More information on this param-
hexadecimal characters in length in the format
eter is in Appendix A, “Expanded Parameter
YYYYMMDDHHMNSSHS, where:
Descriptions.”
YYYY = year *: Output requested by an interactive job is shown on
MM = month the display. Output requested by a batch job is printed
DD = day with the job's spooled output.
HH = hour
*PRINT: The output is printed with the job's spooled
MN = minute
output.
SS = second
HS = hundredths of a second

SYSOBJNAM
Example
Specifies the system object name. DSPDLONAM DLO(MYDOC) FLR(MYFLR) OBJCLS(\DOC)
*NONE: The object is not identified using its system This command finds the document MYDOC in folder MYFLR
object name. and displays all forms of the document's name. If the job is
system-object-name: Specify the 10-character system running in batch mode, the information is printed and not dis-
object name of the document or folder. played.

P3-88 OS/400 CL Reference - Part 2 (Full Version)


DSPDOC

DSPDOC (Display Document) Command


Job: I Pgm: I REXX: I Exec

(P) ──────────────────────────5%
55──DSPDOC──┬────────────────────────────┬──┬──────────────────────────┬──┬──────────────────────┬───
│ ┌─\PRV──────────┐ │ │ ┌─\PRV────────┐ │ │ ┌─\YES─┐ │
└─DOC(──┴─document-name─┴──)─┘ └─FLR(──┴─folder-name─┴──)─┘ └─ALWPRT(──┴─\NO──┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose FLR
Specifies the name of the folder that contains the docu-
The Display Document (DSPDOC) command allows the user ment.
to display a document using the word processing function of
*PRV: The name used in the previous session is used.
OfficeVision More information on displaying documents is in
the Using OfficeVision/400 Word Processing book. folder-name: Specify the name of the folder that con-
tains the document to be displayed.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more ALWPRT
information about printing the help text, refer to Specifies whether the user is able to print a document
“Printing CL Command Descriptions” in Chapter 1. while viewing it.
*YES: The user can print a document while viewing it.
Optional Parameters *NO: The user cannot print a document while viewing it.
DOC
Specifies the name of the document to be displayed. Example
*PRV: The name used in the previous session is used. DSPDOC DOC(MYDOC) FLR(MYFLR)
document-name: Specify the name of the document that
This command displays the document MYDOC in folder
is displayed.
MYFLR.

Chapter 2. OS/400 Command Descriptions P3-89


DSPDSTL

DSPDSTL (Display Distribution List) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──DSPDSTL──┬───────────────────────────────────────────┬──┬──────────────────────────────────┬────────────────────────────────5
│ ┌─\ALL───────────────────────┐ │ │ ┌─\ALL──────────────┐ │
└─LSTID(──┴─list-ID──list-ID-qualifier─┴──)─┘ └─OWNER(──┼─\CURRENT──────────┼──)─┘
└─user-profile-name─┘
(P) ──┬────────────────────────────────────────────────────┬──────────────────────────────────────5
5──┬──────────────────────────┬───
│ ┌─\────────┐ │ │ ┌─\LIBL/────────┐ │
└─OUTPUT(──┼─\PRINT───┼──)─┘ └─OUTFILE(──┼───────────────┼──database-file-name──)─┘
└─\OUTFILE─┘ ├─\CURLIB/──────┤
└─library-name/─┘
5──┬───────────────────────────────────────────┬──┬────────────────────────┬────────────────────────────────────────────────────5
│ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │ │ ┌─\BASIC─┐ │
└─OUTMBR(──┴─member-name─┴──┼──────────┼──)─┘ └─DETAIL(──┴─\FULL──┴──)─┘
└─\ADD─────┘
5──┬────────────────────────────────────────────────────┬──────────────────────────────────────────────────────────────────────5%
│ ┌─\SYSVAL──────────────────────────┐ │
└─CMDCHRID(──┼─\DEVD────────────────────────────┼──)─┘
└─graphic-character-set──code-page─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose vided in alphabetical order by list ID. If the output is a


printed list or output file, the DETAIL parameter deter-
The Display Distribution List (DSPDSTL) command is used to mines whether a list of distribution lists or a list of the
display, print, or create a database output file for distribution entries in each list is the output.
lists contained in the distribution directory as follows:
Element 1: List Identifier
Ÿ For displayed output, a list of distribution lists is dis-
list-ID: Specify the list identifier (ID) of the distribution
played. When a specific list identification (ID) has been
list.
specified in the LSTID parameter, the displayed list con-
tains only the specified distribution list. Element 2: List Qualifier
Ÿ For printed or database file output, if the LSTID param- list-ID-qualifier: Specify the list ID qualifier of the distri-
eter specifies *ALL, the DETAIL parameter determines bution list.
whether a list of distribution lists or a list of entries in Note: The distribution list identifier has two parts, the
each distribution list is the output. When the LSTID ID and the qualifier, separated by at least one
parameter specifies a list, a list of entries in the distribu- space. If lowercase characters are specified, the
tion list is the output. system changes them to uppercase.
No distribution lists can be created or deleted, nor can The naming rules for the two-part list ID are iden-
updates be made to existing lists from this command. These tical to the rules for the user ID and address. A
functions are provided interactively, with display support by complete description of these rules is in the SNA
the Work with Distribution List (WRKDSTL) command, and Distribution Services book.
with the Create Distribution List (CRTDSTL), Delete Distribu-
OWNER
tion List (DLTDSTL), Add Distribution List (ADDDSTLE), and
Specifies the owner of the distribution lists to display,
Remove Distribution List (RMVDSTLE) commands.
print, or write to a database file.
Note: To see the parameter and value descriptions for this
*ALL: The distribution lists owned by all user profiles
command, refer to the online help text. For more
are directed for output.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. *CURRENT: The distribution lists owned by the current
user are directed for output.

Optional Parameters user-profile-name: Specify the user profile of the owner


whose distribution lists are to be directed for output.
LSTID
Specifies which distribution lists to display, print, or write OUTPUT
to a database file. Specifies whether the output from the command is
shown at the requesting work station, printed with the
*ALL: All distribution lists in the system distribution job's spooled output, or written to a database file. More
directory are included in the output. The entries are pro-

P3-90 OS/400 CL Reference - Part 2 (Full Version)


DSPDSTL

information on this parameter is in Appendix A, member-name: Specify the file member that receives
“Expanded Parameter Descriptions.” the output. If OUTMBR(member-name) is specified and
the member does not exist, the system creates it.
*: Output requested by an interactive job is shown on
the display. If the command is run as part of a batch Element 2: Operation to Perform on Member
job, the output is printed with the job's spooled output.
*REPLACE: The system clears the existing member
*PRINT: The output is printed with the job's spooled and adds the new records.
output.
*ADD: The system adds the new records to the end of
*OUTFILE: The output is directed to the database file the existing records.
specified on the OUTFILE parameter.
DETAIL
OUTFILE Specifies how much detail is printed or written to the
Specifies the name of the database file to which the database file. This parameter is not used when the
output of the display is directed. If the database file output is displayed (OUTPUT(*)) or when a specific list
does not exist, this command creates it in the specified ID is specified in the LSTID parameter.
library. If no library is specified, the database file is
Anytime LSTID(*ALL) is specified, the DETAIL param-
created in the user default library specified in the user
eter is used to determine whether a list of all distribution
profile. If no default library was specified, the database
lists or a list of all entries in every distribution list is the
file is created in the QGPL library. If the file is created,
output.
the text is "OUTFILE for DSPDSTL" and the public
authority is *EXCLUDE. Model output file QAOSDSTO in library QSYS is used.

More information on defining the format of database *BASIC: The output is a list of all distribution lists con-
output files is in the Office Services Concepts and tained in the directory.
Programmer’s Guide book. *FULL: The output contains all of the entries in every
The name of the database file can be qualified by one of distribution list contained in the directory.
the following library values:
CMDCHRID
*LIBL: All libraries in the job's library list are Specifies the character identifier (graphic character set
searched until the first match is found. and code page) for data being specified as parameter
values on this command. This character identifier
*CURLIB: The current library for the job is
(CHRID) is related to the display device used to specify
searched. If no library is specified as the current
the command. More information about CHRID pro-
library for the job, the QGPL library is used.
cessing is in the Application Display Programming book.
library-name: Specify the name of the library to be *SYSVAL: The system determines the graphic char-
searched.
acter set and code page values for the command param-
database-file-name: Specify the name of the database eters from the QCHRID system values.
file that receives the output of the display. If the data- *DEVD: The system determines the graphic character
base file is qualified with *LIBL but the system cannot set and code page values for the command parameters
find the file, one is created in the user's default library, if from the display device description where this command
it is specified. If the default library was not specified, the was entered. This option is supported only when the
file is created in the QGPL library. command is entered from an interactive job. If this
option is specified in a batch job, an error message is
OUTMBR
returned.
Specifies the name of the database file member to which
the output is directed. If a member already exists, the Element 1: Character Set
system uses the second element of this parameter to
graphic-character-set: Specify the graphic character set
determine whether the member is cleared before the
values used to create the command parameters. Valid
new records are added. If the member does not exist
values range from 1 through 9999.
and a member name is not specified, the system creates
a member with the name of the output file specified on Element 2: Code Page
the OUTFILE parameter. If an output file member name code-page: Specify the code page. Valid values range
is specified, but the member does not exist, the system from 1 through 9999.
creates it.
Element 1: Member to Receive Output Examples
*FIRST: The first member in the file receives the output.
If OUTMBR(*FIRST) is specified and the member does Example 1: Displaying a List
not exist, the system creates a member with the name of DSPDSTL LSTID(\ALL) OUTPUT(\)
the file specified on the OUTFILE parameter.

Chapter 2. OS/400 Command Descriptions P3-91


DSPDSTL

This command displays a list of all distribution lists in the This command writes one record for each distribution list
directory. Specifying DSPDSTL without parameters would contained in the directory to the database file ALLLISTS. If
result in the same action. this file is not found in the library list, it is created in the
QGPL library, since no library is specified.
Example 2: Printing a List
DSPDSTL LSTID(DEPT48K DISTLIST) OUTPUT(\PRINT) Example 4: Directing Output for a Distribution List
Owner to a Database File
This command prints a list of all entries in the distribution list DSPDSTL OWNER(ABSMITH) OUTFILE(DISTLIST/ABSMITH)
DEPT48K DISTLIST. The detail parameter is not used when OUTMBR(\FIRST \REPLACE) DETAIL(\BASIC)
printing for a specific list.
This command writes one record for each distribution list
Example 3: Directing Output to a Database File owned by user profile ABSMITH to the database file
DSPDSTL OUTPUT(\OUTFILE) OUTFILE(ALLLISTS) ABSMITH in the library DISTLIST. If this file is not found in
OUTMBR(\FIRST \REPLACE) DETAIL(\BASIC) the library DISTLIST, it is created.

P3-92 OS/400 CL Reference - Part 2 (Full Version)


DSPDSTLOG

DSPDSTLOG (Display Distribution Log) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P)─┬──────────────────────────────────────────────────────────────────────────────────────┬───────────────────────5
55──DSPDSTLOG───
│ ┌─\AVAIL───────┐ ┌─\CURRENT───┐ │
(1) ┴──┼────────────┼──)──┬────────────────────────────────────┬─┘
└─PERIOD(──┴─start-time───
├─\BEGIN─────┤ │ ┌─\AVAIL─────┐ ┌─\CURRENT─┐ │
└─start-date─┘ (2) ┴──┼──────────┼──)─┘
└─(──┴─end-time───
├─\END─────┤
└─end-date─┘
5──┬─────────────────────────────────────┬──┬─────────────────────────────────────┬─────────────────────────────────────────────5
│ ┌─\ALL────────────┐ │ │ ┌─\ALLDST─────────┐ │
│ │ ┌──
──────────┐ │ (6, 7) ─┼─\ALL────────────┼──)─┘
│ └─ENTTYP(─────
(3, 4) 6 (5)
└─FNCTYP(──────┴───┬─\RCV─┬─┴────┴──)─┘ │ ┌──
──────────┐ │
├─\RTR─┤ └──6─┬─\NRM─┬─┴───
(8) ─┘
├─\SND─┤ ├─\ERR─┤
├─\CFG─┤ ├─\RTG─┤
├─\OPR─┤ ├─\DSQ─┤
├─\ORG─┤ └─\SYS─┘
├─\ARV─┤
└─\SYS─┘
5──┬────────────────────────────────────────┬──┬────────────────────────────────────────────────────────┬───────────────────────5
│ ┌─\ALL────┐ ┌─\ALL────┐ │ │ ┌─\ALL────────┐ ┌─\ALL──────────────┐ │
└─ORGUSRID(──┼─\BLANK──┼──┼─\BLANK──┼──)─┘ └─ORGSYSNAME(──┴─system-name─┴──┼─\BLANK────────────┼──)─┘
└─user-id─┘ └─address─┘ └─system-group-name─┘
┌─\ALL──────────────────────────────────────┐
5──JOB(──┴─┬─────────────────────────────┬──job-name─┴──)───────────────────────────────────────────────────────────────────────5
└─┬─────────────┬──user-name/─┘
└─job-number/─┘
5──┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────┬─────────────5
│ ┌─\CURRENT─────────────────────────────────────────────────────────────────────────────────────┐ │
│ │ ┌─\CURRENT───────────────────────────────────┐ │ │
│ │ ┌─\LIBL/────────┐ │ ┌─\LIBL/────────┐ │ │ │
└─RCVRNG(──┴─┼───────────────┼──starting-journal-receiver──┴─┼───────────────┼──ending-journal-receiver─┴─┴──)─┘
├─\CURLIB/──────┤ ├─\CURLIB/──────┤
└─library-name/─┘ └─library-name/─┘
5──┬────────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘
Notes:
P All parameters preceding this point can be specified in positional form.

1 If *BEGIN is specified as the start-date, then start-time is ignored.

2 If *END is specified as the end-date, then end-time is ignored.

3 If FNCTYP(*CFG) is specified, then ENTTYP(*ALLDST), or (*ALL), or (*RTG), or (*DSQ) must be specified.

4 If FNCTYP(*SYS) is specified, then ENTTYP(*ALL) or (*SYS) must be specified.

5 A maximum of eight repetitions.

6 If ENTTYP(*RTG) or (*DSQ) is specified, then FNCTYP(*ALL) or FNCTYP(*CFG) must be specified.

7 If ENTTYP(*SYS) is specified, then FNCTYP(*ALL) or FNCTYP(*SYS) must be specified.

8 A maximum of 5 repetitions

Purpose router and sender/receiver), entry type (such as normal,


error, and configuration), and job name. Any number of
The Display Distribution Log (DSPDSTLOG) command pro- selection parameters can be entered, and the resulting
vides a convenient interface to the Systems Network Archi- output is cumulative, based on all parameters entered.
tecture distribution services (SNADS) log. The SNADS log
(the QSNADS journal) contains entries that track SNADS Both displayed and printed output can be produced in con-
operations that have been performed on the system. These junction with the input parameter specified. If the user
operations include sending, receiving, and routing distribu- requests output that can be shown, a summary of all entries
tions and configuration changes. matching the selection criteria are shown. The summary
display includes basic information, such as function type,
This command provides a wide range of selection criteria entry type, date-time of logging, job name, and originating
which allows easy access to the desired information. The user ID. From the summary display, any of the entries can
selection criteria includes time period, function type (such as be chosen to view the details of that log entry. The detail

Chapter 2. OS/400 Command Descriptions P3-93


DSPDSTLOG

display gives more specific information on that particular log minutes, and ss = seconds. Valid values for hh
entry. If the user requests printed output, a detail printout for range from 00 through 23. Valid values for mm and
each log entry in the selection is produced. ss range from 00 through 59.

By specifying the appropriate selection criteria, the user can Element 2: Starting Date
determine the following types of information: One of the following is used to specify the starting date
on which or after which the data must have been logged.
Ÿ Configuration changes that were made, when and by
Entries logged before the specified date are not shown.
whom they were made for all tables or for specific tables
*CURRENT: The logged data for the current day and
Ÿ Configuration changes correlated with error entries or
between the specified starting and ending times (if speci-
distributions routed and/or sent
fied) is shown.
Ÿ List error entries for all functions or for specific functions
*BEGIN: The logged data from the beginning of the log
(such as routing errors)
is shown. If *BEGIN is specified, then any time value
Ÿ All distributions received, routed, or sent during a other than *AVAIL for start-time is ignored.
selected time interval
start-date: Specify the date displayed. The date must
Ÿ Activity for a specific sender or receiver job be entered in the format specified by the system values
QDATFMT and, if separators are used, QDATSEP.
Restrictions:
Element 3: Ending Time
1. This command is shipped with public *EXCLUDE
One of the following is used to specify the ending time
authority.
before which the data must have been logged.
2. This command cannot be used to show information on
*AVAIL: The logged data that is available for the speci-
the 12 by 80 size work station (*DS2) or on the console
fied ending date is shown.
(*DS1).
Note: To see the parameter and value descriptions for this
end-time: Specify the ending time for the specified
ending date that determines the logged data that is
command, refer to the online help text. For more
shown.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. Element 4: Ending Date
One of the following is used to specify the ending date
Optional Parameters before which or on which the data must have been
logged.
PERIOD
Specifies the period of time for which the logged data is *CURRENT: The logged data for the current day and
shown. The following values can be coded in this between the specified starting and ending times (if speci-
parameter, which contains two lists of two elements fied) is shown.
each. *END: The last day on which data was logged is
Element 1: Starting Time shown. If PERIOD(*END) is specified, a time value
other than *AVAIL for end-time is ignored.
One of the following is used to specify the starting time
at which or after which the data must have been logged. end-date: Specify the ending date for which logged data
Entries logged before the specified time and date are not is shown. The date must be entered in the format speci-
shown. fied by the system values QDATFMT and, if separators
are used, QDATSEP.
*AVAIL: The logged data that is available for the speci-
fied starting date is shown. FNCTYP
Specifies the SNADS function that was being performed
start-time: Specify the starting time for the specified
when SNADS log entries were made. If the default
starting date that indicates the logged data that is
value *ALL is not specified, a maximum of eight func-
shown. The time is specified in 24-hour format with or
tions may be specified.
without a time separator as follows:
*ALL: All SNADS functions that made log entries are
Ÿ With a time separator, specify a string of 5 or 8 used.
digits, where the time separator for the job sepa-
rates the hours, minutes, and seconds. If you issue *RCV: The SNADS receiver function is used.
this command from the command line, the string *RTR: The SNADS router function is used.
must be enclosed in apostrophes. If a time sepa-
*SND: The SNADS sender function is used.
rator other than the separator specified for your job
is used, this command fails. *CFG: The SNADS configuration function is used. If
FNCTYP(*CFG) is specified, the ORGUSRID and
Ÿ Without a time separator, specify a string of 4 or 6
ORGSYSNAME parameters cannot be specified.
digits (hhmm or hhmmss) where hh = hours, mm =

P3-94 OS/400 CL Reference - Part 2 (Full Version)


DSPDSTLOG

*OPR: The SNADS operation function is used. originating system group name of distributions from
these systems. This may not be true of distributions
*ORG: The SNADS originator function is used.
originating from other SNADS implementations.
*ARV: The SNADS arrival function is used.
The name and group are translated to the character set
*SYS: The SNADS system function is used. and code page '697 500' using the job's coded character
set identifier (CCSID) before being used to select log
ENTTYP
entries.
Specifies the type of log entries shown. If *ALL or
*ALLDST are not specified, a maximum of five entry Element 1: Originating System Name
types can be specified.
*ALL: All log entries are shown regardless of the origi-
*ALLDST: All log entry types are shown except *SYS. nating system.
*ALL: All log entry types are shown. originating-system-name: Specify the name of the origi-
nating system.
*NRM: Normal (log entries without errors) log entries
are shown. Element 2: Originating System Group Name
*ERR: Error log entries are shown. *ALL: All log entries are shown regardless of the origi-
nating system group name.
*RTG: Routing table log entries or secondary node ID
log entries are shown. *BLANK: Only log entries with an originating address of
all blanks are shown.
*DSQ: Distribution queue log entries are shown.
*SYS: The QSNADS journal entries are shown.
originating-system-group-name: Specify the originating
system group name.
ORGUSRID
JOB
Specifies the originating user ID and address of logged
Specifies the name of the SNADS job that made the log
distributions. This parameter allows the user to display
entry. This parameter allows the user to display or print
or print only those logged entries made because of dis-
only those entries logged by the specified job. More
tributions originated by a user with the specified ID or
information on this parameter is in Appendix A,
address.
“Expanded Parameter Descriptions.”
The user ID and address are translated to the character
A job identifier is a special value or a qualified name
set and code page '697 500' using the job's coded char-
with up to three elements. For example:
acter set identifier (CCSID) before being used to select
log entries. \ALL
job-name
Element 1: Originating User ID user-name/job-name
*ALL: All log entries are shown regardless of the origi- job-number/user-name/job-name
nating user ID. *ALL: Entries are shown regardless of the job that
*BLANK: Only log entries with an originating user ID of logged them.
all blanks (as in the case of SNADS status distributions) job-name: Specify the name of the job being discon-
are shown. nected. If no job qualifier is given, all jobs currently in
originating-user-ID: Specify the originating user ID. the system are searched for the name of the job. If
duplicates of the specified name are found, a qualified
Element 2: Originating User Address
job name must be specified.
*ALL: All log entries are shown regardless of the origi-
user-name: Specify the name of the user who owns the
nating address.
job being disconnected. Specifying the user as a qual-
*BLANK: Only log entries with an originating address of ifier is necessary only if a duplicate job name exists for
all blanks (as in the case of SNADS status distributions) different users. If a duplicate job name exists for the
are shown. same user, the job must be qualified with the job
originating-user-address: Specify the originating number.
address. job-number: Specify the number of the job being discon-
nected. Specifying the job number as a qualifier is only
ORGSYSNAME
necessary if a duplicate job name exists for the same
Specifies the name of the originating system and group
user.
of logged distributions. This parameter allows the user
to display or print only those logged entries made RCVRNG
because of distributions that originated from the speci- Specifies the qualified names of the journal receivers
fied system or group. that contain the SNADS logs. This parameter displays
AS/400, System/38, and System/36 systems do not entries from SNADS logs that are kept in journal
specify a system group. Specify *BLANK to show the receivers that are no longer active.

Chapter 2. OS/400 Command Descriptions P3-95


DSPDSTLOG

Note: The maximum number of receivers that are used library-name: Specify the name of the library to be
in a range of receivers is 256. If more than 256 searched.
receivers are specified, an error message is sent
and no changes are applied.
ending-journal-receiver: Specify the qualified name of
the journal receiver used as the last (newest) receiver
*CURRENT: Only the currently attached receiver is with journal entries applied. If the end of the receiver
used in applying the journal entries. Application of chain is reached before finding a receiver with this
journal entries continues for all journal receivers in the name, the operation is not done and an escape
chain, beginning with the receiver specified by the first message is sent.
parameter value through the currently attached journal
receiver. OUTPUT
Specifies whether the output from the command is
Element 1: Starting Journal Receiver
shown at the requesting workstation or printed with the
The name of the journal receiver can be qualified by one job's spooled output. More information on this param-
of the following library values: eter is in Appendix A, “Expanded Parameter
Descriptions.”
*LIBL: All libraries in the job's library list are
searched until the first match is found. *: Output requested by an interactive job is shown on
the display. Output requested by a batch job is printed
*CURLIB: The current library for the job is
with the job's spooled output.
searched. If no library is specified as the current
library for the job, the QGPL library is used. *PRINT: The output is printed with the job's spooled
output.
library-name: Specify the name of the library to be
searched.
Example
starting-journal-receiver: Specify the name of the journal
receiver used as the first (oldest) receiver. Example 1: Printing a Distribution Log
Element 2: Ending Journal Receiver DSPDSTLOG OUTPUT(\PRINT)
*CURRENT: The currently attached receiver is the last
This command directs the distribution log information to the
(newest) receiver used in applying the journal entries.
job's output spooling queue to be printed. If OUTPUT(*) is
The name of the journal receiver can be qualified by one specified, and the command was entered from a work
of the following library values: station, the information about the distribution log is shown at
the work station.
*LIBL: All libraries in the job's library list are
searched until the first match is found. Example 2: Getting a SNADS Distribution Log
*CURLIB: The current library for the job is DSPDSTLOG ENTTYPE(\SYS)
searched. If no library is specified as the current
library for the job, the QGPL library is used. This command directs the SNADS distribution log entries to
be shown on the work station display for an interactive job,
or printed with the job's spooled output for a batch job.

P3-96 OS/400 CL Reference - Part 2 (Full Version)


DSPDSTSRV

DSPDSTSRV (Display Distribution Services) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──┬────────────────────────┬──────────────────────────────────────────────────────5%
55──DSPDSTSRV──┬─────────────────────────┬───
│ ┌─\SELECT─┐ │ │ ┌─\──────┐ │
└─OPTION(──┼─1───────┼──)─┘ └─OUTPUT(──┴─\PRINT─┴──)─┘
├─2───────┤
└─3───────┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose routing table, or secondary system name table can be


specified without showing the distribution services menu
The Display Distribution Services (DSPDSTSRV) command display. If the output is printed, the information for
shows or prints the distribution queues table, routing table, or options 1, 2, and 3 is printed.
secondary system name table defined for the local system.
*SELECT: The option is selected from the distribution
A detailed description of the Systems Network Architecture
services menu display.
service (SNADS) network is in the SNA Distribution Services
book. 1: The distribution queues table, which describes the
devices and send times for communicating with adjacent
Note: This command does not allow changes to the SNADS
systems, is shown.
network. Changes to the network can be made using
the Configure Distribution Services (CFGDSTSRV) 2: The routing table entries, which describe the destina-
command. tion systems to which the system can route, are shown.
3: The secondary system name entries, which list all
Restriction: Messages that report errors about system
names by which the local system is known, are shown.
names or distribution queues may show or print different
characters than the user entered because of internal system OUTPUT
transformations. Specifies whether the output from the command is
shown at the requesting work station or printed with the
The internal value for a system name or distribution queue job's spooled output. More information on this param-
may differ from the characters shown by the DSPDSTSRV eter is in Appendix A, “Expanded Parameter
command, depending on the language used for the work Descriptions.”
station.
*: Output requested by an interactive job is shown on
Note: To see the parameter and value descriptions for this the display. Output requested by a batch job is printed
command, refer to the online help text. For more with the job's spooled output.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. *PRINT: The output is printed with the job's spooled
output.

Optional Parameters
Example
OPTION DSPDSTSRV OUTPUT(\PRINT)
Specifies an option from the distribution services menu
display that bypasses the initial menu and goes directly This command prints the current SNADS configuration
to the indicated table. The distribution queues table, status.

Chapter 2. OS/400 Command Descriptions P3-97


DSPDTAARA

DSPDTAARA (Display Data Area) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ──┬───────────────────────┬──────5
55──DSPDTAARA──DTAARA(──┬─┼───────────────┼──data-area-name─┬──)──┬────────────────────────┬───
│ ├─\CURLIB/──────┤ │ │ ┌─\──────┐ │ │ ┌─\CHAR─┐ │
│ └─library-name/─┘ │ └─OUTPUT(──┴─\PRINT─┴──)─┘ └─OUTFMT(──┴─\HEX──┴──)─┘
(1) ───────────────────────────┤
├─\GDA───
├─\LDA──────────────────────────────┤
(2) ───────────────────────────┘
└─\PDA───
5──┬────────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\LCL─┐ │
(3) ─┴─\RMT─┴──)─┘
└─SYSTEM(───
Notes:
1 This value is valid only if this is a group job.

2 This value is valid only if this is a prestart job.

P All parameters preceding this point can be specified in positional form.

3 SYSTEM(*RMT) is valid only for DDM data areas.

Purpose DTAARA
Specifies the name and library of the data area whose
The Display Data Area (DSPDTAARA) command displays attributes and value are to be displayed.
the attributes and value of the specified data area. The fol-
The name of the data area can be qualified by one of
lowing attributes are displayed: the type and length of the
the following library values:
data area, the library where the data area is located (there is
no library associated with a local data area, the group data *LIBL: All libraries in the job's library list are
area, or the program initialization parameter data area), and searched until the first match is found.
the text describing the data area.
*CURLIB: The current library for the job is
If the job is a group job, the data area specified may be the searched. If no library is specified as the current
group data area (*GDA). This data area is automatically library for the job, the QGPL library is used.
associated with the group and it cannot be read from jobs library-name: Specify the name of the library to be
outside the group. The length of this character data area is searched.
512 bytes. More information about group jobs is in the Work
Management book. data-area-name: Specify the name of the data area to
be displayed.
The local data area (*LDA) is a character data area 1024 *GDA: The group data area is displayed if this is a
bytes long. It is automatically associated with the job and group job.
cannot be accessed from another job.
*LDA: The local data area is displayed.
If the job is a prestart job, the data area specified may *PDA: The program initialization parameter data area is
contain program initialization parameter data (*PDA). This displayed if this is a prestart job.
data area is automatically associated with the prestart job
and is inaccessible from other jobs. The length of this char-
acter data area is 2000 bytes. More information about pre- Optional Parameters
start jobs is in the Work Management book.
OUTPUT
Restriction: To use this command, the user must have Specifies whether the output from the command is dis-
object operational authority for the data area and *EXECUTE played at the requesting work station or printed with the
authority for the library. No specific authority is required for job's spooled output. More information on this param-
the local data area or the group data area. eter is in Appendix A, “Expanded Parameter
Descriptions.”
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more *: Output requested by an interactive job is shown on
information about printing the help text, refer to the display. Output requested by a batch job is printed
“Printing CL Command Descriptions” in Chapter 1. with the job's spooled output.
*PRINT: The output is printed with the job's spooled
output.
Required Parameters

P3-98 OS/400 CL Reference - Part 2 (Full Version)


DSPDTAARA

OUTFMT CRTDTAARA command, not the name of the remote


Specifies the format in which the objects are shown. data area.
*CHAR: The output is displayed in character format.
*HEX: The output is displayed in both hexadecimal Examples
format and character format, unless the display is shown
Example 1: Displaying Output in Hexadecimal and Char-
on the system console, in which case only the
acter Format
hexadecimal format is displayed. This value is valid only
for character data areas. DSPDTAARA DTAARA(HEXDATA) OUTPUT(\) OUTFMT(\HEX)

SYSTEM The value and attributes of data area HEXDATA are dis-
Specifies whether the information provided is the data played if the user has proper authority. Both character and
area on the local system (*LCL) or on the remote system hexadecimal representations are shown.
(*RMT).
Example 2: Displaying Output in Character Format
*LCL: The data displayed is for the local data area.
DSPDTAARA DTAARA(TIME) OUTPUT(\)
*RMT: The data displayed is from the remote data area
named on the RMTDTAARA paramter of a successfully The value and attributes of the data area TIME are displayed
issued CRTDTAARA command. To view this data, if the user has the proper authority. The library list is used to
specify the name of the data area created on the find the data area.

Chapter 2. OS/400 Command Descriptions P3-99


DSPDTADCT

DSPDTADCT (Display Data Dictionary) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─┬───────────────────────────────────────┬──┬─────────────────────────┬──────5
55──DSPDTADCT──DTADCT(──data-dictionary-name──)────
│ ┌─\ALL─────────────────────┐ │ │ ┌─\FIRST─┐ │
└─DFN(──┼─definition-name──────────┼──)─┘ └─CRTDATE(──┴─date───┴──)─┘
└─generic\-definition-name─┘
5──┬────────────────────────────┬──┬────────────────────────┬──┬────────────────────────────┬───────────────────────────────────5
│ (1) ──┐
┌─\FILE─── │ │ ┌─\──────┐ │ │ ┌─\BASIC────┐ │
└─DFNTYPE(──┼─\RCDFMT─── (2) ┼──)─┘ └─OUTPUT(──┴─\PRINT─┴──)─┘ └─FILEINF(──┼─\DETAIL───┼──)─┘
(3)
└─\FLD──────┘ ├─\EXTENDED─┤
├─\ALL──────┤
└─\NONE─────┘
5──┬──────────────────────────────┬──┬─────────────────────────────┬───────────────────────────────────────────────────────────5%
│ ┌─\BASIC────┐ │ │ ┌─\BASIC────┐ │
(4) ─┼─\DETAIL───┼──)─┘
└─RCDFMTINF(──┼─\EXTENDED─┼──)─┘ └─FLDINF(───
├─\ALL──────┤ ├─\EXTENDED─┤
└─\NONE─────┘ ├─\ALL──────┤
└─\NONE─────┘
Notes:
P All parameters preceding this point can be specified in positional form.

1 DFNTYPE(*FILE) is not valid with FILEINF(*NONE).

2 DFNTYPE(*RCDFMT) is not valid with RCDFMTINF(*NONE).

3 DFNTYPE(*FLD) is not valid with FLDINF(*NONE).

4 FLDINF(*NONE) is required with RCDFMTINF(*NONE) and DFNTYPE(*FILE).

Purpose user has authority. If an asterisk is not included with the


generic (prefix) name, the system assumes it to be the
The Display Data Dictionary (DSPDTADCT) command dis- complete object name. If the complete object name is
plays or prints the contents of a field definition, record format specified, and multiple libraries are searched, multiple
definition, or file definition in a data dictionary. objects can be displayed only if *ALL or *ALLUSR library
Note: To see the parameter and value descriptions for this values can be specified for the name. For more infor-
command, refer to the online help text. For more mation on the use of generic names, refer to “Generic
information about printing the help text, refer to Object Names” in Chapter 2.
“Printing CL Command Descriptions” in Chapter 1. CRTDATE
Specifies the creation date of the object.
Required Parameters *FIRST: The first definition created with this DFN name
is printed or displayed. If several definitions with the
DTADCT
same name were created on the same date and a spe-
Specifies the name of the dictionary that contains the
cific DFN name is specified, only the first one created on
definition to be displayed or printed.
that date is displayed or printed. If a generic name is
specified, the CRTDATE is ignored and all definitions
Optional Parameters equal to the DFN parameter are printed or displayed.

DFN date: Specify the creation date of the definition to


Specifies the name of the definition to be displayed or display or print. The date must be specified in the
printed. format used by the job.

*ALL: All definitions of the type selected by DFNTYPE DFNTYPE


in the dictionary are displayed or printed. Specifies the type of definition to display or print.
definition-name: Specify the name of the definition to be *FILE: The file definitions are displayed or printed.
displayed or printed. *RCDFMT: The record format definitions are displayed
generic*-definition-name: Specify the generic name of or printed.
the definition. A generic name is a character string of *FLD: The field definitions are displayed or printed.
one or more characters followed by an asterisk (*); for
example, ABC*. The asterisk substitutes for any valid OUTPUT
characters. A generic name specifies all objects with Specifies whether the output from the command is
names that begin with the generic prefix for which the shown at the requesting workstation or printed with the
job's spooled output. More information on this param-

P3-100 OS/400 CL Reference - Part 2 (Full Version)


DSPDTADCT

eter is in Appendix A, “Expanded Parameter *ALL: The extended file definition information, any
Descriptions.” record ID codes, and a list of file definitions and files that
use this format definition are displayed or printed.
*: Output requested by an interactive job is shown on
the display. Output requested by a batch job is printed *NONE: No record format information is printed or dis-
with the job's spooled output. played.
*PRINT: The output is printed with the job's spooled FLDINF
output. Specifies the level of detail used in printing or displaying
the field definition information.
FILEINF
Specifies the level of detail used in displaying or printing *BASIC: The following basic field definition information
the file definition information. is displayed or printed: the definition name, the defi-
nition type, the dictionary where the definition is located,
*BASIC: The following basic information is displayed or
the definition's text, the data type, field length, buffer
printed: the definition name, the definition type, the dic-
length, and column headings. If record format informa-
tionary in which the definition is located, the date the
tion is also requested, the basic information also
definition was created, the user ID of the person who
includes the buffer position and field usage.
created it, the date it was last changed, the user ID of
the person who made the last change, the definition's *DETAIL: The basic field definition information plus the
text, the number of format definitions used by this file date the definition was created, the user ID of the
definition, and the type of file. person who created it, the date it was last changed, the
user ID of the person who made the last change, the
*DETAIL: The basic file definition information, plus any
keyboard shift, the alias name, and editing information is
key field information, is displayed or printed.
displayed or printed.
*EXTENDED: The detailed file definition information,
*EXTENDED: The detailed field definition information,
plus any long comment about the file definition, is dis-
plus any long comment about the field definition, is dis-
played or printed.
played or printed.
*ALL: The extended file definition information, plus a list
*ALL: All extended information, plus a list of definitions
of files that use this definition, is displayed or printed.
and files that use this definition, is displayed or printed.
*NONE: No file definition information is printed or dis-
*NONE: No field information is displayed or printed.
played.

RCDFMTINF
Specifies the level of detail used in printing or displaying
Example
the contents of the record format information. DSPDTADCT DTADCT(MINE) DFN(\ALL) DFNTYPE(\FILE)
OUTPUT(\PRINT) FILEINF(\BASIC) RCDFMTINF(\BASIC)
*BASIC: The following basic information is displayed or FLDINF(\EXTENDED)
printed: the definition name, the definition type, the dic-
tionary where the definition is located, the date the defi- This command prints all file definitions in the data dictionary
nition was created, the user ID of the person who MINE. Basic information for the file definitions is printed.
created it, the date it was last changed, the user ID of Basic information for the format definitions in each file defi-
the person who made the last change, the definition's nition, and the extended information for the field definitions in
text, the number of field definitions used by this format each RECORD format definition in the file definitions are
definition, and the record length. printed.
*EXTENDED: The basic file definition information, plus
any long comment about the format definition, is dis-
played or printed.

Chapter 2. OS/400 Command Descriptions P3-101


DSPEDTD

DSPEDTD (Display Edit Description) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ────────────────────────────────────────────────────────────────────5%
55──DSPEDTD──EDTD(──┬─5─┬──)──┬────────────────────────┬───
├─6─┤ │ ┌─\──────┐ │
├─7─┤ └─OUTPUT(──┴─\PRINT─┴──)─┘
├─8─┤
└─9─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose OUTPUT
Specifies whether the output from the command is
The Display Edit Description (DSPEDTD) command shows shown at the requesting workstation or printed with the
information about the specified user-defined edit description. job's spooled output. More information on this param-
Note: To see the parameter and value descriptions for this eter is in Appendix A, “Expanded Parameter
command, refer to the online help text. For more Descriptions.”
information about printing the help text, refer to *: Output requested by an interactive job is shown on
“Printing CL Command Descriptions” in Chapter 1. the display. Output requested by a batch job is printed
with the job's spooled output.
Required Parameters *PRINT: The output is printed with the job's spooled
output.
EDTD
Specifies the single-digit code (5, 6, 7, 8, or 9) that iden-
tifies the user-defined edit description to be displayed. Example
DSPEDTD EDTD(6)
Optional Parameters This command shows the user-defined edit description 6 on
either a printer or a display.

P3-102 OS/400 CL Reference - Part 2 (Full Version)


DSPEWCBCDE

DSPEWCBCDE (Display Extended Wireless Controller Bar Code Entry) Command


Job: I Pgm: I REXX: I Exec

55──DSPEWCBCDE──BCDGRP(────bar-code-group-name────)──INZMBR(────source-member-name────)─────────────────────────────────────────5
(P) ─────────────────────────────────────────────────────────────────5%
5──┬──────────────────────────────────────────────────────┬───
│ ┌─\LIBL/────────┐ ┌─QEWCSRC──────────┐ │
└─INZFILE(──┼───────────────┼──┴─source-file-name─┴──)─┘
├─\CURLIB/──────┤
└─library-name/─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose INZFILE
Specifies the name of the source physical file that con-
The Display Extended Wireless Controller Bar Code Entry tains the source file member.
(DSPEWCBCDE) command displays the bar code parame-
The name of the source file can be qualified by one of
ters for the specified bar code group.
the following library values:
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more *LIBL: All libraries in the job's library list are
information about printing the help text, refer to searched until the first match is found.
“Printing CL Command Descriptions” in Chapter 1. *CURLIB: The current library for the job is
searched. If no library is specified as the current
library for the job, the QGPL library is used.
Required Parameters
library-name: Specify the name of the library to be
BCDGRP searched.
Specifies the name of the bar code group to be dis-
played. QEWCSRC: The source file name QEWCSRC is used.

INZMBR source-file-name: Specify the name of the source phys-


Specifies the name of the source file member that con- ical file that contains the source member.
tains the bar code entry to be displayed. This source file
member contains the extended wireless controller config- Example
uration data.
DSPEWCBCDE BCDGRP(BCDð1) INZMBR(EWCð1)
INZFILE(\LIBL/QEWCSRC)
Optional Parameter
This command displays bar code parameters for bar code
group BCD01 in source file member EWC01 in source file
QEWCSRC in the library list.

Chapter 2. OS/400 Command Descriptions P3-103


DSPEWCM

DSPEWCM (Display Extended Wireless Controller Member) Command


Job: I Pgm: I REXX: I Exec

(P) ───────────────────5%
55──DSPEWCM──INZMBR(────source-member-name────)──┬──────────────────────────────────────────────────────┬───
│ ┌─\LIBL/────────┐ ┌─QEWCSRC──────────┐ │
└─INZFILE(──┼───────────────┼──┴─source-file-name─┴──)─┘
├─\CURLIB/──────┤
└─library-name/─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose INZFILE
Specifies the name of the source physical file of the
The Display Extended Wireless Controller Member source file member. If the source physical file does not
(DSPEWCM) command displays the extended wireless con- exist, this command will fail.
troller parameters of the specified source file member. Spe-
The name of the source file can be qualified by one of
cific Portable Transaction Computer (PTC) and bar code
the following library values:
configuration parameters are displayed using the Display
Extended Wireless Controller PTC Entry (DSPEWCPTCE) *LIBL: All libraries in the job's library list are
and Display Extended Wireless Controller Bar Code Entry searched until the first match is found.
(DSPEWCBCDE) commands.
*CURLIB: The current library for the job is
Note: To see the parameter and value descriptions for this searched. If no library is specified as the current
command, refer to the online help text. For more library for the job, the QGPL library is used.
information about printing the help text, refer to
library-name: Specify the name of the library to be
“Printing CL Command Descriptions” in Chapter 1.
searched.

QEWCSRC: The source file name QEWCSRC is used.


Required Parameter
source-file-name: Specify the name of the existing
INZMBR source physical file that contains the source member to
Specifies the name of the source file member to be dis- change.
played. This member contains wireless controller config-
uration data.
Example
DSPEWCM INZMBR(EWCð1) INZFILE(QGPL/QEWCSRC)
Optional Parameter
This command displays extended wireless controller parame-
ters in source file member EWC01 in source file QEWCSRC
in library QGPL.

P3-104 OS/400 CL Reference - Part 2 (Full Version)


DSPEWCPTCE

DSPEWCPTCE (Display Extended Wireless Controller PTC Entry) Command


Job: I Pgm: I REXX: I Exec

55──DSPEWCPTCE──PTCGRP(────ptc-group────)──INZMBR(────source-member-name────)───────────────────────────────────────────────────5
(P) ─────────────────────────────────────────────────────────────────5%
5──┬──────────────────────────────────────────────────────┬───
│ ┌─\LIBL/────────┐ ┌─QEWCSRC──────────┐ │
└─INZFILE(──┼───────────────┼──┴─source-file-name─┴──)─┘
├─\CURLIB/──────┤
└─library-name/─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose The name of the source file can be qualified by one of


the following library values:
The Display Extended Wireless Controller PTC Entry
(DSPEWCPTCE) command displays the Portable Trans- *LIBL: All libraries in the job's library list are
action Computer (PTC) parameters for the specified PTC searched until the first match is found.
group. *CURLIB: The current library for the job is
Note: To see the parameter and value descriptions for this searched. If no library is specified as the current
command, refer to the online help text. For more library for the job, the QGPL library is used.
information about printing the help text, refer to library-name: Specify the name of the library to be
“Printing CL Command Descriptions” in Chapter 1. searched.

QEWCSRC: The source file name QEWCSRC is used.


Required Parameters source-file-name: Specify the name of the source phys-
PTCGRP ical file that contains the source member.
Specifies the name of the PTC group to be displayed.

INZMBR Example
Specifies the name of the source file member to which DSPEWCPTCE PTCGRP(PTCð1) INZMBR(EWCð1)
the PTC entry was added. The source file member con- INZFILE(\LIBL/QEWCSRC)
tains extended wireless controller configuration data.
This command displays PTC parameters for PTC group
PTC01 in source file member EWC01 in source file
Optional Parameter QEWCSRC in the library list.
INZFILE
Specifies the name of the source physical file that con-
tains the source file member.

Chapter 2. OS/400 Command Descriptions P3-105


DSPEWLM

DSPEWLM (Display Extended Wireless Line Member) Command


Job: I Pgm: I REXX: I Exec

(P) ───────────────────5%
55──DSPEWLM──INZMBR(────source-member-name────)──┬──────────────────────────────────────────────────────┬───
│ ┌─\LIBL/────────┐ ┌─QEWLSRC──────────┐ │
└─INZFILE(──┼───────────────┼──┴─source-file-name─┴──)─┘
├─\CURLIB/──────┤
└─library-name/─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose The name of the source file can be qualified by one of


the following library values:
The Display Extended Wireless Line Member (DSPEWLM)
command displays the extended wireless line parameters of *LIBL: All libraries in the job's library list are
the specified source file member. searched until the first match is found.

Note: To see the parameter and value descriptions for this *CURLIB: The current library for the job is
command, refer to the online help text. For more searched. If no library is specified as the current
information about printing the help text, refer to library for the job, the QGPL library is used.
“Printing CL Command Descriptions” in Chapter 1. library-name: Specify the name of the library to be
searched.
Required Parameter QEWLSRC: The source file name QEWLSRC is used.
INZMBR source-file-name: Specify the name of an existing
Specifies the name of the source file member to be source physical file that contains the source member to
changed. This member contains the extended wireless display.
controller configuration data.
Example
Optional Parameter DSPEWLM INZMBR(EWLð1)
INZFILE This command displays extended wireless line parameters in
Specifies the name of the source physical file that con- source file member EWL01 in source file QEWLSRC in the
tains the source file member to display. If the source library list.
physical file does not exist, this command will fail.

P3-106 OS/400 CL Reference - Part 2 (Full Version)


DSPEXPSCD

DSPEXPSCD (Display Expiration Schedule) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ───────────────────────────────────────────────────────────────────────────────────5%
55──DSPEXPSCD──┬────────────────────────┬───
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Optional Parameters


The Display Expiration Schedule (DSPEXPSCD) command OUTPUT
displays the list of user profiles, their expiration date, and the Specifies whether the output from the command is
expiration action to be taken (disable or delete the profile). If shown at the requesting workstation or printed with the
the expiration action is delete then the owned object option job's spooled output. More information on this param-
(*NODLT, *DLT, *CHGOWN) and the primary group option eter is in Appendix A, “Expanded Parameter
(*NOCHG, *CHGPGP) are shown. If the owned object option Descriptions.”
is *CHGOWN then the new owner is shown. If the primary *: The output is displayed (if requested by an interactive
group option is *CHGPGP then the new primary group and job) or printed with the job's spooled output (if requested
the new primary group authority are shown. This information by a batch job).
is gathered from the Change Expiration Schedule Entry
*PRINT: The output is printed with the job's spooled
(CHGEXPSCDE) command. If the Display Expiration
output.
Schedule (DSPEXPSCD) command is run before the
CHGEXPSCDE command, an empty report will be produced.
Example
Restrictions: You must have *ALLOBJ special authority to
use this command. DSPEXPSCD OUTPUT(\)

Note: To see the parameter and value descriptions for this The expiration schedule is displayed on the active work-
command, refer to the online help text. For more station.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1.

Chapter 2. OS/400 Command Descriptions P3-107


DSPFD

DSPFD (Display File Description) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
55──DSPFD──FILE(──┼───────────────┼──┬─\ALL───────────────┬──)──┬─────────────────────────────────┬─────────────────────────────5
├─\USRLIBL/─────┤ ├─generic\-file-name─┤ │ ┌─\ALL──────────────┐ │
├─\CURLIB/──────┤ └─file-name──────────┘ └─TYPE(──┼─\BASATR───────────┼──)─┘
├─\ALL/─────────┤ │ ┌──
────────────┐ │
├─\ALLUSR/──────┤ └──6┬─\ATR─────┬┴───
(1) ─┘
└─library-name/─┘ ├─\ACCPTH──┤
├─\MBRLIST─┤
├─\SELECT──┤
├─\SEQ─────┤
├─\RCDFMT──┤
├─\MBR─────┤
├─\SPOOL───┤
├─\JOIN────┤
├─\TRG─────┤
├─\CST─────┤
└─\NODGRP──┘
5──┬──────────────────────────────┬─── (P) ──┬───────────────────────────────────┬───────────────────────────────────────────────────5
│ ┌─\────────┐ │ │ ┌─\ALL─────────────┐ │
(2, 3) ─┼─\PRINT───┼──)─┘
└─OUTPUT(───── │ │ ┌──
───────────┐ │ │
└─\OUTFILE─┘ 6 (4) ─┴──)─┘
└─FILEATR(──┴───┬─\DSPF─┬─┴───
├─\PRTF─┤
├─\DKTF─┤
├─\TAPF─┤
├─\CMNF─┤
├─\BSCF─┤
├─\MXDF─┤
├─\PF───┤
├─\LF───┤
├─\SAVF─┤
├─\DDMF─┤
└─\ICFF─┘
5──┬────────────────────────────────────────────────────┬──┬───────────────────────────────────────────┬────────────────────────5
│ ┌─\LIBL/────────┐ │ │ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │
└─OUTFILE(──┼───────────────┼──database-file-name──)─┘ └─OUTMBR(──┴─member-name─┴──┼──────────┼──)─┘
├─\CURLIB/──────┤ └─\ADD─────┘
└─library-name/─┘
5──┬────────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\LCL─┐ │
(5) ─┼─\RMT─┼──)─┘
└─SYSTEM(───
└─\ALL─┘
Notes:
1 A maximum of 12 repetitions.

2 If OUTPUT(*OUTFILE) is specified, a file name must be specified for the OUTFILE parameter. If TYPE(*BASATR) is speci-

fied, OUTPUT(*OUTFILE) must be specified.


3 If OUTPUT(*OUTFILE) is specified, a type other than *ALL must be specified on the TYPE parameter. (Only one type may

be specified.) If TYPE(*ATR) is specified and OUTPUT(*OUTFILE) is specified, FILEATR(*ALL) or FILEATR(*MXDF) cannot


be specified.
P All parameters preceding this point can be specified in positional form.

4 A maximum of 12 repetitions.

5 If SYSTEM(*RMT) is specified for displayed or listed output, the only valid file attributes (FILEATR) are *PF, *LF, or *ALL. If

SYSTEM(*RMT) or SYSTEM(*ALL) is specified for outfile processing, the FILEATR parameter must be either *PF or *LF.

Purpose DSPFD command is in the DB2 for AS/400 Database Pro-


gramming book.
The Display File Description (DSPFD) command shows one
or more types of information retrieved from the file Restrictions:
descriptions of one or more database and/or device files. 1. Before the specified files can be shown, the user must
The information is provided for each file that has the speci- have object operational authority to those files.
fied name and that is found in the libraries named in the
specified library qualifier to which the user has access. The 2. Of the libraries identified by the library qualifier, only
information can be shown, printed, or directed to a database libraries to which the user has read authority are
output file (OUTFILE). More information on files used by the searched for the specified files.

P3-108 OS/400 CL Reference - Part 2 (Full Version)


DSPFD

3. If TYPE(*ALL), TYPE(*MBR), or TYPE(*MBRLIST) is |


specified and if the file is a physical file, the user needs
| The possible library values are: |
at least one data authority (read, write, update, or
delete) to the file to receive information about the |
members.
| *LIBL: All libraries listed in the user portion of the
Note: To see the parameter and value descriptions for this | library list are searched. |
command, refer to the online help text. For more
| *USRLIBL: Only the libraries listed in the user
information about printing the help text, refer to
portion of the | library list are searched. |
“Printing CL Command Descriptions” in Chapter 1.
| *CURLIB: The current library is | searched. If no
current library entry exists in the library list, the |
Required Parameters QGPL library is used. |
FILE | *ALL: All libraries in the system, including QSYS,
Specifies the qualified name of the file or the qualified are | searched. |
generic name of several files that have their descriptions
| *ALLUSR: | .include 1ALLUSR VALUE | .*|All
shown, printed, or directed to a database file. This
nonsystem libraries, including all user-defined |
parameter can specify that all files in the specified library
.*|libraries and the QGPL library, not just those in
or libraries (*LIBL/*ALL for example), or that all files in all
the job's library | .*|list are searched. Libraries
libraries (*ALL/*ALL), have their descriptions provided.
whose names start with the letter Q, | .*|other than
Note: The user must have authority to both the speci- QGPL, are not included. |
fied libraries and the specified files before the file
| library-name: Specify a library name. Only the
descriptions are provided.
library | named in this parameter is searched. | The
The name of the file description can be qualified by one user must have read authority for the specified
of the following library values: library. |
*LIBL: All libraries in the job's library list are |
searched until the first match is found.
*ALL: The descriptions of all files in the library or
*CURLIB: The current library for the job is libraries with the specified library qualifier are shown.
searched. If no library is specified as the current
generic*-file-name: Specify the generic name of the file
library for the job, the QGPL library is used.
or group of files that have their descriptions shown. A
*USRLIBL: Only the libraries in the user portion of generic name is a character string of one or more char-
the job's library list are searched. acters followed by an asterisk (*); for example, ABC*.
*ALL: All libraries in the system, including QSYS, The asterisk substitutes for any valid characters. A
are searched. generic name specifies all objects with names that begin
with the generic prefix for which the user has authority.
*ALLUSR: All user libraries are searched. All If an asterisk is not included with the generic (prefix)
libraries with names that do not begin with the letter name, the system assumes it to be the complete object
Q are searched except for the following: name. If the complete object name is specified, and
#CGULIB #DFULIB #RPGLIB #SEULIB multiple libraries are searched, multiple objects can be
#COBLIB #DSULIB #SDALIB displayed only if *ALL or *ALLUSR library values can be
specified for the name. For more information on the use
Although the following Qxxx libraries are provided
of generic names, refer to “Generic Object Names” in
by IBM, they typically contain user data that
Chapter 2.
changes frequently. Therefore, these libraries are
considered user libraries and are also searched: file-name: Specify the full name of the file whose
| QDSNX QPFRDATA QUSRBRM QUSRSYS description is shown.
| QGPL QRCL QUSRIJS QUSRVxRxMx
| QGPL38 QS36F QUSRINFSKR
| QMQMDATA QUSER38 QUSRNOTES
Optional Parameters
| QMQMPROC QUSRADSM QUSRRDARS TYPE
Note: A different library name, of the form Specifies the types of file information that are provided.
QUSRVxRxMx, can be created by the user See Table 3 at the end of this command description for
for each release that IBM supports. VxRxMx the values that can be specified on the TYPE parameter
is the version, release, and modification level in combination with the FILEATR, OUTFILE, and
of the library. FORMAT parameters.

library-name: Specify the name of the library to be Note: Only one type can be specified if a file name is
searched. specified for the OUTFILE parameter.

Chapter 2. OS/400 Command Descriptions P3-109


DSPFD

Single Values *TRG: For physical files only, the number of trigger pro-
*ALL: All the types of information that apply to the grams, each trigger program name and library, and the
specified file are provided. trigger events, trigger times, and trigger update condi-
tions for each file with a trigger are provided. The
Note: *ALL cannot be specified if a file name is speci- correct output file format is QWHFDTRG from system
fied on the OUTFILE parameter. file QAFDTRG.
*BASATR: The basic attribute information common to *CST: For physical files only, information about the con-
all files is provided. The correct output file format is straint relationships associated with the file is provided.
QWHFDBAS from system file QAFDBASI. The correct output file format is QWHFDCST from the
Note: TYPE(*BASATR) is valid only if system file QAFDCST.
OUTPUT(*OUTFILE) is specified and a file name *NODGRP: For distributed physical files only, data parti-
is specified for the OUTFILE parameter. tioning and relational data base information copied from
Multiple Values a node group (*NODGRP) at file creation time is pro-
vided. The correct output file format is QWHFDNGP
*ATR: The attribute information for the specified file is
from the system file QAFDNGP.
provided. For database files, the attributes include the
access path type and the maximum number of OUTPUT
members. The correct output file format is the format Specifies whether the output from the command is pro-
unique to the requested file attribute. vided at the requesting work station, printed, or placed in
*ACCPTH: For physical and logical files only, the a database output file. More information on this param-
access paths of the specified file are provided. For eter is in Appendix A, “Expanded Parameter
keyed access paths, the composite key description is Descriptions.”
also provided. The correct output file format is *: Output requested by an interactive job is shown on
QWHFDACP from system file QAFDACCP. the display. Output requested by a batch job is printed
with the job's spooled output.
*MBRLIST: For physical and logical files only, an alpha-
betical list that contains the names of all members in the *PRINT: The output is printed with the job's spooled
specified file and a brief description of each member is output.
provided. The correct output file format is QWHFDML Note: If OUTPUT(*OUTFILE) is specified, a type other
from system file QAFDMBRL. than *ALL must be specified for the TYPE
*SELECT: For logical files only, the select/omit attribute parameter (only one type may be specified). If
is provided. The correct output file format is TYPE(*ATR) is specified while
QWHFDDSO from system file QAFDSELO. OUTPUT(*OUTFILE) is specified,
FILEATR(*ALL) or FILEATR(*MXDF) cannot be
*SEQ: For physical and logical files only, the collating
specified.
sequence is provided. The correct output file format is
QWHFDSEQ from system file QAFDCSEQ. *OUTFILE: The output is directed to the database file
specified on the OUTFILE parameter.
*RCDFMT: The record format names and record format
level information for the file, including the record format FILEATR
name(s) and data association information for referenced Specifies the type of file whose attributes are shown.
files are provided. The correct output file format is See Table 3 at the end of this command description for
QWHFDFMT from system file QAFDRFMT. the values that can be specified on the FILEATR param-
*MBR: For physical and logical files only, information eter in combination with the TYPE, OUTFILE, and
about the file members (names, creation dates, sizes, FORMAT parameters.
types, and other attributes) in the specified file is pro- Note: If SYSTEM(*RMT) or SYSTEM(*ALL) is speci-
vided. Members are in the order in which they were fied, the only valid file attributes are *PF, *LF,
created. The correct output file format is QWHFDMBR and *ALL for displayed output, printed output, or
from system file QAFDMBR. output file processing.
*SPOOL: For device files only, the spooling attributes of *ALL: The attributes of all files are shown.
the specified diskette or printer file are provided. The
Note: *ALL cannot be specified if a value is specified
spooling attributes include the number of output copies
for the OUTFILE parameter, and TYPE(*ATR) is
produced, the output priority, and the maximum number
specified.
of records in the file. The correct output file format is
QWHFDSPL from system file QAFDSPOL. *DSPF: The attributes of display files are provided.
This includes both *DSPF and *DSPF38. If a value is
*JOIN: For join logical files only, the join from-file, the
specified for the OUTFILE parameter and TYPE(*ATR)
join to-file, and the fields that are involved in the join are
is specified, display files or mixed files with display
provided. The correct output file format is QWHFDJN
from system file QAFDJOIN.

P3-110 OS/400 CL Reference - Part 2 (Full Version)


DSPFD

device entries are shown. The correct output file format If the file entered as the OUTFILE does not exist, the
is QWHFDDSP from system file QAFDDSP. system creates it in the specified library, or in the
*PRTF: The attributes of printer files are provided. This *CURLIB library when *LIBL is specified as the library
includes both *PRTF and *PRTF38. The correct output name. The text for the created file is 'Outfile for DSPFD'
file format is QWHFDPRT from system file QAFDPRT. and the public authority is *EXCLUDE. The file is cor-
rectly formatted.
*DKTF: The attributes of diskette files are provided.
This includes both *DKTF and *DKTF38. The correct If the file specified on the OUTFILE parameter exists
output file format is QWHFDDKT from system file and has the correct format, the system uses the file.
QAFDDKT. Note: The outfile format must correspond to that of the
*TAPF: The attributes of tape files are provided. This TYPE and FILEATR parameter descriptions.
includes both *TAPF and *TAPF38. The correct output See Table 3 at the end of this command
file format is QWHFDTAP from system file QAFDTAP. description for the values that can be specified
on the OUTFILE parameter in combination with
*CMNF: The attributes of communications files are pro- the TYPE, FILEATR, and FORMAT parameters.
vided. This includes both *CMNF and *CMNF38. If a
value is specified for the OUTFILE parameter and The name of the database file can be qualified by one of
TYPE(*ATR) is specified, only communication files or the following library values:
mixed files with communications device entries are *LIBL: All libraries in the job's library list are
shown. The correct output file format is QWHFDCMN searched until the first match is found.
from system file QAFDCMN.
*CURLIB: The current library for the job is
*BSCF: The attributes of BSC communications files are searched. If no library is specified as the current
provided. This includes both *BSCF and *BSCF38. If a library for the job, the QGPL library is used.
value is specified for the OUTFILE parameter and
TYPE(*ATR) is specified, only BSC communication files
library-name: Specify the name of the library to be
searched.
or mixed files with BSC communications device entries
are shown. The correct output file format is database-file-name: Specify the name of the database
QWHFDBSC from system file QAFDBSC. file that receives the output of the command. If no file
*MXDF: The attributes of mixed files are provided. by that name is found, a file by that name is created and
stored either in the specified library, or, if not qualified, in
Note: *MXDF cannot be specified if a value is specified the current library. The file can be used again by other
for the OUTFILE parameter and TYPE(*ATR) is DSPFD commands that request the same types of infor-
specified. mation. The IBM-supplied model database files cannot
*PF: The attributes of physical files are provided. This be specified.
includes both *PF and *PF38. The correct output file
OUTMBR
format is QWHFDPHY from system file QAFDPHY.
Specifies the name of the database file member to which
*LF: The attributes of logical files are provided. This the output is directed.
includes both *LF and *LF38. The correct output file
Element 1: Member to Receive Output
format is QWHFDLGL from system file QAFDLGL.
*FIRST: The first member in the file receives the output.
*SAVF: The attributes of save files are provided. This
If OUTMBR(*FIRST) is specified and the member does
includes both *SAVF and *SAVF38. The correct output
not exist, the system creates a member with the name of
file format is QWHFDSAV from system file QAFDSAV.
the file specified on the OUTFILE parameter. If the
*DDMF: The attributes of the Distributed Data Manage- member exists, the user has the option to add records to
ment (DDM) files are provided. This includes both the end of the existing member or to clear the existing
*DDMF and *DDMF38. The correct output file format is member before adding the new records.
QWHFDDDM from system file QAFDDDM.
member-name: Specify the file member that receives
*ICFF: The attributes of ICF files are provided. The the output. If OUTMBR(member-name) is specified and
correct output file format is QWHFDICF from system file the member does not exist, the system creates it.
QAFDICF.
Element 2: Operation to Perform on Member
OUTFILE *REPLACE: The system clears the existing member
Specifies the qualified name of the database output file and adds the new records.
to which the output of the display is directed.
*ADD: The system adds the new records to the end of
When creating the database output file, the current date, the existing records.
time, and system name must be included. The system
name is the name of the source system, not the target SYSTEM
system. Specifies whether the information provided is about files
on the local system (*LCL), on the remote system or

Chapter 2. OS/400 Command Descriptions P3-111


DSPFD

systems (*RMT), or on both the local and the remote


Table 3. DSPFD Type, File Attribute, Output File, and Record
systems (*ALL). For performance considerations, unless Format Combinations
explicitly looking for information about files on systems
TYPE FILEATR1 OUTFILE FORMAT
other than the local system, the default value of *LCL
must not be changed. *NODGRP Note 7 QAFDNGP QWHFDNGP
1 The user must specify the FILEATR parameter only when
*LCL: The information provided is about local files only.
TYPE(*ATR) is used. The default of FILEATR(*ALL) is valid on any
*RMT: The information provided is about remote files of the other TYPE values as long as the user is requesting file types
that have been named on the RMTFILE parameter of that match the appropriate request.
successfully issued CRTDDMF commands. To view this Notes:
information, specify the name of the distributed data
1. Any entry or multiple entries can be made in the FILEATR
management (DDM) file, not the name of the remote file.
parameter.
Only information returned by the remote system is
shown. 2. Only for physical and logical files
3. Only for logical files
*ALL: The information provided is about files on both
the local and the remote systems. For DDM files, the 4. Only for device files
displays first show information about the local DDM file 5. Only for join logical files
and then, if available, information about the remote file 6. Only for physical files
that was named on the RMTFILE parameter of the
7. Only for distributed physical files
CRTDDMF command.

The following table lists the values that can be specified on


the TYPE parameter in combination with the FILEATR, Examples
OUTFILE, and FORMAT parameters.
Note: Only one type can be specified if a file name is speci- In the following examples, assume that the commands are
fied for the OUTFILE parameter. entered at a display work station and that the user of the
command is authorized to access all relevant libraries and
objects.
Table 3. DSPFD Type, File Attribute, Output File, and Record
Format Combinations
Example 1: Displaying Definition of a File
TYPE FILEATR1 OUTFILE FORMAT
DSPFD FILE(\ALL/FILE1)
*BASATR Note 1 QAFDBASI QWHFDBAS
*ATR *BSCF QAFDBSC QWHFDBSC
This command shows the definition of FILE1 as defined in all
libraries authorized for the user on the local system. The
*ATR *CMNF QAFDCMN QWHFDCMN
information is displayed at the work station running the
*ATR *DSPF QAFDDSP QWHFDDSP command.
*ATR *PRTF QAFDPRT QWHFDPRT
Example 2: Displaying Attributes of Local DDM File
*ATR *DKTF QAFDDKT QWHFDDKT
DSPFD FILE(LIBRARY1/FILE1)
*ATR *TAPF QAFDTAP QWHFDTAP
*ATR *PF QAFDPHY QWHFDPHY This command shows the definition of FILE1 as defined in
*ATR *LF QAFDLGL QWHFDLGL LIBRARY1. If FILE1 is a Distributed Data Management
(DDM) file, only the attributes of the local DDM file are
*ATR *ICFF QAFDICF QWHFDICF
shown at the work station running the command.
*ATR *SAVF QAFDSAV QWHFDSAV
*ATR *DDMF QAFDDDM QWHFDDDM Example 3: Displaying Definition of All Files
*ACCPTH Note 2 QAFDACCP QWHFDACP DSPFD FILE(\ALL/\ALL) TYPE(\ALL) SYSTEM(\ALL)
*MBRLIST Note 2 QAFDMBRL QWHFDML
This command shows the definition of all the files in all
*SELECT Note 3 QAFDSELO QWHFDDSO libraries authorized for the user on both the local and on all
*SEQ Note 2 QAFDCSEQ QWHFDSEQ remote systems. For DDM files, the displays first show infor-
*RCDFMT Note 1 QAFDRFMT QWHFDFMT mation about the local DDM file and then, if available, infor-
mation about the remote file that is named on the RMTFILE
*MBR Note 2 QAFDMBR QWHFDMBR
parameter of that CRTDDMF command. The information is
*SPOOL Note 4 QAFDSPOL QWHFDSPL shown at the work station running the command.
*JOIN Note 5 QAFDJOIN QWHFDJN
*TRG Note 6 QAFDTRG QWHFDTRG
*CST Note 6 QAFDCST QWHFDCST

P3-112 OS/400 CL Reference - Part 2 (Full Version)


DSPFD

Additional Considerations If the attributes of more than one file are shown or printed,
the attributes of the next file are shown only after all of the
When the DSPFD command is entered, the specified requested attributes for the first file are shown. For printed
libraries are searched for the file or files specified by the output, a separate page is used for each type of information
FILE parameter; then a group of records that give file-level that is printed, as indicated by the TYPE parameter.
information about each file is created. The records are
placed in the printer device file named QPDSPFD. If For displayed or printed output, if no detailed information
OUTPUT(*PRINT) is specified on the command, the records exists for the specified file type, an appropriate indication is
are listed on the printer in the following order: given under the section heading for that type of display. For
example, if a logical file is shown and TYPE(*MBR
1. On the first line, the leftmost fields show system identi- *MBRLIST) was specified, but no members have yet been
fier numbers. The right side shows the date and time defined for the file, the message (no members in file) is
the job was run and the page number. shown or printed under the section headings for the member
2. The file, library, type of information, file attributes, and attributes display and for the member list display.
processor are shown (page 1 only).
For output to a display, the first four lines of each display
3. The specific file, library, and type of file (to which the fol- contain information about the spooled file and fields used for
lowing information applies) are shown. display spooled file functions.
4. Header information that identifies the type of information
being presented is shown, followed by the requested Numeric values in select/omit field descriptions are shown
attribute information. without decimal points. See the description of the fields (by
using the Display File Field Description (DSPFFD) command)
to determine the decimal positions.

Chapter 2. OS/400 Command Descriptions P3-113


DSPFFD

DSPFFD (Display File Field Description) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
55──DSPFFD──FILE(──┼───────────────┼──┬─\ALL───────────────┬──)──┬────────────────────────────┬───(P) ──────────────────────────────5
├─\USRLIBL/─────┤ ├─generic\-file-name─┤ │ ┌─\────────┐ │
├─\CURLIB/──────┤ └─file-name──────────┘ (1) ─┼─\PRINT───┼──)─┘
└─OUTPUT(───
├─\ALL/─────────┤ └─\OUTFILE─┘
├─\ALLUSR/──────┤
└─library-name/─┘
5──┬──────────────────────────────────────────────────────┬──┬───────────────────────────────────────────┬──────────────────────5
│ ┌─\LIBL/────────┐ │ │ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │
(2) ─┼───────────────┼──database-file-name──)─┘ └─OUTMBR(──┴─member-name─┴──┼──────────┼──)─┘
└─OUTFILE(───
├─\CURLIB/──────┤ └─\ADD─────┘
└─library-name/─┘
5──┬──────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\LCL─┐ │
└─SYSTEM(──┼─\RMT─┼──)─┘
└─\ALL─┘
Notes:
1 If OUTPUT(*OUTFILE) is specified, a file name must be specified for OUTFILE.

P All parameters preceding this point can be specified in positional form.

2 If OUTFILE is not specified, OUTMBR must not be specified.

Purpose – The edit code, edit word, and column headings


associated with the field
The Display File Field Description (DSPFFD) command
– A signal of whether validity checking is performed
shows, prints, or places in a database file field-level informa-
on the field
tion for one or more files in a specific library or all the
libraries to which the user has access. – The validity check message identifier, the message
file, and the library
If the information is put in a database file, the database file
– The use of the field
will have a record format named QWHDRFFD. The fields in
record format QWHDRFFD are the same as the fields in the To create an OUTFILE, the user must have object opera-
IBM-supplied format QWHDRFFD in file QADSPFFD in the tional authority to the Create Physical File (CRTPF)
library QSYS. The following information is contained in the command and add authority to the library. To use an
database file: existing OUTFILE, the user must have object operational and
Ÿ For each file specified in the command, the database add authority to the file. The user must also have object
record contains: management and delete authority if *REPLACE is specified
on the OUTMBR parameter.
– The name of the file, the name of the library con-
taining the file, the file type, and file member Restrictions:
– The file creation date and the number of record 1. Before users can display each file specified, they must
formats in the file have object operational authority for the file.
– The name of the record format used by the file, the 2. Also, of the libraries specified by the library qualifier,
format level identifier, the format text description, the only the libraries for which the user has read authority
format record length, and the number of fields in the are searched.
format
Note: To see the parameter and value descriptions for this
– The information retrieval date and time command, refer to the online help text. For more
Ÿ For each field in the record format, the record also con- information about printing the help text, refer to
tains the following, if applicable: “Printing CL Command Descriptions” in Chapter 1.
– The field name and external field name
– The type and length of the field Required Parameters
– For fields referencing other fields, the name of the FILE
referenced file, record format, and field; if any attri- Specifies the qualified name of the file or the generic
butes of the referenced field were changed, the attri- name of several files that have their field-level
bute type is given descriptions shown. This parameter specifies that all
files in the specified library or libraries (*LIBL/*ALL for

P3-114 OS/400 CL Reference - Part 2 (Full Version)


DSPFFD

example), or that all files in all libraries (*ALL/*ALL), file-name: Specify the name of the file whose field-level
have their field-level descriptions shown. information is shown.
Note: The user must have authority to both the files
and the libraries before this information is shown. Optional Parameters
The name of the file field description can be qualified by OUTPUT
one of the following library values: Specifies whether the output from the command is
*LIBL: All libraries in the job's library list are shown at the requesting work station, printed with the
searched until the first match is found. job's spooled output, or placed in a database outfile.
More information on this parameter is in Appendix A,
*CURLIB: The current library for the job is “Expanded Parameter Descriptions.”
searched. If no library is specified as the current
library for the job, the QGPL library is used. *: Output requested by an interactive job is shown on
the display. Output requested by a batch job is printed
*USRLIBL: Only the libraries in the user portion of with the job's spooled output.
the job's library list are searched.
*PRINT: The output is printed with the job's spooled
*ALL: All libraries in the system, including QSYS, output.
are searched.
*OUTFILE: The output is directed to the database file
*ALLUSR: All user libraries are searched. All specified on the OUTFILE parameter.
libraries with names that do not begin with the letter
Q are searched except for the following: OUTFILE
#CGULIB #DFULIB #RPGLIB #SEULIB Specifies the qualified name of the database file where
#COBLIB #DSULIB #SDALIB the displayed information is stored.

Although the following Qxxx libraries are provided When creating the database output file, the current date,
by IBM, they typically contain user data that time, and system name must be included. The system
changes frequently. Therefore, these libraries are name is the name of the source system, not the target
considered user libraries and are also searched: system. If the specified output file does not exist, then
the system creates a database file and member. If the
| QDSNX QPFRDATA QUSRBRM QUSRSYS
file is created, the text is OUTFILE for DSPFFD and the
| QGPL QRCL QUSRIJS QUSRVxRxMx
public authority is *EXCLUDE.
| QGPL38 QS36F QUSRINFSKR
| QMQMDATA QUSER38 QUSRNOTES Note: The outfile format must be the same as
| QMQMPROC QUSRADSM QUSRRDARS QWHDRFFD of system file QADSPFFD. For
Note: A different library name, of the form more information on the outfile format, refer to
QUSRVxRxMx, can be created by the user DB2 for AS/400 Database Programming book.
for each release that IBM supports. VxRxMx The name of the database file can be qualified by one of
is the version, release, and modification level the following library values:
of the library.
*LIBL: All libraries in the job's library list are
library-name: Specify the name of the library to be searched until the first match is found.
searched.
*CURLIB: The current library for the job is
*ALL: All files in the library or libraries specified have searched. If no library is specified as the current
their field-level information shown. library for the job, the QGPL library is used.
generic*-file-name: Specify the generic name of the file library-name: Specify the name of the library to be
or files that have field-level information shown. A searched.
generic name is a character string of one or more char-
acters followed by an asterisk (*); for example, ABC*. database-file-name: Specify the name of the database
The asterisk substitutes for any valid characters. A file where the field level information is written. If no file
generic name specifies all objects with names that begin is found by that name, a file by that name is created and
with the generic prefix for which the user has authority. stored in the specified library, or in *CURLIB if the file
If an asterisk is not included with the generic (prefix) name is not qualified. This file can be used again when
name, the system assumes it to be the complete object other DSPFFD commands are entered. The
name. If the complete object name is specified, and IBM-supplied database file QADSPFFD cannot be speci-
multiple libraries are searched, multiple objects can be fied.
displayed only if *ALL or *ALLUSR library values can be OUTMBR
specified for the name. For more information on the use Specifies the name of the database file member to which
of generic names, refer to “Generic Object Names” in the output is directed.
Chapter 2.
Element 1: Member to Receive Output

Chapter 2. OS/400 Command Descriptions P3-115


DSPFFD

*FIRST: The first member in the file receives the output. displays show only information about the remote file that
If OUTMBR(*FIRST) is specified and the member does was named on the RMTFILE parameter of the
not exist, the system creates a member with the name of CRTDDMF command.
the file specified on the OUTFILE parameter. If the
member exists, the user has the option to add records to
the end of the existing member or to clear the existing
Examples
member and then add the new records. Example 1: Displaying Information About a File on the
member-name: Specify the file member that receives Local System
the output. If OUTMBR(member-name) is specified and DSPFFD FILE(LIB1/FILE2)
the member does not exist, the system creates it.
Element 2: Operation to Perform on Member This command shows the field-level information about file
FILE2 in LIB1 on the local system. The information is shown
*REPLACE: The system clears the existing member at the work station where the command was entered.
and adds the new records.
*ADD: The system adds the new records to the end of Example 2: Displaying Information About Files on the
the existing records. Local and Remote Systems
DSPFFD FILE(\ALL/\ALL) SYSTEM(\ALL)
SYSTEM
Specifies whether the information returned by the This command shows the field-level information of all files in
DSPFFD command is about files on the local system all libraries authorized to the user on the local system and on
(*LCL), about files on the remote system or systems all remote systems. For distributed data management files,
(*RMT), or about files on both local and remote systems the display shows only information about the remote file that
(*ALL). For performance considerations, unless explicitly is named on the RMTFILE parameter of the CRTDDMF
looking for information about files on systems other than command. The information is shown at the work station
the local system, the default value of *LCL should not be where the command was entered.
changed.
Example 3: Directing Output to a Database File
*LCL: The information provided is about local files only.
DSPFFD FILE(QGPL/FLDREF) OUTPUT(\OUTFILE)
*RMT: The information provided is about remote files OUTFILE(QGPL/FLDREFX)
that have been named on the RMTFILE parameter of
successfully run CRTDDMF commands. To look at this This command puts the field-level information for the file
information, specify the name of the distributed data FLDREF in the QGPL library on the local system into a data-
management file, not the name of the remote file. Only base file named FLDREFX in the general purpose library,
the information returned by the remote system is shown. QGPL. The FLDREFX file in the QGPL library can then be
*ALL: The information provided is about files on both processed by a program.
the local and the remote systems. For DDM files, the

P3-116 OS/400 CL Reference - Part 2 (Full Version)


DSPFLR

| DSPFLR (Display Folder) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──DSPFLR──┬──────────────────────────┬──┬────────────────────┬──┬────────────────────────────┬───(P) ─────────────────────────────5
│ ┌─\ALL────────┐ │ │ ┌─\FLR─┐ │ │ ┌─\────────┐ │
└─FLR(──┴─folder-name─┴──)─┘ └─TYPE(──┴─\DOC─┴──)─┘ └─OUTPUT(───(1) ─┼─\PRINT───┼──)─┘
└─\OUTFILE─┘
5──┬─────────────────────────┬──┬────────────────────────────────────────────────────┬──────────────────────────────────────────5
│ ┌─\CURRENT─┐ │ │ ┌─\LIBL/────────┐ │
└─LEVEL(──┴─\ALL─────┴──)─┘ └─OUTFILE(──┼───────────────┼──database-file-name──)─┘
├─\CURLIB/──────┤
└─library-name/─┘
5──┬───────────────────────────────────────────┬──┬───────────────────────┬──┬─────────────────────────────┬───────────────────5%
│ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │ └─OUTFILFMT──┬─\TYPE1─┬─┘ │ ┌─\ALL───────────┐ │
└─OUTMBR(──┴─member-name─┴──┼──────────┼──)─┘ └─\TYPE2─┘ └─ASP(──┴─ASP-identifier─┴──)─┘
└─\ADD─────┘
Notes:
1 Batch cannot be used if OUTPUT(*) is specified.

P All parameters preceding this point can be specified in positional form.

Purpose *PRINT: The output is printed with the job's spooled


output.
The Display Folder (DSPFLR) command allows the user to
*OUTFILE: The output is directed to the database file
display or print a list of folders and documents or to create
specified on the OUTFILE parameter.
an out file that contains the list of folders or documents.
LEVEL
More information on displaying or printing lists of folders and Specifies whether the list includes folders nested within
documents is in the Using OfficeVision/400 Word Processing folders or only folders at the current level. This param-
book. eter is not allowed when OUTPUT(*) is specified. For
Note: To see the parameter and value descriptions for this documents, *ALL cannot be specified.
command, refer to the online help text. For more *CURRENT: Only folders at the current level are listed.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. *ALL: Nested folders within the folders specified are
listed.

Optional Parameters OUTFILE


Specifies the qualified name of the database file where
FLR the output of the display is directed. If the OUTFILE
Specifies the name of the folders or members on the list. does not exist, this command creates a database file in
*ALL: All the folders that the user has authority to see the specified library. If the file is created by this func-
are on the list. tion, the text for the database file is 'OUTFILE created
by DSPFLR', and the authority given to all users is
folder-name: Specify the name of the folder whose con- *EXCLUDE.
tents is listed.
More information on defining the format of database files
TYPE (OUTFILES) is in the Office Services Concepts and
Specifies whether documents or folders are listed. Programmer’s Guide book.
*FLR: The list contains folders. The name of the database file can be qualified by one of
*DOC: The list contains documents. the following library values:

OUTPUT *LIBL: All libraries in the job's library list are


Specifies whether the output from the command is searched until the first match is found.
shown at the requesting workstation or printed with the *CURLIB: The current library for the job is
job's spooled output. More information on this param- searched. If no library is specified as the current
eter is in Appendix A, “Expanded Parameter library for the job, the QGPL library is used.
Descriptions.”
library-name: Specify the name of the library to be
*: Output requested by an interactive job is shown on searched.
the display. Output requested by a batch job is printed
with the job's spooled output. database-file-name: Specifies the qualified name of the
database file that receives the output of the display.

Chapter 2. OS/400 Command Descriptions P3-117


DSPFLR

OUTMBR used is defined by model output file QADSPDOC (Docu-


Specifies the name of the database file member to which ment format) and QADSPFLR (Folder format) in library
the output is directed. If a member already exists, the QSYS with record formats named DOCDTL and
system uses the second element of this parameter to FLRDTL respectively.
determine whether the member is cleared before the
ASP
new records are added. If the member does not exist
Specifies the auxiliary storage pool (ASP) from which the
and a member name is not specified, the system creates
system will search to construct the list of folders or docu-
a member with the name of the output file specified on
ments.
the OUTFILE parameter. If an output file member name
is specified, but the member does not exist, the system *ALL: All ASPs defined on the system will be searched.
creates it. This is the effective value that was used on previous
releases when no ASP parameter was provided on the
Element 1: New Member
DSPFLR command.
*FIRST: The first member in the file receives the output.
If OUTMBR(*FIRST) is specified and the member does
ASP-identifier: Specify a value ranging from 1 through
16 for the ASP identifier. These values depend on how
not exist, the system creates a member with the name of
ASPs are defined on the system.
the file specified on the OUTFILE parameter.
member-name: Specify the file member that receives
the output. If OUTMBR(member-name) is specified and Examples
the member does not exist, the system creates it.
Example 1: Displaying or Printing Output
Element 2: Existing Member
DSPFLR FLR(GENERAL) TYPE(\FLR) OUTPUT(\)
*REPLACE: The system clears the existing member
and adds the new records. This command shows a list of folders for the folder,
GENERAL, at the requesting work station (if requested by an
*ADD: The system adds the new records to the end of
interactive job) or the output is printed with the job's spooled
the existing records.
output (if requested by a batch job).
OUTFILFMT
Specifies the format of the database file to which the Example 2: Directing Output to a Database File
output of the display is directed. DSPFLR FLR(\ALL) TYPE(\FLR) OUTPUT(\OUTFILE)
LEVEL(\ALL) OUTFILE(MYLIB/MYFILE)
*TYPE1: Output is directed to the file format used for
OUTMBR(MYMBR \REPLACE)
Release V2R2 and all releases prior to V2R2. The
format used is defined by model output file QADSPSDC This command shows all the folders that the user has
(Document format) and QADSPSFR (Folder format) in authority to view. The output is directed to MYMBR, in
library QSYS with record formats named DOCDTLS and MYFILE located in MYLIB. If member MYMBR already
FLRDTLS respectively. exists, MYMBR is cleared and then the new records are
*TYPE2: Output is directed to the file format used for added.
Release V2R3 and all releases thereafter. The format

P3-118 OS/400 CL Reference - Part 2 (Full Version)


DSPFNTTBL

DSPFNTTBL (Display Font Table) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─┬────────────────────────┬────────────────────────────────────────────────────────5%
55──DSPFNTTBL──FNTTBL(──┬─\PHFCS────┬──)────
├─\PHCP─────┤ │ ┌─\──────┐ │
├─\HPFCS────┤ └─OUTPUT(──┴─\PRINT─┴──)─┘
├─\HPCP─────┤
├─\SYSPHFCS─┤
├─\SYSPHCP──┤
├─\SYSHPFCS─┤
└─\SYSHPCP──┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose table is documented in Appendix D of the Printer Device


Programming manual.
The Display Font Table (DSPFNTTBL) command displays a
*SYSPHCP: The system printer resident to host resi-
font table. Refer to the Printer Device Programming manual
dent code page mapping table is to be displayed. This
for more information on font mapping tables.
table is documented in Appendix D of the Printer Device
Restrictions: Programming manual.

1. The PSF/400 feature is required to use this command. *SYSHPFCS: The system host resident to printer resi-
dent font character set table is to be displayed. This
Note: To see the parameter and value descriptions for this table is documented in Appendix D of the Printer Device
command, refer to the online help text. For more Programming manual.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. *SYSHPCP: The system host resident to printer resi-
dent code page mapping table is to be displayed. This
table is documented in Appendix D of the Printer Device
Required Parameter Programming manual.
FNTTBL
Specifies the name of the font table to be displayed. Optional Parameters
*PHFCS: The printer resident to host resident font char- OUTPUT
acter set table is to be displayed. Specifies whether the output from the command is dis-
*PHCP: The printer resident to host resident code page played at the requesting work station or printed with the
mapping table is to be displayed. job's spooled output.
*HPFCS: The host resident to printer resident font char- The possible values are:
acter set table is to be displayed. *: The output is displayed (if requested by an interactive
*HPCP: The host resident to printer resident code page job) or printed with job's spooled output (if requested by
mapping table is to be displayed. a batch job).
*SYSPHFCS: The system printer resident to host resi- *PRINT: The output is printed with the job's spooled
dent font character set table is to be displayed. This output.

Chapter 2. OS/400 Command Descriptions P3-119


DSPFNTRSCA

| DSPFNTRSCA (Display Font Resource Attributes) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ─┬────────────────────────┬───────────────────────────────5%
55──DSPFNTRSCA──FNTRSC(──┼───────────────┼──font-resource-name──)────
├─\CURLIB/──────┤ │ ┌─\──────┐ │
└─library-name/─┘ └─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose library-name: Specify the name of the library to be


searched.
The Display Font Resource Attributes (DSPFNTRSCA)
command shows the following for the specified font resource: font-resource-name: Specify the name of the font
resource whose attributes are displayed.
Ÿ Object attribute
Ÿ Picture element density for font character sets
Optional Parameters
Ÿ Descriptive text for the font resource
OUTPUT
Note: To see the parameter and value descriptions for this Specifies whether the output is directed to the display
command, refer to the online help text. For more station screen or to a printer. More information on this
information about printing the help text, refer to parameter is in Appendix A, “Expanded Parameter
“Printing CL Command Descriptions” in Chapter 1. Descriptions.”
*: Output requested by an interactive job is shown on
Required Parameters the display. Output requested by a batch job is printed
with the job's spooled output.
FNTRSC
Specifies the qualified name of the font resource whose *PRINT: The output is printed with the job's spooled
attributes are displayed. output.
The name of the font resource can be qualified by one
of the following library values: Example.
*LIBL: All libraries in the job's library list are DSPFNTRSCA FNTRSC(SHALIMAR/XðAð557C)
searched until the first match is found.
This command displays the attributes associated with the
*CURLIB: The current library for the job is
font resource X0A0557C in library SHALIMAR.
searched. If no library is specified as the current
library for the job, the QGPL library is used.

P3-120 OS/400 CL Reference - Part 2 (Full Version)


DSPHDWRSC

DSPHDWRSC (Display Hardware Resources) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──DSPHDWRSC──TYPE(──┬─\AHW───┬──)──┬──────────────────────────┬──┬───────────────────────────────────────────┬────────────────5
├─\CMN───┤ │ ┌─\────────┐ │ │ ┌─\LIBL/────────┐ │
├─\CSA───┤ └─OUTPUT(──┼─\PRINT───┼──)─┘ └─OUTFILE(──┼───────────────┼──file-name──)─┘
(1) ┤
├─\LAN─── └─\OUTFILE─┘ ├─\CURLIB/──────┤
├─\LWS───┤ └─library-name/─┘
├─\PRC───┤
└─\STG───┘
(P, K) ─────────────5%
5──┬───────────────────────────────────────────┬──┬───────────────────────────┬──┬──────────────────────────┬─────
│ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │ │ ┌─\TYPE1─┐ │ │ ┌─\ALL─┐ │
└─OUTMBR(──┴─member-name─┴──┼──────────┼──)─┘ └─OUTFILFMT(──┴─\TYPE2─┴──)─┘ └─LINETYPE(──┼─\DDI─┼──)───(2) ┘
└─\ADD─────┘ └─\TRN─┘
Notes:
1 When this value is specified, a value must also be specified for the LINETYPE parameter.

2 This parameter is required if *LAN is specified as the resource type.

P All parameters preceding this point can be specified in positional form.

K All parameters preceding this point are key parameters.

Purpose output file. This information consists of the LAN con-


troller adapter address, adapter name, line type, and
The Display Hardware Resources (DSPHDWRSC) command adapter description.
is used to display, print, or direct to an output file the various
*LWS: Displays, prints, or directs to an output file the
types of System Resource Management (SRM) information.
local work station resource information. This information
Restriction: The Work with LAN Adapters (WRKLANADPT) consists of resource name, resource type, serial number,
command must be run before you can run this command location, status, address, configuration description, and
using TYPE(*LAN); otherwise, there is no information to resource description.
display. *PRC: Displays, prints, or directs to an output file the
Note: To see the parameter and value descriptions for this processor resource information. This information con-
command, refer to the online help text. For more sists of resource name, resource type, serial number,
information about printing the help text, refer to location, status, and resource description.
“Printing CL Command Descriptions” in Chapter 1. *STG: Displays, prints, or directs to an output file the
storage devices resource information. This information
consists of resource name, resource type, serial number,
Required Parameter location, status, address, configuration description, and
TYPE resource description.
Specifies the type of information that is to be displayed,
printed, or directed to an output file.
Optional Parameters
*AHW: Displays, prints, or directs to an output file the
combined contents of all hardware resource records. OUTPUT
This includes all *CMN, *CSA, *LWS, *PRC, and *STG Specifies whether SRM data is displayed, printed, or
records. directed to an output file.

*CMN: Displays, prints, or directs to an output file the *: Output requested by an interactive job is shown on
contents of each SRM communications resource record. the display. Output requested by a batch job is printed
This information consists of resource name, resource with the job's spooled output.
type, serial number, location, status, address, configura- *PRINT: The requested data is printed with the job's
tion description, and resource description. spooled output.
*CSA: Displays, prints, or directs to an output file the *OUTFILE: The requested data is directed to an output
coupled adapter resource information. This information database file.
consists of resource name, model, status, location,
resource description, and the system the adapter is con- OUTFILE
nected to. Specifies the qualified name of the database file to
which the output of the command is directed. If the file
*LAN: Displays, prints, or directs token-ring or distrib- does not exist, this command creates a database file in
uted data interface adapter resource information to an the specified library.

Chapter 2. OS/400 Command Descriptions P3-121


DSPHDWRSC

If a new file is created, the system uses one of the fol-


Table 4. Physical File Field Values
lowing physical files as a model, depending on the
resource type specified on the TYPE parameter. Field Field values and description

Resource Type Physical File Model Format name Resource 00 = Communications processor
Description 01 = Communications adapter
02 = Communications port
\AHW QARZALLF QRZALL
03 = Work station controller
\CMN QARZDCMN QRZDCMN
04 = Printer device
\CSA QARZDCSA QRZDCSA
05 = Work station device
\LAN QARZDTRA QRZDTRA 06 = ASCII work station controller
\LWS QARZDLWS QRZDLWS 07 = Work station printer
\PRC QARZDPRC QRZDPRC 08 = Main card enclosure
\STG QARZDSTG QRZDSTG 09 = Bus extender
Field level information for any of the above files can be 10 = System processor
obtained using the Display File Field Description 11 = Service processor
12 = Main storage card
(DSPFFD) command and specifying the physical file in
13 = Storage controller
library QSYS. 14 = Tape controller
The information for the following fields are not shown 15 = Disk storage controller
with the DSPFFD command: 16 = Diskette controller
17 = Tape unit
18 = Disk unit
Table 4. Physical File Field Values 19 = Diskette unit
Field Field values and description 20 = Tape input/output processor
21 = Work station processor
Record 0 = *CMN communications 22 = System control panel
Format resource 23 = Next level main storage card
1 = *LWS local work station 24 = Combined function IO processor
2 = *PRC processor type 25 = MFIO processor
3 = *STG storage resource 26 = Virtual controller
4 = *LAN adapter information
5 = *CSA coupled adapter resource Resource 0 = Not detected
Status 1 = Inoperative
Resource For *CMN type records: 2 = Not ready
Level 1 = Input/output processor 3 = Operational
2 = Input/output adapter
3 = Communications port Resource If resource description is
For *LWS or *STG type records: Extended 00 - Communications processor:
1 = Input/output processor Description 01 = Comm processor
2 = Controller (only applies 02 = MFIO processor
3 = Device to the 03 = Combined function IO processor
For *PRC type records: QARZDCMN and 04 = File server IO processor
0 = Processor unit QARZALLF If resource description is
1 = Processor/main storage physical file 01 - Communications adapter:
2 = Next level main storage models for 01 = Comm adapter
*CMN) 02 = LAN adapter
03 = ISDN adapter
04 = Fax adapter
If resource description is
02 - Communications port:
01 = Comm port
02 = ISDN port
03 = Token-ring port
04 = Autocall port
05 = Ethernet port
06 = V.24 port
07 = X.21 port
08 = V.35 port
09 = V.24 enhanced port
10 = V.36 port
11 = FDDI port
12 = SDDI port
13 = Fax port
14 = Wireless connection
15 = LAN port

P3-122 OS/400 CL Reference - Part 2 (Full Version)


DSPHDWRSC

This parameter is valid only if OUTPUT(*OUTFILE) is *TYPE1: The format of the output file is the same as
specified. Only one type of resource information: that of the physical file models, QARZDCMN,
*CMN, *LWS, *PRC, *STG, or *LAN can be directed to QARZDLWS, QARZDPRC, and QARZDSTG.
one output file.
*TYPE2: The format of the output file is the same as
The possible library values are: that of the physical file model, QARZALLF, and its asso-
ciated record format model, QRZALL. This value is the
*LIBL: The library list is used to locate the output
functional equivalent of the physical file, QARZHWOF,
file.
which was used by the Display Local Hardware
*CURLIB: The current library for the job is used to (DSPLCLHDW) command in releases prior to V3R6M0.
locate the output file. If no library is specified as the
LINETYPE
current library for the job, the QGPL library is used.
Specifies the local area network (LAN) type for which
library-name: Specify the name of the library where information is displayed, printed, or directed to an output
the output file is located. file.
file-name: Specify the name of the file where the This parameter is required if TYPE(*LAN) is specified.
requested information is to be located.
*ALL: Both distributed data interface and token-ring
OUTMBR network adapter resource information is displayed,
Specifies the member name to receive the requested printed, or directed to an output file.
SRM data. This parameter is valid only if OUTPUT *DDI: All distributed data interface adapter resource
(*OUTFILE) is specified. information is displayed, printed, or directed to an output
Element 1: Member to Receive Output file.

*FIRST: The first member name receives the requested *TRN: All token-ring network adapter resource informa-
SRM data. tion is displayed, printed, or directed to an output file.

member-name: Specify the name of the member to


receive the requested SRM data. Valid values range Example
from 1 through 10 characters. DSPHDWRSC TYPE(\STG) OUTPUT(\OUTFILE) OUTFILE(STG)
Element 2: Operation to Perform on Member OUTFILFMT(\TYPE2)
*REPLACE: The new data replaces the existing data. This command places SRM information for storage resources
*ADD: The new data is added to the end of the existing in the output file STG, which is formatted like the physical file
data. model, QARZALLF. If output file STG is located in the library
list, the records of its first member are replaced by the new
OUTFILFMT records. If output file STG is not located in the library list, it
Specifies the physical file model used to format the is created in the current library with first member STG. This
output file. member contains the new records.
Note: This parameter is not used when TYPE(*LAN) is
specified.

Chapter 2. OS/400 Command Descriptions P3-123


DSPHFS

DSPHFS (Display Hierarchical File Systems) Command


Job: B,I Pgm: B,I Exec

55──DSPHFS──┬────────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘

Purpose eter is in Appendix A, “Expanded Parameter


Descriptions.”
The Display Hierarchical File Systems (DSPHFS) command
*: The output is sent to the display.
displays a list of registered file systems. The information on
the list includes file system names, levels, and 50 character *PRINT: The output is printed with the job's spooled
descriptions that are supplied by the file system at registra- output.
tion time.
Note: To see the parameter and value descriptions for this Examples
command, refer to the online help text. For more
information about printing the help text, refer to Example 1: Displaying Historical File System Informa-
“Printing CL Command Descriptions” in Chapter 1. tion
DSPHFS OUTPUT(\)
Optional Parameters This command sends the output to the display.
OUTPUT
Example 2: Printing Historical File System Information
Specifies whether the output from the command is
shown at the requesting workstation or printed with the DSPHFS OUTPUT(PRINT)
job's spooled output. More information on this param-
This command sends the output to the printer file.

P3-124 OS/400 CL Reference - Part 2 (Full Version)


DSPHLPDOC

DSPHLPDOC (Display Help Document) Command


Job: I Pgm: I REXX: I Exec

(P) ────────────────────────────5%
55──DSPHLPDOC──DOC(──document-name──)──FLR(──folder-name──)──┬─────────────────────────────────┬───
│ ┌─\FIRST──────────┐ │
└─HLPLBL(──┴─help-label-name─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Optional Parameters


The Display Help Document (DSPHLPDOC) command dis- HLPLBL
plays a document in its final form. The document is created Specifies where in the document the display is started.
using the word processing function of OfficeVision. More The user can use the page keys or other positioning
information on help documents is in the Using requests to look for the information.
OfficeVision/400 Word Processing book. *FIRST: The document is displayed at the start of the
Note: To see the parameter and value descriptions for this first page.
command, refer to the online help text. For more help-label-name: Specify the name of the label that is
information about printing the help text, refer to used as the starting point for displaying the document.
“Printing CL Command Descriptions” in Chapter 1. This only indicates where to start viewing the document.

Required Parameters Example


DOC DSPHLPDOC DOC(KDOC) FLR(NFLR) HLPLBL(\FIRST)
Specifies the name of the document to display. Specify
the name of the document. The document must be a This command uses the document KDOC in folder NFLR as
resolved document. the help document.

FLR
Specifies the name of the folder that contains the docu-
ment.

Chapter 2. OS/400 Command Descriptions P3-125


DSPIGCDCT

DSPIGCDCT (Display DBCS Conversion Dictionary) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(1) ─IGCDCT(──┼───────────────┼──dictionary-name──)────
55──DSPIGCDCT─── (P) ─┬────────────────────────────────┬──────────────────────────5
├─\CURLIB/──────┤ │ ┌─\ALL────────────┐ │
└─library-name/─┘ └─ENTRY(──┼─generic\-string─┼──)─┘
└─specific-string─┘
5──┬────────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘
Notes:
1 DBCS systems only

P All parameters preceding this point can be specified in positional form.

Purpose *ALL: The system displays or prints all of the dictionary


entries and their related words.
The Display DBCS Conversion Dictionary (DSPIGCDCT)
generic*-string: The system displays or prints all of the
command displays or prints the alphanumeric entries in the
dictionary entries that start with the specified string and
specified DBCS conversion dictionary and their related
their related words. The string cannot be longer than 12
words. The system refers to the DBCS conversion dictionary
characters.
when doing DBCS conversion.
A generic name is a character string of one or more
Note: Use of the conversion function is not recommended
characters followed by an asterisk (*); for example,
for Chinese and Korean double-byte character sets
ABC*. The asterisk substitutes for any valid characters.
(DBCS).
A generic name specifies all objects with names that
Note: To see the parameter and value descriptions for this begin with the generic prefix for which the user has
command, refer to the online help text. For more authority. If an asterisk is not included with the generic
information about printing the help text, refer to (prefix) name, the system assumes it to be the complete
“Printing CL Command Descriptions” in Chapter 1. object name. If the complete object name is specified,
and multiple libraries are searched, multiple objects can
be displayed only if *ALL or *ALLUSR library values can
Required Parameters be specified for the name. For more information on the
IGCDCT use of generic names, refer to “Generic Object Names”
Specifies the qualified name of the DBCS conversion in Chapter 2.
dictionary to be shown or printed. If you do not specify specific-string: Specify an alphanumeric entry (up to 12
a library name, the first dictionary found when searching characters) and its related words that are shown or
your library list is shown. printed.
The name of the dictionary can be qualified by one of
OUTPUT
the following library values:
Specifies whether the output from this command is
*LIBL: All libraries in the job's library list are shown at the requesting work station or printed with the
searched until the first match is found. job's spooled output. More information on this param-
eter is in Appendix A, “Expanded Parameter
*CURLIB: The current library for the job is
Descriptions.”
searched. If no library is specified as the current
library for the job, the QGPL library is used. *: Output requested by an interactive job is shown on
the display. Output requested by a batch job is printed
library-name: Specify the name of the library to be
with the job's spooled output.
searched.
*PRINT: The output is printed with the job's spooled
dictionary-name: Specify the name of the dictionary that output.
will be shown or printed.

Examples
Optional Parameters
Example 1: Displaying Entries
ENTRY
Specifies the alphanumeric entries to be shown or DSPIGCDCT IGCDCT(DBCSLIB/QUSRIGCDCT) OUTPUT(\)
printed with their related words.

P3-126 OS/400 CL Reference - Part 2 (Full Version)


DSPIGCDCT

This command displays at a work station all entries in the DSPIGCDCT IGCDCT(DBCSLIB/QUSRIGCDCT) ENTRY('?')
DBCS conversion dictionary named QUSRIGCDCT, that is OUTPUT(\PRINT)
stored in the library DBCSLIB.
This command prints the entry ? and its related words from
Example 2: Printing Entries the DBCS conversion dictionary named QUSRIGCDCT,
which is stored in the library DBCSLIB.

Chapter 2. OS/400 Command Descriptions P3-127


DSPIPLA

DSPIPLA (Display IPL Attributes) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P)─┬────────────────────────┬──────────────────────────────────────────────────────────────────────────────────────5%
55──DSPIPLA───
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose job's spooled output. More information on this param-


eter is in Appendix A, “Expanded Parameter
The Display IPL Attributes (DSPIPLA) command allows you Descriptions.”
to display the settings of attributes that are used during the
*: Output requested by an interactive job is shown on
next initial program load (IPL).
the display. Output requested by a batch job is printed
Note: To see the parameter and value descriptions for this with the job's spooled output.
command, refer to the online help text. For more
*PRINT: The output is printed with the job's spooled
information about printing the help text, refer to
output.
“Printing CL Command Descriptions” in Chapter 1.

Example
Optional Parameters
DSPIPLA OUTPUT(\)
OUTPUT
Specifies whether the output from the command is dis- This command displays the IPL attribute information.
played at the requesting work station or printed with the

P3-128 OS/400 CL Reference - Part 2 (Full Version)


DSPIPXCCT

DSPIPXCCT (Display IPX Circuit) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ───────────────────────────────────────────────────────────────────────────5%
55──DSPIPXCCT──CCTNAME(────IPX-circuit-name────)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose CCTNAME
Specifies the name of the IPX circuit that you want to
The Display IPX Circuit (DSPIPXCCT) command displays an display. This circuit must have been previously config-
existing circuit from the Internetwork Packet Exchange (IPX) ured using the Add IPX Circuit (ADDIPXCCT) command
configuration. or by selecting Option 1 from the Work with IPX Circuits
Note: To see the parameter and value descriptions for this display. The IPX circuit name cannot exceed 18 charac-
command, refer to the online help text. For more ters in length.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1.
Example
DSPIPXCCT CCTNAME(CIRCUIT2)
Required Parameters
This command causes the IPX support to display information
about the circuit named CIRCUIT2.

Chapter 2. OS/400 Command Descriptions P3-129


DSPIPXD

DSPIPXD (Display IPX Description) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─────────────────────────────────────────────────5%
55──DSPIPXD──IPXD(────IPX-description-name────)──┬────────────────────────┬───
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose OUTPUT
Specifies whether the output from the command is
The Display IPX Description (DSPIPXD) command displays shown at the requesting workstation or printed with the
an IPX description. job's spooled output.
Note: To see the parameter and value descriptions for this *: Output requested by an interactive job is shown on
command, refer to the online help text. For more the display. Output requested by a batch job is printed
information about printing the help text, refer to with the job's spooled output.
“Printing CL Command Descriptions” in Chapter 1.
*PRINT: The output is printed with the job's spooled
output.
Required Parameter
IPXD Example
Specifies the name of the IPX description to be dis- DSPIPXD IPXD(IPXDESC)
played.
This command displays information about the IPX description
named IPXDESC. The information is shown at the work-
Optional Parameter station from which the command was entered. If the
command was submitted from a batch job, the output from
the command is printed with the job's spooled output.

P3-130 OS/400 CL Reference - Part 2 (Full Version)


DSPJOB

DSPJOB (Display Job) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\─────────────────────────────────────────┐
(P) ───────────────────────────────5
55──DSPJOB──JOB(──┴─┬─────────────────────────────┬──job-name─┴──)──┬────────────────────────┬───
└─┬─────────────┬──user-name/─┘ │ ┌─\──────┐ │
└─job-number/─┘ └─OUTPUT(──┴─\PRINT─┴──)─┘
5──┬─────────────────────────┬──┬────────────────────────────┬─────────────────────────────────────────────────────────────────5%
│ ┌─\SELECT─┐ │ │ ┌─\SELECT─┐ │
└─OPTION(──┼─\STSA───┼──)─┘ └─DUPJOBOPT(──┴─\MSG────┴──)─┘
├─\DFNA───┤
├─\RUNA───┤
├─\SPLF───┤
├─\JOBLOG─┤
├─\PGMSTK─┤
├─\JOBLCK─┤
├─\LIBL───┤
├─\OPNF───┤
├─\FILOVR─┤
├─\CMTCTL─┤
├─\CMNSTS─┤
├─\ACTGRP─┤
├─\MUTEX──┤
| ├─\THREAD─┤
└─\ALL────┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose on the job queue, on an output queue, or active in the


system: job status attributes, job definition attributes, and
The Display Job (DSPJOB) command displays, for the speci- spooled file information. However, the job is not considered
fied user job, any of the following information: to be in the system until all of its input has been completely
Ÿ Job status attributes read in; only then is an entry placed on the job queue.

Ÿ Job definition attributes Restrictions:


Ÿ Job run attributes 1. Unless a user has special job control (*JOBCTL)
Ÿ Spooled file information authority, or unless another job has the same user name
specified, only the user's job can be displayed.
Ÿ Job log information
2. Activation group information for a job cannot be shown if
Ÿ Call stack information the job is being held when this command is run.
Ÿ Job lock information Note: To see the parameter and value descriptions for this
Ÿ Library list information command, refer to the online help text. For more
information about printing the help text, refer to
Ÿ Open file information
“Printing CL Command Descriptions” in Chapter 1.
Ÿ File override information
Ÿ Commitment control status Optional Parameters
Ÿ Communications status
JOB
Ÿ Activation group information Specifies the name of the user job whose information is
| Ÿ Mutex information to be displayed. If no job qualifier is given, a search for
the simple job name is made of all of the jobs currently
| Ÿ Thread information in the system. If duplicates of the specified name are
found, a list of messages that contains the qualified job
The information for the following options can be shown only
names of all duplicates is displayed.
when the job is active: job run attributes, call stack informa-
tion, job lock information, library list information, job log infor- A job identifier is a special value or a qualified name
mation, open file information, file override information, with up to three elements. For example:
| commitment control status, communication status, activation \
| group information, mutex information and thread information. job-name
The following options can be found whether the user's job is user-name/job-name
job-number/user-name/job-name

Chapter 2. OS/400 Command Descriptions P3-131


DSPJOB

More information on this parameter is in Appendix A, *LIBL: The library list associated with the job is dis-
“Expanded Parameter Descriptions.” played.
*: The job whose information is displayed is the job *OPNF: The open files associated with the job are dis-
from which this display command is entered. played.
job-name: Specify the name of the job whose informa- *FILOVR: The file overrides associated with the job are
tion is to be displayed. displayed.
user-name: Specify the name of the user of the job *CMTCTL: The commit control status of the job is dis-
whose information is to be displayed. played.
job-number: Specify the number of the job whose infor- *CMNSTS: The communications status of the job is dis-
mation is to be displayed. played.

OUTPUT *ACTGRP: The activation groups associated with the


Specifies whether the output from the command is dis- job are displayed.
played at the requesting work station or printed with the *MUTEX: The mutually exclusive information associated
job's spooled output. If the output is to go to a printer, with the job is shown.
the job log information is not included. To print the job
log information, use the Display Job Log (DSPJOBLOG) | *THREAD: Information about the job's threads is dis-
command. More information on this parameter is in | played.
Appendix A, “Expanded Parameter Descriptions.” *ALL: All information associated with the job is dis-
*: Output requested by an interactive job is shown on played.
the display. Output requested by a batch job is printed DUPJOBOPT
with the job's spooled output. Specifies the action taken when duplicate jobs are found
*PRINT: The output is printed with the job's spooled by this command.
output. *SELECT: The selection display is shown when dupli-
cate jobs are found during an interactive session. Other-
OPTION
wise, a message is issued.
Specifies the information to be shown on the display
station (or printed as specified on the OUTPUT param- *MSG: A message is issued when duplicate jobs are
eter). Only one value may be selected. found.
*SELECT: Shows a list of options that allows the user
to select the displayed job information. Examples
*STSA: The status attributes associated with the job are
Example 1: Printing the Spooled Output
displayed.
DSPJOB JOB(SMITH/PAYROLL) OUTPUT(\PRINT)
*DFNA: The definition attributes associated with the job
are displayed. This command directs the information for the job named
*RUNA: The run attributes associated with the job are PAYROLL submitted by the user named SMITH to the job's
displayed. output spooling queue for printing.
*SPLF: The spooled files associated with the job are Example 2: Displaying the Job's Spooled Output
displayed.
DSPJOB OPTION(\SPLF)
*JOBLOG: The job log associated with the job is dis-
played. The job log is printed or displayed depending on This command displays the spooled output for the current
what is specified for the OUTPUT parameter. This value job.
is not shown when either OPTION(*SELECT) or
OPTION(*ALL) is specified. Example 3: Displaying All of the Job's Information

*PGMSTK: The call stack associated with the job is dis- DSPJOB OPTION(\ALL)
played.
This command displays all of the information for the current
*JOBLCK: The job locks associated with the job are job.
displayed.

P3-132 OS/400 CL Reference - Part 2 (Full Version)


DSPJOBD

DSPJOBD (Display Job Description) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ──────────────────────────────────5%
55──DSPJOBD──JOBD(──┼───────────────┼──job-description-name──)──┬────────────────────────┬───
├─\CURLIB/──────┤ │ ┌─\──────┐ │
└─library-name/─┘ └─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose library-name: Specify the name of the library to be


searched.
The Display Job Description (DSPJOBD) command displays
the contents of the specified job description. job-description-name: Specify the name of the job
description to be displayed.
Restriction: The user must have object operational
authority for the job description.
Optional Parameters
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more OUTPUT
information about printing the help text, refer to Specifies whether the output from the command is dis-
“Printing CL Command Descriptions” in Chapter 1. played at the requesting work station or printed with the
job's spooled output on a printer. More information on
this parameter is in Appendix A, “Expanded Parameter
Required Parameters Descriptions.”
JOBD *: Output requested by an interactive job is shown on
Specifies the qualified name of the job description to be the display. Output requested by a batch job is printed
displayed. with the job's spooled output.
The name of the job description can be qualified by one *PRINT: The output is printed with the job's spooled
of the following library values: output.

*LIBL: All libraries in the job's library list are


searched until the first match is found. Example
*CURLIB: The current library for the job is DSPJOBD JOBD(MYLIB/SPECIAL)
searched. If no library is specified as the current
This command displays the job description named SPECIAL
library for the job, the QGPL library is used.
that is stored in the library MYLIB.

Chapter 2. OS/400 Command Descriptions P3-133


DSPJOBLOG

DSPJOBLOG (Display Job Log) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──────────────────────5
55──DSPJOBLOG──┬────────────────────────────────────────────────────────┬──┬──────────────────────────┬───
│ ┌─\─────────────────────────────────────────┐ │ │ ┌─\────────┐ │
└─JOB(──┴─┬─────────────────────────────┬──job-name─┴──)─┘ └─OUTPUT(──┼─\PRINT───┼──)─┘
└─┬─────────────┬──user-name/─┘ ├─\OUTFILE─┤
└─job-number/─┘ └─\APIDFIN─┘
5──┬────────────────────────────────────────────────────┬──┬───────────────────────────────────────────┬───────────────────────5%
│ ┌─\LIBL/────────┐ │ │ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │
└─OUTFILE(──┼───────────────┼──database-file-name──)─┘ └─OUTMBR(──┴─member-name─┴──┼──────────┼──)─┘
├─\CURLIB/──────┤ └─\ADD─────┘
└─library-name/─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose job-name: Specify the name of the job whose job log is
shown.
The Display Job Log (DSPJOBLOG) command shows com-
user-name: Specify the name of the user of the job
mands and related messages for a job whose job log is not
whose job log is shown.
written. You can also show commands for a job on a job
queue that has not started processing. job-number: Specify the number of the job whose job
log is shown.
This command is used to monitor the progress of a job.
OUTPUT
Note: This function can also be accessed through the Specifies whether the output from the command is
Display Job (DSPJOB) and Work with a Job shown at the requesting work station, printed with the
(WRKJOB) commands. job's spooled output or directed to a database file. More
information on this parameter is in Appendix A,
Restrictions:
“Expanded Parameter Descriptions.”
1. To display a job log, the user must have special job
*: Output requested by an interactive job is shown on
control authority (*JOBCTL), or the job must have the
the display. Output requested by a batch job is printed
same user name as the person running this command.
with the job's spooled output.
2. To display a job that is running for the security officer or
*PRINT: The output is printed with the job's spooled
a member of the security officer group, the user also
output.
must have *ALLOBJ special authority.
*OUTFILE: The output is directed to the database file
Note: To see the parameter and value descriptions for this
specified in the OUTFILE parameter. This option can
command, refer to the online help text. For more
only be used if the JOB parameter specifies the special
information about printing the help text, refer to
value asterisk (*). Using this option only allows a
“Printing CL Command Descriptions” in Chapter 1.
primary output file to be produced.
*APIDFN: The output is directed to the database files
Optional Parameters which were previously prepared by running the
JOB QMHCTLJL API. This option can only be used if the
Specifies the name of the job whose job log is shown. If JOB parameter specified the special value asterisk (*).
no job qualifier is given, all jobs currently in the system The OUTFILE and OUTMBR parameters are not used.
are searched for the simple job name. If duplicates of When this option is used both a primary and secondary
the specified name are found, a list of messages con- output file can be produced. Any message filtering
taining the qualified job names of all duplicate names is specified onthe API is applied to the messages before
shown. they are written to the data base. THe database format
A job identifier is a special value or a qualified name (QMHPFT) of the outpt file is the same as that used in
with up to three elements. For example: hte IBM-supplied database file QAMHJLPR.

\ OUTFILE
job-name Specifies the name of the database file to which the
user-name/job-name output of the display is directed. If this file does not
job-number/user-name/job-name exist, this command creates a database file in the speci-
*: The job in which this command is issued is the job fied library. The public authority is the same as the
whose job log is shown.

P3-134 OS/400 CL Reference - Part 2 (Full Version)


DSPJOBLOG

create authority specified for the library in which the file not exist, the system creates a member with the name of
is created. the file specified on the OUTFILE parameter. If the
member already exists, the user has the option to add
The file specified here cannot be a DDM file.
new records to the end of the existing member or clear
The possible library values are: the member and then add the new records.
*LIBL: The library list is used to locate the outfile. member-name: Specify the file member that receives
If the outfile is not found, one is created in the the output. If OUTMBR(member-name) is specified and
current library. If no current library exists, the outfile the member does not exist, the system creates it. If the
is created in the QGPL library. member already exists, you have the option to add new
records to the end of the existing member or clear the
*CURLIB: The current library for the job is used to
member and then add the new records.
locate the specified outfile. If no library is specified
as the current library for the job, the library QGPL is Element 2: Operation to Perform on Member
used.
*REPLACE: The system clears the existing member
library-name: Specify the name of the library where and adds the new records.
the outfile is located.
*ADD: The system adds the new records to the end of
Database-file-name: Specify the name of the outfile that the existing records.
receives the output of the display.

OUTMBR Example
Specifies the name of the database file member to which DSPJOBLOG JOB(ANDERSON/PAYROLL) OUTPUT(\PRINT)
the output is directed.
This command produces a job log for job PAYROLL for user
Element 1: Member to Receive Output
ANDERSON.
*FIRST: The first member in the file receives the output.
If OUTMBR(*FIRST) is specified and the member does

Chapter 2. OS/400 Command Descriptions P3-135


DSPJOBTBL

DSPJOBTBL (Display Job Tables) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P)─┬────────────────────────┬────────────────────────────────────────────────────────────────────────────────────5%
55──DSPJOBTBL───
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose OUTPUT
Specifies whether the output from the command is dis-
The Display Job Tables (DSPJOBTBL) command displays played at the requesting work station or printed with the
information about the job tables which are internal system job's spooled output. More information on this param-
objects used by the operating system to track all jobs on the eter is in Appendix A, “Expanded Parameter
system. The information includes the size of the tables and Descriptions.”
the number of different types of entries in the tables. The
*: Output requested by an interactive job is shown on
number of entries in these tables can affect the performance
the display. Output requested by a batch job is printed
of various IPL steps and OS/400 commands and application
with the job's spooled output.
program interfaces (APIs) that work with jobs.
*PRINT: The output is printed with the job's spooled
Note: To see the parameter and value descriptions for this
output.
command, refer to the online help text. For more
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. Example
DSPJOBTBL OUTPUT(\)
Optional Parameters
This command displays information about the job tables.

P3-136 OS/400 CL Reference - Part 2 (Full Version)


DSPJRN

| DSPJRN (Display Journal) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(1) ───────────────────┬──)────────────────────────────────────────────────────────────────────────5
55──DSPJRN──JRN(──┬─\INTSYSJRN───
│ ┌─\LIBL/────────┐ │
└─┼───────────────┼──journal-name─┘
├─\CURLIB/──────┤
└─library-name/─┘
5──┬──────────────────────────────────────────────────────────────────────────────┬─────────────────────────────────────────────5
│ ┌─\ALLFILE───────────────────────────────────────────────────────┐ │
│ │ ┌──
─────────────────────────────────────────────────────────┐ │ │
│ │ │ ┌─\LIBL/────────┐ ┌─\FIRST──────┐ │ │ │
6 (2) (3)
└─FILE(──┴───(──┼───────────────┼──┬─\ALL──────┬──┼─────────────┼──)─┴────┴──)─┘
├─\CURLIB/──────┤ └─file-name─┘ ├─\ALL────────┤
└─library-name/─┘ └─member-name─┘
(P) ────────────────5
5──┬────────────────────────────────────────────────────────────────────────────────────────────────────────┬───
│ ┌─\CURRENT───────────────────────────────────────────────────────────────────────────────┐ │
└─RCVRNG(──┼─\CURCHAIN──────────────────────────────────────────────────────────────────────────────┼──)─┘
│ ┌─\CURRENT────────────────────────────────┐ │
│ ┌─\LIBL/────────┐ │ ┌─\LIB/─────────┐ │ │
└─┼───────────────┼──start-journal-receiver──┴─┼───────────────┼──end-journal-receiver─┴─┘
├─\CURLIB/──────┤ ├─\CURLIB/──────┤
└─library-name/─┘ └─library-name/─┘
5──┬────────────────────────────────────────────┬──┬───────────────────────────────────────┬────────────────────────────────────5
│ ┌─\FIRST───────────────────┐ │ │ ┌─\LAST──────────────────┐ │
├─FROMENT(──┴─starting-sequence-number─┴──)──┤ ├─TOENT(──┴─ending-sequence-number─┴──)─┤
└─FROMTIME(──starting-date──starting-time──)─┘ └─TOTIME(──ending-date──ending-time──)──┘
5──┬─────────────────────────────────┬──┬───────────────────────────────────────────────────────┬───────────────────────────────5
│ ┌─\ALL────────────┐ │ │ ┌─\ALL──────────────────────────────────┐ │
└─NBRENT(──┴─maximum-entries─┴──)─┘ └─JRNCDE(──┼─\CTL──────────────────────────────────┼──)─┘
│ ┌──
────────────────────────────────┐ │
│ │ ┌─\ALLSLT──────┐ │ │
6 (4) (5)
└───journal-code──┴─\IGNFILSLT───┴─┴────┘
5──┬───────────────────────────────────┬──┬────────────────────────────────────────────────────────┬────────────────────────────5
│ ┌─\ALL──────────────┐ │ │ ┌─\ALL──────────────────────────────────────┐ │
└─ENTTYP(──┼─\RCD──────────────┼──)─┘ └─JOB(──┴─┬─────────────────────────────┬──job-name─┴──)─┘
│ ┌──
────────────┐ │ └─┬─────────────┬──user-name/─┘
└──6─entry-type─┴───
(6) ─┘ └─job-number/─┘
5──┬───────────────────────────┬──┬───────────────────────────┬──┬───────────────────────────────────────────┬──────────────────5
│ ┌─\ALL─────────┐ │ │ ┌─\ALL──────┐ │ │ ┌─\ALL────────────────────┐ │
└─PGM(──┴─program-name─┴──)─┘ └─USRPRF(──┴─user-name─┴──)─┘ └─CMTCYCID(──┴─commit-cycle-identifier─┴──)─┘
5──┬───────────────────────┬──┬───────────────────────┬──┬─────────────────────────┬──┬──────────────────────────┬──────────────5
│ ┌─\ALL──┐ │ │ ┌─\CHAR─┐ (7) ─journal-ID──)─┘ │
│ └─JRNID(─── ┌─\────────┐ │
└─DEPENT(──┴─\NONE─┴──)─┘ └─OUTFMT(──┴─\HEX──┴──)─┘ └─OUTPUT(──┼─\PRINT───┼──)─┘
└─\OUTFILE─┘
5──┬─────────────────────────────┬──┬───────────────────────────────────────────┬───────────────────────────────────────────────5
│ ┌─\TYPE1─┐ │ │ ┌─\LIBL/────────┐ │
(8) ─┼─\TYPE2─┼──)─┘ └─OUTFILE(──┼───────────────┼──file-name──)─┘
└─OUTFILFMT(───
├─\TYPE3─┤ ├─\CURLIB/──────┤
└─\TYPE4─┘ └─library-name/─┘
5──┬─────────────────────────────────────────────┬──┬──────────────────────────────────────────────────────────────────────┬────5
│ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │ │ ┌─\OUTFILFMT──────────────────────────────────────┐ │
(8) ─┴─member-name─┴──┼──────────┼──)─┘ └─ENTDTALEN(───
└─OUTMBR(─── (8) ─┼─\CALC───────────────────────────────────────────┼──)─┘
└─\ADD─────┘ ├─field-length────────────────────────────────────┤
│ ┌─\CALC────────┐ ┌─\FLDLEN──────────┐ │
└─\VARLEN──┴─field-length─┴──┼──────────────────┼─┘
└─allocated-length─┘
5──┬───────────────────────────────────────────────────────────────────────┬──┬───────────────────────────────┬────────────────5%
| │ ┌─\OUTFILFMT──────────────────────────────────────┐ │ │ ┌─\CONFIRMED─┐ │
| (9) ─┼─\CALC───────────────────────────────────────────┼──)─┘ └─INCENT(────
└─NULLINDLEN(─── (10) ─┴─\ALL───────┴──)─┘
├─field-length────────────────────────────────────┤
│ ┌─\CALC────────┐ ┌─\FLDLEN──────────┐ │
└─\VARLEN──┴─field-length─┴──┼──────────────────┼─┘
└─allocated-length─┘
Notes:
1 If the *INTSYSJRN value is specified, the JRNID parameter must be specified.

2 If *ALL is specified instead of file-name, the format must be library-name/*ALL.

3 A maximum of 300 repetitions.

4 This value is not valid for journal code D, F or R.

| 5 A maximum of 12 repetitions.

Chapter 2. OS/400 Command Descriptions P3-137


DSPJRN

6 A maximum of 50 repetitions.
7 The JRNID parameter can be specified only if JRN(*INTSYSJRN) is specified.
8 This parameter is valid only if OUTPUT(*OUTFILE) is specified.
9 The NULLINDLEN parameter is valid only if OUTFILFMT(*TYPE3) or OUTFILFMT(*TYPE4) is specified.
| 10 This parameter is only valid for a remote journal.
P All parameters preceding this point can be specified in positional form.

Purpose specified on these parameters, except when


*IGNFILSLT is specified on the JRNCDE parameter.
The Display Journal (DSPJRN) command allows the user to Ÿ If a journal code is specified on the JRNCDE
convert journal entries (contained in one or more receivers) parameter and *IGNFILSLT is the second element
into a suitable form for output. Output can be shown, printed of that journal code, then journal entries with the
with the job's spooled printer output, or written to a database specified journal code are selected if they satisfy all
output file. If the database file exists, records may either selection criteria except what is specified on the
replace or be added to the current data in the indicated file FILE parameter.
member. The system creates the specified database file and
member if they do not exist. Database files created by the
system have a standard format. A warning message is sent Required Parameter
and the records are truncated if any of the entries are longer JRN
than the specified maximum record length of the output files. Specifies the journal from which the journal entries are
retrieved for conversion and output.
The contents of selected entries in the journal receivers may
be converted for output. It is also possible to selectively limit *INTSYSJRN: The internal system journal associated
the entries that are displayed. If no journal entries satisfy the with the journal specified on the JRNID parameter is
selection or limitation criteria, an escape message is sent used. Internal system journals are not stored in libraries.
indicating that fact. Note: You must have *ALLOBJ special authority to
specify JRN(*INTSYSJRN).
Gaps may exist in the sequence numbers of the entries con-
verted. These occur because some of the journal entries The name of the journal can be qualified by one of the
represent internal system information. These entries are not following library values:
converted.
*LIBL: All libraries in the job's library list are
It is possible to show journal entries whose journal sequence searched until the first match is found.
numbers are reset in the chain of receivers being specified. *CURLIB: The current library for the job is
searched. If no library is specified as the current
Restrictions: library for the job, the QGPL library is used.
1. The file specified for the database output file must not library-name: Specify the name of the library to be
be journaled to the same journal. More information on searched.
database output file record formats is in the DB2 for
AS/400 Database Programming book. journal-name: Specify the name of the journal.
2. If the sequence number is reset in the range of the
receivers specified, the first occurrence of FROMENT or Optional Parameters
TOENT is used, if they are specified.
FILE
3. The JOB, PGM, and USRPRF parameters cannot be Specifies a maximum of 300 qualified file names whose
used to specify selection criteria if one or more journal journal entries are converted for output. This parameter
receivers in the specified receiver range was attached to also specifies the name of the file member whose
a journal that had RCVSIZOPT(*MINFIXLEN) specified. journal entries are to be converted for output.
4. The FILE, JRNCDE, ENTTYP, JOB, PGM, USRPRF, | To determine which journal entries are to be converted
CMTCYCID, and DEPENT parameters can be used to | for output, based on the specified file member name, the
specify a subset of all available entries within a range of | following is done:
journal entries.
| Ÿ If the specified file member currently exists on the
Ÿ If no values are specified using these parameters,
| system, the journal identifier is determined from the
all available journal entries are converted for output.
| specified file member. All journal entries in the
Ÿ If more than one of these parameters are specified,
| specified receiver range for that journal identifier are
then a journal entry must satisfy all of the values
| converted for output.

P3-138 OS/400 CL Reference - Part 2 (Full Version)


DSPJRN

| Ÿ If the specified file member does not currently exist does not have the required authority to all of the files, an
| on the system, the specified receiver range is error occurs, and the command ends.
| searched to determine all possible journal identifiers
file-name: Specify the name of the physical database
| that are associated with the specified file member.
file whose journaled changes are being converted for
| All journal entries in the specified receiver range for
output.
| those journal identifiers are converted for output.
Element 2: Member Name
| There can be more than one journal identifier asso-
| ciated with the specified file member if, for example, *FIRST: Entries for the first member in the file are con-
| a file member was created by that name, it was verted for output.
| journaled, and then deleted. Then another file *ALL: Entries for currently existing members of the file
| member was created with the same name, and it are converted for output.
| was also journaled and then deleted. All of these
| actions would have to occur within the specified
member-name: Specify the name of the file member
whose entries are converted for output. If the specified
| receiver range.
physical file does not exist on the system, specify either
| Notes: *ALL or a specific file member name.

| 1. The journal identifier is the unique identifier associ- If *ALL is specified for the file-name value, this member
| ated with the object when journaling is started for name is used for all applicable files in the library. For
| that object. The journal identifier stays constant, example, if library-name/*ALL *FIRST is specified on the
| even if the object is renamed or moved. See the FILE parameter, the journal entries of the first members
| Backup and Recovery book for more information. of all applicable files in the specified library are con-
verted for output.
2. When specifying a database file on this parameter,
journal entries with the following journal code values | Note: If more than the maximum number of members
are converted for output only if they satisfy the | is identified (32767 members if a list of files is
values specified on the other parameters: specified), an error occurs and no entries are
converted for output. This restriction is ignored if
| Ÿ Journal code D (database file-level information
*ALLFILE is specified.
| entries).
| Ÿ Journal code F (file member-level information RCVRNG
| entries). Specifies the starting (first) and ending (last) journal
Ÿ Journal code R (record-level information receivers (the receiver range) that contain the journal
entries). entries being converted for output. The system starts
Ÿ Journal code U (user-generated entries). with the starting journal receiver (as specified by the first
Ÿ Other journal codes, if *IGNFILSLT is the value) and proceeds through the receiver chain until the
second element of the journal code. If ending receiver (as specified by the last value) is pro-
*ALLSLT is the second element of the journal cessed.
code, no journal entries with that code are con-
If dual receivers are used at any time, the first of the
verted for output.
receivers is used when chaining through the receivers.
Single Value The Work with Journal Attributes (WRKJRNA) command
can be used to show the order of the receivers in the
*ALLFILE: For all files, all journal entries on the speci-
receiver chain. If a problem (such as damaged or not
fied journal receivers are converted.
found receivers) is found in the receiver chain prior to
Element 1: File Name starting the conversion, the system tries to use the
second of the dual receivers. If the second of the dual
The name of the file can be qualified by one of the fol-
receivers is damaged or not found, the command ends.
lowing library values:
Note: If the maximum number of receivers (256) in the
*LIBL: All libraries in the job's library list are
range is surpassed, an error occurs and no
searched until the first match is found.
journal entries are converted.
*CURLIB: The current library for the job is
*CURRENT: The journal receiver that is currently
searched. If no library is specified as the current
attached when starting to convert journal entries is used.
library for the job, the QGPL library is used.
*CURCHAIN: The journal receiver chain that includes
library-name: Specify the name of the library to be the journal receiver that is currently attached when
searched.
starting to convert journal entries is used. This receiver
*ALL: Journal entries in all physical files in the specified chain does not cross a break in the chain. If there is a
| library (the library name must be specified) whose jour- break in the chain, the receiver range is from the most
| naled changes are currently in the journal receiver are recent break in the chain through the receiver that is
converted for output. If *ALL is specified and the user attached when starting to convert journal entries.

Chapter 2. OS/400 Command Descriptions P3-139


DSPJRN

Element 1: Starting Journal Receiver this command from the command line, the string
must be enclosed in apostrophes. If a time sepa-
The name of the starting journal receiver can be quali-
rator other than the separator specified for your job
fied by one of the following library values:
is used, this command fails.
*LIBL: All libraries in the job's library list are
Ÿ Without a time separator, specify a string of 4 or 6
searched until the first match is found.
digits (hhmm or hhmmss) where hh = hours, mm =
*CURLIB: The current library for the job is minutes, and ss = seconds. Valid values for hh
searched. If no library is specified as the current range from 00 through 23. Valid values for mm and
library for the job, the QGPL library is used. ss range from 00 through 59.
library-name: Specify the name of the library to be TOENT
searched. Specifies the last journal entry to be converted for
output.
starting-journal-receiver: Specify the name of the first
journal receiver whose entries are converted for output. *LAST: The last journal entry in the specified journal
receiver chain is the final entry to be converted.
Element 2: Ending Journal Receiver
*CURRENT: The journal receiver that is currently
ending-sequence-number: Specify the sequence
number of the final journal entry being converted for
attached when starting to convert journal entries is used.
output.
The name of the ending journal receiver can be qualified
by one of the following library values: TOTIME
Specifies the date and time of the last entry to be con-
*LIBL: All libraries in the job's library list are verted for output. The journal entry with the specified
searched until the first match is found. date and time or the latest earlier journal entry is the
*CURLIB: The current library for the job is ending point for conversion of journal entries.
searched. If no library is specified as the current Element 1: Ending Date
library for the job, the QGPL library is used.
ending-date: Specify the date of the last entry.
library-name: Specify the name of the library to be
Element 2: Ending Time
searched.
ending-time: Specify the time on the date of the last
ending-journal-receiver: Specify the name of the last entry. The time is specified in 24-hour format with or
journal receiver whose entries are to be converted for
without a time separator as follows:
output.
Ÿ With a time separator, specify a string of 5 or 8
FROMENT
digits, where the time separator for the job sepa-
Specifies the first journal entry to be considered for con-
rates the hours, minutes, and seconds. If you issue
version for output.
this command from the command line, the string
*FIRST: The first journal entry in the specified journal must be enclosed in apostrophes. If a time sepa-
receiver range is the first entry to be converted. rator other than the separator specified for your job
is used, this command fails.
starting-sequence-number: Specify the sequence
number of the first entry to be converted. Ÿ Without a time separator, specify a string of 4 or 6
digits (hhmm or hhmmss) where hh = hours, mm =
FROMTIME
minutes, and ss = seconds. Valid values for hh
Specifies the date and time of the first journal entry to be
range from 00 through 23. Valid values for mm and
converted for output.
ss range from 00 through 59.
The first journal entry with the specified date and time or
NBRENT
the next later journal entry is the starting point for con-
Specifies the total number of journal entries to be con-
version of journal entries.
verted for output.
Element 1: Starting Date
*ALL: All journal entries that satisfy the selection values
starting-date: Specify the date of the first entry. in the specified journal receivers are converted.
Element 2: Starting Time maximum-entries: Specify the maximum number of
starting-time: Specify the time on the date of the first journal entries to be converted. If the journal entry spec-
entry. The time is specified in 24-hour format with or ified on the TOENT or TOTIME parameter is reached
without a time separator as follows: before the value specified on the NBRENT parameter is
met, the command ends normally.
Ÿ With a time separator, specify a string of 5 or 8
digits, where the time separator for the job sepa- JRNCDE
rates the hours, minutes, and seconds. If you issue Specifies the journal codes for which journal entries are
converted for output.

P3-140 OS/400 CL Reference - Part 2 (Full Version)


DSPJRN

Singe Values PGM


Specifies whether the journal entries to be converted for
*ALL: The conversion of journal entries is not limited to
output are limited to the journal entries for a specified
entries with a particular journal code.
program.
*CTL: Only journal entries written to control the journal
*ALL: The conversion is not limited to entries for a
functions are converted (journal codes = 'J' and 'F').
specified program.
Element 1: Journal Code Value
program-name: Specify the name of the program whose
journal-code: Specify the journal code for which journal journaled changes are to be converted. Only journaled
entries are converted. A list of journal codes that can be changes for this program are converted.
specified is provided in the Backup and Recovery book.
USRPRF
Element 2: Journal Code Selection
Specifies whether the journal entries to be converted are
*ALLSLT: The journal entries with the specified journal limited to those for a specified user profile name. The
code are converted for output only if all other selection user profile name is the user profile under which the job
parameters are satisfied. is run that deposited the journal entries.
*IGNFILSLT: The journal entries having the specified *ALL: The conversion is not limited to entries for a
journal code are converted for output only if all selection specified user profile.
parameters, except the FILE parameter, are satisfied.
user-name: Specify the name of the user profile whose
| Note: This value is not valid for journal code D, F or R. journaled changes are to be converted. Only journaled
changes for this user profile are to be converted.
ENTTYP
Specifies whether to limit the conversion of journal CMTCYCID
entries to those of a specified journal entry type. Specifies the commit cycle identifier of the specific
journal that participated in a logical unit of work for which
*ALL: The conversion of journal entries is not limited to
the journal entries are converted for output.
entries of a particular type.
*ALL: The journal entries for all commit cycle identifiers
*RCD: Only entries that have an entry type for record
are converted.
level operations are converted (these are entry types
BR, DL, DR, PT, PX, UB, UP, and UR). commit-cycle-identifier: Specify the identifier for the
commit cycle whose journaled changes are to be con-
entry-type: Specify the entry type that limits the number
verted.
of journal entries to be converted. Up to 50 valid entry
types can be specified. Only journal entries of the speci- DEPENT
fied entry type are to be converted. A list of valid entry Specifies whether the journal entries to be converted for
types is in the Backup and Recovery book. output include the journal entries recording actions that
occur as a result of a trigger program and actions on
JOB
records that are part of a referential constraint.
Specifies whether the journal entries to be converted for
output are limited to those for a specified job. If the fully *ALL: The journal entries relating to trigger programs
qualified name of the job is not specified, all of the and referential constraints are converted.
journal entries that contain the simple job name are to
*NONE: The journal entries relating to trigger programs
be converted.
and referential constraints are not converted.
A job identifier is a special value or a qualified name
OUTFMT
with up to three elements. For example:
Specifies the format in which the objects are shown.
\ALL
job-name Note: This parameter is ignored if OUTPUT(*OUTFILE)
user-name/job-name is specified.
job-number/user-name/job-name *CHAR: The entry-specific data portion of the journal
More information on this parameter is in Appendix A, entry is shown in character format.
“Expanded Parameter Descriptions.” *HEX: The entry-specific data portion of the journal
*ALL: The conversion is not limited to entries for a par- entry is shown in hexadecimal format.
ticular job.
JRNID
job-name: Specify the name of the job whose journaled Specifies the five-character journal identification number
changes are converted. (ID) of the internal system journal (*INTSYSJRN) to be
user-name: Specify the name of the user of the job displayed. Journal IDs are assigned by the system.
whose journaled changes are to be converted. The first two characters represent the journal type, and
the last three characters are the auxiliary storage pool
job-number: Specify the number of the job whose jour- (ASP) identifier. Following is a listing of journal types.
naled changes are to be converted.

Chapter 2. OS/400 Command Descriptions P3-141


DSPJRN

Journal Types
Table 5. OUTFILFMT(*TYPE1) Journal Entry Format
10 System-managed access-path protection Field Name Length From To
(SMAPP)
Reserved 8 118 125
20 Directory Entry-Specific Data 1001 126 225
Note:
OUTPUT
1 This is the field length in the system-supplied data-
Specifies whether the output from the command is
base file, QADSPJRN. However, a length of up to
shown at the requesting work station, printed with the
32641 bytes can be specified for this field using the
job's spooled printer output, or sent to the database file ENTDTALEN parameter.
specified on the OUTFILE parameter. More information
on this parameter is in Appendix A, “Expanded Param-
eter Descriptions.” *TYPE2: The converted entries include the information
When the output of the command is directed to the returned when OUTFILFMT(*TYPE1) is specified, the
requesting work station, basic information on the journal name of the user profile for the job that generated the
entries is shown. From the basic display, an option can displayed journal entries, and the name of the system on
be selected to show information in detail for any journal which the output records were generated. The format of
entry being shown. the information in each journal entry is shown in the fol-
lowing table.
If the output is printed with the job's spooled printer
output, all of the information that would be shown is Table 6. OUTFILFMT(*TYPE2) Journal Entry Format
printed.
Field Name Length From To
*: Output requested by an interactive job is shown on
Entry Length 5 1 5
the display. Output requested by a batch job is printed
Sequence Number 10 6 15
with the job's spooled output. Journal Code 1 16 16
*PRINT: The output is printed with the job's spooled Journal Entry Type 2 17 18
output. Date 6 19 24
Time 6 25 30
*OUTFILE: The output is directed to the database file Job Name 10 31 40
specified on the OUTFILE parameter. User Name 10 41 50
Job Number 6 51 56
OUTFILFMT Program Name 10 57 66
Specifies the format of the journal entries written to the Object Name 10 67 76
output file specified on the OUTFILE parameter. This Object Library 10 77 86
parameter can be specified only if the value *OUTFILE Member Name 10 87 96
is specified on the OUTPUT parameter. For a Count/RRN 10 97 106
Flag 1 107 107
description of what is represented by each of the fields
Commit Cycle ID 10 108 117
in the journal entry, see the Backup and Recovery book
User Profile 10 118 127
*TYPE1: The converted entries are formatted to include System Name 8 128 135
the minimum information that can be specified. The Reserved 20 136 155
information fields and the format of the information in Entry-Specific Data 1001 156 255
Note:
each journal entry is shown in the following table.
1 This is the field length in the system-supplied data-
base file, QADSPJR2. However, a length of up to
Table 5. OUTFILFMT(*TYPE1) Journal Entry Format
32611 bytes can be specified for this field using the
Field Name Length From To ENTDTALEN parameter.
Entry Length 5 1 5
Sequence Number 10 6 15
Journal Code 1 16 16 *TYPE3: The converted entries include the information
Journal Entry Type 2 17 18 returned when OUTFILFMT(*TYPE2) is specified, and
Date 6 19 24 the null value indicators. The format of the information
Time 6 25 30 in each converted journal entry is shown in the following
Job Name 10 31 40 table.
User Name 10 41 50
Job Number 6 51 56
Table 7 (Page 1 of 2). OUTFILFMT(*TYPE3) Journal
Program Name 10 57 66
Entry Format
Object Name 10 67 76
Object Library 10 77 86 Field Name Length From To
Member Name 10 87 96
Entry Length 5 1 5
Count/RRN 10 97 106
Sequence Number 10 6 15
Flag 1 107 107
Journal Code 1 16 16
Commit Cycle ID 10 108 117
Journal Entry Type 2 17 18

P3-142 OS/400 CL Reference - Part 2 (Full Version)


DSPJRN

Table 7 (Page 2 of 2). OUTFILFMT(*TYPE3) Journal Table 8. OUTFILFMT(*TYPE4) Journal Entry Format
Entry Format
Field Name Length From To
Field Name Length From To
System Name 8 142 149
Timestamp1 26 19 44 Journal Identifier 10 150 159
Job Name 10 45 54 Referential 1 160 160
User Name 10 55 64 Constraint
Job Number 6 65 70 Trigger 1 161 161
Program Name 10 71 80 Reserved 8 162 169
Object Name 10 81 90 Null Value Indicators 522,3 170 221
Object Library 10 91 100 Entry-Specific Data 1023,4 222 323
Member Name 10 101 110 Notes:
Count/RRN 10 111 120 1 The date and time of the journal entry is in 26-byte
Flag 1 121 121
SAA timestamp format instead of separate date and
Commit Cycle ID 10 122 131
time fields as in *TYPE1 and *TYPE2.
User Profile 10 132 141 2 This is a 50-character variable-length field in the
System Name 8 142 149
system-supplied database file QADSPJR4. However,
Reserved 20 150 169
a length of up to 8000 characters can be specified for
Null Value Indicators 522,3 170 221
this field using the NULLINDLEN parameter.
Entry-Specific Data 1023,4 222 323 3 The first two bytes are the length of the variable-length
Notes:
field followed by the actual data if the fields are
1 The date and time of the journal entry is in 26-byte variable-length fields.
SAA timestamp format instead of separate date and 4 This is a 100-character variable-length field in the
time fields as in *TYPE1 and *TYPE2. system-supplied database file QADSPJR4. However,
2 This is a 50-character variable-length field in the a length of up to 32596 characters can be specified for
system-supplied database file QADSPJR3. However, this field using the ENTDTALEN parameter if it is a
a length of up to 8000 characters can be specified for fixed-length field and the null value indicators field is
this field using the NULLINDLEN parameter. also a fixed-length field.
3 The first two bytes are the length of the variable-
length field followed by the actual data if the fields
are variable-length fields. OUTFILE
4 This is a 100-character variable-length field in the Specifies the qualified name of the physical database file
system-supplied database file QADSPJR3. However, to which the output is directed. If the output file already
a length of up to 32596 characters can be specified
exists, the system attempts to use it. Records may
for this field using the ENTDTALEN parameter if it is
a fixed-length field and the null value indicators field
replace or be added to the current data in the file
is also a fixed-length field. member. If no records are written to the database file
(because of the specified selection values), and
*REPLACE is specified on the OUTMBR parameter,
*TYPE4: The converted entries include the information records are cleared from the existing database file. If
returned when OUTFILFMT(*TYPE3) is specified, the the output file does not exist, the system creates a data-
journal identifier, the physical file trigger indicator, and base physical file with the name specified in the
the referential constraint indicator. The format of the OUTFILE parameter in the identified library, even if no
information in each converted journal entry is shown in records are written (because of the specified selection
the following table. values).

Ÿ If a new file is created and OUTFILFMT(*TYPE1) is


Table 8. OUTFILFMT(*TYPE4) Journal Entry Format
specified, the system uses QADSPJRN in QSYS
Field Name Length From To with a format name of QJORDJE as a model.
Entry Length 5 1 5 Ÿ If a new file is created and OUTFILFMT(*TYPE2) is
Sequence Number 10 6 15
specified, the system uses QADSPJR2 in QSYS
Journal Code 1 16 16
Journal Entry Type 2 17 18
with a format name of QJORDJE2 as a model.
Timestamp1 26 19 44 Ÿ If a new file is created and OUTFILFMT(*TYPE3) is
Job Name 10 45 54 specified, the system uses QADSPJR3 in QSYS
User Name 10 55 64 with a format name of QJORDJE3 as a model.
Job Number 6 65 70
Program Name 10 71 80 Ÿ If a new file is created and OUTFILFMT(*TYPE4) is
Object Name 10 81 90 specified, the system uses QADSPJR4 in QSYS
Object Library 10 91 100 with a format name of QJORDJE4 as a model.
Member Name 10 101 110
Count/RRN 10 111 120 The name of the output file can be qualified by one of
Flag 1 121 121 the following library values:
Commit Cycle ID 10 122 131
User Profile 10 132 141

Chapter 2. OS/400 Command Descriptions P3-143


DSPJRN

*LIBL: All libraries in the job's library list are database file will be a fixed length field 100 characters in
searched until the first match is found. length.
*CURLIB: The current library for the job is If *TYPE3 or *TYPE4 is specified on the OUTFILFMT
searched. If no library is specified as the current parameter, the entry-specific data field in the output file
library for the job, the QGPL library is used. is a variable-length field with a maximum field length of
100 characters and an allocated length of 100 charac-
library-name: Specify the name of the library to be
ters. The buffer is 2 bytes longer than the maximum
searched.
field length to include the length portion of the variable-
file-name: Specify the name of the output file that length field.
receives the journal entries.
*CALC: The system calculates the length of the entry-
OUTMBR specific data field to accommodate the longest entry-
Specifies the name of the database file member to which specific data of all journal entries in the specified
the output is directed. If a member already exists, the receiver range. In this case, the entry-specific data field
system uses the second element of this parameter to is a fixed-length character field. The minimum length of
determine whether the member is cleared before the the field is 114 characters. If the length calculated by
new records are added. If the member does not exist the system causes the record format length to exceed
and a member name is not specified, the system creates the maximum record length, a message is sent and the
a member with the name of the output file specified on entry-specific data field is truncated. See the table at
the OUTFILE parameter. If an output file member name the end of this parameter description for the possible
is specified, but the member does not exist, the system maximum record lengths of the various data types that
creates it. can be specified.

Element 1: Member to Receive Output field-length: Specify the number of characters for the
field length. In this case, the field is a fixed-length char-
*FIRST: The first member of the file specified by the
acter field. The maximum value prevents the total
OUTFILE parameter receives the journal entries. If the
record length of the output file from being greater than
OUTFILE is created and *FIRST is specified, the created
the length allowed for physical database files. A
member has the same name as the created file. If
nonzero value is required by the system to ensure that
OUTMBR is not specified, *FIRST is assumed.
the field exists when the output file is created.
member-name: Specify the file member that receives See the table at the end of this parameter description for
the output. If OUTMBR(member-name) is specified and
the allowable field lengths of the various data types that
the member does not exist, the system creates it.
can be specified
Element 2: Operation to Perform on Member
Element 1: Variable-Length Field
*REPLACE: The system clears the existing member
To specify a variable-length field, specify *VARLEN for
and adds the new records.
the first element and length values for the last two ele-
*ADD: The system adds the new records to the end of ments (or let the system use the default values).
the existing records.
*VARLEN: The entry-specific data field is a variable-
ENTDTALEN length field. This value can be specified only when
Specifies the maximum field length of the entry-specific OUTFILFMT(*TYPE3) or OUTFILFMT(*TYPE4) is speci-
data portion of the journal entry when the output file is fied.
created by the system. This field contains part of the Element 2: Maximum Field Length
variable portion of the journal entries (such as the after
image of records for update journal entries). If the The maximum length of the variable-length, entry-
output file exists, this parameter is ignored. specific data field.

The range of allowable values for this parameter is *CALC: The system calculates the maximum length of
the entry-specific data field to accommodate the longest
shown in the table at the end of this parameter
entry-specific data of all journal entries in the specified
description. A single value or a single list of three ele-
receiver range. The minimum length of this field is 114
ments can be specified.
bytes. The corresponding buffer length is 116 bytes:
Single Values 114 bytes of data and 2 bytes for the length portion of
*OUTFILFMT: The length of the entry-specific data field the variable-length field.
in the output file depends on the value specified on the field-length: Specify the number of characters for the
OUTFILFMT parameter. The attributes of this field are maximum field length. See the table at the end of this
the same as those of the entry-specific data field in the parameter description for the allowable field lengths of
corresponding system-supplied model output file. the various data types that can be specified.
If *TYPE1 or *TYPE2 is specified on the OUTFILFMT Element 3: Allocated Length
parameter, the entry-specific data field in the output

P3-144 OS/400 CL Reference - Part 2 (Full Version)


DSPJRN

The allocated length of the variable-length entry-specific supplied model output file QADSPJR3 or QADSPJR4. It
data field. is a variable-length character field with a maximum
length of 50 characters and an allocated length of 50
*FLDLEN: The allocated length is the same as the
characters. The buffer is 2 bytes longer than the
maximum length of the field.
maximum field length to include the length portion of the
allocated-length: Specify the number of characters for variable-length field.
the allocated length.
*CALC: The system calculates the length of this field to
If *CALC is specified for the second element and the accommodate the journal entry with the maximum
system-calculated maximum field length is smaller than number of null value indicators in the specified receiver
the specified allocated length, the allocated length is set range. In this case, the null value indicators field is a
to the maximum field length. If the maximum field length fixed-length character field. The minimum length of this
is specified, the allocated length cannot exceed the field is 1 character to ensure that the field exists when
maximum field length. the output file is created. If the length calculated by the
system causes the record format length to exceed the
Table 9. Range of Values for ENTDTALEN Parameter maximum record length, a message is sent and the null
Entry- Null value indicators field is truncated. See the table at the
Output Specific Value Entry Maximum end of this parameter description for the possible
File Data Indicators Data Record maximum record lengths of the various data types that
Format Format Format Length Length can be specified for the NULLINDLEN parameter.
*TYPE1 Fixed Not appli- 1–32641 32766 field-length: Specify the number of characters for the
cable field length. Valid values range from 1 through 8000. A
*TYPE2 Fixed Not appli- 1–32611 32766 nonzero value is required by the system to ensure that
cable the field exists when the output file is created. In this
*TYPE3 Fixed Fixed 1–32596 32766 case, the null value indicators field is a fixed-length char-
*TYPE3 Fixed Variable 1–32570 32740 acter field.
*TYPE3 Variable Fixed 1–32570 32740 Element 1: Variable-Length Field
*TYPE3 Variable Variable 1–32568 32738 To specify a variable-length field, specify *VARLEN for
*TYPE4 Fixed Fixed 1–32596 32766 the first element and length values for the last two ele-
ments (or let the system use the default values).
*TYPE4 Fixed Variable 1–32570 32740
*TYPE4 Variable Fixed 1–32570 32740 *VARLEN: The null value indicators field is a variable-
length field.
*TYPE4 Variable Variable 1–32568 32738
Element 2: Maximum Field Length
Note: When the file contains variable-length fields, the
maximum record length does not include the 2 bytes per Specifies the maximum length of the variable-length null
variable-length field. value indicators field.
*CALC: The system calculates the length of this field to
NULLINDLEN accommodate the journal entry with the maximum
Specifies the length of the null value indicators field number of null value indicators in the specified receiver
when the output file is created by the system. This range. To ensure that this field exists in the output file
parameter can be specified only if OUTFILFMT(*TYPE3) that is created, the minimum length of this field is 1 byte.
or OUTFILFMT(*TYPE4) is specified. The corresponding buffer length is 3 bytes: 1 byte of
data and 2 bytes for the length portion of the variable-
Null value indicators are present only in journal entries
length field.
that contain a record image where the corresponding
physical file has null capable fields. There is one null field-length: Specify the maximum length of the null
value indicator per field in the physical file. Each indi- value indicators field. Valid values range from 1 through
cator is one character in length and can be one of two 8000 characters.
values: Element 3: Allocated Length
'Fð'X = Corresponding field is not null. Specifies the allocated length of the variable-length null
'F1'X = Corresponding field is null.
value indicators field.
The range of allowable values for this parameter is
*FLDLEN: The allocated length is the same as the
shown in the table at the end of this parameter
maximum length of the field.
description. A single value or a single list of three ele-
ments can be specified. If *CALC is specified for Element 2 and the system-
calculated maximum length is smaller than the specified
Single Values
allocated length, the allocated length is set to the
*OUTFILFMT: The null value indicators field has the maximum field length. If the maximum field length is
same attributes as the corresponding field in the system-

Chapter 2. OS/400 Command Descriptions P3-145


DSPJRN

specified, the allocated length cannot exceed the shown by pressing the Page Down key. When entered from
maximum field length. a batch job, the above command prints all converted journal
entries with the job's spooled printer output. The entry-
allocated-length: Specify the number of characters for
specific data portion of the journal entries are shown in char-
the allocated length.
acter format.
Table 10. Range of Values for NULLINDLEN Parameter Example 2: Converting Journal Entries to an Output File
Entry- Null DSPJRN JRN(MYLIB/JRNLA) FILE((LIB1/A MBR3) (LIB1/C)
Output Specific Value Null Line Maximum (LIB2/\ALL \ALL)) RCVRNG((RCVLIB/RCV27
File Data Indicators Indicator Record
RCVLIB/RCV3ð)) FROMENT(4736) ENTTYP(UP DL)
Format Format Format Length Length
JOB(ððð666/QPGMR/WORKSTð1) PGM(TSTPGMA)
*TYPE3 Fixed Fixed 1–8000 32766 ENTDTALEN(28ð) OUTPUT(\OUTFILE)
*TYPE3 Fixed Variable 1–8000 32740 OUTFILE(MYLIB/JRNENTFIL1)
*TYPE3 Variable Fixed 1–8000 32740 This command converts selected journal entries in the journal
*TYPE3 Variable Variable 1–8000 32738 receiver chain (from receiver RCV27 in library RCVLIB to
*TYPE4 Fixed Fixed 1–8000 32766 receiver RCV30 in library RCVLIB) that are attached to
JRNLA in library MYLIB and places them in the first member
*TYPE4 Fixed Variable 1–8000 32740
of the database file JRNENTFIL1 in library MYLIB. If the
*TYPE4 Variable Fixed 1–8000 32740 database file does not exist, it is created with a format of
*TYPE4 Variable Variable 1–8000 32738 QJORDJE. The last field in the format is 280 bytes in length.
Note: When the file contains variable-length fields, the The journal entry that has a sequence number of 4736 is the
maximum record length does not include the 2 bytes per first entry written to the output file. Only entries for record
variable-length field. updates and deletes made by program TSTPGMA in the job
000666/QPGMR/WORKST01 to member MBR3 of file A in
library LIB1, the first member of file C in library LIB1, and all
| INCENT members of all files in library LIB2 are written to the output
| Specifies whether only the confirmed or both the con- file.
| firmed and unconfirmed, journal entries are converted for
| output. This parameter only applies when converting Example 3: Converting Journal Entries for a Specific
| journal entries for output from a remote journal. User Profile
| Confirmed entries are those journal entries which have DSPJRN JRN(SS/J) FILE(SS1/PF)
| been sent to this remote journal and the state of the RCVRNG((SS/R1 \CURRENT)) JRNCDE(F) USRPRF(MAC7)
| Input/Output (I/O) to auxiliary storage for the same OUTFILE(FMTLIB/ENTFILE) OUTFILFMT(\TYPE2)
| journal entries on the local journal is known.
This command converts selected journal entries in the journal
| Unconfirmed entries are those journal entries which have receiver range. The range begins with journal receiver R1 in
| been sent to this remote journal, but the state of the library SS and ends with the journal receiver currently
| Input/Output (I/O) to auxiliary storage for the same attached (when the converting of journal entries is started) to
| journal entries on the local journal is not known, or the journal J in library SS. The entries are placed in the first
| object name information for those journal entries is not member of the database file ENTFILE in library FMTLIB. If
| yet known to the remote journal. Unconfirmed journal the file does not exist, it is created with the QJORDJE2
| entries can only exist within the attached receiver of a format. The last field of the format is 100 bytes in length.
| remote journal. This only applies if synchronous delivery Only entries with file-level information made by the user
| mode is being used for a particular remote journal. MAC7 to the first member of file PF in library SS1 are written
| *CONFIRMED: Only those journal entries which have to the output file.
| been confirmed are converted for output.
Example 4: Converting Journal Entries with Null Value
| *ALL: All confirmed and unconfirmed journal entries are Field Length Specified
| converted for output.
DSPJRN JRN(LIBPROD/PRODJRN) FILE(APPLIB/PFILE)
OUTFILFMT(\TYPE3) OUTFILE(JRNLIB/ENTFILE)
Examples ENTDTALEN(\VARLEN 5ðð 1ðð) NULLINDLEN(25)

Example 1: Converting Journal Entries for Display This command converts selected journal entries that are in
the range from the journal receiver currently attached (when
DSPJRN JRN(MYLIB/JRNLA)
the converting of entries is started) to the journal PRODJRN
When issued at a work station, this command converts and in library LIBPROD. The entries are placed in the first
shows the first journal entries in the journal receiver currently member of the database file ENTFILE in library JRNLIB. If
attached (when the converting of journal entries is started) to the file does not exist, it is created with the QJORDJE3
the journal JRNLA in library MYLIB. Subsequent entries are format. The entry-specific data field is a variable-length field

P3-146 OS/400 CL Reference - Part 2 (Full Version)


DSPJRN

with a maximum field length of 500 characters and an allo- length null value indicators field. The allocated length of this
cated length of 100 characters. The null value indicators field is the same as the maximum field length.
field is a fixed-length field of 25 characters. Only entries with
file-level information for the first member of file PFILE in Example 6: Converting Journal Entries Using
library APPLIB are written to the output file. *IGNFILSLT and *CURCHAIN
DSPJRN JRN(JRNLIB/JRNA) FILE(FILLIB/FILEA)
Example 5: Converting Journal Entries with Null Value RCVRNG(\CURCHAIN) JRNCDE((F \ALLSLT) (R \ALLSLT)
Field Length Calculated (U \IGNFILSLT)) OUTPUT(\PRINT)
DSPJRN JRN(JRNLIB/JRNA) FILE(FILLIB/FILEA)
FROMENT(4736) ENTTYP(UP DL) This command converts journal entries with:
JOB(ððð666/QPGMR/WORKSTð1) PGM(TSTPGMA) Ÿ File-level information for the first member of file FILEA in
ENTDTALEN(28ð) OUTPUT(\OUTFILE) library FILLIB
OUTFILFMT(\TYPE3) OUTFILE(ENTLIB/ENTFILE)
ENTDTALEN(\CALC) NULLINDLEN(\VARLEN \CALC \FLDLEN) Ÿ Record-level information for the first member of file
FILEA in library FILLIB
This command converts journal entries with file-level informa-
Ÿ User-generated journal entries regardless of whether the
tion for the first member of file FILEA in library FILLIB in the
entry is associated with any journaled file member
range from the journal receiver currently attached (when the
converting of entries is started) to the journal JRNA in library Journal entries are converted from the chain of journal
JRNLIB. The entries are written to the first member of data- receivers, which are the journal receivers in the range from
base file ENTFILE in library ENTLIB. If the file does not the latest chain break through the journal receiver currently
exist, it is created with the QJORDJE3 format. The system attached when the converting of entries is started, associated
calculates the length of the fixed-length, entry-specific data with the journal JRNA in library JRNLIB. The converted
field. The system also calculates the length of the variable- entries are written to a print file.

Chapter 2. OS/400 Command Descriptions P3-147


DSPJRNRCVA

| DSPJRNRCVA (Display Journal Receiver Attributes) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ────────────────────────────────────5%
55──DSPJRNRCVA──JRNRCV(──┼───────────────┼──receiver-name──)──┬────────────────────────┬───
├─\CURLIB/──────┤ │ ┌─\──────┐ │
└─library-name/─┘ └─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose The name of the journal receiver can be qualified by one


of the following library values:
The Display Journal Receiver Attributes (DSPJRNRCVA)
command shows the creation and current operational attri- *LIBL: All libraries in the job's library list are
butes of a journal receiver, including the name of the journal searched until the first match is found.
the receiver is now attached to, or was last attached to (if the *CURLIB: The current library for the job is
| receiver is not currently attached). If the journal receiver is searched. If no library is specified as the current
| associated with a local journal and was originally attached to library for the job, the QGPL library is used.
| a local journal, names of the journal receivers that were
library-name: Specify the name of the library to be
| attached before and after the specified receiver are dis-
searched.
| played. The information also includes, for example, the
| number of journal entries contained in the journal receiver, receiver-name: Specify the name of the journal receiver
the length of the longest entry-specific data, the maximum to be displayed.
number of null value indicators in a journal entry, the journal
sequence numbers of the first and last entries on the journal
receiver, and the date and time that the receiver was Optional Parameters
| attached and detached as well as remote journal related OUTPUT
| information such as the local and source journals. Specifies whether the output from the command is
shown at the requesting workstation or printed with the
From the display supplied by the command, an option can be
job's spooled output. More information on this param-
| selected to display the previous receiver, the next receiver,
eter is in Appendix A, “Expanded Parameter
| or the dual receiver if the journal receiver is associated with
Descriptions.”
| a local journal and was originally attached to a local journal.
| Additionally, if the journal receiver is currently associated with *: Output requested by an interactive job is shown on
| a journal, an option can be selected to display details about the display. Output requested by a batch job is printed
| the associated journal. with the job's spooled output.
Note: To see the parameter and value descriptions for this *PRINT: The output is printed with the job's spooled
command, refer to the online help text. For more output.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1.
Example
DSPJRNRCVA JRNRCV(MYLIB/JRNRCLA) OUTPUT(\PRINT)
Required Parameter
This command prints the current operational attribute infor-
JRNRCV mation of journal receiver JRNRCLA in library MYLIB with
Specifies the qualified name of the journal receiver that the job's spooled printer output.
is to be displayed.

P3-148 OS/400 CL Reference - Part 2 (Full Version)


DSPKBDMAP

DSPKBDMAP (Display Keyboard Map) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──DSPKBDMAP──────────────────────────────────────────────────────────────────────────────────────────────────────────────────5%

Purpose There are no parameters for this command.

The Display Keyboard Map (DSPKBDMAP) command shows


the current F-to-PF map for the 3270 work station device Example
from which the command was sent. More information on DSPKBDMAP
user-assignable keyboard mapping is in the System Opera-
tion for New Users book. The DSPKBDMAP command uses the 3270 help screen to
display the active PF key mapping for the device the
command was entered on.

Chapter 2. OS/400 Command Descriptions P3-149


DSPLANADPP

DSPLANADPP (Display Local Area Network Adapter Profile) Command


Job: B,I Pgm: B,I Exec

(P) ─┬────────────────────────────────┬──────────────────────5
55──DSPLANADPP──LINE(──line-name──)──ADPTNAME(──┬─\ADPTADR─────┬──)────
└─adapter-name─┘ (1) ─adapter-address──)─┘
└─ADPTADR(───
5──┬────────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘
Notes:
P All parameters preceding this point can be specified in positional form.

1 This parameter is valid only if ADPTNAME(*ADPTADR) is specified.

Purpose Optional Parameters


The Display Local Area Network Adapter Profile ADPTADR
(DSPLANADPP) command shows the profile of an active Specifies the 12-character hexadecimal adapter address.
local area network (LAN) adapter.
OUTPUT
Note: To see the parameter and value descriptions for this Specifies whether the output from the command is
command, refer to the online help text. For more shown at the requesting workstation or printed with the
information about printing the help text, refer to job's spooled output. More information on this param-
“Printing CL Command Descriptions” in Chapter 1. eter is in Appendix A, “Expanded Parameter
Descriptions.”
Required Parameters *: Output requested by an interactive job is shown on
the display. Output requested by a batch job is printed
LINE with the job's spooled output.
Specifies the name of the line attached to the adapter
whose profile is to be displayed. *PRINT: The output is printed with the job's spooled
output.
Note: The specified line must be varied on.

ADPTNAME Example
Specifies the name of the adapter whose profile is to be
DSPLANADPP LINE(DETBRANCH) ADPTNAME(PAYROLL)
displayed.
*ADPTADR: The adapter address is used to identify the This command displays the profile of the adapter PAYROLL
adapter. which is attached to the line DETBRANCH.
adapter-name: Specify the name of the adapter whose
profile is to be displayed.

P3-150 OS/400 CL Reference - Part 2 (Full Version)


DSPLANMLB

DSPLANMLB (Display LAN Media Library) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P)─┬────────────────────────┬───────────────────────────────────────────────────5%
55──DSPLANMLB──LIND(──line-description-name──)───
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose OUTPUT
Specifies whether the output from the command is dis-
The Display LAN information for a Media Library played at the requesting work station or printed with the
(DSPLANMLB) command displays local area network attri- job's spooled output.
butes of a line description that is associated with a media
*: The output is displayed (if requested by an interactive
library device. The information is obtained from the Display
job) or printed with the job's spooled output (if requested
Network Attributes (DSPNETA) and the Display Line
by a batch job).
Description (DSPLIND) commands.
*PRINT: The output is printed with the job's spooled
Note: To see the parameter and value descriptions for this
output.
command, refer to the online help text. For more
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. Examples
Example 1: Displaying the LAN information for a line
Required Parameter description
LIND DSPLANMLB LIND(TRNLINE) OUTPUT(\)
Specifies the line description that is used to attach the
media library device. This command displays the LAN information for the line
description TRNLINE that is attached to a media library
device.
Optional Parameters

Chapter 2. OS/400 Command Descriptions P3-151


DSPLANSTS

DSPLANSTS (Display Local Area Network Status) Command


Job: B,I Pgm: B,I Exec

(P) ──────────────────────────────────────────────────5%
55──DSPLANSTS──LINE(──line-description-name──)──┬────────────────────────┬───
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose OUTPUT
Specifies whether the output from the command is
The Display Local Area Network Status (DSPLANSTS) shown at the requesting workstation or printed with the
command shows the status of an active token-ring or a dis- job's spooled output. More information on this param-
tributed data interface (DDI) line. eter is in Appendix A, “Expanded Parameter
Note: The DDI line status is the status of the local network Descriptions.”
from the perspective of the local adapter. *: Output requested by an interactive job is shown on
Note: To see the parameter and value descriptions for this the display. Output requested by a batch job is printed
command, refer to the online help text. For more with the job's spooled output.
information about printing the help text, refer to *PRINT: The output is printed with the job's spooled
“Printing CL Command Descriptions” in Chapter 1. output.

Required Parameter Example


LINE DSPLANSTS LINE(NYBRANCH)
Specifies the name of the active line description being
This command shows the status for the line description
used by the local area network (LAN) manager.
NYBRANCH.

Optional Parameter

P3-152 OS/400 CL Reference - Part 2 (Full Version)


DSPLIB

DSPLIB (Display Library) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ────────────────────────────────────────────────5%
55──DSPLIB──┬──────────────────────────────────┬──┬────────────────────────┬───
│ ┌─\LIBL───────────────┐ │ │ ┌─\──────┐ │
└─LIB(──┼─\CURLIB─────────────┼──)─┘ └─OUTPUT(──┴─\PRINT─┴──)─┘
├─\USRLIBL────────────┤
├─\ALL────────────────┤
├─\ALLUSR─────────────┤
│ ┌──
──────────────┐ │
└──6─library-name─┴───
(1) ─┘

Notes:
1 A maximum of 15 repetitions

P All parameters preceding this point can be specified in positional form.

Purpose The name of the library can be qualified by one of the


following library values:
The Display Library (DSPLIB) command displays the con-
tents of one or more specified libraries; that is, it displays a *LIBL: All libraries in the job's library list are
list of the names and types of all objects contained in each searched until the first match is found.
library, regardless of the authorization on each object. The *CURLIB: The current library for the job is
command can also be used to display a list of libraries from searched. If no library is specified as the current
which individual libraries may be selected for a display of library for the job, the QGPL library is used.
their objects. From the display of a library's contents, options
*USRLIBL: Only the libraries in the user portion of
can be specified to request displays that show more specific
the job's library list are searched.
information about the objects in the library. If more than one
library is to be displayed, they are displayed one at a time. *ALL: All libraries in the system, including QSYS,
The display lists the name and type of each library and the are searched.
number of objects in the library. *ALLUSR: All user libraries are searched. All
libraries with names that do not begin with the letter
Restriction: The user must have *READ authority for each
Q are searched except for the following:
library specified to display its contents.
#CGULIB #DFULIB #RPGLIB #SEULIB
Notes: #COBLIB #DSULIB #SDALIB
1. For printed output, the total-size field of the library Although the following Qxxx libraries are provided
includes the size of the objects in the library plus the by IBM, they typically contain user data that
size of the library object itself. If this value is followed changes frequently. Therefore, these libraries are
by a plus (+) sign, objects in the library are not currently considered user libraries and are also searched:
available, are damaged, being locked, or are not author- | QDSNX QPFRDATA QUSRBRM QUSRSYS
ized. The plus sign indicates that the actual total of all | QGPL QRCL QUSRIJS QUSRVxRxMx
objects is greater than the value displayed. | QGPL38 QS36F QUSRINFSKR
| QMQMDATA QUSER38 QUSRNOTES
2. If *USRLIBL, *LIBL, *ALL, or *ALLUSR is specified on
| QMQMPROC QUSRADSM QUSRRDARS
the LIB parameter and output is printed, the contents of
the libraries is printed. If output is displayed for one of Note: A different library name, of the form
these names, a list of the libraries is displayed from QUSRVxRxMx, can be created by the user
which individual libraries may be selected for further for each release that IBM supports. VxRxMx
display. is the version, release, and modification level
of the library.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more library-name: Specify the name of the library to be
information about printing the help text, refer to searched.
“Printing CL Command Descriptions” in Chapter 1.
OUTPUT
Specifies whether the output from the command is
Optional Parameters shown at the requesting work station or printed with the
job's spooled output. More information on this param-
LIB eter is in Appendix A, “Expanded Parameter
Specifies the names of the libraries that are shown or Descriptions.”
printed.

Chapter 2. OS/400 Command Descriptions P3-153


DSPLIB

*: Output requested by an interactive job is shown on Example


the display. Output requested by a batch job is printed
DSPLIB LIB(QGPL)
with the job's spooled output.
*PRINT: The output is printed with the job's spooled The names, types, and basic descriptions of all the objects
output. located in the QGPL library are either shown on the work
station from which the command was submitted, or printed
on the system printer if the command was run in a batch job.

P3-154 OS/400 CL Reference - Part 2 (Full Version)


DSPLIBD

DSPLIBD (Display Library Description) Command


Job: B,I Pgm: B,I REXX: B,I

55──DSPLIBD──LIB(──┬─\CURLIB──────┬──)──┬────────────────────────┬─────────────────────────────────────────────────────────────5%
└─library-name─┘ │ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘

Purpose library-name: Specify the name of the library to be


searched.
The Display Library Description (DSPLIBD) command is used
to display the description of a library. The description
includes the type of library, auxiliary storage pool (ASP), Optional Parameter
create authorities, the create object auditing value, and a text
OUTPUT
description.
Specifies whether the output from the command is
Restriction: The user cannot display the library description shown at the requesting workstation or printed with the
of a library for which they have *EXCLUDE authority. job's spooled output. More information on this param-
eter is in Appendix A, “Expanded Parameter
Note: To see the parameter and value descriptions for this Descriptions.”
command, refer to the online help text. For more
information about printing the help text, refer to *: Output requested by an interactive job is shown on
“Printing CL Command Descriptions” in Chapter 1. the display. Output requested by a batch job is printed
with the job's spooled output.
*PRINT: The output is printed with the job's spooled
Required Parameter output.
LIB
Specifies the name of the library for which information is
Example
being displayed.
DSPLIBD LIB(QGPL)
The name of the library can be qualified by one of the
following library values: This command displays type, ASP, create authority value,
and text description for library QGPL.
*CURLIB: The current library for the job is
searched. If no library is specified as the current
library for the job, the QGPL library is used.

Chapter 2. OS/400 Command Descriptions P3-155


DSPLIBL

DSPLIBL (Display Library List) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─────────────────────────────────────────────────────────────────────────────────────5%
55──DSPLIBL──┬────────────────────────┬───
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose eter is in Appendix A, “Expanded Parameter


Descriptions.”
The Display Library List (DSPLIBL) command displays the
*: Output requested by an interactive job is shown on
system portion of the library list, the current library entry of
the display. Output requested by a batch job is printed
the job's library list, product libraries, and the user portion of
with the job's spooled output.
the library list.
*PRINT: The output is printed with the job's spooled
Note: To see the parameter and value descriptions for this
output.
command, refer to the online help text. For more
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. Example
DSPLIBL
Optional Parameters
The names, types, and text of the libraries that are in the
OUTPUT job's library list are displayed on the user's work station from
Specifies whether the output from the command is dis- which the command was submitted, or the list is printed on
played at the requesting work station or printed with the the system printer, if the command was part of the batch
job's spooled output. More information on this param- input stream.

P3-156 OS/400 CL Reference - Part 2 (Full Version)


DSPLICKEY

DSPLICKEY (Display License Key Information) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──DSPLICKEY──┬────────────────────────────────────────────┬──┬──────────────────────────────┬─────────────────────────────────5
│ ┌─\ALL────────────────────────┐ │ │ ┌─\ALL─────────┐ │
└─PRDID(──┼─generic\-product-identifier─┼──)─┘ └─LICTRM(──┴─license-term─┴──)─┘
└─product-identifier──────────┘
(P) ──┬──────────────────────────────────────┬──┬─────────────────────────────┬───────────────────5
5──┬──────────────────────────┬───
│ ┌─\ALL────┐ │ │ ┌─\LOCAL───────────────┐ │ │ ┌─\───────────┐ │
└─FEATURE(──┴─feature─┴──)─┘ └─SERIAL(──┼─\REMOTE──────────────┼──)─┘ └─OUTPUT(──┼─\PRINT──────┼──)─┘
├─\ALL─────────────────┤ └─\LICKEYFILE─┘
└─system-serial-number─┘
5──┬───────────────────────────────────────────────────────┬────────────────────────────────────────────────────────────────────5
│ ┌─\LIBL/────────┐ │
(1) ─┼───────────────┼──license-key-file──)─┘
└─LICKEYFILE(───
├─\CURLIB/──────┤
└─library-name/─┘
5──┬─────────────────────────────────────────────────────────────┬─────────────────────────────────────────────────────────────5%
│ ┌─\FIRST───────────────────┐ ┌─\REPLACE─┐ │
(1) ─┴─member-to-receive-output─┴──┼──────────┼──)─┘
└─LICKEYMBR(───
└─\ADD─────┘
Notes:
1 This parameter is valid only when OUTPUT(*LICKEYFILE) is specified.

P All parameters preceding this point can be specified in positional form.

Purpose PRDID
Specifies the seven-character identifier of the product for
The Display License Key Information (DSPLICKEY) which software license key information is shown.
command can be used to show the software license key
*ALL: The software license key information for all
information from the license repository for products with
product identifiers is shown.
keyed compliance. Products with keyed compliance require
that you have a software license key from the software pro- generic*-product-identifier: Specify the generic identifier
vider in order to change the usage limit or the expiration date for the products to be shown. A generic product identi-
of the license information. fier is specified in the same manner as a generic name.
A generic name is a character string of one or more
The license repository is used to store product license infor-
characters followed by an asterisk (*); for example,
mation for each unique product, license term, feature, and
ABC*. The asterisk substitutes for any valid characters.
system. The repository can contain licenses for any system,
A generic name specifies all objects with names that
and the product need not be installed.
begin with the generic prefix for which the user has
The information shown includes the processor group, the authority. If an asterisk is not included with the generic
serial number, the software license key, the usage limit, the (prefix) name, the system assumes it to be the complete
expiration date, and the vendor data. object name. For more information on the use of
generic names, refer to “Generic Object Names” in
The Display License Key Information (DSPLICKEY) Chapter 2.
command also can be used to create an output file, which product-identifier: Specify the seven-character identifier
can be used as input to the Add License Key Information of the product.
(ADDLICKEY) command or the Remove License Key Infor-
mation (RMVLICKEY) command. LICTRM
Specifies the license term for which software license key
Restrictions: This command is shipped with public information is shown.
*EXCLUDE authority.
*ALL: The software license key information for all
Note: To see the parameter and value descriptions for this license terms found on the system is shown.
command, refer to the online help text. For more
license-term: Specify the license term in Vx, VxRy, or
information about printing the help text, refer to
VxRyMz format, where x and y can be a number from 0
“Printing CL Command Descriptions” in Chapter 1.
through 9, and z can be a number from 0 through 9 or a
letter from A through Z.
Optional Parameters

Chapter 2. OS/400 Command Descriptions P3-157


DSPLICKEY

FEATURE *CURLIB: The current library for the job is


Specifies the feature of the product specified on the searched. If no library is specified as the current
PRDID parameter for which the software license key library for the job, the QGPL library is used.
information is shown.
library-name: Specify the name of the library to be
*ALL: The software license key information for all fea- searched.
tures of the product specified on the PRDID parameter is
shown.
license-key-file: Specify the name of the file to which
the software license key information is written.
feature: Specify the number of the feature for which
software license key information is shown. LICKEYMBR
Specifies the name of the database file member to which
SERIAL the output is written. The member is used or created, as
Specify the serial number of the system for which soft- follows:
ware license key information is shown.
Ÿ If the member exists, the system uses the second
*LOCAL: The software license key information for the
element of this parameter to determine whether the
local system is shown.
member is cleared before the new records are
*REMOTE: The software license key information for all added.
systems except the local system is shown.
Ÿ If the member does not exist and a member name
*ALL: The software license key information for all is not specified, the system creates a member with
systems is shown. the name of the output file specified on the
LICKEYFILE parameter.
system-serial-number: Specify the serial number of the
system for which software license key information is Ÿ If the member does not exist and a database file
shown. member name is specified, the system creates the
member.
OUTPUT
Specifies whether the output from this command is dis- Element 1: Member to Receive Output
played, printed, or directed to a database file. More
*FIRST: The first member in the file receives the output.
information on this parameter is in Appendix A,
“Expanded Parameter Descriptions.” member-to-receive-output: Specify the name of the
member to receive the output.
*: The output is shown on the display if requested by an
interactive job, or printed with the job's spooled output if Element 2: Operation to Perform on Member
requested by a batch job. *REPLACE: The system clears the existing member
*PRINT: The output is printed with the job's spooled and adds the new records.
output. *ADD: The system adds the new records to the end of
*LICKEYFILE: The software license key information is the existing records.
written to an output file.

LICKEYFILE Example
Specifies the qualified name of the file where the soft-
DSPLICKEY PRDID(\ALL) LICTRM(\ALL)
ware license key information is written. If this file does
FEATURE(\ALL) SERIAL(\REMOTE)
not exist, it is created using the file QSYS/QALZAKEY OUTPUT(\LICKEYFILE) LICKEYFILE(KEYS)
as a template. If this file exists it must be in the format LICKEYMBR(REMOTE \REPLACE)
of QSYS/QALZAKEY.
The name of the license key file can be qualified by one This command shows the software license key information
of the following library values: for all of the products, features, and license terms for all of
the systems except this system. The output is put in the
*LIBL: All libraries in the job's library list are member REMOTE of the file KEYS. Any existing records are
searched until the first match is found. replaced.

P3-158 OS/400 CL Reference - Part 2 (Full Version)


DSPLIND

DSPLIND (Display Line Description) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ────────────────────5%
55──DSPLIND──LIND(──line-description-name──)──┬────────────────────────┬──┬────────────────────────────┬───
│ ┌─\──────┐ │ │ ┌─\ALL───────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘ └─OPTION(──┼─\BASIC─────┼──)─┘
├─\SWTNWILST─┤
├─\CTL───────┤
├─\SWTCTLLST─┤
├─\ACTSWTCTL─┤
├─\SSAP──────┤
├─\GRPADR────┤
├─\FCNADR────┤
├─\EORTBL────┤
├─\LGLCHLE───┤
├─\APPN──────┤
├─\PHYCHAR───┤
├─\THRESHOLD─┤
└─\TMRRTY────┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *BASIC: The basic displays that apply to this line type
are shown, but additional information displays are not
The Display Line Description (DSPLIND) command displays shown.
a line description. Output is directed to a display or a
*SWTNWILST: The switched network interface list
spooled printer file as indicated by the OUTPUT parameter
panels that apply to this line are displayed.
and job type.
*CTL: The attached nonswitched controller list panels
Note: To see the parameter and value descriptions for this
for this line are displayed.
command, refer to the online help text. For more
information about printing the help text, refer to *SWTCTLLST: The switched controller list panels that
“Printing CL Command Descriptions” in Chapter 1. apply to this line are displayed.
*ACTSWTCTL: The active switched controller list
Required Parameters panels that apply to this line are displayed.
*SSAP: The source service access point panels for this
LIND
token-ring or Ethernet line are displayed.
Specifies the name of the line description to be dis-
played. *GRPADR: The group address panels for this Ethernet
line are displayed.

Optional Parameters *FCNADR: The functional address panels for this token-
ring are displayed.
OUTPUT
*EORTBL: The end-of-record table panels for this asyn-
Specifies whether the output from the command is
chronous line are displayed.
shown at the requesting workstation or printed with the
job's spooled output. More information on this param- *LGLCHLE: The logical channel entries for this X.25
eter is in Appendix A, “Expanded Parameter line are displayed.
Descriptions.” *APPN: The advanced peer-to-peer networking (APPN)
*: Output requested by an interactive job is shown on values for this line are displayed.
the display. Output requested by a batch job is printed *PHYCHAR: The information concerning the physical
with the job's spooled output. characteristics of an asynchronous line is displayed.
*PRINT: The output is printed with the job's spooled *THRESHOLD: The information concerning the
output. threshold values of an IDLC line is displayed.
OPTION *TMRRTY: The timer and retry values for this line are
Specifies the panels to be displayed. displayed.
*ALL: All panels that apply to this specific line type are
displayed. Example
DSPLIND LIND(LINE21)

Chapter 2. OS/400 Command Descriptions P3-159


DSPLIND

This command displays information about the line description the command is entered from a batch job, the output from
named LINE21. The information is shown on the work the display is printed with the job's spooled output.
station display from which the command was submitted. If

P3-160 OS/400 CL Reference - Part 2 (Full Version)


DSPLNK

DSPLNK (Display Object Links) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──┬────────────────────────────────┬──────────────5
55──DSPLNK──┬─────────────────────────────────┬──┬────────────────────────┬───
│ (1) ───────────────┐
┌─\─── │ │ ┌─\──────┐ │ │ ┌─\ALL────────┐ │
└─OBJ(──┴─'object-path-name'─┴──)─┘ └─OUTPUT(──┴─\PRINT─┴──)─┘ (2) ─┼─\ALLDIR─────┼──)─┘
└─OBJTYPE(───
└─object-type─┘
5──┬───────────────────────────┬──┬───────────────────────┬────────────────────────────────────────────────────────────────────5%
│ ┌─\PRV──────┐ │ │ ┌─\PRV──┐ │
└─DETAIL(──┼─\NAME─────┼──)─┘ └─DSPOPT(──┼─\USER─┼──)─┘
├─\BASIC────┤ └─\ALL──┘
└─\EXTENDED─┘
Notes:
1 You can specify a pattern for this path name.

2 A list of the valid OS/400 object types for this command is in Appendix A.

P All parameters preceding this point can be specified in positional form.

Purpose *: Output requested by an interactive job is shown on


the display. Output requested by a batch job is printed
The Display Object Links (DSPLNK) command shows a list with the job's spooled output.
of names of specified objects in directories and options to
*PRINT: The output is printed with the job's spooled
display information about the objects.
output.
For more information about integrated file system commands, OBJTYPE
see the Integrated File System Introduction book. Specifies the object type you want displayed. For a list
of the OS/400 object types that are valid for this param-
Restriction: The user must have *R authority to the direc-
eter, refer to Appendix A, “Expanded Parameter
tory containing the object links and *X to the other directories
Descriptions.”
in the path. Object authority is not required when displaying
the object name only. *ALL: All objects whose name matches the pattern
specified in the OBJ parameter are displayed.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more *ALLDIR: All directory types (DIR, LIB, FLR, database
information about printing the help text, refer to FILE) are displayed.
“Printing CL Command Descriptions” in Chapter 1. object-type: Specify the object type you want displayed.
DETAIL
Optional Parameters Specifies the information you want to see on the Display
OBJ Object Links display.
Specifies which objects are displayed. *PRV: The same information that was displayed when
*: All objects in the current directory are displayed. you ran this command previously is shown. The value
*BASIC is used if you have not used this command or
object-name-pattern: Specify the path name of the the Work with Object Links (WRKLNK) command before.
object or a pattern to match the name of the object to be
shown. The object path name can be either a simple *NAME: Only the name is displayed.
name or a name that is qualified with the name of the *BASIC: The name is displayed along with the type,
directory in which the object is located. A pattern can be type attribute, and text.
specified in the last part of the path name. An asterisk
*EXTENDED: In addition to the basic information noted
(*) matches any number of characters and a question
above, the type field is extended to display more infor-
mark (?) matches a single character. If the path name is
mation about symbolic links and an additional option is
qualified or contains a pattern, it must be enclosed in
available to display hard or symbolic links.
apostrophes. For more information on specifying path
names, refer to Chapter 2, “Path Names (*PNAME).” DSPOPT
Specifies whether to show PC system and hidden
OUTPUT
objects.
Specifies whether the output from the command is
shown at the requesting workstation or printed with the *PRV: The same value is used for this parameter as the
job's spooled output. More information on this param- previous time the command was run by this user. If this
eter is in Appendix A, “Expanded Parameter command has not been used before, *USER is used.
Descriptions.”

Chapter 2. OS/400 Command Descriptions P3-161


DSPLNK

*USER: The PC system and hidden objects are not including the directory (.) and the parent directory (..)
shown. Objects beginning with a period (.) are not dis- entries.
played unless the specified pattern begins with a period
(.).
*ALL: All objects are shown, including the PC system Example
and hidden objects. Objects beginning with a period (.)
DSPLNK OBJ('X/PAY')
are displayed (with asterisk (*) specified for the pattern)
This command displays the object PAY located in directory X
in the current directory.

P3-162 OS/400 CL Reference - Part 2 (Full Version)


DSPLOG

DSPLOG (Display Log) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──DSPLOG──┬───────────────────┬──┬────────────────────────────────────────────────────────────────────────────────────┬───────5
│ ┌─QHST─┐ │ │ ┌─\AVAIL─────┐ ┌─\CURRENT───┐ │
(1) ─┴─start-time─┴──┼────────────┼──)──┬──────────────────────────────────┬─┘
└─LOG(──┴──────┴──)─┘ └─PERIOD(───
├─\BEGIN─────┤ │ ┌─\AVAIL───┐ ┌─\CURRENT─┐ │
└─start-date─┘ └─(──┴─end-time─┴──┼──────────┼──)─┘
├─\END─────┤
└─end-date─┘
(P) ──┬──────────────────────────────────────────┬───────5
5──┬───────────────────────────────────────────────────────────────────┬───
│ ┌─\NONE────────────────────────────────────────────────┐ │ │ ┌─\ALL──────────────────────┐ │
│ │ ┌──
───────────────────────────────────────────────┐ │ │ │ │ ┌──
────────────────────┐ │ │
6 (2)
└─JOB(──┴─────┬─────────────────────────────┬──job-name───┴────┴──)─┘ 6 (3)
└─MSGID(──┴───message-identifier─┴────┴──)─┘
└─┬─────────────┬──user-name/─┘
└─job-number/─┘
5──┬──────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\────────┐ │
└─OUTPUT(──┼─\PRINT───┼──)─┘
└─\PRTWRAP─┘
Notes:
1 *PERIOD contains 2 lists of 2 elements each. *N must be specified for any element that precedes the value to be specified,

to maintain its position in the parameter value sequence.


2 A maximum of 5 repetitions.

3 A maximum of 100 repetitions.

P All parameters preceding this point can be specified in positional form.

Purpose Element 1: Starting Time


One of the following is used to specify the starting time
The Display Log (DSPLOG) command shows the system
at which or after which the data must have been logged.
history log (QHST). The history log contains information
Entries logged before the specified time and date are not
about the operation of the system and the current system
shown.
status.
*AVAIL: The logged data that is available for the speci-
The display contains the messages sent to the log, the date fied starting date is shown.
and time the message was sent, and the name of the job
start-time: Specify the starting time on the specified
that sent it.
starting date that indicates the logged data to be shown.
Note: To see the parameter and value descriptions for this The time is specified in 24-hour format with or without a
command, refer to the online help text. For more time separator as follows:
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. Ÿ With a time separator, specify a string of 5 or 8
digits, where the time separator for the job sepa-
rates the hours, minutes, and seconds. If you issue
Optional Parameters this command from the command line, the string
must be enclosed in apostrophes. If a time sepa-
LOG
rator other than the separator specified for your job
Specifies which of the system logs is shown.
is used, this command fails.
QHST: The system history log QHST is shown.
Ÿ Without a time separator, specify a string of 4 or 6
PERIOD digits (hhmm or hhmmss) where hh = hours, mm =
Specifies the time period covered by the logged minutes, and ss = seconds. Valid values for hh
message data being shown. The values that can be range from 00 through 23. Valid values for mm and
coded for this parameter are specified as two lists with ss range from 00 through 59.
two elements in each list. If PERIOD is not specified,
Element 2: Starting Date
the following values are assumed:
One of the following is used to specify the starting date
PERIOD((\AVAIL \CURRENT) (\AVAIL \CURRENT))
on which or after which the data must have been logged.
Entries logged before the specified date are not shown.

Chapter 2. OS/400 Command Descriptions P3-163


DSPLOG

*CURRENT: The logged data for the current day and \NONE
between the specified starting and ending times (if speci- job-name
fied) is shown. user-name/job-name
job-number/user-name/job-name
*BEGIN: The logged data from the beginning of the log
is shown. More information on this parameter is in Appendix A,
“Expanded Parameter Descriptions.”
start-date: Specify the date convert. The date must be
entered in the format specified by the system values *NONE: No job name is used to indicate which mes-
QDATFMT and, if separators are used, QDATSEP. sages are shown.

Element 3: Ending Time job-name: Specify the names of up to five jobs that are
to have their logged messages shown.
One of the following is used to specify the ending time
before which, or at which, the data must have been user-name: Specify the names of the users of the jobs
logged. that are to have their messages displayed.

*AVAIL: The logged data that is available for the speci- job-number: Specify the numbers of the jobs that are to
fied ending date is shown. The time can be entered as have their logged messages displayed.
either 4 or 6 digits (hhmm or hhmmss) where hh = MSGID
hours, mm = minutes, and ss = seconds. If time separa- Specifies up to 100 message identifiers (if any) of the
tors are used to separate the time values, the character logged messages that are shown. These messages are
string must be enclosed in apostrophes ('hh:mm:ss'). If shown only if they were logged in the period of time
a time separator other than the one specified for the job specified in this command and in the jobs specified, if
is used, the command fails. job names were given in this command.
Note: The values specified for the ending date and *ALL: All logged messages, regardless of their identi-
time are ignored if the output is shown. That is, fiers, are shown if they meet the previous parameters'
all data in the log that was logged on or after the specifications.
specified starting date and time can be shown,
regardless of the ending date and time specified. message-identifier: Specify the identifiers of up to fifty
messages that are shown. (Refer to the description of
end-time: Specify the ending time for the specified the MSGID parameter in the Add Message Description
ending date that determines the logged data that is (ADDMSGD) command description for more information
printed. on message identifiers.)
Element 4: Ending Date To display specific generic types of messages, specify
One of the following is used to specify the ending date the 3-character code that identifies the message file fol-
before which or on which the data must have been lowed by all zeros. For example, CPF0000 specifies
logged. that all CPF messages that meet the specifications of
the previous parameters are shown. If an identifier is
*CURRENT: The current day is the last day for which
specified as pppnnðð, any message beginning with the
logged data is shown.
specified five characters (pppnn) can be shown.
*END: The last day on which data was logged is
shown. If PERIOD(*END) is specified, a time value OUTPUT
other than *AVAIL for end-time is ignored. Specifies whether the output from the command is
shown at the requesting display station or printed with
end-date: Specify the ending date for which logged data the job's spooled output. More information on this
is to be printed. The date must be entered in the format parameter is in Appendix A, “Expanded Parameter
specified by the system values QDATFMT and, if sepa- Descriptions.”
rators are used, QDATSEP.
*: Output requested by an interactive job is shown on
Note: If no output is received after you run the the display. Output requested by a batch job is printed
DSPLOG command with *PRINT specified, the with the job's spooled output.
dates of some message data may be out of
sequence. To print the data in this case, specify: *PRINT: The output is printed with the job's spooled
output. Only one line will be printed for each message
PERIOD((\AVAIL \BEGIN)(\AVAIL \END)).
and only the first 105 characters of the first level
JOB message text will be printed.
Specifies the names of the jobs (if any) whose mes- *PRTWRAP: The output is printed with the job's
sages in the system log are shown. If a job name is not spooled output. If the message does not fit on one line,
qualified, all jobs by that name in the log will have their additional lines are printed to accomodate up to 2000
messages displayed. characters of the first level message text.
A job identifier is a special value or a qualified name
with up to three elements. For example:

P3-164 OS/400 CL Reference - Part 2 (Full Version)


DSPLOG

Examples Example 2: Displaying Logged Messages for September


1988
Example 1: Displaying Logged Messages for Current DSPLOG JOB(MYJOB) PERIOD((\AVAIL ð9ð188)
Date (\AVAIL ð93ð88)) MSGID(CPFðððð)
DSPLOG LOG(QHST)
This command displays all CPF messages, in the history log
This command shows all the logged messages (and their for MYJOB, that were logged during September 1988.
associated data) that are available in the history log for the
current date.

Chapter 2. OS/400 Command Descriptions P3-165


DSPMFSINF

DSPMFSINF (Display Mounted File System Information) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─┬────────────────────────┬─────────────────────────────────────────────────────5%
55──DSPMFSINF──OBJ(──'object-path-name-'──)────
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Optional Parameter


The Display Mounted File System Information (DSPMFSINF) OUTPUT
command displays information about a mounted file system. Specifies whether the output from the command is
shown at the requesting work station or printed with the
Note: To see the parameter and value descriptions for this
job's spooled output.
command, refer to the online help text. For more
information about printing the help text, refer to *: Output requested by an interactive job is shown on
“Printing CL Command Descriptions” in Chapter 1. the display. Output requested by a batch job is printed
with the job's spooled output.

Required Parameter *PRINT: The output is printed with the job's spooled
output.
OBJ
Specifies the path name of an object that is within the
mounted file system whose statistics are to be displayed.
Examples
Any object in the mounted file system can be specified.
Example 1: Displaying Statistics of a Mounted File
For example, it can be a directory (*DIR) or a stream file
System
(*STMF).
DSPMFSINF OBJ('/jsmith/file1')
This command can also be issued using the following
alternative command name: This command displays the statistics for the mounted file
system that contains /jsmith/file1.
Ÿ STATFS

For more information about Network File System com- Example 2: Displaying '/QSYS.LIB' File System Statistics
mands, see OS/400 Network File System Support DSPMFSINF OBJ('/QSYS.LIB/MYLIB.LIB/MYFILE.FILE')
SC41-5714.
This command displays the statistics for the /QSYS.LIB file
system that contains *FILE object MYFILE in library MYLIB.

P3-166 OS/400 CL Reference - Part 2 (Full Version)


DSPMNUA

DSPMNUA (Display Menu Attributes) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ─┬────────────────────────┬─────────────────────────────────────────────5%
55──DSPMNUA──MENU(──┼───────────────┼──menu-name──)────
├─\CURLIB/──────┤ │ ┌─\──────┐ │
└─library-name/─┘ └─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose The name of the menu can be qualified by one of the


following library values:
The Display Menu Attributes (DSPMNUA) command shows
the following: *LIBL: All libraries in the job's library list are
searched until the first match is found.
Ÿ Menu type
*CURLIB: The current library for the job is
Ÿ Command line length searched. If no library is specified as the current
Ÿ Display function keys on the menu library for the job, the QGPL library is used.
Ÿ Program name and library for program menus library-name: Specify the name of the library to be
searched.
Ÿ Display file name and library for free-format menus
Ÿ Message file name and library for free-format menus menu-name Specify the name of the menu whose attri-
butes are displayed.
Ÿ The type of command line to be shown for display file
menus:
Optional Parameter
– *LONG
– *SHORT OUTPUT
Specifies whether the output is directed to the display
– *NONE (an option line is used) station screen or to a printer. More information on this
Ÿ Current library parameter is in Appendix A, “Expanded Parameter
Descriptions.”
Ÿ Product library
*: Output requested by an interactive job is shown on
Ÿ Descriptive text
the display. Output requested by a batch job is printed
Restriction: The user must have *USE authority for the with the job's spooled output.
menu whose attributes are being shown and *USE authority *PRINT: The output is printed with the job's spooled
for the library where the menu is located. output.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more Example
information about printing the help text, refer to
DSPMNUA MENU(PAYROLL)
“Printing CL Command Descriptions” in Chapter 1.
This command shows the attributes of a menu named
Required Parameter PAYROLL at the display station (if the command is running
interactively). The menu is found by searching the library list
MENU (*LIBL default value).
Specifies the qualified name of the menu whose attri-
butes are displayed.

Chapter 2. OS/400 Command Descriptions P3-167


DSPMOD

DSPMOD (Display Module) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
55──DSPMOD──MODULE(──┼───────────────┼──module-name──)──┬────────────────────────────────┬──────────────────────────────────────5
├─\CURLIB/──────┤ │ ┌─\ALL───────────┐ │
└─library-name/─┘ └─DETAIL(──┴─┬─\BASIC─────┬─┴──)─┘
├─\SIZE──────┤
├─\EXPORT────┤
├─\IMPORT────┤
├─\PROCLIST──┤
├─\REFSYSOBJ─┤
└─\COPYRIGHT─┘
5──┬──────────────────────────────┬─── (P) ──┬────────────────────────────────────────────────────────┬──────────────────────────────5
│ ┌─\────────┐ │ │ ┌─\LIBL/────────┐ │
(1, 2) ─┼──────────┼──)─┘
└─OUTPUT(───── └─OUTFILE(──┼───────────────┼────database-file-name────)─┘
├─\PRINT───┤ ├─\CURLIB/──────┤
└─\OUTFILE─┘ └─library-name/─┘
5──┬───────────────────────────────────────────┬───────────────────────────────────────────────────────────────────────────────5%
│ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │
└─OUTMBR(──┴─member-name─┴──┴─\ADD─────┴──)─┘
Notes:
1 If OUTPUT(*OUTFILE) is specified, a file name must be specified for the OUTFILE parameter.

2 If OUTPUT(*OUTFILE) is specified, a detail other than *ALL must be specified on the DETAIL parameter and only one

DETAIL may be specified.


P All parameters preceding this point can be specified in positional form.

Purpose module-name: Specify the name of the module for


which information is displayed.
The Display Module (DSPMOD) command displays informa-
tion about a module. The display includes information about
the compiler, the source from which the module was created, Optional Parameters
the processing attributes of the module, and the size of the DETAIL
module. Specifies the set of information to be displayed for the
module. More than one value can be specified, but
Restriction: To use this command, you must have *USE
*ALL must be specified as a single value. DETAIL(*ALL)
authority to the module being displayed and *EXECUTE
is valid only when information is displayed or printed. It
authority to the library in which the module is stored.
is not valid if *OUTFILE is chosen for OUTPUT.
Note: To see the parameter and value descriptions for this
*ALL: All the information applicable to the specified
command, refer to the online help text. For more
module is displayed or printed.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. *BASIC: The basic module information, module compat-
ibility section, and SQL information is shown.

Required Parameters *SIZE: The size and size limits for this module are
shown.
MODULE
*EXPORT: The symbols and type defined in this
Specifies the qualified name of the module for which
module that are exported to other modules are shown.
information is displayed.
*IMPORT: The symbols and type defined externally to
The name of the module can be qualified by one of the
this module are shown.
following library values:
*PROCLIST: A list of the procedure names with their
*LIBL: All libraries in the job's library list are type is shown.
searched until the first match is found.
*REFSYSOBJ: A list of the system objects referred to
*CURLIB: The current library for the job is by this module when the module is bound into a bound
searched. If no library is specified as the current program or service program is shown.
library for the job, the QGPL library is used.
*COPYRIGHT: Copyright information for this module is
library-name: Specify the name of the library to be shown.
searched.

P3-168 OS/400 CL Reference - Part 2 (Full Version)


DSPMOD

OUTPUT The IBM-supplied database files and their record formats


Specifies whether the output from this command is dis- are as follows:
played, printed, or directed to a database file. More
information on this parameter is in Appendix A, Detail File Record Format
“Expanded Parameter Descriptions.” *BASIC QABNDMBA QBNDMBAS
*SIZE QABNDMSI QBNDMSIZ
*: Output requested by an interactive job is shown on *EXPORT QABNDMEX QBNDMEXP
the display. Output requested by a batch job is printed *IMPORT QABNDMIM QBNDMIMP
with the job's spooled output. *PROCLIST QABNDMPR QBNDMPRO
*REFSYSOBJ QABNDMRE QBNDMREF
*PRINT: The output is printed with the job's spooled
*COPYRIGHT QABNDMCO QBNDMCOP
output.
*OUTFILE: The output is directed to the database file The name of the database file can be qualified by one of
specified on the OUTFILE parameter. the following library values:
Note: When a procedure name longer than 256 charac- *LIBL: All libraries in the job's library list are
ters is encountered and the value *OUTFILE is searched until the first match is found.
specified, the last 253 characters of the proce-
*CURLIB: The current library for the job is
dure name are placed in the output file and are
searched. If no library is specified as the current
preceded by less than (<<<) characters. The
library for the job, the QGPL library is used.
less than (<<<) characters indicate that this is
only a partial name. The diagnostic message library-name: Specify the name of the library to be
CPD5D12, which indicates that not all available searched.
information is returned, is sent to the job log.
database-file-name: Specify the name of the database
The same message is sent as a status message
file that receives the output of the display.
to the calling program of the command pro-
cessing program (CPP) that can be monitored. OUTMBR
You can use the Retrieve Module Information Specifies the name of the database file member to which
(QBNRMODI) or the List Module Information the output is directed. If a member already exists, the
(QBNLMODI) APIs to find the complete name of system uses the second element of this parameter to
the procedure. determine whether the member is cleared before the
Note: DETAIL(*ALL) is not valid when new records are added. If the member does not exist
OUTPUT(*OUTFILE) is specified. and a member name is not specified, the system creates
a member with the name of the output file specified on
OUTFILE the OUTFILE parameter. If an output file member name
Specifies the qualified name of the database file to is specified, but the member does not exist, the system
which the output of the display is directed. If the creates it.
OUTFILE does not exist, this command creates a data-
Element 1: Member to Receive Output
base file in the specified library. If the file is created, the
text is "Output file for DSPMOD". The public authority of *FIRST: The first member in the file receives the output.
the file is the same as the create authority specified for If OUTMBR(*FIRST) is specified and the member does
the library in which the file is created. The record format not exist, the system creates a member with the name of
of the output file will be the same as that used in the the file specified on the OUTFILE parameter.
IBM-supplied database file. member-name: Specify the file member that receives
Note: When a procedure name longer than 256 charac- the output. If OUTMBR(member-name) is specified and
ters is encountered and the value *OUTFILE is the member does not exist, the system creates it.
specified, the last 253 characters of the proce- Element 2: Operation to Perform on Member
dure name are placed in the output file and are
preceded by the characters "<<<". The "<<<" *REPLACE: The system clears the existing member
characters indicate that this is only a partial and adds the new records.
name. The diagnostic message CPD5D12, *ADD: The system adds the new records to the end of
which indicates that not all available information the existing records.
is returned, is sent to the job log. The same
message is sent as a status message to the
calling program of the command processing Example
program (CPP) that can be monitored. You can DSPMOD MODULE(MYMOD)
use the Retrieve Module Information
(QBNRMODI) or the List Module Information This command displays module object MYMOD from the
(QBNLMODI) APIs to find the complete name of library list.
the procedure.

Chapter 2. OS/400 Command Descriptions P3-169


DSPMODD

DSPMODD (Display Mode Description) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ────────────────────────────────────────────────────5%
55──DSPMODD──MODD(──mode-description-name──)──┬────────────────────────┬───
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose OUTPUT
Specifies whether the output from the command is
The Display Mode Description (DSPMODD) command dis- shown at the requesting workstation or printed with the
plays a mode description for advanced-program-to-program job's spooled output. More information on this param-
communications (APPC) devices. Output is directed to a eter is in Appendix A, “Expanded Parameter
display or a spooled printer file as indicated on the OUTPUT Descriptions.”
parameter and job type.
*: Output requested by an interactive job is shown on
Note: To see the parameter and value descriptions for this the display. Output requested by a batch job is printed
command, refer to the online help text. For more with the job's spooled output.
information about printing the help text, refer to
*PRINT: The output is printed with the job's spooled
“Printing CL Command Descriptions” in Chapter 1.
output.

Required Parameters Example


MODD DSPMODD MODD(CICS2)
Specifies the name of the mode description.
This command displays information about mode description
CICS2. If the command is entered from a batch job, the
Optional Parameters output from the display is printed with the job's spooled
output.

P3-170 OS/400 CL Reference - Part 2 (Full Version)


DSPMODSRC

DSPMODSRC (Display Module Source) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──DSPMODSRC──────────────────────────────────────────────────────────────────────────────────────────────────────────────────5%

Purpose Example
The Display Module Source (DSPMODSRC) command DSPMODSRC
allows the user to show the source debug displays for
debugging bound programs. This command shows the source debug displays for pro-
grams that are to be debugged.
There are no parameters for this command.

Chapter 2. OS/400 Command Descriptions P3-171


DSPMODSTS

DSPMODSTS (Display Mode Status) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ────────────────────────────────5%
55──DSPMODSTS──DEV(──device-name──)──┬─────────────────────────┬──┬────────────────────────┬───
│ ┌─\ALL──────┐ │ │ ┌─\──────┐ │
└─MODE(──┼─BLANK─────┼──)─┘ └─OUTPUT(──┴─\PRINT─┴──)─┘
└─mode-name─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose BLANK: The mode name consisting of 8 blank charac-


ters is used.
The Display Mode Status (DSPMODSTS) command displays
mode-name: Specify the name (up to 8 characters) of
the status of all modes associated with an APPC device
the mode whose status is being shown for the specified
description. The display shows the status of the APPC
device. The mode name may contain the characters A
device, the current number of source, target, and detached
through Z, 0 through 9, $, #, and @.
conversations in use, and configured and operational session
maximum values. OUTPUT
Specifies whether the output from the command is
Restriction: This command is valid only for APPC device shown at the requesting work station or printed with the
descriptions. job's spooled output. More information on this param-
Note: To see the parameter and value descriptions for this eter is in Appendix A, “Expanded Parameter
command, refer to the online help text. For more Descriptions.”
information about printing the help text, refer to *: Output requested by an interactive job is shown on
“Printing CL Command Descriptions” in Chapter 1. the display. Output requested by a batch job is printed
with the job's spooled output.
Required Parameters *PRINT: The output is printed with the job's spooled
output.
DEV
Specifies the name of the APPC device description.
Example
Optional Parameters DSPMODSTS DEV(MINN2) MODE(CICS2)

MODE This command shows the status of the mode CICS2 used by
Specifies the name of the mode whose status is being the device MINN2. If the command is entered from a batch
shown. job, the output from the display is printed with the job's
spooled output.
*ALL: All the modes used by the specified device are
shown.

P3-172 OS/400 CL Reference - Part 2 (Full Version)


DSPMSG

DSPMSG (Display Messages) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──┬────────────────────────┬──┬───────────────────────┬───5
55──DSPMSG──┬─────────────────────────────────────────────────────┬───
│ ┌─\WRKUSR───────────────────────────────┐ │ │ ┌─\ALL──┐ │ │ ┌─\LAST──┐ │
└─MSGQ(──┼─\SYSOPR───────────────────────────────┼──)─┘ └─MSGTYPE(──┼─\INFO─┼──)─┘ └─START(──┴─\FIRST─┴──)─┘
├─\USRPRF───────────────────────────────┤ ├─\INQ──┤
├─\WRKSTN───────────────────────────────┤ └─\COPY─┘
│ ┌─\LIBL/────────┐ │
└─┼───────────────┼──message-queue-name─┘
├─\CURLIB/──────┤
└─library-name/─┘
5──┬────────────────────────────┬──┬──────────────────────────┬──┬───────────────────────────┬─────────────────────────────────5%
│ ┌─ðð────────────┐ │ │ ┌─\────────┐ │ │ ┌─\PRV──────┐ │
└─SEV(──┼─\MSGQ─────────┼──)─┘ └─OUTPUT(──┼─\PRINT───┼──)─┘ └─ASTLVL(──┼─\USRPRF───┼──)─┘
└─severity-code─┘ └─\PRTWRAP─┘ ├─\BASIC────┤
└─\INTERMED─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose information about printing the help text, refer to


“Printing CL Command Descriptions” in Chapter 1.
The Display Messages (DSPMSG) command is used by the
display station user to show the messages received at the
specified message queue. If the message queue is not allo- Optional Parameters
cated to the job in which this command is entered or to any MSGQ
other job, it is implicitly allocated by this command for the Specifies the qualified name of the message queue from
duration of the command. When the messages are shown, which messages are shown.
options are also shown that allow the user to either remove
one or more messages from the queue or to enter a reply to Note: The values *WRKUSR, *SYSOPR, and
each inquiry message. *WRKSTN can be used only when the user is in
an interactive job.
Note: Refer to the section entitled “Handling Messages” in
the System Operation book for a description of how *WRKUSR: Messages are shown from the work
to print a single message description or a group of station's message queue. After exiting this display, the
message descriptions. message queue for the job's user profile is shown. If
there are no messages on the work station message
Restrictions: queue, only the user profile message queue is shown.
1. DSPMSG cannot be specified when another job has *SYSOPR: Messages from the system operator
already allocated the message queue by specifying the message queue (QSYSOPR) are shown.
ALCOBJ command operating in the *EXCL lock state. *USRPRF: Messages from the current user profile
2. The DSPMSG command allows the user to see, but not message queue are displayed.
remove, messages for the job when the message queue *WRKSTN: Messages are shown from the work
is in the *BREAK or *NOTIFY mode for another job. station's own message queue.
3. When the message queue is in the *BREAK mode for The name of the message queue can be qualified by
another job, the break handling program for the one of the following library values:
message queue determines whether the user is allowed
to respond to inquiry messages. If PGM(*DSPMSG) is *LIBL: All libraries in the job's library list are
specified, the user can reply to inquiry messages, but if searched until the first match is found.
PGM(user-program) is specified, no reply to inquiry mes- *CURLIB: The current library for the job is
sages is allowed. searched. If no library is specified as the current
4. If multiple jobs show the same inquiry message, and all library for the job, the QGPL library is used.
jobs reply to the message, only the first reply to the library-name: Specify the name of the library to be
message is valid. Subsequent replies from other jobs searched.
cause error messages to be issued.
message-queue-name: Specify the name of the
Note: To see the parameter and value descriptions for this
message queue from which messages are shown. The
command, refer to the online help text. For more
system operator can specify QSYSOPR to show mes-
sages on the system operator message queue.

Chapter 2. OS/400 Command Descriptions P3-173


DSPMSG

MSGTYPE on this parameter is in Appendix A, “Expanded Param-


Specifies the type of messages in the message queue eter Descriptions.”
that are shown.
OUTPUT
*ALL: All messages that are in the message queue are Specifies whether the output from the command is
shown. shown at the requesting display station or listed with the
*INFO: Only informational messages (those not job's spooled output on a printer. More information on
requiring a reply) are shown. this parameter is in Appendix A, “Expanded Parameter
Descriptions.”
*INQ: Only inquiry messages (those requiring a reply)
are shown. *: Output requested by an interactive job is shown on
the display. Output requested by a batch job is printed
*COPY: Copies of the inquiry messages that were sent
with the job's spooled output. Immediate messages can
to other message queues and still require replies are
be 512 bytes long.
shown.
*PRINT: The output is printed with the job's spooled
START | output. Impromptu messages and predefined messages
Specifies whether the newest messages or the oldest | are truncated to 105 characters.
messages in the message queue (of those specified by
PRTWRAP: The output is printed with the job's spooled
the MSGTYPE and SEV parameters) are shown first.
output without truncation.
The display station user can roll the display up or down
to see other messages if the message list occupies ASTLVL
more than one display screen. This parameter is Specifies the user interface to display.
ignored if the output is directed to a spooled printer file.
*PRV: The previous user interface used is displayed.
*LAST: If the intermediate view (Display Message) is
*USRPRF: The user interface specified in the current
displayed, the last (newest) message on the message
user profile is used.
queue is shown on the bottom line of the display. The
display station user can press the Roll Down key to *BASIC: The Operational Assistant* user interface is
show older messages. used. This user interface separates messages into two
categories: (1) messages needing a reply and (2) mes-
If the Basic view (Work with Messages) is displayed ,
sages not needing a reply. New messages are shown
the last (newest) message on the MSGQ is shown on
at the top of each message list.
the top line of the display. The display station user can
press the Roll Up key to show older messages. *INTERMED: The system user interface is used.
*FIRST: If the intermediate view (Dispaly Messages) is Note: The DSPMSG command documentation assumes the
displayed, the first (oldest) message on the message *INTERMED user interface is shown. If the *BASIC
queue is shown on the top line of the display. The user interface is shown, see the documentation for
display station user can press the Roll Up key to show the Work with Messages (WRKMSG) command.
newer messages.
If the Basic view (Work with Messages) is displayed, the Examples
first (oldest) message on the MSGQ is shown on the
bottom of the display. The display station user can Example 1: Displaying Messages From Work Station
press the Roll Down ket to show newer messages. Message Queue and User Profile Message Queue
SEV DSPMSG
Specifies the severity code of the message. The
severity code indicates the severity level of the condition This command displays messages in the requester's work
that causes the message to be sent. station message queue followed by the user profile message
queue. If there are no messages in the work station queue,
00: All messages in the specified message queue are the user profile message queue is shown immediately.
shown.
*MSGQ: Messages with a severity code greater than or Example 2: Displaying Informational Messages
equal to the severity code specified for the message DSPMSG MSGQ(SMITH) MSGTYPE(\INFO)
queue are shown.
This command displays, at the requester's work station, any
severity-code: Specify a value, ranging from 00 through informational messages in the message queue named
99, that specifies the minimum severity code that a SMITH.
message must have to still be shown. More information

P3-174 OS/400 CL Reference - Part 2 (Full Version)


DSPMSGD

DSPMSGD (Display Message Descriptions) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─────5
55──DSPMSGD──┬─────────────────────────────────────────────────┬──┬────────────────────────────────────────────────────┬───
│ ┌─\FIRST──────┐ ┌─\ONLY───────┐ │ │ ┌─\LIBL/────────┐ ┌─QCPFMSG───────────┐ │
└─RANGE(──┬─┴─lower-value─┴──┼─────────────┼─┬──)─┘ └─MSGF(──┼───────────────┼──┴─message-file-name─┴──)─┘
│ ├─\LAST───────┤ │ ├─\CURLIB/──────┤
│ └─upper-value─┘ │ ├─\USRLIBL/─────┤
└─\ALL─────────────────────────────┘ └─library-name/─┘
5──┬────────────────────────┬──┬──────────────────────┬──┬────────────────────────┬────────────────────────────────────────────5%
│ ┌─\FULL──┐ │ │ ┌─\YES─┐ │ │ ┌─\──────┐ │
└─DETAIL(──┴─\BASIC─┴──)─┘ └─FMTTXT(──┴─\NO──┴──)─┘ └─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Element 2: Ending Message Identifier:


The second of the two values in the RANGE parameter
The Display Message Descriptions (DSPMSGD) command
specifies the message identifier for the ending (last)
shows detailed information about the messages in a
message description to print. This value is ignored if
message file. The descriptions of specific messages or a
OUTPUT(*) and DETAIL(*BASIC) is specified.
range of messages in one message file can be specified by
their identifiers, or all messages in one message file can be *ONLY: Only the description with the message identifier
specified. specified as a starting message identifier is shown or
printed if *FULL is specified on the DETAIL parameter.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more *LAST: The last message in the file is the last one
information about printing the help text, refer to whose description is shown or printed.
“Printing CL Command Descriptions” in Chapter 1. upper-value: Specify the 7-character identifier of the last
message description to print.
Optional Parameters Other Single Values:
RANGE *ALL: All message descriptions in the message file
Specifies the range of message identifiers in the speci- specified by the MSGF parameter are shown or printed.
fied message file for which message descriptions are This value can only be specified on Element 1 of this
shown. parameter.
All message descriptions in the message file specified MSGF
by the MSGF parameter are shown or printed when Specifies the qualified name of the message file from
*ALL is specified on this parameter. which the message descriptions are taken.
If the starting message identifier is not specified, the The name of the message file can be qualified by one of
message descriptions begin with the first message in the the following library values:
specified message file. If the ending message identifier
is not specified, the default value, *ONLY, is used, and *LIBL: All libraries in the job's library list are
only the description of the starting message identifier is searched until the first match is found.
shown or printed. *CURLIB: The current library for the job is
Note: The ending message identifier is ignored when searched. If no library is specified as the current
DETAIL(*BASIC) and OUTPUT(*) (interactive library for the job, the QGPL library is used.
display) are specified. *USRLIBL: Only the libraries in the user portion of
Element 1: Starting Message Identifier: the job's library list are searched.

The first of the two values in the RANGE parameter library-name: Specify the name of the library to be
specifies the message identifier of the first message searched.
description to show or print. QCPFMSG: Message descriptions are taken from the
*FIRST: The first message in the file specified by the system message file, QCPFMSG.
MSGF parameter is the first one whose description is message-file-name: Specify the name of the message
shown or printed. file to use.
lower-value: Specify the 7-character identifier of the first
message description to show or print.

Chapter 2. OS/400 Command Descriptions P3-175


DSPMSGD

DETAIL *: Output requested by an interactive job is shown on


Specifies the amount of detail about the message to the display. Output requested by a batch job is printed
show or print. with the job's spooled output.
*FULL: Detailed message descriptions are shown or *PRINT: The output is printed with the job's spooled
printed. If OUTPUT(*PRINT) is specified, the detailed output.
descriptions are printed. If OUTPUT(*) is specified, a
menu is shown from which the user can select which
details to view.
Examples
*BASIC: A list of the specified message identifiers, their Example 1: Displaying or Printing Descriptions
severity, and first-level messages are shown or printed. DSPMSGD RANGE(CPF11ðð CPF36ðð)
If the user is working from an interactive display, the MSGF(QSYS/QCPFMSG)
user can choose to show or print detailed descriptions of
messages selected from the list. If this command is entered from a display station, the
descriptions of the specified messages are shown on the
FMTTXT display. If this command is entered from a batch job, the
Specifies whether the message text is formatted. descriptions of the messages are sent to the job's spooled
*YES: The message text is formatted. output queue.
*NO: The message text is unformatted. Example 2: Printing Message Descriptions
OUTPUT DSPMSGD RANGE(\FIRST IDUð571)
Specifies whether the output from the command is MSGF(QIDU/QIDUMSG) FMTTXT(\NO)
shown at the requesting work station or printed with the OUTPUT(\PRINT)
job's spooled output. More information on this param-
eter is in Appendix A, “Expanded Parameter This command prints the message descriptions for message
Descriptions.” identifiers in the file that are in the following range: from the
first message in the QIDUMSG message file through the
message whose identifier is IDU0571. The message is
unformatted.

P3-176 OS/400 CL Reference - Part 2 (Full Version)


DSPM36

DSPM36 (Display AS/400 Advanced 36 Machine) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ────────────────────────────────────────────5%
55──DSPM36──M36(──┼───────────────┼──machine-name──)──┬────────────────────────┬───
├─\CURLIB/──────┤ │ ┌─\──────┐ │
└─library-name/─┘ └─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose library-name: Specify the name of the library to be


searched.
The Display AS/400 Advanced 36 Machine (DSPM36)
command shows the current machine and configuration infor- machine-name: Specify the name of the *M36 object to
mation for an *M36 object. be displayed.

Note: If the *M36 object does not contain any configuration


Optional Parameter
information, the status of the machine will be shown
as 'Incomplete'. OUTPUT
Note: To see the parameter and value descriptions for this Specifies whether the output from the command is
command, refer to the online help text. For more shown at the requesting workstation or printed with the
information about printing the help text, refer to job's spooled output. More information on this param-
“Printing CL Command Descriptions” in Chapter 1. eter is in Appendix A, “Expanded Parameter
Descriptions.”
*: The output requested by an interactive job is shown
Required Parameter on the display. The output requested by a batch job is
M36 printed with the job's spooled output.
Specifies the qualified name of the *M36 object. *PRINT: The output is printed with the job's spooled
The name of the *M36 object can be qualified by one of output.
the following library values:

*LIBL: All libraries in the job's library list are Example


searched until the first match is found. DSPM36 M36(MY36)
*CURLIB: The current library for the job is
This command shows all current machine and configuration
searched. If no library is specified as the current
information for the *M36 object named MY36. The *M36
library for the job, the QGPL library is used.
object is found using the library list for the job. The default
value for the OUTPUT parameter is used.

Chapter 2. OS/400 Command Descriptions P3-177


DSPM36CFG

DSPM36CFG (Display AS/400 Advanced 36 Machine Configuration) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ────────────────────────────────5%
55──DSPM36CFG──M36CFG(──┼───────────────┼──configuration-name──)──┬────────────────────────┬───
├─\CURLIB/──────┤ │ ┌─\──────┐ │
└─library-name/─┘ └─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose configuration-name: Specify the name of the *M36CFG


object to be displayed.
The Display AS/400 Advanced 36 Machine Configuration
(DSPM36CFG) command shows the current configuration
information for an *M36CFG object. Optional Parameter
Note: To see the parameter and value descriptions for this OUTPUT
command, refer to the online help text. For more Specifies whether the output from the command is
information about printing the help text, refer to shown at the requesting workstation or printed with the
“Printing CL Command Descriptions” in Chapter 1. job's spooled output. More information on this param-
eter is in Appendix A, “Expanded Parameter
Descriptions.”
Required Parameter
*: The output requested by an interactive job is shown
M36CFG on the display. The output requested by a batch job is
Specifies the qualified name of the *M36CFG object. printed with the job's spooled output.
The name of the *M36CFG object can be qualified by *PRINT: The output is printed with the job's spooled
one of the following library values: output.
*LIBL: All libraries in the job's library list are
searched until the first match is found. Example
*CURLIB: The current library for the job is DSPM36CFG M36CFG(TESTLIB/TESTCFG)
searched. If no library is specified as the current
library for the job, the QGPL library is used. This command shows all current configuration information for
the *M36CFG object named TESTCFG in library TESTLIB.
library-name: Specify the name of the library to be
searched.

P3-178 OS/400 CL Reference - Part 2 (Full Version)


DSPNCK

DSPNCK (Display Nickname) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──DSPNCK──┬─────────────────────────────────────┬──┬─────────────────────┬──┬──────────────────────────────────┬──────────────5
│ ┌─\ALL─────┐ ┌─\PRV─────┐ │ │ ┌─\ALL──┐ │ │ ┌─\ALL──────────────┐ │
└─NCK(──┴─nickname─┴──┼─\ALL─────┼──)─┘ └─TYPE(──┼─\USER─┼──)─┘ └─OWNER(──┼─\CURRENT──────────┼──)─┘
├─\PRIVATE─┤ └─\LIST─┘ └─user-profile-name─┘
└─\PUBLIC──┘
(P) ──┬──────────────────────────────────────────────────────┬────────────────────────────────────5
5──┬──────────────────────────┬───
│ ┌─\────────┐ │ │ ┌─\LIBL/────────┐ │
└─OUTPUT(──┼─\PRINT───┼──)─┘ (1) ─┼───────────────┼──database-file-name──)─┘
└─OUTFILE(───
└─\OUTFILE─┘ ├─\CURLIB/──────┤
└─library-name/─┘
5──┬───────────────────────────────────────────┬───────────────────────────────────────────────────────────────────────────────5%
│ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │
└─OUTMBR(──┴─member-name─┴──┼──────────┼──)─┘
└─\ADD─────┘
Notes:
1 This parameter is required when OUTPUT(*OUTFILE) is specified.

P All parameters preceding this point can be specified in positional form.

Purpose *ALL: All nicknames in the system distribution directory


are directed for output.
The Display Nickname (DSPNCK) command is used to
nickname: Specify the nickname for which detailed
display, print, or create a database output file for nicknames
information is to be directed for output.
in the system distribution directory.
Element 2: Nickname Access
A nickname is a short version of either a directory entry or a
*PRV: The last access specified by the current user for
distribution list name. You can specify a nickname instead of
displaying, selecting, or working with nicknames is used.
the full directory entry or distribution list name on many
OfficeVision displays. More information about nicknames is *ALL: All of the nicknames to which you have access
in the SNA Distribution Services book. are directed for output. This includes the private nick-
names that you own and all of the public nicknames in
Output from this command is directed as follows: the system distribution directory.
Ÿ For displayed output, the default is to display a list of all *PRIVATE: The private nicknames that you own are
nicknames. When a nickname is specified, detailed directed for output.
information on that nickname only is displayed.
*PUBLIC: All of the public nicknames in the system dis-
Ÿ For printed or database file output, the default is to write tribution directory are directed for output.
all nicknames to which the user has access. When a
nickname is specified, detailed information on that nick- TYPE
name only is written to the output file. Specifies the type of nicknames (user or list) to display,
print, or write to a database file.
Restriction: You must be the owner to display a private *ALL: All nicknames of both the user and list types are
nickname. No special authority is needed to display a directed for output.
private nickname that you own or a public nickname.
*USER: The user nicknames are directed for output.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more *LIST: The list nicknames are directed for output.
information about printing the help text, refer to OWNER
“Printing CL Command Descriptions” in Chapter 1. Specifies the owner of the nicknames to display, print, or
write to a database file.
Optional Parameters *ALL: The nicknames owned by all user profiles are
directed for output. This does not include the private
NCK
nicknames to which the user does not have access.
Specifies the nicknames to display, print, or write to a
database file. *CURRENT: The nicknames owned by the current user
are directed for output.
Element 1: Nickname
user-profile-name: Specify the user profile of the owner
whose nicknames are to be directed for output.

Chapter 2. OS/400 Command Descriptions P3-179


DSPNCK

OUTPUT the OUTFILE parameter. If an output file member name


Specifies whether the output from the command is is specified, but the member does not exist, the system
shown at the requesting work station, printed with the creates it.
job's spooled output, or written to a database file.
Element 1: Member to Receive Output
*: The output requested by an interactive job is shown
*FIRST: The first member in the file receives the output.
on the display. If the command is run as part of a batch
If OUTMBR(*FIRST) is specified and the member does
job, the output is printed with the job's spooled output.
not exist, the system creates a member with the name of
*PRINT: The output is printed with the job's spooled the file specified on the OUTFILE parameter.
output.
member-name: Specify the file member that receives
*OUTFILE: The output is directed to the database file the output. If OUTMBR(member-name) is specified and
specified on the OUTFILE parameter. the member does not exist, the system creates it.

OUTFILE Element 2: Action on Member


Specifies the name of the database file to which output *REPLACE: The system clears the existing member
is to be directed. If the file does not exist, this command and adds the new records.
creates the database file in the specified library. Text for
*ADD: The system adds the new records to the end of
the created file is "OUTFILE for DSPNCK" and the public
the existing records.
authority is *EXCLUDE.
More information on defining the format of database
output files is in the Office Services Concepts and Examples
Programmer’s Guide book.
Example 1: Displaying a List of Nicknames
Note: This parameter is required when
DSPNCK NCK(\ALL \PRIVATE)
OUTPUT(*OUTFILE) is specified.
The name of the database file can be qualified by one of This command shows a list of private nicknames to the
the following library values: owner of the nicknames. The owner can request to show or
print additional information for the nicknames shown.
*LIBL: All libraries in the job's library list are
searched until the first match is found. Example 2: Printing a List of Nicknames
*CURLIB: The current library for the job is DSPNCK NCK(MANAGER \PRIVATE) OUTPUT(\PRINT)
searched. If no library is specified as the current
library for the job, the QGPL library is used. This command prints detailed information on the user's
private nickname MANAGER.
library-name: Specify the name of the library to be
searched. Example 3: Directing Nicknames to a Database File
database-file-name: Specify the name of the database DSPNCK NCK(\ALL \PUBLIC) OUTPUT(\OUTFILE)
file to receive the output. If the file does not exist, it is OUTFILE(ALLNICKS) OUTMBR(\FIRST \REPLACE)
created in the specified library. If the file does not exist
and no library is specified, or if the file is qualified with This command directs one record for each public nickname
*LIBL and the system cannot find the file, the database in the directory to the database file ALLNICKS. If this file is
file is created in the user default library. The user default not found in the library list (the default library qualifier), it is
library is specified in the user profile of the current user. created in the user's default library or in the QGPL library if
If no default library is specified in the user profile, the no user default library is specified.
QGPL library is used.
Example 4: Directing Nicknames for an Owner to a Data-
OUTMBR base File
Specifies the name of the database file member to which DSPNCK NCK(\ALL \PUBLIC) OWNER(CDJONES)
the output is directed. If a member already exists, the OUTFILE(NICKNAME/CDJONES) OUTMBR(\FIRST \REPLACE)
system uses the second element of this parameter to
determine whether the member is cleared before the This command directs one record for each public nickname
new records are added. If the member does not exist owned by the user whose user profile is CDJONES to the
and a member name is not specified, the system creates database file CDJONES in the library NICKNAME. If this file
a member with the name of the output file specified on is not found in the library NICKNAME, it is created.

P3-180 OS/400 CL Reference - Part 2 (Full Version)


DSPNETA

DSPNETA (Display Network Attributes) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─────────────────────────────────────────────────────────────────────────────────────5%
55──DSPNETA──┬────────────────────────┬───
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose eter is in Appendix A, “Expanded Parameter


Descriptions.”
The Display Network Attributes (DSPNETA) command dis-
*: Output requested by an interactive job is shown on
plays the network attributes of the system.
the display. Output requested by a batch job is printed
Note: To see the parameter and value descriptions for this with the job's spooled output.
command, refer to the online help text. For more
*PRINT: The output is printed with the job's spooled
information about printing the help text, refer to
output.
“Printing CL Command Descriptions” in Chapter 1.

Example
Optional Parameters
DSPNETA OUTPUT(\)
OUTPUT
Specifies whether the output of the command is dis- If the job is interactive, this command displays the network
played at the requesting work station or printed with the attributes of the system at the work station. If the job is
job's spooled output. More information on this param- batch, the network attributes are printed with the job's
spooled output.

Chapter 2. OS/400 Command Descriptions P3-181


DSPNODGRP

DSPNODGRP (Display Node Group) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ─┬────────────────────────┬────────────────────────────────────────5%
55──DSPNODGRP──NODGRP(──┼───────────────┼──node-group──)────
├─\CURLIB/──────┤ │ ┌─\──────┐ │
├─\USRLIBL/─────┤ └─OUTPUT(──┴─\PRINT─┴──)─┘
└─library-name/─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Optional Parameters


The Display Node Group (DSPNODGRP) command displays OUTPUT
the systems or nodes in a node group, as well as the parti- Specifies whether the output from the command is
tioning scheme for the node group. shown at the requesting workstation or printed with the
job's spooled output. More information on this param-
Note: To see the parameter and value descriptions for this
eter is in Appendix A, “Expanded Parameter
command, refer to the online help text. For more
Descriptions.”
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. *: Output requested by an interactive job is shown on
the display. Output requested by a batch job is printed
with the job's spooled output.
Required Parameters
*PRINT: The output is printed with the job's spooled
NODGRP output.
Specifies the name of the node group you want to
display.
Examples
The name of the node group can be qualified by one of
the following library values: Example 1: Displaying a Node Group

*LIBL: All libraries in the job's library list are DSPNODGRP NODGRP(LIB1/GROUP1)
searched until the first match is found.
This command displays the systems in the node group called
*CURLIB: The current library for the job is GROUP1 and the partitioning scheme associated with the
searched. If no library is specified as the current node group. The information is shown at the workstation.
library for the job, the QGPL library is used.
Example 2: Printing a Node Group
*USRLIBL: Only the libraries in the user portion of
the job's library list are searched. DSPNODGRP NODGRP(LIB1/GROUP2) OUTPUT(\PRINT)

library-name: Specify the name of the library to be This command creates a spooled file that contains a list of
searched. the systems in the node group called GROUP1 and the
node-group: Specify the name of the node group to be associated partitioning scheme.
displayed.

P3-182 OS/400 CL Reference - Part 2 (Full Version)


DSPNTBD

DSPNTBD (Display NetBIOS Description) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─────────────────────────────────────────────5%
55──DSPNTBD──NTBD(────NetBIOS-description-name────)──┬────────────────────────┬───
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose job's spooled output. More information on this param-


eter is in Appendix A, “Expanded Parameter
The Display NetBIOS Description (DSPNTBD) command dis- Descriptions.”
plays a NetBIOS description object.
*: Output requested by an interactive job is shown on
Note: To see the parameter and value descriptions for this the display. Output requested by a batch job is printed
command, refer to the online help text. For more with the job's spooled output.
information about printing the help text, refer to
*PRINT: The output is printed with the job's spooled
“Printing CL Command Descriptions” in Chapter 1.
output.

Required Parameter Example


NTBD DSPNTBD NTBD(MYNETBIOS)
Specifies the name of the NetBIOS description to be dis-
played. This command displays information about the NetBIOS
description named MYNETBIOS. The information is shown
at the workstation from which the command was entered. If
Optional Parameter the command was submitted from a batch job, the output
OUTPUT from the command is printed with the job's spool output.
Specifies whether the output from the command is
shown at the requesting workstation or printed with the

Chapter 2. OS/400 Command Descriptions P3-183


DSPNWID

DSPNWID (Display Network Interface Description) Command


Job: B,I Pgm: B,I Exec

(P) ──┬────────────────────────────┬───────────────5%
55──DSPNWID──NWID(────network-interface-name────)──┬────────────────────────┬───
└─OUTPUT(──┬─\──────┬──)─┘ │ ┌─\ALL───────┐ │
└─\PRINT─┘ └─OPTION(──┼─\BASIC─────┼──)─┘
├─\CHLENTRY──┤
├─\DLCI──────┤
├─\NETDIF────┤
├─\PCLENTRY──┤
├─\TMRRTY────┤
└─\THRESHOLD─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *BASIC: The basic displays that apply to this network


The Display Network Interface Description (DSPNWID) interface are shown, but additional information displays
command displays a network interface description. are not shown.

Note: To see the parameter and value descriptions for this *CHLENTRY: The channel entry list panels associated
command, refer to the online help text. For more with the network interface description are displayed.
information about printing the help text, refer to This value is valid only when an integrated services
“Printing CL Command Descriptions” in Chapter 1. digital network (ISDN) is used.
*DLCI: The data link connection identifier information,
including the DLCI numbers, status, and active or
Required Parameters attached lines is displayed. This value is valid only
NWID when a frame relay network (FR) is used.
Specifies the name of the network interface description *NETDIF: The values of the network difference parame-
to be displayed. ters in the network interface description are displayed.
This value is valid only when ISDN is used.
Optional Parameters *PCLENTRY: The protocol-specific information,
including the protocol entries for the network interface
OUTPUT
description, is displayed. This value is valid only when
Specifies whether the output from the command is
ISDN is used.
shown at the requesting workstation or printed with the
job's spooled output. More information on this param- *TMRRTY: The timer and retry values for this network
eter is in Appendix A, “Expanded Parameter interface are displayed.
Descriptions.” *THRESHOLD: The values specified on the threshold
*: Output requested by an interactive job is shown on parameters in the network interface description are dis-
the display. Output requested by a batch job is printed played. This value is valid only when ISDN is used.
with the job's spooled output.
*PRINT: The output is printed with the job's spooled Example
output. DSPNWID NWID(ISDNNET)
OPTION
This command displays information about the network inter-
Specifies the panels to be displayed.
face description named ISDNNET. The information is shown
*ALL: All panels that apply to this specific network inter- an the work station display from which the command was
face are displayed. submitted. If the command is entered from a batch job, the
output from the display is printed with the job's spooled
output.

P3-184 OS/400 CL Reference - Part 2 (Full Version)


DSPNWSALS

DSPNWSALS (Display Network Server Alias) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─┬─────────────────────────┬──┬─────────────────────────┬──┬────────────────────────┬──5%
55──DSPNWSALS──ALIAS(──alias-name──)────
│ ┌─\PERM─┐ │ └─SERVER(──server-name──)─┘ │ ┌─\──────┐ │
└─DURATION(──┴─\TEMP─┴──)─┘ └─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *PERM: A permanent alias is displayed.


*TEMP: A temporary alias is displayed.
The Display Network Server Alias (DSPNWSALS) command
shows an alias for a resource shared on the network. Output SERVER
is directed to a display or a spooled printer file as indicated Specifies the name of the server where the resource
on the OUTPUT parameter and job type. described by this alias is located. This parameter is
required if DURATION(*TEMP) is specified.
This command is only valid for a server type of
*LANSERVER. OUTPUT
Specifies whether the output from the command is
Note: To see the parameter and value descriptions for this
shown at the requesting workstation or printed with the
command, refer to the online help text. For more
job's spooled output. More information on this param-
information about printing the help text, refer to
eter is in Appendix A, “Expanded Parameter
“Printing CL Command Descriptions” in Chapter 1.
Descriptions.”
*: Output requested by an interactive job is shown on
Required Parameter the display. Output requested by a batch job is printed
ALIAS with the job's spooled output.
Specifies the name of the alias to be displayed. *PRINT: The output is printed with the job's spooled
output.
Optional Parameters
Example
DURATION
Specifies whether a permanent or temporary alias is dis- DSPNWSALS ALIAS(ALIAS1)
played.
This command displays permanent alias ALIAS1.

Chapter 2. OS/400 Command Descriptions P3-185


DSPNWSA

DSPNWSA (Display Network Server Attributes) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──┬────────────────────────┬─────────────────────────────────────────────────────5%
55──DSPNWSA──┬────────────────────────────┬───
│ ┌─\ALL───────┐ │ │ ┌─\──────┐ │
└─OPTION(──┼─\AIX───────┼──)─┘ └─OUTPUT(──┴─\PRINT─┴──)─┘
├─\BASE──────┤
├─\LANSERVER─┤
├─\NETWARE───┤
| └─\WINDOWSNT─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *NETWARE: The displays that apply to the *NETWARE


server type are shown, but additional information dis-
The Display Network Server Attributes (DSPNWSA) plays are not shown.
command displays the network server attributes for the
| *WINDOWSNT: The displays that apply to the
system.
| *WINDOWSNT server type are shown, but additional
Output is directed to a display or a spooled printer file as | information displays are not shown.
indicated by the OUTPUT parameter and job type. OUTPUT
Note: To see the parameter and value descriptions for this Specifies whether the output from the command is
command, refer to the online help text. For more shown at the requesting workstation or printed with the
information about printing the help text, refer to job's spooled output. More information on this param-
“Printing CL Command Descriptions” in Chapter 1. eter is in Appendix A, “Expanded Parameter
Descriptions.”

Optional Parameters *: Output requested by an interactive job is shown on


the display. Output requested by a batch job is printed
OPTION with the job's spooled output.
Specifies the displays to be shown.
*PRINT: The output is printed with the job's spooled
*ALL: All displays that apply to all server types are output.
shown.
*AIX: The displays that apply to the *AIX server type Example
are shown, but additional information displays are not
DSPNWSA OUTPUT(\)
shown.
*BASE: The displays that apply to the *BASE server If the job is interactive, this command displays the network
type are shown, but additional information displays are server attributes of the system at the workstation. If the job
not shown. is batch, the network server attributes are printed with the
job's spooled output.
*LANSERVER: The displays that apply to the
*LANSERVER server type are shown, but additional
information displays are not shown.

P3-186 OS/400 CL Reference - Part 2 (Full Version)


DSPNWSD

| DSPNWSD (Display Network Server Description) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──┬─────────────────────────┬─────────5%
55──DSPNWSD──NWSD(────network-server-description-name────)──┬────────────────────────┬───
│ ┌─\──────┐ │ │ ┌─\ALL────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘ └─OPTION(──┼─\BASIC──┼──)─┘
├─\PORTS──┤
├─\STGLNK─┤
└─\TCPIP──┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose OPTION
Specifies what information you want displayed. You can
The Display Network Server Description (DSPNWSD) choose to display all information (*ALL) or specific infor-
command displays a network server description object. mation.
Note: To see the parameter and value descriptions for this *ALL: All information concerning the network server is
command, refer to the online help text. For more shown.
information about printing the help text, refer to
*BASIC: Only basic characteristics of the network
“Printing CL Command Descriptions” in Chapter 1.
server are shown.
*PORTS: Only the information concerning attached
Required Parameters communication descriptions is shown.
NWSD *STGLNK: Only the information concerning linked client
Specifies the name of the network server description to storage spaces is shown.
be displayed.
*TCPIP: Only the information concerning TCP/IP config-
uration is shown.
Optional Parameters
OUTPUT Example
Specifies whether the output from the command is DSPNWSD NWSD(SERVER1)
shown at the requesting workstation or printed with the
job's spooled output. More information on this param- This command displays information about the network server
eter is in Appendix A, “Expanded Parameter description named SERVER1. Since no option was speci-
Descriptions.” fied, all information is displayed. The information is shown at
the work station display from which the command was
*: Output requested by an interactive job is shown on
entered. If the command was submitted from a batch job,
the display. Output requested by a batch job is printed
the output from the command is printed with the job's
with the job's spooled output.
spooled output.
*PRINT: The output is printed with the job's spooled
output.

Chapter 2. OS/400 Command Descriptions P3-187


DSPNWSSSN

DSPNWSSSN (Display Network Server Session) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─┬────────────────────────┬───────────────────────────────5%
55──DSPNWSSSN──SESSION(──session-name──)──SERVER(──server-name──)────
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose SERVER
Specifies the name of a specific, active server.
The Display Network Server Session (DSPNWSSSN)
command displays status data for a specific active network
server session. The session name, user ID, guest sign-on, Optional Parameter
session time, and idle time are displayed when this OUTPUT
command is issued. Specifies whether the output from the command is
shown at the requesting workstation or printed with the
This command is only valid for a server type of
job's spooled output. More information on this param-
*LANSERVER.
eter is in Appendix A, “Expanded Parameter
Output is directed to a display or a spooled printer file as Descriptions.”
indicated on the OUTPUT parameter and by the job type. *: Output requested by an interactive job is shown on
Note: To see the parameter and value descriptions for this the display. Output requested by a batch job is printed
command, refer to the online help text. For more with the job's spooled output.
information about printing the help text, refer to *PRINT: The output is printed with the job's spooled
“Printing CL Command Descriptions” in Chapter 1. output.

Required Parameters Example


SESSION DSPNWSSSN SESSION(LUEREQ) SERVER(NWS1)
Specifies the name of an active network server session.
This command shows status details for the session named
Note: The session name is the same as the requester LUEREQ.
name.

P3-188 OS/400 CL Reference - Part 2 (Full Version)


DSPNWSSTC

DSPNWSSTC (Display Network Server Statistics) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─┬────────────────────────┬──────────────────────────────────────────────────────────5%
55──DSPNWSSTC──SERVER(──server-name──)────
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose information about printing the help text, refer to


“Printing CL Command Descriptions” in Chapter 1.
The Display Network Server Statistics (DSPNWSSTC)
command displays statistics for a specific active network
server. The following information is displayed when this Required Parameter
command is issued: SERVER
Ÿ Date and time that the server was started Specifies the name of an active server.
Ÿ Elapsed time
Ÿ Sessions that were accepted, timed-out, or ended by Optional Parameter
error OUTPUT
Ÿ Kilobytes sent and received Specifies whether the output from the command is
shown at the requesting workstation or printed with the
Ÿ Mean response time
job's spooled output. More information on this param-
Ÿ System errors eter is in Appendix A, “Expanded Parameter
Ÿ Permission and password violations Descriptions.”

Ÿ Files and communications devices that have been *: Output requested by an interactive job is shown on
accessed the display. Output requested by a batch job is printed
with the job's spooled output.
Ÿ Spooled print jobs
*PRINT: The output is printed with the job's spooled
Ÿ Times buffers exhausted output.

This command is only valid for a server type of


*LANSERVER. Example
DSPNWSSTC SERVER(NWS2)
Output is directed to a display or a spooled printer file as
indicated by the OUTPUT parameter and job type. The above command shows detailed statistics for the
Note: To see the parameter and value descriptions for this network server named NWS2.
command, refer to the online help text. For more

Chapter 2. OS/400 Command Descriptions P3-189


DSPNWSSTG

DSPNWSSTG (Display Network Server Storage Space) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─┬────────────────────────┬─────────────────────────────────────────5%
55──DSPNWSSTG──NWSSTG(──network-server-storage-space──)────
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose NWSSTG
Specifies the name of the network server storage space
The Display Network Server Storage Space (DSPNWSSTG) to be displayed.
command can be used to display a network server storage
space. Output is directed to a display or to a spooled printer
file as indicated on the OUTPUT parameter and by the job Optional Parameter
type. Information displayed includes the format of the OUTPUT
storage space: (*HPFS, *FAT, *NETWARE, *AIX, and Specifies whether the output is shown on the display of
*NTFS), its size, the percentage used, the drive at which it is the requesting workstation or is printed with the job's
linked to an NWSD (network server description), whether the spooled output.
format operation is complete and the text entered at create
time. *: Output requested by an interactive job is shown on
the display. Output requested by a batch job is printed
Note: To see the parameter and value descriptions for this with the job's spooled output.
command, refer to the online help text. For more
information about printing the help text, refer to *PRINT: The output is printed with the job's spooled
“Printing CL Command Descriptions” in Chapter 1. output.

Required Parameter Example


DSPNWSSTG NWSSTG(STGSPACE1)

This command displays a network server storage space


named STGSPACE1.

P3-190 OS/400 CL Reference - Part 2 (Full Version)


DSPNWSUSR

DSPNWSUSR (Display Network Server Users) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──┬────────────────────────┬─────────────────5%
55──DSPNWSUSR──┬─────────────────────────────┬──┬─────────────────────────────┬───
│ (1) ─────┐
┌─\ALL─── │ │ ┌─\NWSUSRA───┐ │ │ ┌─\──────┐ │
└─SERVER(──┴─server-name─┴──)─┘ └─SVRTYPE(──┼─\NWSA──────┼──)─┘ └─OUTPUT(──┴─\PRINT─┴──)─┘
├─\LANSERVER─┤
└─\NETWARE───┘
Notes:
1 This value is not valid when SVRTYPE(*NETWARE) is specified.

P All parameters preceding this point can be specified in positional form.

Purpose server user attributes (CHGNWSUSRA command) for


the user profile running the DSPNWSUSR command is
The Display Network Server Users (DSPNWSUSR) used to display the network users.
command allows a user to retrieve a list of all of the logged
*NWSA: The network server type specified in the
on users of a particular server. This command can be used
network server attributes (CHGNWSA command) is used
to display logged on users for an individual IBM OS/2 Warp
to display the network users.
Server for AS/400 or NetWare server. For IBM OS/2 Warp
Server for AS/400, you can also see all logged on users for *LANSERVER: Only those IBM OS/2 Warp Server for
the domain. The user identifier, the time since server log on, AS/400 users associated with the specified network
and other user information will be displayed when this server are displayed.
command is issued. *NETWARE: Only those NetWare users associated with
the specified network server are displayed.
Output is directed to a display or a spooled printer file as
indicated by the OUTPUT parameter and job type. OUTPUT
Note: To see the parameter and value descriptions for this Specifies whether the output from the command is
command, refer to the online help text. For more shown at the requesting workstation or printed with the
information about printing the help text, refer to job's spooled output. More information on this param-
“Printing CL Command Descriptions” in Chapter 1. eter is in Appendix A, “Expanded Parameter
Descriptions.”
*: Output requested by an interactive job is shown on
Optional Parameters the display. Output requested by a batch job is printed
SERVER with the job's spooled output.
Specifies the name of a network server. *PRINT: The output is printed with the job's spooled
*ALL: The user can work with all local servers and with output.
all remote 'active' servers defined to the IBM OS/2 Warp
Server for AS/400 domain.
Example
Note: You cannot specify *ALL when the SVRTYPE DSPNWSUSR SERVER(NWS1) SVRTYPE(\NETWARE)
parameter is specified with a value of
*NETWARE. The above command will allow you to display all of the
server-name: Specify the name of a specific, active NetWare users currently active for the server named NWS1.
server defined for the network. If NWS1 does not exist or is not active, an error message
('server NWS1 not found' or 'server NWS1 not active') will be
SVRTYPE returned.
Specifies the server type to use when displaying users.
*NWSUSRA: The server type specified in the network

Chapter 2. OS/400 Command Descriptions P3-191


DSPNWSUSRA

| DSPNWSUSRA (Display Network Server User Attributes) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─────────────────5
55──DSPNWSUSRA──┬─────────────────────────────┬──┬─────────────────────────┬──┬────────────────────────────┬───
│ ┌─\CURRENT────┐ │ │ ┌─\USER──┐ │ │ ┌─\ALL───────┐ │
└─USRPRF(──┴─'user-name'─┴──)─┘ └─PRFTYPE(──┴─\GROUP─┴──)─┘ └─OPTION(──┼─\AIX───────┼──)─┘
├─\BASE──────┤
├─\LANSERVER─┤
├─\NETWARE───┤
└─\WINDOWSNT─┘
5──┬────────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *AIX: The displays that apply to the *AIX server type
are shown, but additional information displays are not
The Display Network Server User Attributes shown.
(DSPNWSUSRA) command displays the network server user
*BASE: The displays that apply to the *BASE server
attributes for a user or group profile.
type are shown, but additional information displays are
Output is directed to a display or a spooled printer file as not shown.
indicated by the OUTPUT parameter and job type. *LANSERVER: The displays that apply to the
Note: To see the parameter and value descriptions for this *LANSERVER server type are shown, but additional
command, refer to the online help text. For more information displays are not shown.
information about printing the help text, refer to *NETWARE: The displays that apply to the *NETWARE
“Printing CL Command Descriptions” in Chapter 1. server type are shown, but additional information dis-
plays are not shown.
Optional Parameters | *WINDOWSNT: The displays that apply to the
| *WINDOWSNT server type are shown, but additional
USRPRF | information displays are not shown.
Specifies the name of a user or group profile.
OUTPUT
*CURRENT: The user profile attributes for the current
Specifies whether the output from the command is
user profile are displayed.
shown at the requesting workstation or printed with the
user-name: Specify the name of a user or group profile job's spooled output. More information on this param-
to be displayed. eter is in Appendix A, “Expanded Parameter
Descriptions.”
PRFTYPE
Specifies whether the information to be displayed is for a *: Output requested by an interactive job is shown on
user profile or for a group profile. the display. Output requested by a batch job is printed
with the job's spooled output.
*USER: The information to be displayed is for a user
profile. *PRINT: The output is printed with the job's spooled
output.
*GROUP: The information to be displayed is for a group
profile.
Example
OPTION
Specifies the displays to be shown. DSPNWSUSRA USRPRF(NWSUSR1)

*ALL: All displays that apply to all server types are If the job is interactive, this command displays the network
shown. server user attributes defined for user NWSUSR1 at the
workstation. If the job is batch, the network server user attri-
butes for user NWSUSR1 is printed with the job's spooled
output.

P3-192 OS/400 CL Reference - Part 2 (Full Version)


DSPOBJAUT

DSPOBJAUT (Display Object Authority) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(1) ─object-type──)──┬──────────────────────────┬───
55──DSPOBJAUT──OBJ(──┼───────────────┼──object-name──)──OBJTYPE(─── (P) ─────────────5
├─\CURLIB/──────┤ │ ┌─\────────┐ │
└─library-name/─┘ └─OUTPUT(──┼─\PRINT───┼──)─┘
└─\OUTFILE─┘
5──┬────────────────────────────────────────────────────┬──┬───────────────────────────────────────────┬────────────────────────5
│ ┌─\LIBL/────────┐ │ │ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │
└─OUTFILE(──┼───────────────┼──database-file-name──)─┘ └─OUTMBR(──┴─member-name─┴──┼──────────┼──)─┘
├─\CURLIB/──────┤ └─\ADD─────┘
└─library-name/─┘
5──┬──────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\OBJECT─┐ │
└─AUTTYPE(──┼─\FIELD──┼──)─┘
└─\ALL────┘
Notes:
1 A list of the valid OS/400 object types for this command is in Appendix A.

P All parameters preceding this point can be specified in positional form.

Purpose The name of the object can be qualified by one of the


following library values:
The Display Object Authority (DSPOBJAUT) command
shows the list of authorized users of an object and their *LIBL: All libraries in the job's library list are
authorities for the object. If the object is secured by an searched until the first match is found.
authorization list, the name of the authorization list is also *CURLIB: The current library for the job is
shown. searched. If no library is specified as the current
library for the job, the QGPL library is used.
The following are shown for the specified object:
library-name: Specify the name of the library to be
Ÿ The object name. searched.
Ÿ The name of the library that contains the object.
object-name: Specify the name of the object.
Ÿ The name of the object's owner.
OBJTYPE
Ÿ The object's type. Specifies the type of object that has its authorized users
Ÿ The name of the authorization list securing the object. and authorities shown. Any one of the object types can
be specified. For example, to display a list of users
Ÿ A list of all the users who are authorized to use the
authorized to use a file, specify the value *FILE. More
object.
information on this parameter is in Appendix A,
Ÿ The authorities that each user has for the object. “Expanded Parameter Descriptions.”
If the user entering the command does not have object man-
agement authority for the object, only that user's name and Optional Parameters
authorities are shown. The names of the other users and
their authorities for the object are not shown. If an object OUTPUT
does not have an owner name associated with it, no authori- Specifies whether the output from the command is
ties for the object are shown. shown at the requesting work station, printed with the
job's spooled output, or directed to a database file.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more More information on this parameter is in Appendix A,
information about printing the help text, refer to “Expanded Parameter Descriptions.”
“Printing CL Command Descriptions” in Chapter 1. *: Output requested by an interactive job is shown on
the display. Output requested by a batch job is printed
Required Parameters with the job's spooled output.
*PRINT: The output is printed with the job's spooled
OBJ
output.
Specifies the qualified name of the object for which the
authorized users and their authorities are displayed. *OUTFILE: The output is directed to the database file
specified on the OUTFILE parameter.

Chapter 2. OS/400 Command Descriptions P3-193


DSPOBJAUT

OUTFILE *OBJECT: The object level authority information is dis-


Specifies the name of the database file to which the played, placed in a spooled file, or placed in an outfile.
output of the display is directed. If the output file does
If OUTPUT(*) is requested and the object is a file with
not exist, this command creates a database file in the
field level authorities, the F16 key, Display Field Authori-
specified library. If the file is created by this function,
ties, will be enabled on the display.
the text is 'OUTFILE created by DSPOBJAUT'. The
public authority is *EXCLUDE. The database format *FIELD: The field level authority information is dis-
(QSYDSAUT) of the output file is the same as that used played, placed in a spooled file, or placed in an outfile.
in the IBM-supplied database file QAOBJAUT. This value is only valid if *FILE is specified for the
The name of the database file can be qualified by one of Object type prompt (OBJTYPE parameter).
the following library values: *ALL: If OUTPUT(*) is requested, the object level
authority information is displayed. If there are field level
*LIBL: All libraries in the job's library list are
authorities associated with the file, the F16 key, Display
searched until the first match is found.
Field Authorities, will be enabled on the display. If
*CURLIB: The current library for the job is OUTPUT(*PRINT) is requested, the object level and field
searched. If no library is specified as the current level authority data are included in the spooled file.
library for the job, the QGPL library is used. AUTTYPE(*ALL) is not valid with OUTPUT(*OUTFILE).
library-name: Specify the name of the library to be This value is only valid if *FILE is specified for the
searched. Object type prompt (OBJTYPE parameter).
database-file-name: Specify the name of the database
file to which the output is directed. Examples
OUTMBR Example 1: Displaying Users and Authorities
Specifies the name of the database file member to which
the output is directed. DSPOBJAUT OBJ(ARLIB/PROG1) OBJTYPE(\PGM)

Element 1: Member to Receive Output This command shows the authorized users and their authori-
*FIRST: The first member in the file receives the output. ties for the object named PROG1 to the user who entered
If OUTMBR(*FIRST) is specified and the member does the command, if that user has object management authority
not exist, the system creates a member with the name of for the object. If the user does not have object management
the file specified on the OUTFILE parameter. authority, only personal authorities are shown. PROG1 is a
program (*PGM) located in the library named ARLIB. The
member-name: Specify the file member that receives system assumes * for the device that shows the output list.
the output. If OUTMBR(member-name) is specified and If the command was entered in the batch subsystem, the
the member does not exist, the system creates it. output is placed in the default output queue for the job. If the
Element 2: Operation to Perform on Member command was entered in the interactive subsystem, the
output is shown on the device where the user entered the
*REPLACE: The system clears the existing member
command.
and adds the new records.
*ADD: The system adds the new records to the end of Example 2: Printing List of Users
the existing records. DSPOBJAUT OBJ(ARLIB/PROG2) OBJTYPE(\PGM)
OUTPUT(\PRINT)
AUTTYPE This command causes the list of authorized users of the
Specifies whether object level authority, field level program named PROG2 in the ARLIB library to be printed. If
authority, or both object level and field level authority are the user who enters the command does not have object
displayed. Field level authority information only applies management authority for the program, only that user's name
to *FILE objects. and authorities are printed.

P3-194 OS/400 CL Reference - Part 2 (Full Version)


DSPOBJD

| DSPOBJD (Display Object Description) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
55──DSPOBJD──OBJ(──┬─┼───────────────┼──┬─\ALL─────────────────┬─┬──)──OBJTYPE(──┬─\ALL─────────────────┬──)────────────────────5
│ ├─\CURLIB/──────┤ ├─generic\-object-name─┤ │ │ ┌──
─────────────┐ │
│ ├─\USRLIBL/─────┤ └─object-name──────────┘ │ └──6─object-type─┴─────
(3, 4) ─┘
│ ├─\ALLUSR/──────┤ │
│ ├─\ALL/─────────┤ │
│ └─library-name/─┘ │
├─\ALLUSR───(1) ──────────────────────────────────┤
(2) ─────────────────────────────────────┘
└─\IBM───
(P) ──┬──────────────────────────┬──┬────────────────────────────────────────────────────┬────────5
5──┬──────────────────────────┬───
│ ┌─\BASIC───┐ │ │ ┌─\────────┐ │ │ ┌─\LIBL/────────┐ │
└─DETAIL(──┼─\FULL────┼──)─┘ └─OUTPUT(──┼─\PRINT───┼──)─┘ └─OUTFILE(──┼───────────────┼──database-file-name──)─┘
└─\SERVICE─┘ └─\OUTFILE─┘ ├─\CURLIB/──────┤
└─library-name/─┘
5──┬───────────────────────────────────────────┬───────────────────────────────────────────────────────────────────────────────5%
│ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │
└─OUTMBR(──┴─member-name─┴──┴─\ADD─────┴──)─┘
Notes:
1 OBJTYPE must be *LIB if OBJ(*ALLUSR) specified.

2 OBJTYPE must be *LIB if OBJ(*IBM) specified.

3 A maximum of 60 repetitions

4 A list of the valid OS/400 object types for this command is in Appendix A.

P All parameters preceding this point can be specified in positional form.

Purpose 2. The size of a library object does not include the sizes of
the objects in the library. The size of a library, including
The Display Object Description (DSPOBJD) command shows the sizes of the objects in the library, can be obtained
the names and attributes of specified objects in the specified using the DSPLIB command with OUTPUT(*PRINT) or
library or in the libraries of the job's library list. The the QLIRLIBD API.
command can also be used to show the names and attri-
butes of libraries themselves. Restriction: The user who submits this command must
have execute authority for the specified libraries, and some
Only the object attributes of each object are shown; the data authority (that is, any one of the authorities) for each of the
attributes of data in the object, and the actual data in the objects. If the user does not have execute authority for a
object, are not shown. Also indicated is whether an object library, none of its objects are shown.
being shown has been damaged (possibly by a system
Note: To see the parameter and value descriptions for this
failure).
command, refer to the online help text. For more
Any OS/400 system object for which the user has some information about printing the help text, refer to
authority can be shown by this command. Libraries for which “Printing CL Command Descriptions” in Chapter 1.
the user does not have execute authority cannot be shown,
even if specified in the command. If only one object is to be Required Parameters
shown, the user can specify it by entering the object name,
object type, and the name of the library where it is located. OBJ
Depending on the specified library qualifier, either the first Specifies which objects in the libraries are to have their
| object found in the specified libraries is shown, or all objects object attributes shown. If no library qualifier is speci-
| in the specified libraries for which the user has some fied, *LIBL is assumed, and all libraries in the job's
| authority are shown. library list are searched for the objects. Objects in the
library for which the user does not have some authority
Notes: are not shown.
1. For objects that are damaged or locked, the information The name of the object can be qualified by one of the
shown, printed, or written to the output file is incomplete. following library values:
An indication that the object is locked or damaged is
written to the output file. If the description of the object *LIBL: All libraries in the job's library list are
is shown or printed, the text for the damaged or locked searched until the first match is found.
object indicates either the damaged or locked status.

Chapter 2. OS/400 Command Descriptions P3-195


DSPOBJD

*CURLIB: The current library for the job is object-name: Specify the name of the object that is
searched. If no library is specified as the current shown.
library for the job, the QGPL library is used.
*USRLIBL: Only the libraries in the user portion of Single Value
the job's library list are searched.
*ALLUSR: All user libraries are shown. When the
*ALL: All libraries in the system, including QSYS, object name has a value of *ALLUSR, the object type
are searched. must be *LIB.
*ALLUSR: All user libraries are searched. All
libraries with names that do not begin with the letter *IBM: All system (IBM) libraries are shown. This is the
Q are searched except for the following: list of libraries saved/restored on the SAVLIB/RSTLIB CL
#CGULIB #DFULIB #RPGLIB #SEULIB commands with LIB(*IBM). When the object name has a
#COBLIB #DSULIB #SDALIB value of *IBM, the object type must be *LIB.

Although the following Qxxx libraries are provided


by IBM, they typically contain user data that
changes frequently. Therefore, these libraries are OBJTYPE
considered user libraries and are also searched: Specifies the types of objects that are shown. More
| QDSNX QPFRDATA QUSRBRM QUSRSYS information on this parameter is in Appendix A,
| QGPL QRCL QUSRIJS QUSRVxRxMx “Expanded Parameter Descriptions.”
| QGPL38 QS36F QUSRINFSKR *ALL: All object types that have the specified object
| QMQMDATA QUSER38 QUSRNOTES name are shown.
| QMQMPROC QUSRADSM QUSRRDARS
object-type: Specify one or more values for the types of
Note: A different library name, of the form OS/400 system objects to be shown. Any of the OS/400
QUSRVxRxMx, can be created by the user system object types can be specified. Objects in the
for each release that IBM supports. VxRxMx specified libraries, as well as libraries themselves, that
is the version, release, and modification level have the object types specified have their object attri-
of the library. butes shown. If the library qualifier specified or
library-name: Specify the name of the library to be assumed for the OBJ parameter is *USRLIBL or *LIBL,
searched. only one object type (not *ALL) can be specified.

*ALL: All objects in the libraries identified in the library


qualifier, which are of the types specified by the Optional Parameters
OBJTYPE parameter, are shown.
DETAIL
Note: If the library qualifier is *ALL, *ALLUSR, or a Specifies which set of attributes is shown for each
library name, all objects of the specified types for object.
which the user has some authority (for example,
*BASIC: The display or printed output contains the
object operational authority) and that are in the
name and a basic set of object attributes for each object.
specified libraries are shown. If the qualifier is
*USRLIBL or *LIBL, only one object type (not *FULL: The display or printed output contains the name
*ALL) can be specified, and only the first object and a full set of object attributes for each object, which
found is shown. The user can show only those includes the basic set of attributes.
objects for which the user has some authority. *SERVICE: The display or printed output contains the
generic*-object-name: Specify the generic name of the service-related attributes for each object.
object. A generic name is a character string of one or
OUTPUT
more characters followed by an asterisk (*); for example,
Specifies whether the output from the command is
ABC*. The asterisk substitutes for any valid characters.
shown at the requesting work station, printed with the
A generic name specifies all objects with names that
job's spooled output, or directed to a database file.
begin with the generic prefix for which the user has
More information on this parameter is in Appendix A,
authority. If an asterisk is not included with the generic
“Expanded Parameter Descriptions.”
(prefix) name, the system assumes it to be the complete
object name. If the complete object name is specified, *: Output requested by an interactive job is shown on
and multiple libraries are searched, multiple objects can the display. Output requested by a batch job is printed
be searched only if *ALL or *ALLUSR library values can with the job's spooled output.
be specified for the name. For more information on the *PRINT: The output is printed with the job's spooled
use of generic names, refer to “Generic Object Names” output.
in Chapter 2.
*OUTFILE: The output is directed to the database file
specified on the OUTFILE parameter.

P3-196 OS/400 CL Reference - Part 2 (Full Version)


DSPOBJD

Note: All data is written to the file specified on the not exist, the system creates a member with the name of
OUTFILE parameter regardless of the value the file specified on the OUTFILE parameter.
specified on the DETAIL parameter.
member-name: Specify the file member that receives
OUTFILE the output. If OUTMBR(member-name) is specified and
Specifies the qualified name of the database file to the member does not exist, the system creates it.
which the output of the display is directed. If the Element 2: Operation to Perform on Member
OUTFILE does not exist, this command creates a data-
*REPLACE: The system clears the existing member
base file in the specified library. If the file is created, the
and adds the new records.
text is "output file for DSPOBJD". The public authority is
the same as the create authority specified for the library *ADD: The system adds the new records to the end of
in which the file is created. The database format the existing records.
(QLIDOBJD) of the output file is the same as that used
in the IBM-supplied file database QADSPOBJ.
Examples
The name of the database file can be qualified by one of
the following library values: Example 1: Displaying a Basic Description of Objects

*LIBL: All libraries in the job's library list are DSPOBJD OBJ(X/PAY) OBJTYPE(\ALL)
searched until the first match is found.
A basic description of all the objects (for which the user has
*CURLIB: The current library for the job is some authority) that are named PAY in library X are shown.
searched. If no library is specified as the current Objects in the library for which the user has no authority are
library for the job, the QGPL library is used. not shown.
library-name: Specify the name of the library to be
Example 2: Displaying a Full Description of a Program
searched.
DSPOBJD OBJ(X/PAY) OBJTYPE(\PGM) DETAIL(\FULL)
database-file-name: Specify the name of the database
file that receives the output of the display. A full description of the program named PAY in library X is
shown. The display includes all the attributes of the
OUTMBR program.
Specifies the name of the database file member to which
the output is directed. If a member already exists, the Example 3: Displaying Program Information
system uses the second element of this parameter to
DSPOBJD OBJ(\USRLIBL/PAY) OBJTYPE(\PGM)
determine whether the member is cleared before the
new records are added. If the member does not exist This command shows information about the first program
and a member name is not specified, the system creates named PAY that is found in the user portion of the job's
a member with the name of the output file specified on library list.
the OUTFILE parameter. If an output file member name
is specified, but the member does not exist, the system Example 4: Displaying a Basic Description of Files
creates it. DSPOBJD OBJ(Z/ABC\) OBJTYPE(\FILE)
Element 1: Member to Receive Output
A basic description of all of the files whose names begin with
*FIRST: The first member in the file receives the output. ABC (generic name) located in library Z, for which the user
If OUTMBR(*FIRST) is specified and the member does has some authority, are shown.

Chapter 2. OS/400 Command Descriptions P3-197


DSPOPCLNK

DSPOPCLNK (Display OptiConnect Link Status) Command


Job: I Pgm: I REXX: I Exec

55──DSPOPCLNK──────────────────────────────────────────────────────────────────────────────────────────────────────────────────5%

Purpose Examples
DSPOPCLNK
The Display OptiConnect Link Status (DSPOPCLNK)
command allows you to view the connection status of the This command displays a panel showing the connection
links between systems in the fiber optic network. status of the links between systems in the fiber optic
network.
There are no parameters for this command.

P3-198 OS/400 CL Reference - Part 2 (Full Version)


DSPOPT

DSPOPT (Display Optical) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ────────────5
55──DSPOPT──VOL(──┬─\ALL───────────────────────┬──)──┬───────────────────────────────┬──┬───────────────────────┬───
(1) ────────────────┤
├─\MOUNTED─── │ (3) ────────┐
┌─\ALL─── │ │ ┌─\VOLATR─┐ │
├─volume-identifier──────────┤ (2) ─┴─optical-device─┴──)─┘ └─DATA(──┼─\DIRATR─┼──)─┘
└─DEV(───
└─generic\-volume-identifier─┘ ├─\FILATR─┤
└─\SAVRST─┘
5──┬───────────────────────────────┬──┬──────────────────────────┬──┬─────────────────────────────────────────────────┬─────────5
(5, 9) ─┬─\ALL────
└─PATH(───── (10) ────┬──)─┘ │ ┌─\────────┐ │ │ ┌─\LIBL/───┐ │
└─'path-name'─┘ (7) ─┼──────────┼────user-space-name────)─┘
└─OUTPUT(──┼─\PRINT───┼──)─┘ └─USRSPC(───
├─\OUTFILE─┤ ├─\CURLIB/─┤
└─\USRSPC──┘ └─library/─┘
5──┬───────────────────────────┬──┬─────────────────────────────────────────────────┬───────────────────────────────────────────5
│ ┌─\YES─┐ │ │ ┌─\LIBL/───┐ │
(7, 8) ─┴─\NO──┴──)─┘ └─OUTFILE(───
└─REPLACE(───── (6) ─┼──────────┼──database-file-name──)─┘
├─\CURLIB/─┤
└─library/─┘
5──┬──────────────────────────────────────────────────────────┬────────────────────────────────────────────────────────────────5%
│ ┌─\FIRST───────────────────┐ ┌─\REPLACE─┐ │
(6) ─┴─member-to-receive-output─┴──┼──────────┼──)─┘
└─OUTMBR(───
└─\ADD─────┘
Notes:
1 This value is valid only for optical devices, not for library devices.

2 This parameter is ignored if a specific volume identifier is specified on the VOL parameter.

3 This value is valid only when VOL(*ALL) or VOL(generic*) is specified.

4 This parameter is valid only when DATA(*VOLATR) is specified.

5 This parameter is ignored if DATA(*VOLATR) is specified.

6 This parameter is valid only if OUTPUT(*OUTFILE) is specified.

7 This parameter is valid only if OUTPUT(*USRSPC) is specified.

8 This parameter is ignored if the user space is not found in the specified library.

9 You can specify a pattern for this path name.

10 This value is valid only when DATA(*DIRATR) or DATA(*FILATR) is specified.

P All parameters preceding this point can be specified in positional form.

Purpose *MOUNTED: The information is shown for the volume


mounted on the specified device (DEV parameter).
The Display Optical (DSPOPT) command displays volume,
Note: This value is valid only for optical devices, not for
directory, or file attributes depending on the value specified
library devices.
on the DATA parameter. The information can be printed,
displayed, or written to an output file. volume-identifier: Specify the identifier of an optical
volume.
Restriction: To use this command you must have *USE
generic*-volume-identifier: Specify the generic name of
authority to the authorization list securing the volumes being
the volume identifier. A generic name is a character
displayed.
string of one or more characters followed by an asterisk
Note: To see the parameter and value descriptions for this (*); for example, ABC*. The asterisk substitutes for any
command, refer to the online help text. For more valid characters. A generic name specifies all objects
information about printing the help text, refer to with names that begin with the generic prefix for which
“Printing CL Command Descriptions” in Chapter 1. the user has authority. If an asterisk is not included with
the generic (prefix) name, the system assumes it to be
the complete object name. For more information on the
Required Parameter use of generic names, refer to “Generic Object Names”
VOL in Chapter 2.
Specifies the identifier of the optical volume which con-
tains the information being shown.
Optional Parameters
*ALL: The information is shown for all optical volumes
on the specified directly attached optical device (DEV
parameter).

Chapter 2. OS/400 Command Descriptions P3-199


DSPOPT

DEV *OUTFILE: The output is directed to the database file


Specifies the name of the optical device containing the specified on the OUTFILE parameter.
optical volume whose information is displayed.
*USRSPC: The output is added to the user space spec-
Note: This parameter is ignored when a specific ified on the USRSPC parameter.
volume name is specified on the VOL parameter.
USRSPC
*ALL: The volume attributes are displayed for optical Specifies the qualified name of the user space to which
volumes on all directly attached optical devices. the output of the display is added.
Note: This value is valid only when VOL(*ALL) or Note: This parameter is valid only if
VOL(generic*) is specified. OUTPUT(*USRSPC) is specified.
optical-device: Specify the name of an optical device. The name of the user space can be qualified by one of
DATA the following library values:
Specifies the type of information that is displayed when *LIBL: All libraries in the job's library list are
specified on the PATH parameter. If DATA(*SAVRST) is searched until the first match is found.
specified, the information includes a description of each
*CURLIB: The current library for the job is
object saved to the optical file and summary information
searched. If no library is specified as the current
about the saved objects. To determine whether the
library for the job, the QGPL library is used.
volume being displayed contains data in the basic
stream file format or in the save and restore format, you library-name: Specify the name of the library to be
can specify DATA(*FILATR) and check the data file searched.
identifiers listed.
user-space-name: Specify the name of the user space
*VOLATR: The volume attributes for the specified that receives the output.
volume or volumes are displayed.
REPLACE
*DIRATR: The directory attributes for the specified
Indicates whether to replace an existing user space.
directory or directories are displayed.
Note: This parameter is valid only if
*FILATR: The file attributes for the specified file or files
OUTPUT(*USRSPC) is specified and is ignored if
are displayed.
the user space is not found in the specified
*SAVRST: The specified files contain save and restore library.
data. Summary information is displayed for the
*YES: The user space is replaced if found. The
command and each saved object.
existing authorities of the original user space are
PATH retained, but the contents are replaced.
Specifies the path name of the directory or the file on *NO: The user space is not replaced if found. The
the volume being displayed, beginning with the root request ends and a message is sent to the job log indi-
directory of the volume. The DATA parameter indicates cating that the user space already exists in the library
whether the directory or the file attributes are displayed. and cannot be created.
The object path name can be either a simple name or a
name that is qualified with the name of the directory in OUTFILE
which the object is located. A pattern can be specified Specifies the name of the database file to which the
in the last part of the path name. An asterisk (*) output of the display is added.
matches any number of characters. If the path name is Note: This parameter is valid only if
qualified or contains a pattern, it must be enclosed in OUTPUT(*OUTFILE) is specified.
apostrophes.
The name of the database file can be qualified by one of
Note: This parameter is ignored if DATA(*VOLATR) is the following library values:
specified.
*LIBL: All libraries in the job's library list are
OUTPUT searched until the first match is found.
Specifies whether the output from the command is dis-
*CURLIB: The current library for the job is
played at the requesting work station, printed with the
searched. If no library is specified as the current
job's spooled output, added to a database file or directed
library for the job, the QGPL library is used.
to a user space.
*: Output requested by an interactive job is shown on
library-name: Specify the name of the library to be
searched.
the display. If the command is run as part of a batch
job, the output is printed with the job's spooled output. database-file-name: Specify the name of the database
*PRINT: The output is printed with the job's spooled file that receives the output of the display. If the data-
output. base file is qualified with the *LIBL value but the system
cannot find the file, one is created in the user's default

P3-200 OS/400 CL Reference - Part 2 (Full Version)


DSPOPT

library. If a default library is not specified, the file is DSPOPT VOL(\ALL) DEV(\ALL)
created in library QGPL.
This command displays the volume attributes for all volumes
OUTMBR in all local optical devices and libraries.
Specifies the name of the database file member to which
the output is directed. Example 2: Displaying Attributes Using a Generic
Search
Note: This parameter is valid only if
OUTPUT(*OUTFILE) is specified. DSPOPT VOL(PAY\) DATA(\DIRATR) PATH('/\')
Element 1: Member to Receive Output
This command displays the attributes for all directories in the
*FIRST: The first member in the file receives the output. root directory of all optical volumes beginning with the char-
If OUTMBR(*FIRST) is specified and the member does acters PAY.
not exist, the system creates a member with the name of
the file specified on the OUTFILE parameter. Example 3: Displaying Attributes of a Specific Directory
member-name: Specify the file member that receives
DSPOPT VOL(VOLð1) DEV(OPTð1) DATA(\FILATR)
the output. If OUTMBR(member-name) is specified and PATH('/DIR1/DIR2/\')
the member does not exist, the system creates it.
Element 2: Action on Member This command displays the file attributes for all files in the
directory /DIR1/DIR2 of optical volume VOL01.
*REPLACE: The data currently contained in the output
file member is replaced with the output of this command. Example 4: Displaying Save and Restore Data
*ADD: The new records are added to the existing infor-
DSPOPT VOL(\MOUNTED) DEV(OPTð1) DATA(\SAVRST)
mation in the specified database file member.
PATH('/\')

Examples This command displays the save and restore data for all files
in the root directory of the optical volume mounted on device
Example 1: Displaying Attributes for All Optical Volumes OPT01.

Chapter 2. OS/400 Command Descriptions P3-201


DSPOPTLCK

DSPOPTLCK (Display Optical Locks) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──DSPOPTLCK──TYPE(──┬─\VOL──┬──)──┬──────────────────────────────┬───(P) ──┬─────────────────────────┬────────────────────────────5
├─\DIR──┤ (1) ─volume-identifier──)─┘
└─VOL(─── (2) ─'path-name'──)─┘
└─PATH(───
├─\FILE─┤
└─\JOB──┘
5──┬────────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘
Notes:
1 This parameter is valid only if TYPE(*VOL), TYPE(*DIR), or TYPE(*FILE) is specified.

2 This parameter is valid only if TYPE(*DIR) or TYPE(*FILE) is specified.

P All parameters preceding this point can be specified in positional form.

Purpose VOL
Specifies the volume identifier of the optical volume for
The Display Optical Locks (DSPOPTLCK) command displays which the locks are listed.
a list of locks held on an optical volume, directory, or file. If
TYPE(*JOB) is specified, this command displays a list of all PATH
jobs currently performing an optical request. The information Specifies the path name of the directory or file on the
can be printed or displayed. volume for which the locks are listed.
Note: This parameter is valid only if TYPE(*DIR) or
This command does not identify any locks to volumes, direc- TYPE(*FILE) is specified.
tories, or files which are in remote optical servers. It also
does not identify any jobs which are currently using a remote OUTPUT
optical server. Use the Display Optical Server Specifies whether the output from the command is
(DSPOPTSVR) command with TYPE(*CONV) specified to shown at the requesting workstation or printed with the
determine if any jobs are currently using a remote optical job's spooled output. More information on this param-
server. eter is in Appendix A, “Expanded Parameter
Descriptions.”
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more *: Output requested by an interactive job is shown on
information about printing the help text, refer to the display. If the command is run as part of a batch
“Printing CL Command Descriptions” in Chapter 1. job, the output is printed with the job's spooled output.
*PRINT: The output is printed with the job's spooled
Required Parameter output.

TYPE
Specifies the type of locks to be displayed or printed. Examples
*VOL: Job information and locks on the specified optical Example 1: Displaying Locks on a File
volume are displayed or printed. DSPOPTLCK TYPE(\FILE) VOLUME(VOLðð1)
*DIR: Job information and locks on the specified optical PATH('/PAYROLL/JAN1995')
directory are displayed or printed.
This command displays the locks held on the file JAN1995 in
*FILE: Job information and locks on the specified the directory /PAYROLL on the VOL001 volume.
optical file are displayed or printed.
*JOB: Job information and locks on all jobs currently Example 2: Displaying Locks for Active Jobs
performing optical requests are displayed or printed. DSPOPTLCK TYPE(\JOB)

Optional Parameters This command diplays a list of active jobs performing optical
requests.

P3-202 OS/400 CL Reference - Part 2 (Full Version)


DSPOPTSVR

DSPOPTSVR (Display Optical Server) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──────────────────────────────────────────────────────────5%
55──DSPOPTSVR──┬─────────────────────┬──┬────────────────────────┬───
│ ┌─\DEST─┐ │ │ ┌─\──────┐ │
└─TYPE(──┴─\CONV─┴──)─┘ └─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *CONV: The conversation information is displayed.


This information includes a listing of all active optical
The Display Optical Server (DSPOPTSVR) command dis- conversations, the destination of each conversation, the
plays information about the configuration of all optical servers jobs using the conversation, and the path of each open
added with the Add Optical Server (ADDOPTSVR) file.
command. The information can be printed or displayed.
OUTPUT
Note: To see the parameter and value descriptions for this Specifies whether the output from the command is
command, refer to the online help text. For more shown at the requesting workstation or printed with the
information about printing the help text, refer to job's spooled output. More information on this param-
“Printing CL Command Descriptions” in Chapter 1. eter is in Appendix A, “Expanded Parameter
Descriptions.”
Optional Parameters *: The requested data is shown on the display station.
TYPE *PRINT: The output is printed with the job's spooled
Specifies the type of information to be displayed. output.
*DEST: The destination information is displayed. This
information includes a listing of all of the optical servers Example
accessible with the hierarchical file system APIs and the DSPOPTSVR TYPE(\DEST)
current status of each destination.
This command displays the current status of each destination
of all optical servers that have been started.

Chapter 2. OS/400 Command Descriptions P3-203


DSPOVR

DSPOVR (Display Override) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──┬──────────────────────┬──┬────────────────────────────────┬─────────────5
55──DSPOVR──┬────────────────────────────────────┬───
│ ┌─\ALL─────────────────┐ │ │ ┌─\YES─┐ │ │ ┌─\─────────────────┐ │
└─FILE(──┼─\PRTF────────────────┼──)─┘ └─MRGOVR(──┴─\NO──┴──)─┘ └─LVL(──┼─\JOB──────────────┼──)─┘
└─overridden-file-name─┘ └─call-level-number─┘
5──┬────────────────────────┬──┬───────────────────────────────────────┬───────────────────────────────────────────────────────5%
│ ┌─\──────┐ │ │ ┌─\─────────────────────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘ └─ACTGRP(──┴─activation-group-name─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *YES: The file overrides displayed are merged.


*NO: The file overrides displayed are not merged.
The Display Override (DSPOVR) command displays file over-
rides at any active call level for a job. All file overrides, or LVL
file overrides for a specific file name, can be displayed. Specifies the call levels of the file overrides displayed.
There is a one-to-one correspondence between the call
The file overrides can be merged before being displayed. A stack entries displayed on the call stack from the
merged file override is the result of combining all overrides WRKJOB command and the call level for that call stack
for a file from call level one to the specified call level, entry.
producing the override which is applied when the file is
opened at the specified call level. The first call stack entry name displayed on the call
stack (at the top of the list) is the program or procedure
A call level is associated with each call stack entry in the call at call level one. The second call stack entry name dis-
stack. Calling a program or procedure adds another call played is the program or procedure at call level two.
stack entry to the call stack. When a program or procedure The last call stack entry name displayed is the program
is called using the TFRCTL (Transfer Control) command, the or procedure at the highest call level for the job.
call stack entry replaces a call stack entry that is already on
Ÿ If a merged file override is displayed, file overrides
the call stack; a new call level number is not created.
from call level one to the specified call level contrib-
Note: This function can also be accessed through option 15 utes to the creation of the merged file override.
of the Work with Job (WRKJOB) command.
Ÿ If MRGOVR(*NO) and FILE(*ALL) are specified, all
Note: To see the parameter and value descriptions for this file overrides (and the call levels at which they were
command, refer to the online help text. For more found) from call level one to the specified call level
information about printing the help text, refer to are displayed.
“Printing CL Command Descriptions” in Chapter 1.
Ÿ If MRGOVR(*NO) is specified, and a file override
name is specified on the FILE parameter, all file
Optional Parameters overrides for the file specified (and the call levels at
which they were found) from call level one to the
FILE specified call level are displayed.
Specifies whether all file overrides, or file overrides for a
specific file, are displayed. *: The call level of the file override displayed is the call
level of the program that called the DSPOVR command
*ALL: All the file overrides from call level one to the
processing program. If the DSPOVR command is called
specified call level are displayed.
to QCMDEXC, the call level is the same level as that of
*PRTF: The *PRTF file override, which exists in the call QCMDEXC. Overrides at call level numbers greater
level where this command is entered, is displayed. than 999 are not displayed.
overridden-file-name: Specify the name of the file for *JOB: The call levels of the file overrides displayed are
which all the file overrides, from call level one to the all call levels for the job.
specified call level, are displayed.
call-level-number: Specify the specific call levels of the
MRGOVR file overrides displayed. A specific call level is used to
Specifies whether the file overrides are merged. Only display file overrides at call levels lower than the call
those parameters on the overrides of the same type as level at which the user is running. Valid values range
the last override used for the merged override are used from 1 through 999.
in determining the effective override for the specified call
level.

P3-204 OS/400 CL Reference - Part 2 (Full Version)


DSPOVR

OUTPUT activation-group-name: Specify the name of the acti-


Specifies whether the output from the command is dis- vation group that specifies activation group level over-
played at the requesting work station or printed with the rides.
job's spooled output. More information on this param-
eter is in Appendix A, “Expanded Parameter
Descriptions.”
Examples
*: Output requested by an interactive job is shown on Example 1: Displaying Merged Overrides
the display. Output requested by a batch job is printed DSPOVR FILE(REPORTS) MRGOVR(\YES) LVL(3) OUTPUT(\)
with the job's spooled output.
This command produces a display showing the merged over-
*PRINT: The output is printed with the job's spooled ride for the file REPORTS at call level 3 with text
output. descriptions of each keyword and parameter. Applicable
ACTGRP overrides at call levels 1, 2 and 3 are used to form the
Specifies the level overrides to display for an activation merged override.
group. When MRGOVR(*YES) is specified, the acti-
Example 2: Displaying File Overrides
vation group level overrides are processed after all call
level overrides that are greater than or equal to the call DSPOVR FILE(REPORTS) MRGOVR(\NO) LVL(2) OUTPUT(\)
level of the oldest procedure in the activation group are
This command displays all file overrides for the file reports
processed.
up to call level 2. It produces a display showing the file
*: The level overrides from the requester's activation name, the call level for which the override was requested,
group will be displayed. the type of override, and the override parameters. If no file
overrides are found for the file up to and including the speci-
fied call level, escape message CPF9842 is sent.

Chapter 2. OS/400 Command Descriptions P3-205


DSPPDGPRF

DSPPDGPRF (Display Print Descriptor Group Profile) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──────────────────────────────────────────────────────────5%
55──DSPPDGPRF──USER(──┬─\CURRENT──┬──)──┬────────────────────────┬───
└─user-name─┘ │ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Optional Parameters


The Display Print Descriptor Group Profile (DSPPDGPRF) OUTPUT
command displays the print descriptor group (PDG) and print Specifies whether the output from the command is
descriptor name for the specified user profile. shown at the requesting workstation or printed with the
job's spooled output. More information on this param-
Restriction: The user must have *OBJMGT authority to use eter is in Appendix A, “Expanded Parameter
this command. Descriptions.”
*: Output requested by an interactive job is shown on
Required Parameters the display. Output requested by a batch job is printed
with the job's spooled output.
USER
Specifies the name of the user whose PDG profile is to *PRINT: The output is printed with the job's spooled
be displayed. output.

*CURRENT: The user profile that is currently running is


used. Example
user-name: Specify the name of the user whose PDG DSPPDGPRF USER(TPDEXTER)
profile is to be displayed.
This command displays the print descriptor and the print
descriptor group for user profile TPDEXTER.

P3-206 OS/400 CL Reference - Part 2 (Full Version)


DSPPFM

DSPPFM (Display Physical File Member) Command


Job: I Pgm: I REXX: I Exec

┌─\LIBL/────────┐
(P) ────────────────────────────────────5
55──DSPPFM──FILE(──┼───────────────┼──physical-file-name──)──┬──────────────────────────┬───
├─\CURLIB/──────┤ │ ┌─\FIRST──────┐ │
└─library-name/─┘ └─MBR(──┼─\LAST───────┼──)─┘
└─member-name─┘
5──┬────────────────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─1─────────────┐ │
└─FROMRCD(──┼─\END──────────┼──)─┘
├─\ALLDATA──────┤
└─record-number─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose member-name: Specify the name of the physical file


member.
The Display Physical File Member (DSPPFM) command dis-
plays a physical database file member. Records are shown FROMRCD
in arrival sequence, even if the file has a keyed access path. Specifies which record in a physical file is shown on the
Users can page through the file, locate a particular record by top line of the initial display. If the specified record
record number, or specify a starting position in the record. number is a deleted record, the display is positioned on
They can also select a character or hexadecimal display of the first record that follows the record that has been
the records. deleted. The user can display as many records as
needed using the page-up and page-down keys.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more 1: Record number one, or the first non-deleted record,
information about printing the help text, refer to of the physical file is shown. If the file is a distributed
“Printing CL Command Descriptions” in Chapter 1. file, this will be the first non-deleted record of the local
member, and only local data will be shown.
*END: The last non-deleted record in the physical file is
Required Parameters shown. The *END value shows the last complete page
FILE so that the last record in the physical file appears at the
Specifies the name of the physical file that contains the bottom of the screen. If the file is a distributed file, this
member being shown. If no library qualifier is specified, will be the last non-deleted record of the local member,
the library list is used to locate the file. and only local data will be shown.
The name of the physical file member can be qualified *ALLDATA: All the data for a distributed file, including
by one of the following library values: remote data, is shown. If *ALLDATA is specified for a
non-distributed file, it will be treated the same as
*LIBL: All libraries in the job's library list are FROMRCD(1).
searched until the first match is found.
record-number: Specify the number of the record shown
*CURLIB: The current library for the job is on the top line of the initial display. If the file is a distrib-
searched. If no library is specified as the current uted file, this will be the record number of the local
library for the job, the QGPL library is used. member, and only local data will be shown.
library-name: Specify the name of the library to be
searched.
Examples
physical-file-name: Specify the name of the physical file.
Example 1: Displaying the First File Member
DSPPFM FILE(TESTA)
Optional Parameters
This command shows the first member of a physical file
MBR
named TESTA. The library list is used to locate the file.
Specifies the name of the physical file member being
shown. Example 2: Displaying a File Member
*FIRST: The first member in the database file is used. DSPPFM FILE(SAMPLE/TESTB) MBR(PROGRAM)
*LAST: The last member of the specified physical file is
shown.

Chapter 2. OS/400 Command Descriptions P3-207


DSPPFM

This command shows member PROGRAM of physical file


TESTB in library SAMPLE.

P3-208 OS/400 CL Reference - Part 2 (Full Version)


DSPPGM

DSPPGM (Display Program) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ────────────5%
55──DSPPGM──PGM(──┼───────────────┼──program-name──)──┬────────────────────────┬──┬────────────────────────────┬───
├─\CURLIB/──────┤ │ ┌─\──────┐ │ │ ┌─\ALL───────┐ │
└─library-name/─┘ └─OUTPUT(──┴─\PRINT─┴──)─┘ └─DETAIL(──┼─\BASIC─────┼──)─┘
├─\SIZE──────┤
├─\MODULE────┤
├─\SRVPGM────┤
├─\ACTGRPEXP─┤
├─\ACTGRPIMP─┤
└─\COPYRIGHT─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose OUTPUT
Specifies whether the output from the command is
The Display Program (DSPPGM) command displays informa- shown at the requesting workstation or printed with the
tion about a program. The display includes information about job's spooled output. More information on this param-
the compiler, the type of program, certain processing attri- eter is in Appendix A, “Expanded Parameter
butes of the program, the type of program (ILE or OPM), the Descriptions.”
size of the program, and the number of parameters that can
*: Output requested by an interactive job is shown on
be passed to the program when it is called.
the display. Output requested by a batch job is printed
Restrictions: with the job's spooled output.

1. You must have *READ authority to the program and *PRINT: The output is printed with the job's spooled
*EXECUTE authority to the library to use this command. output.

2. You must have *USE authority to the program when DETAIL


DETAIL(*MODULE) is specified. Specifies the type of information displayed for the
service program. More than one value can be specified,
Note: To see the parameter and value descriptions for this
but a list of values must not include *ALL. *ALL must be
command, refer to the online help text. For more
specified as a single value.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. Note: DETAIL(*ALL) or DETAIL(*BASIC) are the only
values valid for original program model (OPM)
programs. All values other than *ALL or *BASIC
Required Parameter are ignored for an OPM program.
PGM *ALL: All of the DETAIL information types (*BASIC,
Specifies the qualified name of the program for which *SIZE, *MODULE, *SRVPGM, *ACTGRPEXP,
information is displayed. *ACTGRPIMP, and *COPYRIGHT) would be shown on
The name of the program can be qualified by one of the the display. If the user has chosen the information to be
following library values: displayed on the screen, the user would be able to scroll
through the information for each DETAIL, but would
*LIBL: All libraries in the job's library list are have to press enter (or PF12) to go from DETAIL to
searched until the first match is found. DETAIL.
*CURLIB: The current library for the job is *BASIC: General program information is shown.
searched. If no library is specified as the current
*SIZE: The size and size limits for this program are
library for the job, the QGPL library is used.
shown.
library-name: Specify the name of the library to be
*MODULE: A list is shown of the module objects bound
searched.
by this program. The library shown for each module is
program-name: Specify the name of the program for the library that the module was in when the program was
which information is displayed. first created. If the module has been replaced by a
module from a different library, this library name remains
the name of the library that the module was in when the
Optional Parameters program was created. To determine the source that the
module was created from, use option 5=Display

Chapter 2. OS/400 Command Descriptions P3-209


DSPPGM

description to see the source file, library, and member program model (OPM) program results in the
names. *BASIC information being shown.
*SRVPGM: A list is shown of the service programs
bound by this program.
Examples
*ACTGRPEXP: A list is shown of the data items
exported to the activation group specified in the data Example 1: Displaying Program Information
export entry in the binding specifications.
DSPPGM PGM(LIBð1/PAYROLL)
*ACTGRPIMP: A list is shown of the imports that are
resolved by weak exports that had been exported to the This command displays information about the program
activation group directory. named PAYROLL in library LIB01. The display is shown at
the display station if requested by an interactive job, or
*COPYRIGHT: A list is shown of the copyrights for this
printed if requested by a batch job.
service program.
Note: The DETAIL values *SIZE, *MODULE, Example 2: Printing Program Information
*SRVPGM, and *COPYRIGHT are valid only for DSPPGM PGM(CUSINQ) OUTPUT(\PRINT)
integrated language environment (ILE) programs.
Specifying one of these values for an original This command displays information about a program named
CUSINQ. The library list is used to find the program, and the
information is printed.

P3-210 OS/400 CL Reference - Part 2 (Full Version)


DSPPGMADP

DSPPGMADP (Display Programs that Adopt) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\ALL─────────────┐
│ ┌──
───────────┐ │
55──DSPPGMADP──USRPRF(──user-profile-name──)──── 6┬─\PGM────┬┴────
(P) ─OBJTYPE(──┴── (1) ┴──)──┬──────────────────────────┬────────────────5
├─\SQLPKG─┤ │ ┌─\────────┐ │
└─\SRVPGM─┘ └─OUTPUT(──┼─\PRINT───┼──)─┘
└─\OUTFILE─┘
5──┬────────────────────────────────────────────────────┬──┬───────────────────────────────────────────┬───────────────────────5%
│ ┌─\LIBL/────────┐ │ │ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │
└─OUTFILE(──┼───────────────┼──database-file-name──)─┘ └─OUTMBR(──┴─member-name─┴──┼──────────┼──)─┘
├─\CURLIB/──────┤ └─\ADD─────┘
└─library-name/─┘
Notes:
P All parameters preceding this point can be specified in positional form.

1 A maximum of 3 repetitions.

Purpose *SRVPGM: Only service programs that adopt the speci-


fied user profile are shown.
The Display Programs that Adopt (DSPPGMADP) command
is used to show objects that adopt the special and private OUTPUT
authorities of the specified user profile. This is a convenient Specifies whether the output from the command is
way to check security exposure due to program adoption. shown at the requesting work station, printed with the
job's spooled output, or directed to a database file.
Restrictions: More information on this parameter is in Appendix A,
“Expanded Parameter Descriptions.”
1. The user of this command must have *OBJMGT
authority to the user profile. *: Output requested by an interactive job is shown on
the display. Output requested by a batch job is printed
2. The user profile specified on the command will be locked
with the job's spooled output.
while the command is running. The lock prevents such
things as objects having their ownership changed. If this *PRINT: The output is printed with the job's spooled
profile owns a lot of objects, the profile could be locked output.
for an extended period of time. *OUTFILE: The output is directed to the database file
Note: To see the parameter and value descriptions for this specified on the OUTFILE parameter.
command, refer to the online help text. For more
OUTFILE
information about printing the help text, refer to
Specifies the qualified name of the database file to
“Printing CL Command Descriptions” in Chapter 1.
which output of the display is directed. If this file does
not exist, this command creates a database file in the
Required Parameter specified library. If this function creates the file, the text
states 'Outfile for DSPPGMADP', and the public authority
USRPRF is *EXCLUDE.
Specifies the name of the user profile whose authorities
are adopted. Up to 10 characters can be specified. The name of the output database file can be qualified by
one of the following library values:

Optional Parameters *LIBL: All libraries in the job's library list are
searched until the first match is found.
OBJTYPE
*CURLIB: The current library for the job is
Specifies the type of object shown.
searched. If no library is specified as the current
*ALL: All objects that adopt the user profile specified on library for the job, the QGPL library is used.
the USRPRF parameter are shown.
library-name: Specify the name of the library to be
*PGM: Only programs that adopt the specified user searched.
profile are shown.
database-file-name: Specify the name of the database
*SQLPKG: Only Structured Query Language (SQL) file.
packages that adopt the specified user profile are
shown. OUTMBR
Specifies the name of the database file member to which
the output is directed.

Chapter 2. OS/400 Command Descriptions P3-211


DSPPGMADP

Element 1: Member to Receive Output *REPLACE: The system clears the existing member
and adds the new records.
*FIRST: The first member in the file receives the output.
If OUTMBR(*FIRST) is specified and the member does *ADD: The system adds the new records to the end of
not exist, the system creates a member with the name of the existing records.
the file specified on the OUTFILE parameter. If the
member exists, the user has the option of either adding
records to the end of the existing member or clearing the
Example
existing member and adding the new records. DSPPGMADP USRPRF(xxx) OUTPUT(\PRINT)
member-name: Specify the file member that receives This command directs the information about the user profile
the output. If OUTMBR(member-name) is specified and (xxx) that programs use to print the job's output spooling
the member does not exist, the system creates it. queue.
Element 2: Operation to Perform on Member

P3-212 OS/400 CL Reference - Part 2 (Full Version)


DSPPGMREF

DSPPGMREF (Display Program References) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ──OBJTYPE(─────────────────5
55──DSPPGMREF──PGM(──┼───────────────┼──┬─\ALL──────────────────┬──)──┬──────────────────────────┬───
├─\USRLIBL/─────┤ ├─generic\-program-name─┤ │ ┌─\────────┐ │
├─\CURLIB/──────┤ └─program-name──────────┘ └─OUTPUT(──┼─\PRINT───┼──)─┘
├─\ALL/─────────┤ └─\OUTFILE─┘
├─\ALLUSR/──────┤
└─library-name/─┘
┌─\PGM───────────────┐
│ ┌──
─────────────┐ │
5──┴──6─┬─\ALL────┬─┴───
(1) ─┴──)──┬──────────────────────────────────────────────────────┬──────────────────────────────────────────5
├─\SQLPKG─┤ │ ┌─\LIBL/────────┐ │
├─\SRVPGM─┤ (2) ─)─┘
└─OUTFILE(──┼───────────────┼──database-file-name───
└─\MODULE─┘ ├─\CURLIB/──────┤
└─library-name/─┘
5──┬─────────────────────────────────────────────┬─────────────────────────────────────────────────────────────────────────────5%
│ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │
(3) ─┴─member-name─┴──┼──────────┼──)─┘
└─OUTMBR(───
└─\ADD─────┘
Notes:
P All parameters preceding this point can be specified in positional form.

1 A maximum of 4 repetitions

2 If OUTPUT(*OUTFILE) is specified, a file name must be specified for OUTFILE.

3 If OUTFILE is not specified, OUTMBR must not be specified.

Purpose referenced by each program, is created. For files, informa-


tion about how each file is used (input, output, update,
The Display Program References (DSPPGMREF) command unspecified, or any combination of these four) is also shown
provides a list of the system objects to which the specified or printed.
programs refer.
If the information is written to a database file, the database
Program Type System Objects
file will have a record format named QWHDRPPR. The
BASIC *FILE (externally described) and *PGM fields in record format QWHDRPPR are the same as the
C No information is provided for programs in fields in the IBM-supplied format QWHDRPPR in file
C except for ILE C (program type CLE) QADSPPGM in the library QSYS. The following information
is contained in the database file:
CBLLE *FILE, *PGM, and *SRVPGM
Ÿ The name of the program and its text description
CL *FILE, *PGM, and *DTAARA
Ÿ The name of the library containing the program
CLE *SRVPGM
Ÿ The number of objects referenced by the program
CLLE *FILE, *PGM, *DTAARA, and *SRVPGM
Ÿ The qualified name of the system object
COBOL *FILE and *PGM (literal names on the CALL
command) Ÿ The information retrieval dates

CSP *FILE, *PGM, *MSGF, *CSPMAP, and Ÿ The object type of the referenced object
*CSPTBL
For files, the record contains the following additional fields:
PASCAL No information is provided for programs in
Ÿ The name of the file in the program (possibly different
Pascal
from the system object name if an override was in effect
PL/I *FILE and *PGM when the program was created)
RPG *FILE, *DTAARA, *PGM Ÿ The program use of the file (1=input, 2=output,
RPGLE *FILE, *PGM, *DTAARA, and *SRVPGM 4=update, 8=unspecified, or a number representing a
combination of any of these four; for example, a code of
This information can be shown, printed, or written to (stored 11 is a combination of 1, 2, and 8, which is input, output,
in) a database output file (an OUTFILE). and unspecified)
Ÿ The number of record formats referenced, if any
If the information is shown or printed, a list (by library) of the
specified user-authorized programs, along with the objects Ÿ The name of the record format used by the file and its
record format level identifier

Chapter 2. OS/400 Command Descriptions P3-213


DSPPGMREF

Ÿ The number of fields referenced for each format | QDSNX QPFRDATA QUSRBRM QUSRSYS
| QGPL QRCL QUSRIJS QUSRVxRxMx
Note: The referenced object names and libraries listed may
| QGPL38 QS36F QUSRINFSKR
be different than the actual names of the objects, | QMQMDATA QUSER38 QUSRNOTES
since this information is stored when the program is | QMQMPROC QUSRADSM QUSRRDARS
created. If the object has been moved since the
program was created, or an override was in effect Note: A different library name, of the form
during creation, the names listed may differ from the QUSRVxRxMx, can be created by the user
actual names. for each release that IBM supports. VxRxMx
is the version, release, and modification level
Restrictions: of the library.
1. The user must have object operational authority for the library-name: Specify the name of the library to be
program. searched.
2. Also, of the libraries specified by the library qualifier, *ALL: All programs in the specified library (or all the
only the libraries for which the user has read authority libraries identified in the library qualifier to which the user
are searched for the programs. has access) have their information shown.
Note: To see the parameter and value descriptions for this generic*-program-name: Specify the name of the
command, refer to the online help text. For more program or the generic name of several programs in the
information about printing the help text, refer to specified library (or all libraries identified in the library
“Printing CL Command Descriptions” in Chapter 1. qualifier) that has information shown. A generic name is
a character string of one or more characters followed by
an asterisk (*); for example, ABC*. The asterisk substi-
Required Parameters
tutes for any valid characters. A generic name specifies
PGM all objects with names that begin with the generic prefix
Specifies the qualified name of the program (or all pro- for which the user has authority. If an asterisk is not
grams) that has a list of the files and other related included with the generic (prefix) name, the system
system objects that are referenced by the program. A assumes it to be the complete object name. If the com-
specific program name or a generic program name is plete object name is specified, and multiple libraries are
specified; either type can be optionally qualified by a searched, multiple objects can be displayed only if *ALL
library name. Only the libraries in the specified library or *ALLUSR library values can be specified for the
qualifier that the user either owns or is authorized to use name. For more information on the use of generic
are searched for the program(s). names, refer to “Generic Object Names” in Chapter 2.
The name of the program can be qualified by one of the program-name: Specify the name of the program to
following library values: have information shown.

*LIBL: All libraries in the job's library list are


searched until the first match is found. Optional Parameters
*CURLIB: The current library for the job is OUTPUT
searched. If no library is specified as the current Specifies whether the output from this command is dis-
library for the job, the QGPL library is used. played, printed, or directed to a database file. More
*USRLIBL: Only the libraries in the user portion of information on this parameter is in Appendix A,
the job's library list are searched. “Expanded Parameter Descriptions.”

*ALL: All libraries in the system, including QSYS, *: Output requested by an interactive job is shown on
are searched. the display. Output requested by a batch job is printed
with the job's spooled output.
*ALLUSR: All user libraries are searched. All
libraries with names that do not begin with the letter *PRINT: The output is printed with the job's spooled
Q are searched except for the following: output.
#CGULIB #DFULIB #RPGLIB #SEULIB *OUTFILE: The output is directed to the database file
#COBLIB #DSULIB #SDALIB specified on the OUTFILE parameter.
Although the following Qxxx libraries are provided OBJTYPE
by IBM, they typically contain user data that Specifies the object type for which information is dis-
changes frequently. Therefore, these libraries are played.
considered user libraries and are also searched:
*PGM: Only program information is displayed.
*ALL: Program information and SQL package informa-
tion are displayed.
*SQLPKG: Only SQL package information is displayed.

P3-214 OS/400 CL Reference - Part 2 (Full Version)


DSPPGMREF

*SRVPGM: Service program information is displayed. member-name: Specify the file member that receives
the output. If OUTMBR(member-name) is specified and
*MODULE: Module information is displayed.
the member does not exist, the system creates it.
OUTFILE
Element 2: Operation to Perform on Member
Specifies the qualified name of the database output file
in which the program-related information is written. *REPLACE: The system clears the existing member
and adds the new records.
When creating the database output file, the current date,
time, and system name must be included. The system *ADD: The system adds the new records to the end of
name is the name of the source system, not the target the existing records.
system. If the specified file does not exist, the system
creates a database output file and member. If the file is Examples
created, the description text is 'Outfile for DSPPGMREF'
and the public authority is *EXCLUDE. Example 1: Storing a List of Programs
Note: The format of the output file must be the same DSPPGMREF PGM(LIBRARY1/\ALL) OUTPUT(\OUTFILE)
as QWHDRPPR of the system file QADSPPGM. OUTFILE(LIB2/FILE2)
More information on the OUTFILE format is in
the DB2 for AS/400 Database Programming This command creates a list of all authorized programs found
book. in LIBRARY1, and of the files and other system objects that
the programs reference. It stores the list in a database file
The name of the database file can be qualified by one of named FILE2 in LIB2.
the following library values:
Example 2: Printing a List of Objects
*LIBL: All libraries in the job's library list are
searched until the first match is found. DSPPGMREF PGM(LIBRARY1/BILLING) OUTPUT(\PRINT)
*CURLIB: The current library for the job is This command creates a list of system objects that are refer-
searched. If no library is specified as the current enced by the BILLING program in LIBRARY1. The output is
library for the job, the QGPL library is used. spooled for printing.
library-name: Specify the name of the library to be
searched.
Additional Considerations
database-file-name: Specify the name of the database
output file in which the program-related information is When the DSPPGMREF command is entered, the library is
placed. If the specified file is not found, a file by that searched for the program or programs specified on the PGM
name is created and stored in the specified library, or in parameter; then a group of records that give system object-
*CURLIB if not qualified. This file can be used again related information about each program is created. The
when other DSPPGMREF commands are entered. The records are placed in the printer device file named
IBM-supplied database file QADSPPGM cannot be spec- QPDSPPGM. If OUTPUT(*PRINT) is specified on the
ified. command, the records are listed on the printer in the fol-
lowing order:
OUTMBR
Ÿ Header information: Lists the DSPPGMREF command
Specifies the name of the database file member to which
input values.
the output is directed.
Ÿ Program-related information: Lists, for each program
Element 1: Member to Receive Output
identified by the PGM parameter, all of the system
*FIRST: The first member in the file receives the output. objects (including files) that are referenced by the
If OUTMBR(*FIRST) is specified and the member does program. If more than one program is identified, the
not exist, the system creates a member with the name of beginning of the next one follows the end of the previous
the file specified on the OUTFILE parameter. If the one.
member exists, the user has the option to add records to
the end of the existing member or to clear the existing If the DSPPGMREF command is entered interactively and
member and add the new records. OUTPUT(*) is specified or assumed, the records in the
printer device file are shown instead of being printed.

Chapter 2. OS/400 Command Descriptions P3-215


DSPPGMVAR

DSPPGMVAR (Display Program Variable) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌──
─────────────────────────────────────────────────────────────────┐
55──DSPPGMVAR──PGMVAR(───6─(──┬─\CHAR──────────────┬──┬────────────────────────────┬────
(1) ─)─┴───
(2) ──)───────────────────────────────5
└─'program-variable'─┘ │ ┌──
──────────────────┐ │
6
└─(────'basing-pointer'─┴──)─┘
(P) ──┬───────────────────────────────┬──┬───────────────────────┬────────────────────────5
5──┬──────────────────────────────────┬───
│ ┌─1─────────────────┐ │ │ ┌─\DCL─────────────┐ │ │ ┌─\CHAR─┐ │
└─START(──┴─starting-position─┴──)─┘ └─LEN(──┴─displayed-length─┴──)─┘ └─OUTFMT(──┴─\HEX──┴──)─┘
5──┬────────────────────────┬──┬───────────────────────────┬──┬────────────────────────────────────────┬───────────────────────5%
│ ┌─\──────┐ │ │ ┌─\DFTPGM──────┐ │ │ ┌─\LAST──────────────────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘ └─PGM(──┴─program-name─┴──)─┘ └─RCRLVL(──┴─recursion-level-number─┴──)─┘
Notes:
1 A maximum of 5 repetitions

2 A maximum of 10 repetitions

P All parameters preceding this point can be specified in positional form.

Purpose special value displays a character view of a pointer


being shown without the use of a based variable.
The Display Program Variable (DSPPGMVAR) command
'program-variable': Specify the names of from 1 through
shows the current value of one or more program variables in
10 program variables to be shown. The name must be
a program that is being debugged. The variables can be
enclosed in apostrophes if it contains special characters.
specified either by their variable names or by their machine-
interface object-definition-table-vector (MI ODV) numbers. If the program variable is an array, the subscripts repre-
Up to 10 variables can be specified. senting an element in the array can be specified. If an
array name is specified without any subscripts, all of the
Restrictions: array elements are recorded. A single-dimensional
1. This command is valid only in debug mode. To start cross-section can also be specified. Up to 132 charac-
debug mode, refer to the STRDBG (Start Debug) ters may be specified for this program variable entry.
command. This includes any qualifiers, subscripts, embedded
blanks, parentheses, and commas. It does not include
2. This command cannot be used if the user is servicing the enclosing apostrophes when special characters are
another job, and that job is on a job queue, or is being used. An integer, MI ODV number, asterisk (single-
held, suspended, or ended. dimensional cross-section), or a numeric variable name
3. This command cannot be used to display variables in a can be specified for a subscript. For more information
bound program. on the program-variable value, refer to Appendix C,
“Parameter Values Used for Testing and Debugging.”
4. This command cannot be used to display variables
within the system domain unless the user has Some examples are:
*SERVICE special authority. PGMVAR(A)
Note: To see the parameter and value descriptions for this PGMVAR('A(2,B)')
command, refer to the online help text. For more PGMVAR('B(I1,\,I3)')
PGMVAR('VAR1 OF A(I,J IN B)')
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. Element 2: Basing Pointers
'basing-pointer': Specify up to five basing pointers for
Required Parameter the each program variable being displayed. In some
languages, the program variable may be based on a
PGMVAR pointer variable. This set of values allows the user to
Specifies the names of from 1 through 10 program vari- specify the basing pointers for the variable to be dis-
ables whose values are shown. The variables can be in played. Each basing pointer name must be enclosed in
a high-level language (HLL) or machine-interface (MI) apostrophes if it contains special characters.
program.
If the basing pointer is an array, the subscripts repre-
Element 1: Program Variables senting an element in the array must be specified. Up to
*CHAR: This special value is specified instead of a vari- 132 characters can be specified for a basing pointer
able name if a basing pointer is also specified. This name. This includes any qualifiers, subscripts,
embedded blanks, parentheses, and commas. It does
not include the enclosing apostrophes when special

P3-216 OS/400 CL Reference - Part 2 (Full Version)


DSPPGMVAR

characters are used. An integer, MI ODV number, or a *HEX: Program variables are shown in both character
numeric variable name can be specified for a subscript. format and hexadecimal format.
For more information on the basing pointer value, refer
OUTPUT
to Appendix C, “Parameter Values Used for Testing and
Specifies whether the output from the command is
Debugging.”
shown at the requesting display station or printed with
Some examples are: the job's spooled output. More information on this
PGMVAR(('VAR1(B,5)' 'PTR2(C,P2)')) parameter is in Appendix A, “Expanded Parameter
PGMVAR((VAR2 (BASEPTRA BASEPTRB))) Descriptions.”
*: Output requested by an interactive job is shown on
the display. Output requested by a batch job is printed
Optional Parameters with the job's spooled output.
START *PRINT: The output is printed with the job's spooled
Specifies, for string variables only, the starting position in output.
the string from which its value is being displayed. If
PGM
more than one string variable is specified in the
Specifies the name of the program that contains the
PGMVAR parameter, the same starting position value is
program variables shown.
used for each one. For a bit string, the value specifies
the starting bit position; for a character string, the value *DFTPGM: The program currently specified as the
specifies the starting character position. default program has its variables shown.
1: The variable is shown from the first position through program-name: Specify the name of the program whose
the length specified on the LEN parameter. program variables are shown.
starting-position: Specify the first position in the string RCRLVL
being displayed. The START value specified must not Specifies which recursion level of the program contains
be larger than the maximum string length for any vari- the variables being shown. Recursion level 1 is the first
able specified, except that START(1) is allowed if the (or earliest) call of the program, recursion level 2 is the
maximum length for a string is zero. The LEN value, second call of the program, and so on to the last (most
plus the START position minus one, must not be greater recent) recursion level in the stack. For example, if
than the maximum string length. These checks are program A calls program B, and then program B calls
made for each string variable specified in the PGMVAR program A, a new recursion level of program A is
parameter. formed. Some high-level languages also allow recursive
procedures. For these programs, refer to the appro-
LEN
priate high-level language manual for more information.
Specifies, for string variables only, the length of the
string shown when the breakpoint is reached, starting at *LAST: The last (most recent) call of the program con-
the position specified by the START parameter. If more tains the pointer being shown.
than one string variable is specified in the PGMVAR recursion-level-number: Specify the number of the
parameter, the same value is used for each one. For a recursion level of the program containing the pointer
bit string, the value specifies the number of bits shown; being shown.
for a character string, the value specifies the number of
characters shown.
*DCL: The string variable is shown to the end of the
Examples
string or for a value of 200 bytes, whichever is less. If Example 1: Displaying Program Variables
the string variable has a maximum length of zero, only
LEN(*DCL) is allowed. DSPPGMVAR PGMVAR('&QUANT') PGM(MYPROG)

displayed-length: Specify the length of the data shown. Assuming that the program MYPROG is in debug mode, this
The length (as well as the combination of START and command shows the name and current value of the CL vari-
LEN) must be no greater than the length of the shortest able called &QUANT; its type and length are also shown.
string specified in the PGMVAR parameter.
Example 2: Displaying Program Variables
OUTFMT
DSPPGMVAR PGMVAR(TOTSALES MANHRS)
Specifies the format in which the objects are shown.
PGM(REGION) RCRLVL(1)
*CHAR: The program variables are shown in character
form. This command shows the program variables TOTSALES and
MANHRS of the first call of the program REGION.

Chapter 2. OS/400 Command Descriptions P3-217


DSPPRB

DSPPRB (Display Problem) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──┬────────────────────────────────────────┬────────────────────────────────5
55──DSPPRB──┬───────────────────────────────────┬───
│ ┌─\ALL───────────────┐ │ │ ┌─\ALL───────────────────┐ │
└─PRBID(──┴─problem-identifier─┴──)─┘ │ │ ┌──
─────────────────┐ │ │
6 (1) ─┴──)─┘
└─STATUS(──┴───┬─\OPENED─────┬─┴───
├─\READY──────┤
├─\PREPARED───┤
├─\SENT───────┤
├─\ANSWERED───┤
├─\VERIFIED───┤
├─\CLOSED─────┤
└─status-type─┘
5──┬────────────────────────────────────┬───────────────────────────────────────────────────────────────────────────────────────5
│ ┌─\ALL──────────────────┐ │
│ │ ┌──
────────────────┐ │ │
6 (2)
└─SEV(──┴───severity-level─┴────┴──)─┘
5──┬──────────────────────────────────────────────────────────────────────────────────┬─────────────────────────────────────────5
│ ┌─\AVAIL─────┐ ┌─\BEGIN─────┐ │
└─PERIOD(──┴─start-time─┴──┼────────────┼──)──┬──────────────────────────────────┬─┘
├─\CURRENT───┤ │ ┌─\AVAIL───┐ ┌─\END─────┐ │
└─start-date─┘ └─(──┴─end-time─┴──┼──────────┼──)─┘
├─\CURRENT─┤
└─end-date─┘
5──┬──────────────────────────────────────────────────────────────────────┬──┬─────────────────────────────────┬────────────────5
│ ┌─\ALL──────┐ │ │ ┌─\ALL──────────┐ │
└─HARDWARE(──┴─type-code─┴──┬─────────────────────────────────────┬──)─┘ └─RESOURCE(──┴─resource-name─┴──)─┘
│ ┌─\ALL─────────┐ ┌─\ALL──────────┐ │
└─┴─model-number─┴──┼───────────────┼─┘
└─serial-number─┘
5──┬───────────────────────────────────────────────────────────────────────────────────────┬────────────────────────────────────5
│ ┌─\ALL──────────────────┐ │
└─LICPGM(──┴─licensed-program-name─┴──┬────────────────────────────────────────────┬──)─┘
│ ┌─\ALL──────────┐ ┌─\ALL────────────────┐ │
└─┴─release-level─┴──┼─────────────────────┼─┘
└─modification-number─┘
5──┬────────────────────────────────────────────────┬──┬────────────────────────────────────┬───────────────────────────────────5
│ ┌─\ALL─────────────────────────┐ │ │ ┌─\ALL──────────────────┐ │
└─FUNCTION(──┼─generic\-function-identifier─┼──)─┘ └─PGM(──┼─generic\-program-name─┼──)─┘
└─function-identifier──────────┘ └─program-name──────────┘
5──┬────────────────────────────────────────────┬──┬────────────────────────────────────────────────────────────┬───────────────5
│ ┌─\ALL────────────────────────┐ │ │ ┌─\ALL───────────────┐ ┌─\ALL───────────────┐ │
└─MSGID(──┼─generic\-message-identifier─┼──)─┘ └─ORIGIN(──┼─\NETATR────────────┼──┼────────────────────┼──)─┘
└─message-identifier──────────┘ └─network-identifier─┘ ├─\NETATR────────────┤
└─control-point-name─┘
5──┬──────────────────────────────────────────┬──┬────────────────────────────┬──┬───────────────────────────┬──────────────────5
│ ┌─\ALL──────────────────────┐ │ │ ┌─\ALL──────┐ │ │ ┌─\ALL───────┐ │
└─SRVID(──┴─service-identifier-number─┴──)─┘ └─ASNUSER(──┴─user-name─┴──)─┘ └─GROUP(──┴─group-name─┴──)─┘
5──┬───────────────────────┬──┬───────────────────────────┬──┬──────────────────────────────┬───────────────────────────────────5
│ ┌─\ALL─┐ │ │ ┌─\ALL──────┐ │ │ ┌─\────────────┐ │
└─PRBTYPE(──┼─1────┼──)─┘ └─PRBCGY(──┼─\REPORT───┼──)─┘ └─OUTPUT(──┼─\PRINT───────┼──)─┘
├─2────┤ ├─\CRITICAL─┤ (3, 4) ┘
└─\OUTFILE─────
├─3────┤ └─\LOGONLY──┘
├─4────┤
├─5────┤
└─6────┘
5──┬──────────────────────────────────────────────────────────┬──┬─────────────────────────────────────────────┬────────────────5
│ ┌─\LIBL/────────┐ │ │ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │
(3, 4, 5) ─┼───────────────┼──database-file-name──)─┘ └─OUTMBR(───
└─OUTFILE(─────── (3) ─┴─member-name─┴──┼──────────┼──)─┘
├─\CURLIB/──────┤ └─\ADD─────┘
└─library-name/─┘
5──┬─────────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\BASIC──┐ │
(5) ─┼─\CAUSE──┼──)─┘
└─TYPE(───
├─\FIX────┤
├─\USRTXT─┤
└─\SPTDTA─┘
Notes:
P All parameters preceding this point can be specified in positional form.

1 A maximum of 6 repetitions

P3-218 OS/400 CL Reference - Part 2 (Full Version)


DSPPRB

2 A maximum of 3 repetitions
3 The OUTFILE and OUTMBR parameters are valid only when OUTPUT(*OUTFILE) is specified.
4 If OUTPUT(*OUTFILE) is specified, a database file name is required for the OUTFILE parameter.
5 The TYPE parameter is valid only when a value is specified for the OUTFILE parameter.

Purpose SEV
Specifies the severity level of the problem log entries
The Display Problem (DSPPRB) command shows or print being shown on the display. The severity level is
service information related to performing hardware and soft- assigned by the user when the problem is prepared for
ware maintenance. The service information, contained in the reporting. The four severity levels are:
problem log entries, are shown on the DSPPRB display,
printed with the job's output, or stored in a database file. 1 High
2 Medium
3 Low
Optional Parameters 4 None
PRBID *ALL: Problem log entries with any severity level are
Specifies the problem identifier of the problem being shown.
selected. Problems with different system origins can
severity-level: Specify at least one or as many as three
have the same identifier. This parameter can be used
of the four severity levels.
with the ORIGIN parameter to select a single problem
from a particular system origin. PERIOD
*ALL: All problem identifiers are selected. Specifies the period of time for which the data log is
printed. The following values can be coded in this
problem-identifier: Specify the 10-character problem parameter, which contains two sets of two values each
identifier of the problem being selected. (four list elements).
STATUS Element 1: Starting Time
Specifies the status of the problem log entries. The
*AVAIL: The error data that is available for the speci-
seven status types are as follows:
fied starting or ending date is printed.
*OPENED The problem is in OPENED status. The start-time: Specify the starting time of the specified
problem has been identified and a starting date for which the error data is printed. The
problem record has been created. time is specified in 24-hour format with or without a time
*READY The problem is in READY status. separator as follows:
Problem analysis information has been
Ÿ With a time separator, specify a string of 5 or 8
added to the problem record.
digits, where the time separator for the job sepa-
*PREPARED The problem is in PREPARED status. rates the hours, minutes, and seconds. If you issue
The problem has been prepared for this command from the command line, the string
reporting. must be enclosed in apostrophes. If a time sepa-
*SENT The problem is in SENT status. The rator other than the separator specified for your job
problem has been sent to a service pro- is used, this command fails.
vider, but no answer has been returned. Ÿ Without a time separator, specify a string of 4 or 6
*ANSWERED The problem is in ANSWERED status. digits (hhmm or hhmmss) where hh = hours, mm =
An answer was returned by the service minutes, and ss = seconds. Valid values for hh
provider or added by an operator on this range from 00 through 23. Valid values for mm and
system. ss range from 00 through 59.

*VERIFIED The problem is in VERIFIED status. The Element 2: Starting Date


problem has been resolved and the
system operator has verified that the *BEGIN: The logged data from the beginning of the log
problem has been corrected. is displayed.

*CLOSED The problem is closed. Note: If PERIOD(*BEGIN) is specified, then any time
value other than *AVAIL for start-time is ignored.
*ALL: Problem log entries with any status are shown.
*CURRENT: The logged data for the current day, and
status-type: Specify up to six status types that identify the time that has elapsed between the specified starting
the problem log entries being displayed. time and ending time for the day, is displayed.

Chapter 2. OS/400 Command Descriptions P3-219


DSPPRB

start-date: Specify the date shown. The date must be resource-name: Specify the name of the resource for
entered in the format specified by the system values which logged entries are being displayed.
QDATFMT and, if separators are used, QDATSEP.
LICPGM
Element 3: Ending Time Specifies the name of the failing licensed program for
*AVAIL: The logged data that is available for the speci- which problem log entries are shown.
fied ending date is displayed. Element 1: Licensed Program
end-time: Specify the time that the data logging ends. *ALL: All licensed programs are shown regardless of
See the description of start-time for details about how whether any are identified as failing.
time can be specified.
Note: If *ALL is specified, any value other than *ALL for
Element 4: Ending Date release and modification is ignored.
*END: The last day on which data was logged is licensed-program-name: Specify the name of the failing
shown. If PERIOD(*END) is specified, a time value licensed program.
other than *AVAIL for end-time is ignored.
Element 2: Release Level of the Licensed Program
*CURRENT: The logged data for the current day, and
*ALL: All entries identifying failing licensed programs
the time that has elapsed between the specified starting
are shown.
time and ending time for the day, is displayed.
end-date: Specify the date that the data logging ends. release-level: Specify the release level of the failing
licensed program.
The date must be entered in the format specified by the
system values QDATFMT and, if separators are used, Element 3: Modification Number of the Release
QDATSEP.
*ALL: All entries identifying a failing licensed program
HARDWARE of the specified licensed program and release are
Specifies the name of the problem log entries identifying shown.
the failing device. modification-number: Specify the modification number of
Note: If *ALL is specified, then any value other than the release of the failing licensed program.
*ALL for model and serial number is ignored.
FUNCTION
Element 1: Machine Type Specifies the name of the function identifier for which the
problem log entries are shown.
*ALL: Entries are shown regardless of which device, if
any, is identified as failing. *ALL: Entries are shown regardless of which function
identifier, if any, is identified.
type-code: Specify the 4-character type code of the
device. generic*-function-identifier: Specify the generic name of
the function identifier. A generic name is a character
Element 2: Model Number
string of one or more characters followed by an asterisk
*ALL: All entries identifying the specified type of failing (*); for example, ABC*. The asterisk substitutes for any
device are shown. valid characters. A generic name specifies all objects
model-number: Specify the 3-character model number with names that begin with the generic prefix for which
of the device. the user has authority. If an asterisk is not included with
the generic (prefix) name, the system assumes it to be
Element 3: Serial Number
the complete object name. If the complete object name
*ALL: All entries identifying the specified type and is specified, and multiple libraries are searched, multiple
model of the failing device are shown. objects can be displayed only if *ALL or *ALLUSR library
values can be specified for the name. For more infor-
serial-number: Specify the serial number of the device
mation on the use of generic names, refer to “Generic
in one of the following formats where n is a decimal digit
Object Names” in Chapter 2.
(0-9).
function-identifier: Specify the complete function identi-
Ÿ nnnnn
fier of the function. If blank characters are included, the
Ÿ nnnnnnn
character string must be enclosed in apostrophes.
Ÿ nn-nnnnn
Ÿ nn-nnnnnnn PGM
Specifies that only problem log entries identifying the
RESOURCE
failing program are shown. For machine-detected prob-
Specifies the name of the failing resource, or all failing
lems, the failing program is identified by the possible
resources, for which problem log entries are shown.
cause with the highest probability of failure.
*ALL: Entries are shown regardless of which resource
*ALL: Entries are shown regardless of which program,
name, if any, is identified by the problem.
if any, is identified.

P3-220 OS/400 CL Reference - Part 2 (Full Version)


DSPPRB

generic*-program-name: Specify the generic name of GROUP


the program. Specifies the group in the filter to which the problem is
assigned.
program-name: Specify the name of the program.
*ALL: All problem log entries are shown, regardless of
MSGID
the group assigned to them.
Specifies the message or range of messages for which
the problem log entries are shown. This is the problem group-name: Specify the 10-character problem filter
message identifier shown in the problem details display. group assigned to the entry.
For user-detected problems, the message identifier is Note: The values are blank if problem log filtering is not
entered by the user. used.
*ALL: Entries are shown regardless of which problem
PRBTYPE
message identifier is associated with a problem.
Specifies which type of problems to display.
generic*-message-identifier: Specify the generic name *ALL: All problem log entries are shown, regardless of
of the message identifier.
the problem type.
message-identifier: Specify the problem message identi- 1: Only machine-detected problems are shown.
fier.
2: Only user-detected problems are shown.
ORIGIN
3: Only PTF order problems are shown.
Specifies the nodes for which the problem log entries
are shown. 4: Only application-detected problems are shown.
Element 1: Network Identifier 5: Only PC machine-detected problems are shown.
*ALL: Entries are shown regardless of the network 6: Only PC user-detected problems are shown.
identifier of the origin system of each entry.
PRBCGY
*NETATR: Only entries that originated on systems with Specifies which category of problems to display.
the same local network identifier as the one defined in
the network attributes for this system are shown. *ALL: All problems are shown.
*REPORT: Problems that are logged and reported to
network-identifier: Specify a network identifier. Only
the service provider are shown.
entries originating on systems with this local network
identifier are shown. *CRITICAL: Problems that are critical are shown.
Element 2: Control Point Name *LOGONLY: Problems that are logged, but not reported
to the service provider, are shown.
*ALL: All entries originating on systems using the
network identifier are shown. OUTPUT
*NETATR: Only entries originating on systems with the Specifies whether the output from the command is
same control point name as the one defined in the shown at the requesting work station, printed with the
network attributes are shown. job's spooled output, or directed to a database file.

control-point-name: Specify the name of the control More information on this parameter is in Appendix A,
point. Only entries originating on systems with this “Expanded Parameter Descriptions.”
control point name are shown. *: Output requested by an interactive job is shown on
the display. Output requested by a batch job is printed
SRVID
with the job's spooled output.
Specifies that only problem log entries using the IBM
service-assigned number are shown. This number is *PRINT: The output is printed with the job's spooled
assigned when the problem is reported to IBM service output.
support.
*OUTFILE: The output is directed to the database file
*ALL: Entries are shown regardless of which service specified on the OUTFILE parameter.
number, if any, is assigned to the problem.
OUTFILE
service-identifier-number: Specify the service identifier Specifies the qualified name of the database file that
number. receives the output of the command. If the file does not
exist, this command creates a database file in the speci-
ASNUSER
fied library. If a file is created, the text reads "Outfile for
Specifies which problem log entries are displayed.
DSPPRB," and the authority for users other than those
*ALL: All problem log entries are shown, regardless of who have specific authority, group authority, or authority
the user name assigned to them. from an authorization list is *EXCLUDE. Refer to the
user-name: Specify the user name assigned to the
problem log entries to be displayed.

Chapter 2. OS/400 Command Descriptions P3-221


DSPPRB

tables at the end of the TYPE parameter description for *FIX: Fixes to the problem are program temporary fix
the format used. (PTF) records.
Note: The format must be the same as that of the *USRTXT: User-supplied text, consisting of note
TYPE parameter. records, is placed in the output file.
The name of the database file can be qualified by one of *SPTDTA: Output files with supporting data identifiers
the following library values: are created.

*LIBL: All libraries in the job's library list are Basic Problem Data (*BASIC)
searched until the first match is found. The output file produced for type *BASIC has one record
*CURLIB: The current library for the job is for each problem in the problem log. Each record has a
searched. If no library is specified as the current unique problem identifier.
library for the job, the QGPL library is used. The record format is QASXPBOF. See the following
library-name: Specify the name of the library to be "DSPPRB Fields for Basic Problem Data
searched. (TYPE(*BASIC))" table for the fields in the record.

database-file-name: Specify the name of the database Table 11 (Page 1 of 3). DSPPRB Fields for Basic Problem
file to which the output of the command is written. Data (TYPE(*BASIC))
OUTMBR Field Name Length Description
Specifies the name of the database file member to which PBRCEN 1 Century that the data was
the output is directed. retrieved and placed in the output
file:
Element 1: Member to Receive Output
0 20th century
*FIRST: The first member in the file receives the output. 1 21st century
If OUTMBR(*FIRST) is specified and the member does
PBRDAT 6 Date that the data was retrieved
not exist, the system creates a member with the name of
and placed in the output file.
the file specified on the OUTFILE parameter. If the
member exists, records may be either added to the end PBRTIM 6 Time that the data was retrieved
of the member or replace existing records. and placed in the output file.
PBSYSN 8 Name of the system in which the
member-name: Specify the file member that receives
DSPPRB command is run to
the output. If OUTMBR(member-name) is specified and create this output file.
the member does not exist, the system creates it.
PBFORM 8 Record format, which is always
Element 2: Operation to Perform on Member *BASIC.
*REPLACE: The system clears the existing member PBID 10 Problem identifier.
and adds the new records. PBORG 20 System origin.
*ADD: The system adds the new records to the end of PBORGI 1 Problem origin indication:
the existing records.
L Local
TYPE R Remote
Specifies the type of problem information that is placed PBSEV 1 Problem severity levels:
in the output file. Only one type of data can be placed 1 High
in each file. More information on each value of this 2 Medium
parameter, including a table on the output record format 3 Low
for the value, is located at the end of this parameter 4 None
description. PBTYPE 1 Problem type (which identifies how
Note: This parameter is valid only when a value is the problem was detected):
specified also on the OUTFILE parameter. 1 Machine-detected
2 User-perceived
*BASIC: Basic problem data includes problem type and
3 PTF order
status; device type, model, and serial number; product
ID, contact information; and tracking data. PBSTAT 1 Problem status:
O Opened
*CAUSE: Possible problem causes include point-of-
R Ready
failure, partial, isolation, or answer cause records. P Prepared
Answer causes are used if they are available. If they S Sent
are not, isolation causes are used. If isolation causes A Answered
are not available, partial causes are used. If partial V Verified
causes are not available, then the point-of-failure causes C Closed
are used.

P3-222 OS/400 CL Reference - Part 2 (Full Version)


DSPPRB

Table 11 (Page 2 of 3). DSPPRB Fields for Basic Problem Table 11 (Page 2 of 3). DSPPRB Fields for Basic Problem
Data (TYPE(*BASIC)) Data (TYPE(*BASIC))
Field Name Length Description Field Name Length Description
PBDESC 7 Message identifier of a message in PBFTEL2 30 Alternate fax telephone number.
the QCPFMSG message file that The number service support per-
describes the problem. sonnel should use to contact the
user's company if the primary tele-
PBPMSG 7 Message identifier of a message in
phone number is not available.
the QCPFMSG message file that
describes the reference code. PBENTR 36 Company name.
PBRFCD 4 Original reference code. PBSTR1 36 First line of street address.
PBSLID 8 Identifies the entry recorded in the PBSTR2 36 Second line of street address.
error log when the system
PBSTR3 36 Third line of street address.
detected a problem.
PBCITY 36 City and state.
PBMACH 4 Identifies the type of device with
which this problem is associated. PBCOUN 20 Country.
PBMODL 3 Identifies the model of the device PBZIP 12 ZIP code.
with which this problem is associ-
PBSNUM 10 Service assigned number.
ated.
PBEPDP 8 Identifies the program used to run
PBFEAT 4 Identifies the feature number of the
problem analysis.
device with which this problem is
associated. PBPDPE 2 Identifies the code the system
returned after problem analysis is
PBMSER 10 Identifies the serial number of the
run.
device with which this problem is
associated. PBISOS 1 Identifies the result of running
problem analysis:
PBEC 12 Identifies the engineering change
(EC) level of the device with which 1 Problem analysis was suc-
this problem is associated. cessful, the problem still
exists.
PBLPP 7 Shows the identification number of 2 Problem analysis was suc-
the program with the problem. cessful, the problem has
This number could be for a been resolved.
licensed program or for licensed 3 Problem analysis was not
internal code. successful.
PBVER 4 Identifies the version of the 4 Problem analysis was not
program with the problem. completed.
5 Problem analysis was par-
PBREL 2 Identifies the release level of the
tially completed.
program with the problem.
PBDATO 6 Date the problem was opened.
PBMDF 2 Identifies the modification level that
applies to the release level of the PBTIMO 6 Time the problem was opened.
licensed program with the problem. PBUSRO 10 User who opened the problem.
PBCNT 36 The name of the person whom PBDATA 6 Date the problem was analyzed.
service personnel should contact
to help resolve this problem. PBTIMA 6 Time the problem was analyzed.

PBTEL1 30 Primary telephone number. The PBUSRA 10 User who analyzed the problem.
number service support personnel PBDATP 6 Date the problem was prepared.
should use to contact the user's
company. PBTIMP 6 Time the problem was prepared.

PBTEL2 30 Alternate telephone number. The PBUSRP 10 User who prepared the problem.
number service support personnel PBDATS 6 Date the service request was sent.
should use to contact the user's
company if the primary telephone PBTIMS 6 Time the service request was sent.
number is not available. PBUSRS 10 User who sent the service request.
PBFTEL1 30 Primary fax telephone number. PBDATN 6 Date the service request was
The number service support per- answered.
sonnel should use to contact the
user's company. PBTIMN 6 Time the service request was
answered.
PBUSRN 10 User who answered the problem.

Chapter 2. OS/400 Command Descriptions P3-223


DSPPRB

Table 11 (Page 3 of 3). DSPPRB Fields for Basic Problem Table 12 (Page 1 of 2). DSPPRB Fields for Possible Cause
Data (TYPE(*BASIC)) Data (TYPE(*CAUSE))
Field Name Length Description Field Name Length Description
PBDATF 6 Date fix was verified. CARCEN 1 Century that the data was
retrieved and placed in the output
PBTIMF 6 Time fix was verified.
file:
PBUSRF 10 User who verified the fix.
0 20th century
PBDATC 6 Date the problem was closed. 1 21st century
PBTIMC 6 Time the problem was closed. CARDAT 6 Date that the data was retrieved
and placed in the output file.
PBUSRC 10 User who closed the problem.
CARTIM 6 Time that the data was retrieved
PBSYMP 256 Symptom string.
and placed in the output file.
PBUSRD 10 User assigned to the problem.
CASYSN 8 Name of the system where the
PBFTRN 10 Filter assigned to the problem. DSPPRB command was run to
create this output file.
PBFTRL 10 Filter library.
CAFORM 8 Format, which is always *CAUSE.
PBFTRG 10 Group in filter assigned to the
problem. CAID 10 Problem identifier.
PBALIB 10 Library containing APAR data CAORG 20 System origin.
saved for the problem.
CALIST 1 Cause list type:
Note:
P The possible cause list was
1. All fields are of type C (character). identified when the failure
2. All dates are represented in YYMMDD format where: occurred.
L The possible cause list was
YY Year identified by problem analysis
MM Month which was not completed.
DD Day I The possible cause list was
For example 940515 represents May 15, 1994. identified by problem anal-
ysis.
3. All times are for a 24-hour clock and are represented in
A The possible cause list was
HHMMSS format where:
returned by RETAIN as result
HH Hour of a service request.
MM Minutes
CACODE 4 Cause code.
SS Seconds
CANAME 7 A message identifier of a message
For example 144526 represents 26 seconds past 2:45 p.m.
in QCPFMSG that describes a
4. The contact name, telephone numbers, company name, possible cause.
and address are only present if different than the service
contact information. CADOC 7 Message identifier of a message in
QCPFMSG that identifies the doc-
5. For those activities that can be done more than once, the ument being referenced when
date and time represent the last time the activity was done. solving this problem.
CADEVL 40 Location of the rack or system unit
Possible Causes (*CAUSE) when the device is installed.
The output file produced for type *CAUSE has one CAPRT1 12 Part 1, a part which describes a
record for each possible cause identified at the time the possible hardware problem cause.
failure was detected or as a result of running problem Up to six part numbers are pos-
analysis. The cause list type indicates when the pos- sible for a part because different
sible causes were identified and is the same for all part numbers are used to identify
the part when it has different fea-
records with a given problem identifier.
tures.
The sum of the possibilities will equal 100 percent for CAPRT2 12 Part 2
each problem identifier.
CAPRT3 12 Part 3
The record format is QSXCAOF. See the following
CAPRT4 12 Part 4
"DSPPRB Fields for Possible Cause Data
(TYPE(*CAUSE))" table for the fields in the record. CAPRT5 12 Part 5
CAPRT6 12 Part 6

P3-224 OS/400 CL Reference - Part 2 (Full Version)


DSPPRB

Table 12 (Page 2 of 2). DSPPRB Fields for Possible Cause Table 12 (Page 2 of 2). DSPPRB Fields for Possible Cause
Data (TYPE(*CAUSE)) Data (TYPE(*CAUSE))
Field Name Length Description Field Name Length Description
CATYPE 1 Cause type: CAPLOC 25 Location of the part in the device.
Field Type (Instances) CAPCOD 4 Symptom code, also called the
A, K, N Hardware (commu- Fault Symptom Code (FSC). It is
nications controller generated by the sense bits col-
or power supply) lected in the hardware device at
C Software (OS/400) the time of failure. Only present
D Device (terminal, for cause type 'E'.
printer, or tape unit)
CASENS 64 Sense data bytes are made up of
E S/370 channel
the bits that are collected in the
attached device
hardware device to show the
G Configuration (con-
status of the device. Only present
troller description
for cause type 'E'.
parameter incorrect)
H General (modem or CAEADDR 13 Address of device where part is
cable) installed.
M Media (tape or
1-4 Identifies the device con-
diskette)
troller card.
U User (door open or
5 Separator character (-).
diskette upside
6-13 Identifies the failing device
down)
or resource.
CACHNC 3,0 The possibility that this part or
Note: All fields are of type C (character), except the CACHNC
action will correct the problem
field, which is of type P (packed decimal).
(1-100%).
CADEVN 10 Name of the device where the part
Program Fixes (*FIX)
is installed.
The output file produced for type *FIX has one record for
CAMACH 4 Type of device.
each program temporary fix (PTF) identified as a result
CAMODL 3 Model number of device. of a service call for a machine-detected or user-
CAFEAT 4 Feature number of device. perceived problem. Multiple program fix records may
CAMSER 10 Serial number of the device. have the same problem identifier.

CARSER 10 Serial number of the rack where The record format is QSXFXOF. See the following
the device is installed. "DSPPRB Fields for Program Fix Data (TYPE(*FIX))"
table for the fields in the record.
CAADDR 9 Address (1234-5678)
CALPP 7 Identifies a licensed program or
Table 13 (Page 1 of 2). DSPPRB Fields for Program Fix Data
licensed internal code. Only
(TYPE(*FIX))
present for cause type 'C'.
Field Name Length Description
CAVER 4 Version of the licensed program.
Only present for cause type 'C'. FXRCEN 1 Century that the data was
retrieved and placed in the output
CAREL 2 Release level of the licensed
file:
program. Only present for cause
type 'C'. 0 20th century
1 21st century
CAMDF 2 Modification level that applies to
the release of the licensed FXRDAT 6 Date that the data was retrieved
program. Only present for cause and placed in the output file.
type 'C'. FXRTIM 6 Time that the data was retrieved
CAMOD 10 Module in the licensed program. and placed in the output file.
Only present for cause type 'C'. FXSYSN 8 Name of the system where the
CAVOL 8 Removable media volume identi- DSPPRB command was run to
fier. Only present for cause type create this output file.
'M'. FXFORM 8 Format, which is always *FIX.
CARSRC 10 Resource name assigned to the FXID 10 Problem identifier.
device by the system.
FXORG 20 System origin.
CAPORT 2 Port where the work station cable
connects to the work station FXPTF 7 Program temporary fix (PTF)
attachment. number.

Chapter 2. OS/400 Command Descriptions P3-225


DSPPRB

Supporting Data Identifiers (*SPTDTA)


Table 13 (Page 2 of 2). DSPPRB Fields for Program Fix Data
(TYPE(*FIX)) The output file produced for type *SPTDTA has one
Field Name Length Description record for each item identified. Multiple records may
have the same problem identifier. Items identified
FXPST 1 Program temporary fix (PTF)
contain information related to the problem. The data
status:
identifier type indicates the type of item being identified.
N Not requested. The information in other fields is dependent on the type
R Requested.
of item being identified.
FXSFS 1 PTF save file status: "Y" = yes;
"N" = no; "R" = yes (released) The record format is QSXSDOF. See the following
"DSPPRB Fields for Supporting Data Identifier Data
FXPRD 7 PTF product ID or special value (TYPE(*BASIC))" table for the fields in the record.
*ONLY. *ONLY represents
PTFID(*ONLYPRD) specified on
the SNDPTFORD command. Table 15. DSPPRB Fields for Supporting Data Identifier Data
(TYPE(*SPTDTA))
FXRLS 6 PTF release level (VxRxMx) or
special value *ONLY. *ONLY Field Name Length Description
represents PTFID(*ONLYRLS) SDRCEN 1 Century that the data was
specified on the SNDPTFORD retrieved and placed in the output
command. file:
Note: All fields are of type C (character). 0 20th century
1 21st century
User Text (*USRTXT) SDRDAT 6 Date that the data was retrieved
and placed in the output file.
The output file produced for type *USRTXT has one
record for each line of user-entered text (notes). Mul- SDRTIM 6 Time that the data was retrieved
tiple text records may have the same problem identifier. and placed in the output file.

The record format is QSXTXOF. See the following SDSYSN 8 Name of the system where the
DSPPRB command was run to
"DSPPRB Fields for User Text Data (TYPE(*USRTXT))"
create this output file.
table for the fields in the record.
SDFORM 8 Format, which is always *SPTDTA.
Table 14. DSPPRB Fields for User Text Data SDID 10 Problem identifier.
(TYPE(*USRTXT))
SDORG 20 System origin.
Field Name Length Description
SDTYPE 1 Type of identifier:
TXRCEN 1 Century that the data was S Spooled file identifier
retrieved and placed in the output
file: SDNAM1 10 Identifier name 1:
0 20th century Type S Spooled file name
1 21st century SDNAM2 10 Identifier name 2:
TXRDAT 6 Date that the data was retrieved Type S Job name
and placed in the output file.
SDNAM3 10 Identifier name 3:
TXRTIM 6 Time that the data was retrieved
and placed in the output file. Type S User name

TXSYSN 8 Name of the system where the SDJNBR 10 Job number


DSPPRB command was run to SDFNBR 10 Spooled file number
create this output file.
Note: All fields are of type C (character).
TXFORM 8 Format, which is always *USRTXT.
TXID 10 Problem identifier.
TXORG 20 System origin.
Examples
Example 1: Displaying Today's Problem Log Entries
TXTYPE 1 Type of text:
DSPPRB PERIOD(\AVAIL \CURRENT) (\AVAIL \CURRENT)
N Note
S Problem description
This command shows all problem log entries that were
TXTEXT 80 User-entered text. created today.
Note: All fields are of type C (character).
Example 2: Creating an Output File
DSPPRB OUTPUT(\OUTFILE) OUTFILE(\CURLIB/NEWFILE)

P3-226 OS/400 CL Reference - Part 2 (Full Version)


DSPPRB

This command creates a member in the physical file licensed program identifier and program name as the prob-
NEWFILE in the current library which contains a record for able cause of the failure.
each problem log entry in the problem log.
Example 5: Displaying a List of Machine-Detected Prob-
Example 3: Displaying a List of Hardware Problems lems
DSPPRB SEV(1 2) HARDWARE(9347 ðð1 1ð-7523489) DSPPRB RESOURCE(TAPð1) MSGID(CPF6788)

This command shows a list containing problems with the This command shows a list containing machine-detected
hardware specified by the user. The user has specified that problems that were opened due to the message, CPF6788,
the command track medium-to-high levels of severity. having been sent to the system operator message queue.
The list of problems includes user-detected problems. To get
Example 4: Displaying a List of Problems That Have the user-detected problems, the user specified the resource
Been Opened name and message identifier by using the Analyze Problem
DSPPRB STATUS(\OPENED) PERIOD((\AVAIL \CURRENT) (ANZPRB) command.
(12ðððð \CURRENT)) LICPGM(5716SS1 ð3 ðð)
PGM(QNOPGM) Example 6: Displaying a List of Reported Problems
DSPPRB SRVID(12345)
This command shows a list containing problems that have
been opened during the period starting at midnight and This command shows a list containing problems that have
ending at noon on the current day, and have not yet been been reported to an IBM service support center and have
analyzed. This command also identifies the specified 12345 as the service identifier.

Chapter 2. OS/400 Command Descriptions P3-227


DSPPSFCFG

DSPPSFCFG (Display Print Services Facility Configuration) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ────────────────────────────5%
55──DSPPSFCFG──PSFCFG(──┼───────────────┼──PSF-configuration-name──)──┬────────────────────────┬───
├─\CURLIB/──────┤ │ ┌─\──────┐ │
└─library-name/─┘ └─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *CURLIB: The current library for the job is


searched. If no library is specified as the current
The Display Print Services Facility Configuration library for the job, the QGPL library is used.
(DSPPSFCFG) command displays a Print Services Facility
library-name: Specify the name of the library to be
(PSF) configuration object in the specified library. If the PSF
searched.
configuration object is found, it is displayed. If the PSF con-
figuration object is not found, a message is sent to the user PSF-configuration-name: Specify the name of the PSF
stating that the PSF configuration object could not be found. configuration object being displayed.

Restriction: The PSF/400 feature is required to use this


command. Optional Parameter
Note: To see the parameter and value descriptions for this OUTPUT
command, refer to the online help text. For more Specifies whether the output from the command is dis-
information about printing the help text, refer to played at the requesting work station or printed with the
“Printing CL Command Descriptions” in Chapter 1. job's spooled output.
*: The output is displayed (if requested by an interactive
Required Parameter job) or printed with the job's spooled output (if requested
by a batch job).
PSFCFG
*PRINT: The output is printed with the job's spooled
Specifies the name and library of the PSF configuration
output.
object to display.
The name of the PSF configuration object can be quali-
fied by one of the following library values: Example
*LIBL: All libraries in the job's library list are DSPPSFCFG PSFCFG(PSFCFG1) OUTPUT(\PRINT)
searched until the first match is found.
This command will print a description of PSF configuration
(*PSFCFG) object named PSFCFG1. The job's library list
will be used to search for the PSFCFG1.

P3-228 OS/400 CL Reference - Part 2 (Full Version)


DSPPTF

DSPPTF (Display Program Temporary Fix) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──┬────────────────────────────┬─────────────5
55──DSPPTF──┬──────────────────────────────────┬──┬────────────────────────────┬───
│ ┌─\ALL─────────────┐ │ │ ┌─\ALL───────┐ │ │ ┌─\ALL──────────┐ │
└─LICPGM(──┴─licensed-program─┴──)─┘ └─SELECT(──┼─\ONORDER───┼──)─┘ └─RLS(──┴─release-level─┴──)─┘
├─\PTFSAVF───┤
├─\ACTRQD────┤
└─PTF-number─┘
5──┬─────────────────────────┬──┬──────────────────────────┬──┬───────────────────────────────────────────┬─────────────────────5
│ ┌─\NO──┐ │ │ ┌─\────────┐ │ │ ┌─\LIBL/────────┐ │
└─COVERONLY(──┴─\YES─┴──)─┘ └─OUTPUT(──┼─\PRINT───┼──)─┘ └─OUTFILE(──┼───────────────┼──file-name──)─┘
└─\OUTFILE─┘ ├─\CURLIB/──────┤
└─library-name/─┘
5──┬───────────────────────────────────────────┬───────────────────────────────────────────────────────────────────────────────5%
│ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │
└─OUTMBR(──┴─member-name─┴──┼──────────┼──)─┘
└─\ADD─────┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *ALL: The status of all PTFs for the specified product is
shown.
The Display Program Temporary Fix (DSPPTF) command
*ONORDER: The PTFs that are currently on order are
shows the program temporary fixes (PTFs) for a specified
shown. This special value allows a user to get a list of
product.
PTFs that are currently on order. This special value is
Restriction: This command is shipped with public valid for PTFs both on order and on the system, that is,
*EXCLUDE authority and the QPGMR, QSYSOPR, QSRV, in the QGPL library save file or in a loaded status.
and QSRVBAS user profiles have private authorities to use *PTFSAVF: Only PTFs for which save files exist within
the command. the QGPL library are shown. This special value is useful
Note: To see the parameter and value descriptions for this to the base system user for determining which PTF save
command, refer to the online help text. For more files are no longer needed. It is also useful for the
information about printing the help text, refer to service provider for determining which PTFs can be dis-
“Printing CL Command Descriptions” in Chapter 1. tributed.
*ACTRQD: The PTFs that have actions pending are
shown. This special value is useful to the user for deter-
Optional Parameters mining which PTFs require an action to become active.
LICPGM Note: If *ACTRQD is specified, the exit programs that
Specifies the product for which PTFs are shown. When run can take a long time resulting in a delay in
LICPGM(*ALL) is specified, PTFs for all installed and the appearance of the first screen.
supported products are shown.
PTF-number: Specify the PTF identification number of
*ALL: The PTFs of all installed and supported products the PTF that is shown.
are shown.
RLS
licensed-program: Specify the product for which PTFs
Specifies the release level of the PTFs being displayed.
are shown.
*ALL: The PTFs for all releases of the supported and
SELECT installed products are displayed.
Specifies which PTF is shown for the specified product.
*ALL cannot be specified for the LICPGM parameter if a release-level: Specify the release level in VxRyMz
PTF number is specified on the SELECT parameter. format, where Vx is the version number, Ry is the
release number, and Mz is the modification level. The
When LICPGM(*ALL) and SELECT(*ALL) are specified, variables x and y can be a number from 0 through 9,
all PTFs for all installed and supported products are and the variable z can be a number from 0 through 9 or
shown. a letter from A through Z.
When LICPGM(licensed-program) and SELECT(*ALL)
are specified, PTFs for all releases of the specified pro- If the release-level specified is the release-level of the
ducts are shown. installed base option of the product, PTFs for all installed
options of the product are displayed regardless of the

Chapter 2. OS/400 Command Descriptions P3-229


DSPPTF

release-level of the option. All PTFs for options that are *CURLIB: The current library for the job is
supported at this release-level are also displayed. searched. If no library is specified as the current
library for the job, the QGPL library is used.
If the release-level specified is not the release-level of
the installed base option of the product, only PTFs for library-name: Specify the name of the library to be
the product options that are supported or installed at that searched.
release-level are displayed.
file-name: Specify the name of the file that receives the
PTFs.
COVERONLY
OUTMBR
Specifies whether only the cover letter is displayed.
Specifies the name of the database file member to which
*NO: The cover letter is not displayed. the output is directed.
*YES: The cover letter is displayed. Element 1: Member to Receive Output
OUTPUT *FIRST: The first member in the file receives the output.
Specifies whether the output from this command is dis- If OUTMBR(*FIRST) is specified and the member does
played, printed, or directed to a database file. More not exist, the system creates a member with the name of
information on this parameter is in Appendix A, the file specified on the OUTFILE parameter.
“Expanded Parameter Descriptions.”
member-name: Specify the file member that receives
*: Output requested by an interactive job is shown on the output. If OUTMBR(member-name) is specified and
the display. Output requested by a batch job is printed the member does not exist, the system creates it.
with the job's spooled output.
Element 2: Operation to Perform on Member
*PRINT: The output is printed with the job's spooled
*REPLACE: The system clears the existing member
output. The name of the spooled file is QSYSPRT.
and adds the new records.
*OUTFILE: The output is directed to the database file
*ADD: The system adds the new records to the end of
specified on the OUTFILE parameter.
the existing records.
OUTFILE
Specifies the qualified name of the output file that is Examples
used to store the requested DSPPTF information. This
parameter is valid only if OUTPUT(*OUTFILE) is speci- Example 1: Printing Status of PTFs
fied. The model output file is QADSPPTF in library
DSPPTF LICPGM(5769SS1) OUTPUT(\PRINT)
QSYS.
The name of the file can be qualified by one of the fol- This command produces a printout containing the status of
lowing library values: PTFs for the product 5769-SS1.

*LIBL: All libraries in the job's library list are Example 2: Printing Information
searched until the first match is found. DSPPTF LICPGM(5769SS1) SELECT(SFððð34) OUTPUT(\PRINT)

This command produces a printout containing detailed infor-


mation about PTF SF00034 for the product 5769-SS1.

P3-230 OS/400 CL Reference - Part 2 (Full Version)


DSPPWRSCD

DSPPWRSCD (Display Power On/Off Schedule) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──┬─────────────────────────┬──┬────────────────────────────────┬──────────────────5%
55──DSPPWRSCD──┬────────────────────────┬───
│ ┌─\──────┐ │ │ ┌─\TODAY─┐ │ │ ┌─4ð─────────────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘ (1) ─┴─number-of-days─┴──)─┘
└─STRDATE(──┴─date───┴──)─┘ └─DAYS(───
Notes:
P All parameters preceding this point can be specified in positional form.

1 DAYS is allowed only if OUTPUT(*PRINT) is specified.

Purpose *TODAY: The current date is used.


date: Specify the first date to be displayed. The date
The Display Power On/Off Schedule (DSPPWRSCD)
must be specified in the format specified on the job attri-
command is used to display or print the power on/off
butes. Specify the current date or a date in the future.
schedule.
Note: To see the parameter and value descriptions for this DAYS
command, refer to the online help text. For more Specifies the number of days for which the power on/off
information about printing the help text, refer to schedule is to be printed.
“Printing CL Command Descriptions” in Chapter 1. 40: Forty days of the report are printed.
number-of-days: Specify the number of days. Valid
Optional Parameters values range from 1 through 366.

OUTPUT
Specifies whether the output from the command is Examples
shown at the requesting workstation or printed with the
job's spooled output. More information on this param- Example 1: Displaying Power On/Off Schedule
eter is in Appendix A, “Expanded Parameter DSPPWRSCD
Descriptions.”
*: Output requested by an interactive job is shown on This command displays the power on/off schedule.
the display. Output requested by a batch job is printed
Example 2: Printing 30 Days of Power On/Off Schedule
with the job's spooled output.
*PRINT: The output is printed with the job's spooled DSPPWRSCD OUTPUT(\PRINT) DAYS(3ð)
output.
This command prints 30 days of the power on/off schedule,
STRDATE starting with the current date.
Specifies the first date to be displayed or printed on the
power on/off schedule.

Chapter 2. OS/400 Command Descriptions P3-231


DSPRCDLCK

DSPRCDLCK (Display Record Locks) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
55──DSPRCDLCK──FILE(──┼───────────────┼──physical-file-name──)──┬──────────────────────────┬────────────────────────────────────5
├─\CURLIB/──────┤ │ ┌─\FIRST──────┐ │
└─library-name/─┘ └─MBR(──┴─member-name─┴──)─┘
(P) ──┬────────────────────────┬────────────────────────────────────────────────────────────5%
5──┬───────────────────────────────┬───
│ ┌─\ALL──────────┐ │ │ ┌─\──────┐ │
└─RCDNBR(──┴─record-number─┴──)─┘ └─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose MBR
Specifies the name of the member in the file whose
The Display Record Locks (DSPRCDLCK) command allows record locks are shown on the display.
the user to show the current record lock status of a particular
*FIRST: The first member in the database file is used.
database physical file member. This command displays the
lock status for a particular relative record number, or the lock member-name: Specify the name of the physical file
status of all locked records in the member. member that is shown.
Note: To see the parameter and value descriptions for this RCDNBR
command, refer to the online help text. For more Specifies a particular relative record number or all
information about printing the help text, refer to records of a member.
“Printing CL Command Descriptions” in Chapter 1.
*ALL: The lock status of all records currently locked in
a physical file member is shown on the display.
Required Parameters record-number: Specify the number of the record whose
FILE lock status is shown on the display.
Specifies the qualified name of the physical file that con- OUTPUT
tains the member whose record locks are shown on the Specifies whether the output from the command is
display. shown at the requesting work station or printed with the
The name of the physical file can be qualified by one of job's spooled output. More information on this param-
the following library values: eter is in Appendix A, “Expanded Parameter
Descriptions.”
*LIBL: All libraries in the job's library list are
searched until the first match is found. *: Output requested by an interactive job is shown on
the display. Output requested by a batch job is printed
*CURLIB: The current library for the job is with the job's spooled output.
searched. If no library is specified as the current
library for the job, the QGPL library is used. *PRINT: The output is printed with the job's spooled
output.
library-name: Specify the name of the library to be
searched.
Example
physical-file-name: Specify the name of the physical file.
DSPRCDLCK FILE(MASTER/PAYROLL) MBR(\FIRST)
RCDNBR(1) OUTPUT(\)
Optional Parameters
This command shows the lock status of relative record
number 1, in the first member of the physical file named
PAYROLL in the MASTER library.

P3-232 OS/400 CL Reference - Part 2 (Full Version)


DSPRCYAP

DSPRCYAP (Display Recovery for Access Paths) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ────────────────────────────────────────────────────────────────────────────────────5%
55──DSPRCYAP──┬────────────────────────┬───
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose information about printing the help text, refer to


“Printing CL Command Descriptions” in Chapter 1.
The Display Recovery for Access Paths (DSPRCYAP)
command is used to show or print the access path recovery
status information and target access path recovery time for Optional Parameter
the system and for all auxiliary storage pools (ASPs) that are OUTPUT
currently on the system. Specifies whether the output from the command is
shown at the requesting workstation or printed with the
The system uses no more than the specified target access
job's spooled output. More information on this param-
path recovery time when recovering access paths during an
eter is in Appendix A, “Expanded Parameter
initial program load (IPL) after an abnormal system end.
Descriptions.”
Because access path recovery time is a target, performance
may range around the target. *: The output requested by an interactive job is shown
on the display. The output requested by a batch job is
The time taken to rebuild access paths exposed while printed with the job's spooled output.
running the Copy File (CPYF), the Reorganize Physical File
*PRINT: The output is printed with the job's spooled
Member (RGZPFM), or the Restore Object (RSTOBJ) com-
output.
mands is not considered in the target access path recovery
time of access paths protected with this command.
Example
For more information on using this command, see the
Backup and Recovery book. DSPRCYAP

Restriction: You must have job control special authority to This command shows the target access path recovery times
use this command. and recovery status information for the system and config-
ured auxiliary storage pools. Output from the command is
Note: To see the parameter and value descriptions for this
shown on the workstation if the command is run interactively,
command, refer to the online help text. For more
or printed with the job's spooled output if the command is run
in batch.

Chapter 2. OS/400 Command Descriptions P3-233


DSPRDBDIRE

DSPRDBDIRE (Display Relational Database Directory Entry) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─────────────────────────────5
55──DSPRDBDIRE──┬────────────────────────────────────────────────┬──┬──────────────────────────┬───
│ ┌─\ALL──────────────────────────────┐ │ │ ┌─\────────┐ │
└─RDB(──┼─generic\-relational-database-name─┼──)─┘ └─OUTPUT(──┼─\PRINT───┼──)─┘
└─relational-database-name──────────┘ └─\OUTFILE─┘
5──┬────────────────────────────────────────────────────┬──┬───────────────────────────────────────────┬───────────────────────5%
│ ┌─\LIBL/────────┐ │ │ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │
└─OUTFILE(──┼───────────────┼──database-file-name──)─┘ └─OUTMBR(──┴─member-name─┴──┼──────────┼──)─┘
├─\CURLIB/──────┤ └─\ADD─────┘
└─library-name/─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *PRINT: The requested information is printed with the


job's spooled output.
The Display Relational Database Directory Entry
*OUTFILE: The requested information is stored in an
(DSPRDBDIRE) command is used to display one entry,
output file.
generic entries, or all entries in the relational database direc-
tory. OUTFILE
Note: To see the parameter and value descriptions for this Specifies the qualified name of the output file to which
command, refer to the online help text. For more the requested information is directed. If the file does not
information about printing the help text, refer to exist, it is created. If a new file is created, system file
“Printing CL Command Descriptions” in Chapter 1. QADSPDE in system library QSYS with a record format
name of RWRDDSP is used as a model. If the file
already exists, it must have this format. This parameter
Optional Parameters is valid only if OUTPUT(*OUTFILE) is specified.
RDB The name of the database file can be qualified by one of
Specifies the relational database directory entries being the following library values:
displayed.
*LIBL: All libraries in the job's library list are
*ALL: All entries in the relational database directory are searched until the first match is found.
displayed.
*CURLIB: The current library for the job is
generic*-relational-database-name: Specify a generic searched. If no library is specified as the current
relational database name. A generic name is a char- library for the job, the QGPL library is used.
acter string of one or more characters followed by an
library-name: Specify the name of the library to be
asterisk (*); for example, ABC*. The asterisk substitutes
searched.
for any valid characters. A generic name specifies all
objects with names that begin with the generic prefix for database-file-name: Specify the name of the file in
which the user has authority. If an asterisk is not which the requested information is to be located.
included with the generic (prefix) name, the system
assumes it to be the complete object name. If the com- OUTMBR
plete object name is specified, and multiple libraries are Specifies the output file member in which the requested
searched, multiple objects can be displayed only if *ALL relational database information is to be located. If the
or *ALLUSR library values can be specified for the member does not exist, it is created. This parameter is
name. For more information on the use of generic valid only if OUTPUT(*OUTFILE) is specified.
names, refer to “Generic Object Names” in Chapter 2. Element 1: Member to Receive Output
relational-database-name: Specify the name of the rela- *FIRST: The requested information is stored in the first
tional database being displayed. file member.
OUTPUT member-name: Specify the name of the output file
Specifies whether the relational database directory infor- member in which the requested information is to be
mation is displayed at the requesting work station, located. The member name can be from 1 to 10 charac-
printed, or directed to an output file. ters in length.
*: Output requested by an interactive job is shown on Element 2: Operation to Perform on Member
the display. Output requested by a batch job is printed
with the job's spooled output.

P3-234 OS/400 CL Reference - Part 2 (Full Version)


DSPRDBDIRE

*REPLACE: If the member exists, the system clears it Example 2: Directing Information to an Output File
and adds the new information. DSPRDBDIRE OUTPUT(\OUTFILE) OUTFILE(SAVEDIR)
*ADD: If the member exists, the system adds the new
information to the existing records. This command directs all of the relational database directory
entries to an output file named SAVEDIR. This is the usual
method for backing up the contents of the relational database
Examples directory. The entries can be restored using a CL program
that reads the information from the output file and issues Add
Example 1: Directing Information to an Output File Relational Database Directory Entry (ADDRDBDIRE) com-
DSPRDBDIRE OUTPUT(\PRINT) mands to add the information back into the relational data-
base directory.
This command directs information from all of the relational
database directory entries to a spooled file.

Chapter 2. OS/400 Command Descriptions P3-235


DSPRMTDFN

DSPRMTDFN (Display Remote Definition) Command


Job: B,I Pgm: B,I Exec

(P) ───────────────────────────────────────5
55──DSPRMTDFN──SYSTEM(──┬─\ANY──────────────────────┬──)──┬──────────────────────────┬───
├─\ALL──────────────────────┤ │ ┌─\────────┐ │
└─system-name──system-group─┘ └─OUTPUT(──┼─\PRINT───┼──)─┘
└─\OUTFILE─┘
5──┬───────────────────────────────────────────┬──┬───────────────────────────────────────────┬────────────────────────────────5%
│ ┌─\LIBL/────────┐ │ │ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │
└─OUTFILE(──┼───────────────┼──file-name──)─┘ └─OUTMBR(──┴─member-name─┴──┼──────────┼──)─┘
├─\CURLIB/──────┤ └─\ADD─────┘
└─library-name/─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *OUTFILE: The output is directed to the database file


specified on the OUTFILE parameter.
The Display Remote Definition (DSPRMTDFN) command
allows the user to display or print remote definitions for a OUTFILE
system. The output can be displayed, printed, or directed to Specifies the qualified name of the database file to
a database file. which the output of this command is directed. If the file
does not exist, the system creates a file in the specified
Note: To see the parameter and value descriptions for this library. If a new file is created, system file
command, refer to the online help text. For more QAOCRMTDFN in system library QSYS with a record
information about printing the help text, refer to format name of RMTDFN is used as a model. If the file
“Printing CL Command Descriptions” in Chapter 1. already exists, it must have this format.
The name of the file can be qualified by one of the fol-
Required Parameters lowing library values:
SYSTEM *LIBL: All libraries in the job's library list are
Specifies the system name and system group of the searched until the first match is found.
remote system being displayed.
*CURLIB: The current library for the job is
*ANY: Displays the default definition for a remote searched. If no library is specified as the current
system not covered by the other entries. library for the job, the QGPL library is used.
*ALL: Displays all definitions for remote systems. library-name: Specify the name of the library to be
Element 1: System Name searched.

system-name: Specify the name of the remote system file-name: Specify the name of the output file.
to be displayed.
OUTMBR
Element 2: System Group Specifies the name of the database file member to which
system-group: Specify the group name of the remote the output is directed.
system to be displayed. Do not specify this value if the Element 1: Member to Receive Output
group name is blank.
*FIRST: The first member in the file receives the output.
If OUTMBR(*FIRST) is specified and the member does
Optional Parameters not exist, the system creates a member with the name of
the file specified on the OUTFILE parameter.
OUTPUT
Specifies whether the output from this command is dis- member-name: Specify the file member that receives
played, printed, or directed to a database file. More the output. If OUTMBR(member-name) is specified and
information on this parameter is in Appendix A, the member does not exist, the system creates it.
“Expanded Parameter Descriptions.” Element 2: Operation to Perform on Member
*: Output requested by an interactive job is shown on *REPLACE: The output data replaces existing records
the display. Output requested by a batch job is printed in the specified member.
with the job's spooled output.
*ADD: The output data is added after existing records
*PRINT: The output is printed with the job's spooled in the specified member.
output.

P3-236 OS/400 CL Reference - Part 2 (Full Version)


DSPRMTDFN

Examples Example 2: Writing a Definition to an Output File


DSPRMTDFN SYSTEM(\ALL) OUTPUT(\OUTFILE)
Example 1: Displaying a Specific Remote Definition OUTFILE(RMTDFNOUT)
DSPRMTDFN SYSTEM(RCHAS1)
This command writes the current attributes for all defined
This command displays the current attributes for remote remote systems to the output file RMTDFNOUT.
system RCHAS1.

Chapter 2. OS/400 Command Descriptions P3-237


DSPSAVF

DSPSAVF (Display Save File) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ─────────────────────────────────────────────5%
55──DSPSAVF──FILE(──┼───────────────┼──file-name──)──┬────────────────────────┬───
├─\CURLIB/──────┤ │ ┌─\──────┐ │
└─library-name/─┘ └─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *CURLIB: The current library for the job is


searched. If no library is specified as the current
The Display Save File (DSPSAVF) command displays the library for the job, the QGPL library is used.
save information in a save file. This information includes a
library-name: Specify the name of the library to be
description of each object saved to the save file and
searched.
summary information.
file-name: Specify the name of the file.
The information can be written to a printer or shown on a
display device.
Optional Parameters
Restriction: The user of this command must have use
authority for the save file and read authority for the specified OUTPUT
library. Specifies whether the output from the command is
shown at the requesting workstation or printed with the
Note: To see the parameter and value descriptions for this job's spooled output. More information on this param-
command, refer to the online help text. For more eter is in Appendix A, “Expanded Parameter
information about printing the help text, refer to Descriptions.”
“Printing CL Command Descriptions” in Chapter 1.
*: Output requested by an interactive job is shown on
the display. Output requested by a batch job is printed
Required Parameters with the job's spooled output.
FILE *PRINT: The output is printed with the job's spooled
Specifies the qualified name of the save file to be shown output.
on the display.
The name of the save file can be qualified by one of the Example
following library values: DSPSAVF FILE(ONLINE) OUTPUT(\PRINT)
*LIBL: All libraries in the job's library list are
This command shows the objects saved to save file ONLINE.
searched until the first match is found.
The output is printed with the job's spooled output.

P3-238 OS/400 CL Reference - Part 2 (Full Version)


DSPSBSD

DSPSBSD (Display Subsystem Description) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ────────────────────────────5%
55──DSPSBSD──SBSD(──┼───────────────┼──subsystem-description-name──)──┬────────────────────────┬───
├─\CURLIB/──────┤ │ ┌─\──────┐ │
└─library-name/─┘ └─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose library-name: Specify the name of the library to be


searched.
The Display Subsystem Description (DSPSBSD) command
displays the information contained in a subsystem subsystem-description-name: Specify the name of the
description. The types of information, which are shown on subsystem description to be displayed.
separate displays, include the following: operational attri-
butes, pool definitions, autostart job entries, work station Optional Parameters
entries (by name and type), job queue entries, routing
entries, communications entries, and remote location name OUTPUT
entries. If this command is entered in a batch job, the infor- Specifies whether the output from the command is dis-
mation for all the types is printed with the job's spooled played at the requesting work station or printed with the
output. job's spooled output. More information on this param-
eter is in Appendix A, “Expanded Parameter
Restriction: The user must have object operational and Descriptions.”
read authority for the subsystem description before its con-
*: Output requested by an interactive job is shown on
tents can be shown.
the display. Output requested by a batch job is printed
Note: To see the parameter and value descriptions for this with the job's spooled output.
command, refer to the online help text. For more
*PRINT: The output is printed with the job's spooled
information about printing the help text, refer to
output.
“Printing CL Command Descriptions” in Chapter 1.

Example
Required Parameters
DSPSBSD SBSD(LIB6/ORDER) OUTPUT(\)
SBSD
Specifies the qualified name of the subsystem This command (if entered from a batch job) sends a com-
description that is to be displayed. plete set of display information about the subsystem
description named ORDER (stored in LIB6 library) to the
The name of the subsystem description can be qualified
job's spooling queue for printing. The information includes
by one of the following library values:
the subsystem's attributes, all of the job entries, and all of the
*LIBL: All libraries in the job's library list are routing entries currently in the subsystem description. If the
searched until the first match is found. command is entered in an interactive job, the subsystem
description menu is shown on a display from which an option
*CURLIB: The current library for the job is
may be chosen.
searched. If no library is specified as the current
library for the job, the QGPL library is used.

Chapter 2. OS/400 Command Descriptions P3-239


DSPSECA

DSPSECA (Display Security Attributes) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─────────────────────────────────────────────────────────────────────────────────────5%
55──DSPSECA──┬────────────────────────┬───
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose OUTPUT
Specifies whether the output from the command is dis-
The Display Security Attributes (DSPSECA) command dis- played at the requesting work station or printed with the
plays the User ID number that will be used the next time a job's spooled output.
User ID number is generated, and the group ID number that
*: Output requested by an interactive job is shown on
will be used the next time a group ID number is generated.
the display. Output requested by a batch job is printed
Note: To see the parameter and value descriptions for this with the job's spooled output.
command, refer to the online help text. For more
*PRINT: The output is printed with the job's spooled
information about printing the help text, refer to
output.
“Printing CL Command Descriptions” in Chapter 1.

Example
Optional Parameter

P3-240 OS/400 CL Reference - Part 2 (Full Version)


DSPSECAUD

DSPSECAUD (Display Security Auditing Values) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ───────────────────────────────────────────────────────────────────────────────────5%
55──DSPSECAUD──┬────────────────────────┬───
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose OUTPUT
Specifies whether the output from the command is
The Display Security Auditing Values (DSPSECAUD) shown at the requesting workstation or printed with the
command displays current information about the security job's spooled output. More information on this param-
audit journal and the current settings for the system values eter is in Appendix A, “Expanded Parameter
that control what is being audited on the system. Descriptions.”

Restrictions: *: The output is displayed (if requested by an interactive


job) or printed with the job's spooled output (if requested
You must have *ALLOBJ and *AUDIT special authorities to by a batch job).
use this command. *PRINT: The output is printed with the job's spooled
Note: To see the parameter and value descriptions for this output.
command, refer to the online help text. For more
information about printing the help text, refer to
Example
“Printing CL Command Descriptions” in Chapter 1.
DSPSECAUD

Optional Parameter The current security attributes are displayed on the active
workstation.

Chapter 2. OS/400 Command Descriptions P3-241


DSPSFWRSC

DSPSFWRSC (Display Software Resources) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──────────────────────────5
55──DSPSFWRSC──┬──────────────────────────┬──┬────────────────────────────────────────────────────┬───
│ ┌─\────────┐ │ │ ┌─\LIBL/────────┐ │
└─OUTPUT(──┼─\PRINT───┼──)─┘ └─OUTFILE(──┼───────────────┼──database-file-name──)─┘
└─\OUTFILE─┘ ├─\CURLIB/──────┤
└─library-name/─┘
5──┬───────────────────────────────────────────┬───────────────────────────────────────────────────────────────────────────────5%
│ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │
└─OUTMBR(──┴─member-name─┴──┼──────────┼──)─┘
└─\ADD─────┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose authority, group authority, or authority from an authori-


zation list, is the same as the create authority specified
The DSPSFWRSC (Display Software Resources) command for the library in which the file is created. This param-
allows the user to show, print, or write to an output file the eter is valid only if OUTPUT(*OUTFILE) is specified.
list of installed software resources.
The name of the database file can be qualified by one of
Note: To see the parameter and value descriptions for this the following library values:
command, refer to the online help text. For more
information about printing the help text, refer to *LIBL: All libraries in the job's library list are
“Printing CL Command Descriptions” in Chapter 1. searched until the first match is found.
*CURLIB: The current library for the job is
searched. If no library is specified as the current
Optional Parameters library for the job, the QGPL library is used.
OUTPUT library-name: Specify the name of the library to be
Specifies whether the output from the command is dis- searched.
played at the requesting work station, printed with the
job's spooled output, or directed to a database file. database-file-name: Specify the name of the database
file to which the output of the command is directed.
More information on this parameter is in Appendix A,
“Expanded Parameter Descriptions.” OUTMBR
*: Output requested by an interactive job is shown on Specifies the name of the database file member to which
the display. Output requested by a batch job is printed the output is directed. This parameter is valid only if
with the job's spooled output. OUTPUT(*OUTFILE) is specified.

*PRINT: The output is printed with the job's spooled Element 1: Member to Receive Output
output. *FIRST: The first member in the file receives the output.
*OUTFILE: The output is directed to the database file If OUTMBR(*FIRST) is specified and the member does
specified on the OUTFILE parameter. not exist, the system creates a member with the name of
the file specified on the OUTFILE parameter. If the
Note: If OUTPUT(*OUTFILE) is used, the name of the member exists, the records may be added to the end of
database file is required. the existing member or the existing member may be
OUTFILE cleared and the records added at the top of the member.
Specifies the qualified name of the database file to member-name: Specify the file member that receives
which the output of the command is directed. If the file the output. If OUTMBR(member-name) is specified and
does not exist, this command creates a database file in the member does not exist, the system creates it.
the specified library. If a new file is created, the system
Element 2: Operation to Perform on Member
uses the physical file QARZLCOF in library QSYS as a
model file. The file has a record format name of *REPLACE: The system clears the existing member
QARZLCGD. Field level information can be obtained and adds the new records.
using the Display File Field Description (DSPFFD) *ADD: The system adds the new records to the end of
command and specifying QARZLCOF as the file name the existing records.
and QSYS as the library. If this function creates the file,
the text says "Output file for DSPSFWRSC". The
authority for users other than those who have specific Example

P3-242 OS/400 CL Reference - Part 2 (Full Version)


DSPSFWRSC

DSPSFWRSC OUTPUT(\OUTFILE) OUTFILE(\CURLIB/NAMES) This command sends the output from the command to the
first member of the file NAMES in the current library. The
output replaces the information in the member.

Chapter 2. OS/400 Command Descriptions P3-243


DSPSOCSTS

DSPSOCSTS (Display Sphere of Control Status) Command


Job: I Pgm: I REXX: I Exec

(P) ──┬──────────────────────────┬─────────────────────────────────────────────────────5%
55──DSPSOCSTS──┬────────────────────────┬───
│ ┌─\──────┐ │ │ ┌─\BASIC─┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘ (1) ─┴─\FULL──┴──)─┘
└─DETAIL(───
Notes:
P All parameters preceding this point can be specified in positional form.

1 This parameter is valid only when OUTPUT(*PRINT) is specified.

Purpose *: Output requested by an interactive job is shown on


the display. Output requested by a batch job is printed
The Display Sphere of Control Status (DSPSOCSTS) with the job's spooled output.
command shows the status of the sphere of control including
*PRINT: The output is printed with the job's spooled
primary, default, backup, and requested nodes.
output.
More information on sphere of control is in the Alerts Support DETAIL
book. Specifies whether the output from the command is
Note: To see the parameter and value descriptions for this printed as a list of nodes or as a detailed description of
command, refer to the online help text. For more each node in the sphere of control.
information about printing the help text, refer to *BASIC: A list of nodes in the sphere of control is
“Printing CL Command Descriptions” in Chapter 1. printed.
*FULL: A list of nodes in the sphere of control with
Optional Parameters detailed information for each node is printed.
OUTPUT
Specifies whether the output from the command is dis- Example
played at the requested work station or printed with the DSPSOCSTS
job's spooled printer output. More information on this
parameter is in Appendix A, “Expanded Parameter This command shows the Sphere of Control Status display at
Descriptions.” the requesting work station.

P3-244 OS/400 CL Reference - Part 2 (Full Version)


DSPSPLF

DSPSPLF (Display Spooled File) Command


Job: I Pgm: I REXX: I Exec

55──DSPSPLF──FILE(──spooled-file-name──)──┬────────────────────────────────────────────────────────┬────────────────────────────5
│ ┌─\─────────────────────────────────────────┐ │
└─JOB(──┴─┬─────────────────────────────┬──job-name─┴──)─┘
└─┬─────────────┬──user-name/─┘
└─job-number/─┘
(P) ──┬────────────────────┬──────────────────────────────────────────────────────────5%
5──┬─────────────────────────────────────┬───
│ ┌─\ONLY───────────────┐ │ │ ┌─\NO──┐ │
└─SPLNBR(──┼─\LAST───────────────┼──)─┘ └─FOLD(──┴─\YES─┴──)─┘
└─spooled-file-number─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose user-name: Specify the name of the user of the job that
created the spooled file.
The Display Spooled File (DSPSPLF) command shows the
job-number: Specify the number of the job that created
data records in the specified spooled file. The current con-
the spooled file.
tents of the file (data records) can be displayed for spooled
files which do not contain Advanced Function Printing* Data SPLNBR
Stream (AFPDS) data or ASCII data. The display provides Specifies the number of the job's spooled file that is
various functions to show the file and to scan for a specific being displayed. More information on this parameter is
character string. in Appendix A, “Expanded Parameter Descriptions.”
Note: To see the parameter and value descriptions for this *ONLY: One spooled file from the job has the specified
command, refer to the online help text. For more file name. The number of the spooled file is not neces-
information about printing the help text, refer to sary. If *ONLY is specified and more than one spooled
“Printing CL Command Descriptions” in Chapter 1. file has the specified file name, a message is sent.
*LAST: The highest-numbered spooled file with the
Required Parameters specified file name is displayed.

FILE spooled-file-number: Specify the number of the spooled


Specifies the name of the spooled file whose records are file having the specified file name whose data records
to be displayed. are displayed.

FOLD
Optional Parameters Specifies whether the records in the first display are
folded if they are longer than the length of the display
JOB line.
Specifies the qualified name of the job and consists of
*NO: The records are not folded. When the length of
as many as three elements. For example:
the record is longer than one line, the remaining posi-
job-name tions of the record are not shown.
user-name/job-name *YES: The first display shows the first record folded on
job-number/user-name/job-name one or more display lines if it is longer than one line.
*N may be used in place of the user-name element to
maintain position in the sequence. More information on Example
this parameter is in Appendix A, “Expanded Parameter
DSPSPLF FILE(QPRINT) JOB(PAYROLLð1) SPLNBR(4)
Descriptions.”
FOLD(\NO)
*: The job that issued this DSPSPLF command is the
job that created the spooled file. In this example, the spooled file QPRINT is displayed. The
file is the fourth file produced by the job PAYROLL01. The
job-name: Specify the name of the job that created the
record positions that are longer than the length of the display
spooled file.
line are truncated on the first display.

Chapter 2. OS/400 Command Descriptions P3-245


DSPSRVA

DSPSRVA (Display Service Attributes) Command


Job: I Pgm: I REXX: I Exec

55──DSPSRVA────────────────────────────────────────────────────────────────────────────────────────────────────────────────────5%

Purpose Ÿ Handle messages about critical system conditions

The Display Service Attributes (DSPSRVA) command dis- There are no parameters for this command.
plays information about how the system is set up to:
Ÿ Analyze problems
Ÿ Notify the service provider of problems
Ÿ Install a PTF

P3-246 OS/400 CL Reference - Part 2 (Full Version)


DSPSRVPGM

DSPSRVPGM (Display Service Program) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ─┬────────────────────────┬───────────────────────────────5
55──DSPSRVPGM──SRVPGM(──┼───────────────┼──service-program-name──)────
├─\CURLIB/──────┤ │ ┌─\──────┐ │
└─library-name/─┘ └─OUTPUT(──┴─\PRINT─┴──)─┘
5──┬────────────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\ALL───────┐ │
└─DETAIL(──┼─\BASIC─────┼──)─┘
├─\SIZE──────┤
├─\MODULE────┤
├─\SRVPGM────┤
├─\PROCEXP───┤
├─\DTAEXP────┤
├─\ACTGRPEXP─┤
├─\ACTGRPIMP─┤
├─\SIGNATURE─┤
└─\COPYRIGHT─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Optional Parameters


The Display Service Program (DSPSRVPGM) command dis- OUTPUT
plays information about a service program, including the cre- Specifies whether the output from the command is
ation and processing attributes of the service program, shown at the requesting work station or printed with the
information about the compiler, and the size of the service job's spooled output.
program. *: Output requested by an interactive job is shown on
the display. Output requested by a batch job is printed
Restrictions:
with the job's spooled output.
1. You must have *USE authority to the service program
*PRINT: The output is printed with the job's spooled
being displayed and *EXCUTE authority to the library in
output.
which the service program exists.
DETAIL
2. You must have *USE authority to the service program
Specifies the type of information displayed for the
when DETAIL(*MODULE) is specified.
service program. More than one value can be specified,
Note: To see the parameter and value descriptions for this with the exception of *ALL, which must be specified as a
command, refer to the online help text. For more single value.
information about printing the help text, refer to
*ALL: All of the DETAIL information types (*BASIC,
“Printing CL Command Descriptions” in Chapter 1.
*SIZE, *MODULE, *SRVPGM, *PROCEXP, *DTAEXP,
*ACTGRPEXP, *ACTGRPIMP, *SIGNATURE, and
Required Parameter *COPYRIGHT) are shown on the display. If the user
has chosen the information to be displayed on the
SRVPGM
screen, the user would be able to scroll through the
Specifies the name of the service program for which
information for each DETAIL, but would have to press
information is displayed or printed.
Enter (or PF12) to go from DETAIL to DETAIL.
The name of the service program can be qualified by
*BASIC: General service program information is shown.
one of the following library values:
*SIZE: The size and size limits are shown.
*LIBL: All libraries in the job's library list are
searched until the first match is found. *MODULE: A list of the module objects bound by this
service program is shown. The library shown for each
*CURLIB: The current library for the job is module is the library that the module was in when the
searched. If no library is specified as the current service program was first created. If the module has
library for the job, the QGPL library is used. been replaced by a module from a different library, this
library-name: Specify the name of the library to be library name remains the name of the library that the
searched. module was in when the service program was created.
To determine the source that the module was created
service-program-name: Specify the name of the service
program for which information is displayed.

Chapter 2. OS/400 Command Descriptions P3-247


DSPSRVPGM

from, use option 5=Display description to see the source *ACTGRPIMP: A list is shown of the imports that are
file, library, and member names. resolved by weak exports that had been exported to the
activation group directory.
*SRVPGM: A list of the service program objects bound
by this service program is shown. *SIGNATURE: A list of the signatures is shown. The
first signature in the list is the current signature.
*PROCEXP: A list of the procedures exported from a
service program and specified in the binding language is *COPYRIGHT: A list of the copyrights is shown.
shown. The exports are only for the current signature.
*DTAEXP: A list of the data items exported from a Example
service program and specified in the binding language is
DSPSRVPGM SRVPGM(COACH)
shown. The exports are only for the current signature.
*ACTGRPEXP: A list is shown of the data items This command displays a service program object named
exported to the activation group specified in the data COACH.
export entry in the binding specifications.

P3-248 OS/400 CL Reference - Part 2 (Full Version)


DSPSRVSTS

DSPSRVSTS (Display Service Status) Command


Job: I Pgm: I REXX: I Exec

(P) ──┬────────────────────────────┬───────────────────5%
55──DSPSRVSTS──┬────────────────────────────────────────────────────────┬───
│ ┌─\─────────────────────────────────────────┐ │ │ ┌─\SELECT─┐ │
└─JOB(──┴─┬─────────────────────────────┬──job-name─┴──)─┘ └─DUPJOBOPT(──┴─\MSG────┴──)─┘
└─┬─────────────┬──user-name/─┘
└─job-number/─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose More information on this parameter is in Appendix A,


“Expanded Parameter Descriptions.”
The Display Service Status (DSPSRVSTS) command shows
*: Status information is shown about the job in which
information about the current service status of the specified
the DSPSRVSTS command is entered.
job. This includes the name of the job it is servicing and/or
the name of the job servicing the specified job. job-name: Specify the name of the job whose status
information is shown.
Restriction: This command is shipped with public
user-name: Specify the name of the user of the job
*EXCLUDE authority and the QPGMR, QSYSOPR, QSRV,
whose status information is shown.
and QSRVBAS user profiles have private authorities to use
the command. job-number: Specify the number of the job whose status
information is shown.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more DUPJOBOPT
information about printing the help text, refer to Specifies the action taken when duplicate jobs are found
“Printing CL Command Descriptions” in Chapter 1. by this command.
*SELECT: The selection display is shown when dupli-
Optional Parameters cate jobs are found during an interactive session. Other-
wise, an escape message is issued.
JOB
Specifies which job is having its service status shown on *MSG: An escape message is issued when duplicate
the display. If no user name or job number are given, all jobs are found.
of the jobs currently in the system are searched for the
simple job name; the name specified must be unique Example
within the system.
DSPSRVSTS
A job identifier is a special value or a qualified name
with up to three elements. For example: This command shows the service status information for the
\ job from which the command is entered.
job-name
user-name/job-name
job-number/user-name/job-name

Chapter 2. OS/400 Command Descriptions P3-249


DSPSYSSTS

DSPSYSSTS (Display System Status) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──┬─────────────────────┬──┬───────────────────────────┬───────────────────────────5%
55──DSPSYSSTS──┬────────────────────────┬───
│ ┌─\──────┐ │ │ ┌─\NO──┐ │ │ ┌─\PRV──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘ └─RESET(──┴─\YES─┴──)─┘ └─ASTLVL(──┼─\USRPRF───┼──)─┘
├─\BASIC────┤
├─\INTERMED─┤
└─\ADVANCED─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose DSPSYSSTS command in this job. The value specified


on this parameter does not affect the information pre-
The Display System Status (DSPSYSSTS) command allows sented for *BASIC assistance level.
the user to display or print information about the current
*NO: The system status statistics are not reset.
status of the system.
*YES: The system status statistics are reset.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more ASTLVL
information about printing the help text, refer to Specifies which user interface to use.
“Printing CL Command Descriptions” in Chapter 1.
*PRV: The previously used assistance level is pre-
sented.
Optional Parameters *USRPRF: The assistance level defined in the user
OUTPUT profile is presented.
Specifies whether the output is displayed at the *BASIC: The Operational Assistant user interface is
requesting work station or printed with the job's spooled presented.
output. More information on this parameter is in
*INTERMED: The system user interface is presented.
Appendix A, “Expanded Parameter Descriptions.”
*ADVANCED: The system user interface expert mode
*: Output requested by an interactive job is shown on
is presented.
the display. Output requested by a batch job is printed
with the job's spooled output.
*PRINT: The output is printed with the job's spooled Example
output. DSPSYSSTS OUTPUT(\PRINT)
RESET
This command prints the current system status information.
Specifies whether system status statistics fields are reset
to zero, as if this is the first occurrence of the

P3-250 OS/400 CL Reference - Part 2 (Full Version)


DSPSYSVAL

DSPSYSVAL (Display System Value) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ────────────────────────────────────────────────────5%
55──DSPSYSVAL──SYSVAL(──system-value-name──)──┬────────────────────────┬───
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose 1, then the DBCS version of the operating system is


installed on the system. If the system value for QIGC is
The Display System Value (DSPSYSVAL) command displays 0, the DBCS version of the operating system is not
the name and the value of the specified system value. installed on the system.

Restriction: You must have *ALLOBJ and *SECADM


special authorities to change security related system values. Optional Parameter
Note: To see the parameter and value descriptions for this OUTPUT
command, refer to the online help text. For more Specifies whether the output from the command is dis-
information about printing the help text, refer to played at the requesting work station or printed with the
“Printing CL Command Descriptions” in Chapter 1. job's spooled output. More information on this param-
eter is in Appendix A, “Expanded Parameter
Descriptions.”
Required Parameter
*: Output requested by an interactive job is shown on
SYSVAL the display. Output requested by a batch job is printed
Specifies the name of the system value that is displayed. with the job's spooled output.
A complete list of system values that are shipped with
the system is in the Work Management book and the *PRINT: The output is printed with the job's spooled
Programming Reference Summary book. output.

Double-Byte Character Set Considerations:


Example
In addition to the system values specified in the Work
Management book, the user can display the value of DSPSYSVAL SYSVAL(QHOUR)
QIGC, which indicates whether the double-byte char-
This command displays the current value of the system value
acter set (DBCS) version of the operating system is
QHOUR.
installed on the system. If the system value for QIGC is

Chapter 2. OS/400 Command Descriptions P3-251


DSPS36

DSPS36 (Display System/36) Command


Job: I Pgm: I Exec

┌─\──────┐
55──DSPS36──OUTPUT(──┴─\PRINT─┴──)─────────────────────────────────────────────────────────────────────────────────────────────5%

Purpose job's spooled output. More information on this param-


eter is in Appendix A, “Expanded Parameter
The Display System/36 (DSPS36) command allows the user Descriptions.”
to show or print the description of the System/36 environ-
*: The output is displayed at the requesting work station
ment configuration. The description includes System/36
if requested by an interactive job. If this is not an inter-
printers, display stations, general environment values, and (if
active job, the output is printed with the job's spooled
the user is authorized) MRT security values.
output.
Note: To see the parameter and value descriptions for this
*PRINT: The output is printed with the job's spooled
command, refer to the online help text. For more
output.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1.
Example
Required Parameters DSPS36 OUTPUT(\)

OUTPUT This command allows the user in an interactive job to display


Specifies whether the output from the command is the System/36 environment description.
shown at the requesting workstation or printed with the

P3-252 OS/400 CL Reference - Part 2 (Full Version)


DSPTAP

| DSPTAP (Display Tape) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─┬────────────────────────────────┬──┬─────────────────────────────────────┬────────────────5
55──DSPTAP──DEV(──device-name──)────
│ ┌─\MOUNTED──────────┐ │ │ ┌─\ALL─────────────────┐ │
└─VOL(──┴─volume-identifier─┴──)─┘ └─LABEL(──┴─data-file-identifier─┴──)─┘
5──┬──────────────────────────────────────┬──┬───────────────────────┬──┬──────────────────────────┬────────────────────────────5
│ ┌─1────────────────────┐ │ │ ┌─\LABELS─┐ │ │ ┌─\────────┐ │
└─SEQNBR(──┴─file-sequence-number─┴──)─┘ └─DATA(──┴─\SAVRST─┴──)─┘ └─OUTPUT(──┼─\PRINT───┼──)─┘
└─\OUTFILE─┘
5──┬─────────────────────────┬──┬────────────────────────────────────────────────────┬──────────────────────────────────────────5
│ ┌─\REWIND─┐ │ │ ┌─\LIBL/────────┐ │
└─ENDOPT(──┴─\UNLOAD─┴──)─┘ └─OUTFILE(──┼───────────────┼──database-file-name──)─┘
├─\CURLIB/──────┤
└─library-name/─┘
5──┬───────────────────────────────────────────┬───────────────────────────────────────────────────────────────────────────────5%
│ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │
└─OUTMBR(──┴─member-name─┴──┼──────────┼──)─┘
└─\ADD─────┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Required Parameter


The Display Tape (DSPTAP) command shows the volume DEV
label and data file label information that is contained on a Specifies the name of the tape or media library device
standard labeled magnetic tape or the volume type and where the volume being displayed is located.
density. Information includes an indication of whether the
tape is written using improved data recording capability Optional Parameters
(IDRC) format. If the tape is not labeled, it shows the
volume type and density. VOL
Specifies the tape volume to be displayed.
If DATA(*SAVRST) is specified, the information includes a
Note: If the device specified is a media library device,
description of each object saved to the tape file and
then the volume specified should be the cartridge
summary information about the saved objects.
identifier to be mounted and used.
The information can be printed or shown on a display device. *MOUNTED: The volume currently placed in the device
This command allows the user to display a single file label or is used. For a media library device, the volume to be
all file labels on a volume. Additional information can be dis- used is the next cartridge in the category mounted by
played for save or restore files by specifying the Set Tape Category (SETTAPCGY) command.
DATA(*SAVRST). (The user should know whether the tape
volume-identifier: Specify the volume identifier of the
being displayed contains data in the basic exchange format
labeled volume. The volume identifier read from the
or in the save/restore format. But, if not known, the user can
tape is compared to this value. If the volume identifier
specify DATA(*LABELS) and check the data file identifiers
specified is not found on the tape, an escape message
listed. If the names of libraries are displayed, the data files
is sent.
are probably in the save/restore format.)
LABEL
The volume for which information is displayed must be on Specifies the data file identifiers of the data files on the
the specified device. After some information is displayed and tape whose labels are displayed. The data file identifier
DATA(*SAVRST) is specified, the DSPTAP command can is stored in the file label ahead of the data in the file.
read more of the tape before additional information is dis-
played. If DATA(*SAVRST) is specified, the user is *ALL: All data file identifiers on the tape specified on
prompted to load the tape volumes on which the data con- the DEV parameter are shown.
tinues. data-file-identifier: Specify the data file identifier (17
Note: To see the parameter and value descriptions for this alphanumeric characters maximum) of the data file for
command, refer to the online help text. For more which label information is displayed. For save and
information about printing the help text, refer to restore files, the label is usually the library name, but it
“Printing CL Command Descriptions” in Chapter 1. does not have to be.

Chapter 2. OS/400 Command Descriptions P3-253


DSPTAP

SEQNBR the file does not exist, this command creates a database
Specifies, for volumes with multiple files, the sequence file in the specified library. If a new file is created, the
number of the data file on tape whose label information system uses QATADOF in QSYS as a model with the
is displayed. If LABEL(*ALL) is specified or assumed, all format name of QTADOUTF. This parameter is valid
files following the file specified by SEQNBR are also dis- only when OUTPUT(*OUTFILE) and DATA(*LABELS) is
played after the specified file. specified.
1: The data file being displayed is the first file (or the database-file-name: Specify the name of the database
only file) on the tape. If LABEL(*ALL) is specified, all file file to be used.
labels are displayed, and no verification of label
OUTMBR
sequence numbers is done.
Specifies the name of the database file member to which
If a specific LABEL identifier is specified, it is compared the output is directed when OUTPUT(*OUTFILE) is
with the label identifier of the data file with the specified specified.
sequence number (SEQNBR). If the identifiers do not
Element 1: Member to Receive Output
match, an error message is sent. If LABEL(*ALL) is
specified, all file labels whose sequence numbers are *FIRST: The first member in the file receives the output.
equal to or greater than the value entered are displayed. If OUTMBR(*FIRST) is specified and the member does
not exist, the system creates a member with the name of
file-sequence-number: Specify the sequence number of
the file specified on the OUTFILE parameter.
the file that is used. Valid values range from 1 through
16777215. member-name: Specify the name of the file member
that is to receive the output. If OUTMBR(member-name)
DATA
is specified and the member does not exist, the system
Specifies the type of information that is displayed.
creates it.
*LABELS: The volume label and data file labels are
Element 2: Operation to Perform on Member
displayed.
*REPLACE: The existing records in the specified data-
*SAVRST: The tape contains save and restore data.
base file member are replaced by the new records.
Summary information is shown for the command and
each saved object. This option is valid only if the data *ADD: The system adds the new records at the end of
file was created using one of the CL save commands. the existing member.

OUTPUT ENDOPT
Specifies whether the output from the command is dis- Specifies the operation that is automatically performed
played at the requesting work station or printed with the on the tape volume after the operation ends. If more
job's spooled output. More information on this param- than one volume is included, this parameter applies only
eter is in Appendix A, “Expanded Parameter to the last tape volume used; all other tape volumes are
Descriptions.” rewound and unloaded when the end of the tape is
reached.
*: Output requested by an interactive job is shown on
the display. Output requested by a batch job is printed *REWIND: The tape is automatically rewound, but not
with the job's spooled output. unloaded, after the operation has ended.

*PRINT: The output is printed with the job's spooled *UNLOAD: The tape is automatically rewound and
output. unloaded after the operation ends.

Note: For a tape created by the Save (SAV) command,


each file is printed as a separate listing. Example
*OUTFILE: The output is directed to the database file DSPTAP DEV(QTAPE2) LABEL(\ALL)
specified on the OUTFILE parameter.
The volume label and file labels on the tape volume that is
OUTFILE on the tape device named QTAPE2 are displayed.
Specifies the qualified name of the database file to
which the information about the tape files is directed. If

P3-254 OS/400 CL Reference - Part 2 (Full Version)


DSPTAPCGY

DSPTAPCGY (Display Tape Category) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──DSPTAPCGY──┬────────────────────────────┬──┬────────────────────────────────────────────────────┬───────────────────────────5
│ ┌─\────────┐ │ │ ┌─\LIBL/────────┐ │
(P)┘ └─OUTFILE(──┼───────────────┼──database-file-name──)─┘
└─OUTPUT(──┼─\PRINT───┼──)───
└─\OUTFILE─┘ ├─\CURLIB/──────┤
└─library-name/─┘
5──┬───────────────────────────────────────────┬───────────────────────────────────────────────────────────────────────────────5%
│ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │
└─OUTMBR(──┴─member-name─┴──┼──────────┼──)─┘
└─\ADD─────┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *LIBL: All libraries in the job's library list are


searched until the first match is found.
The Display Tape Category (DSPTAPCGY) command allows
*CURLIB: The current library for the job is
the user to display the categories defined through the Create
searched. If no library is specified as the current
Tape Category (CRTTAPCGY) command.
library for the job, the QGPL library is used.
Note: To see the parameter and value descriptions for this
library-name: Specify the name of the library to be
command, refer to the online help text. For more
searched.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. database-file-name: Specify the name of the database
file to be used.
Optional Parameters OUTMBR
Specifies the name of the database file member to which
OUTPUT
the output is directed when OUTPUT(*OUTFILE) is
Specifies whether the output from the command is dis-
specified.
played at the requesting workstation, printed to an output
file, or printed with the job's spooled output. Element 1: Member to Receive Output
*: The output is displayed if requested by an interactive *FIRST: The first member in the file receives the output.
job or printed with the job's spooled output if requested If OUTMBR(*FIRST) is specified and the member does
by a batch job. not exist, the system creates a member with the name of
the file specified on the OUTFILE parameter.
*PRINT: The output is printed with the job's spooled
output. member-name: Specify the name of the file member
that is to receive the output. If OUTMBR(member-name)
*OUTFILE: The output is directed to a database file
is specified and the member does not exist, the system
specified on the OUTFILE parameter. The file must have
creates it.
the same format as database file QATACOF.
Element 2: Operation to Perform on Member
OUTFILE
Specifies the qualified name of the database file to *REPLACE: The existing records in the specified data-
which the information about the tape volumes is base file member are replaced by the new records.
directed. If the file does not exist, this command creates *ADD: The system adds the new records at the end of
a database file in the specified library. If a new file is the existing member.
created, the system uses QATACOF in QSYS as a
model with the format name of QTACOUTF. This
parameter is valid only when OUTPUT(*OUTFILE) is Example
specified. DSPTAPCGY OUTPUT(\)
The name of the database file can be qualified by one of
the following library values: This command displays the user defined categories on this
system to the workstation display.

Chapter 2. OS/400 Command Descriptions P3-255


DSPTAPCTG

DSPTAPCTG (Display Tape Cartridge) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──DSPTAPCTG──DEV(──library-device-name──)──┬────────────────────────────────────────────┬─────────────────────────────────────5
│ ┌─\ALL──────────────────────────┐ │
└─CTG(──┼─generic\-cartridge-identifier─┼──)─┘
│ ┌──
──────────────────────┐ │
└──6─cartridge-identifier─┴───
(1) ───┘

5──┬─────────────────────────────────────────────────┬──┬──────────────────────────┬────────────────────────────────────────────5
│ ┌─\ALL──────────┐ ┌─\CURRENT────┐ │ │ ┌─\────────┐ │
└─CGY(──┬─┼─\NOSHARE──────┼──┼─────────────┼─┬──)─┘ └─OUTPUT(──┼─\PRINT───┼──)─┘
│ ├─\IPL──────────┤ ├─\ALL────────┤ │ └─\OUTFILE─┘
│ ├─\NL───────────┤ └─system-name─┘ │
│ ├─\SYSGEN───────┤ │
│ ├─\CNV──────────┤ │
│ └─category-name─┘ │
├─\SHARE4ðð──────────────────────────┤
├─\INSERT────────────────────────────┤
└─\EJECT─────────────────────────────┘
5──┬────────────────────────────────────────────────────┬──┬───────────────────────────────────────────┬───────────────────────5%
│ ┌─\LIBL/────────┐ │ │ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │
└─OUTFILE(──┼───────────────┼──database-file-name──)─┘ └─OUTMBR(──┴─member-name─┴──┼──────────┼──)─┘
├─\CURLIB/──────┤ └─\ADD─────┘
└─library-name/─┘
Note:
1 A maximum of 40 repetitions.

Purpose the user has authority. If an asterisk is not included with


the generic (prefix) name, the system assumes it to be
The Display Tape Cartridge (DSPTAPCTG) command dis- the complete object name. For more information on the
plays the attributes of tape cartridges. use of generic names, refer to “Generic Object Names”
Note: To see the parameter and value descriptions for this in Chapter 2.
command, refer to the online help text. For more cartridge-identifier: Specify the cartridge identifier.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. CGY
Specifies the category of tape cartridges to be shown.
Element 1: Category Name
Required Parameter
*ALL: All categories are searched for the cartridge iden-
DEV tifiers specified on the CTG parameter and all are dis-
Specifies the name of the library device to be used. The played.
device name must have been created previously on the
system using the Create Device Media Library *NOSHARE: The cartridge identifiers in the *NOSHARE
(CRTDEVMLB) command. category are displayed. A cartridge with this identifier
cannot be shared with other systems.
*IPL: The cartridge identifiers in the *IPL category are
Optional Parameters displayed. A cartridge with this identifier can be used for
CTG an alternate IPL.
Specifies a maximum of 40 cartridge identifiers to be dis- *NL: The cartridge identifiers in the *NL category are
played. displayed. A cartridge with this identifier is used as a
Note: The cartridge identifier should be the same as non-labeled tape.
the external identifier if the library device has a *SYSGEN: The cartridge identifiers in the *SYSGEN
bar code scanner to read external identifiers. category are displayed. If the library device is in
*ALL: All tape cartridges in the device or in the cate- *SYSGEN mode, cartridges cannot be moved from the
gory specified are displayed. *SYSGEN category.
generic*-cartridge-identifier: Specify the generic name of *CNV: The cartridge identifiers in the *CNV category
the cartridge identifier. A generic name is a character are displayed. A cartridge in this category is for use with
string of one or more characters followed by an asterisk the convenience station.
(*); for example, ABC*. The asterisk substitutes for any category-name: Specify the name of a user-defined cate-
valid characters. A generic name specifies all objects gory. This category name must have been created pre-
with names that begin with the generic prefix for which

P3-256 OS/400 CL Reference - Part 2 (Full Version)


DSPTAPCTG

viously with the Create Tape Category (CRTTAPCGY) created, the system uses QATAVOF in QSYS as a
command. model with the format name of QTAVOLOF.
Element 2: Category System Note: This parameter is valid only when
OUTPUT(*OUTFILE) is specified.
This element identifies the system to which the category
belongs. The system name is obtained from the The name of the database file can be qualified by one of
pending system name field of a Display Network Attri- the following library values:
butes (DSPNETA) command. If there is no pending
*LIBL: All libraries in the job's library list are
system name, the current system name attribute is used.
searched until the first match is found.
Attention
*CURLIB: The current library for the job is
If the system name is changed, the category infor- searched. If no library is specified as the current
mation associated with all tape cartridges in library library for the job, the QGPL library is used.
devices owned by the system are no longer valid.
library-name: Specify the name of the library to be
searched.
*CURRENT: The category belongs to the system cur-
rently running this command. database-file-name: Specify the name of the database
file to be used.
*ALL: All systems that own categories available to the
system running this command are used. OUTMBR
system-name: Specify the name of the system to which Specifies the name of the database file member to which
the category belongs. the output is directed when OUTPUT(*OUTFILE) is
specified.
Single Values:
Element 1: Member to Receive Output
*SHARE400: The cartridge identifiers in the
*SHARE400 category are displayed. A cartridge in this *FIRST: The first member in the file receives the output.
category can be shared with other systems attached to If this value is specified and the member does not exist,
the same device. the system creates a member with the name of the file
specified on the OUTFILE parameter.
*INSERT: The cartridge identifiers in the *INSERT cate-
gory are displayed. A cartridge in this category has member-name: Specify the name of the file member
been placed in the library device, but its identifier has that is to receive the output. If OUTMBR(member-name)
not been added to the system. is specified and the member does not exist, the system
creates it.
*EJECT: The cartridge identifiers in the *EJECT cate-
gory are displayed. A cartridge in this category has had Element 2: Operation to Perform on Member
its identifier removed from the system and is no longer *REPLACE: The existing records in the specified data-
usable. base file member are replaced by the new records.
OUTPUT *ADD: The system adds the new records at the end of
Specifies whether the output from the command is dis- the existing member.
played at the requesting work station, printed to an
output file, or printed with the job's spooled output.
Examples
*: The output is displayed (if requested by an interactive
job) or printed with the job's spooled output (if requested Example 1: Displaying the Tape Cartridges in the
by a batch job). *SHARE400 Category
*PRINT: The output is printed with the job's spooled DSPTAPCTG DEV(LIBð1) CGY(\SHARE4ðð) OUTPUT(\)
output.
This command displays the attributes of all tape cartridges in
*OUTFILE: The output is directed to a database file the *SHARE400 category on the work station display.
specified on the OUTFILE parameter. The file must have
the same format as database file QSYS/QATAVOF. Example 2: Displaying the Tape Cartridge for VOL3
OUTFILE DSPTAPCTG DEV(LIBð1) CTG(VOL3) OUTPUT(\)
Specifies the qualified name of the database file to CGY(\ALL)
which the information about the tape volumes is
This command displays the attributes of the cartridge identi-
directed. If the file does not exist, this command creates
fier VOL3.
a database file in the specified library. If a new file is

Chapter 2. OS/400 Command Descriptions P3-257


DSPTAPSTS

DSPTAPSTS (Display Tape Status) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──DSPTAPSTS──┬────────────────────────────┬──┬──────────────────────────┬─────────────────────────────────────────────────────5
│ ┌─\ALL────────┐ │ │ ┌─\────────┐ │
(P)┘ └─OUTPUT(──┼─\PRINT───┼──)─┘
└─DEV(──┴─device-name─┴──)───
└─\OUTFILE─┘
5──┬────────────────────────────────────────────────────┬──┬───────────────────────────────────────────┬───────────────────────5%
│ ┌─\LIBL/────────┐ │ │ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │
└─OUTFILE(──┼───────────────┼──database-file-name──)─┘ └─OUTMBR(──┴─member-name─┴──┼──────────┼──)─┘
├─\CURLIB/──────┤ └─\ADD─────┘
└─library-name/─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose OUTFILE
Specifies the qualified name of the database file to
The Display Tape Status (DSPTAPSTS) command does the which the information about the tape volumes is
following: directed. If the file does not exist, this command creates
Ÿ Displays slot information associated with the library a database file in the specified library. If a new file is
device. created, the system uses QATAIOF in QSYS as a model
with the format name of QTAIOUTF. This parameter is
Ÿ Displays tape device information about the tape devices valid only when OUTPUT(*OUTFILE) is specified.
attached to the library device.
database-file-name: Specify the name of the database
Note: To see the parameter and value descriptions for this file to be used.
command, refer to the online help text. For more
information about printing the help text, refer to OUTMBR
“Printing CL Command Descriptions” in Chapter 1. Specifies the name of the database file member to which
the output is directed when OUTPUT(*OUTFILE) is
specified.
Optional Parameters
Element 1: Member to Receive Output
DEV
*FIRST: The first member in the file receives the output.
Specifies the name of the device for which information is
If OUTMBR(*FIRST) is specified and the member does
displayed.
not exist, the system creates a member with the name of
*ALL: Specifies that all library devices defined through the file specified on the OUTFILE parameter.
Create Device Media Library (CRTDEVMLB) command
member-name: Specify the name of the file member
are displayed.
that is to receive the output. If OUTMBR(member-name)
device-name: Specify the device name. The device is specified and the member does not exist, the system
name must be a library device name or a random creates it.
access cartridge loader(RACL) device name. The
Element 2: Operation to Perform on Member
device name must already be known to the system by
Create Device Media Library (CRTDEVMLB) command. *REPLACE: The existing records in the specified data-
base file member are replaced by the new records.
OUTPUT
Specifies whether the output from the command is dis- *ADD: The system adds the new records at the end of
played at the requesting workstation, printed to an output the existing member.
file, or printed with the job's spooled output.
*: The requested output is shown on the display. If this Example
value is specified for a batch job, the effect is the same
DSPTAPSTS DEV(LIBð1) OUTPUT(\)
as if *PRINT were entered.
*PRINT: The requested output is written to a spooled This command displays the valid information about this
file, which is found in the job's output queue. library device to the workstation display.
*OUTFILE: The output is directed to a database file
specified on the OUTFILE parameter. The file must have
the same format as database file QATAIOF.

P3-258 OS/400 CL Reference - Part 2 (Full Version)


DSPTRC

DSPTRC (Display Trace) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──┬──────────────────────────────────┬────────────────────────────────────────────────5%
55──DSPTRC──┬────────────────────────┬───
│ ┌─\──────┐ │ │ ┌─\DFTPGM─────────────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘ └─PGM(──┼─\ALL────────────────┼──)─┘
│ ┌──
──────────────┐ │
└──6─program-name─┴───
(1) ─┘

Notes:
P All parameters preceding this point can be specified in positional form.

1 A maximum of 20 repetitions

Purpose parameter is in Appendix A, “Expanded Parameter


Descriptions.”
The Display Trace (DSPTRC) command displays all of the
*: Output requested by an interactive job is shown on
data traces that are currently defined in the programs speci-
the display. Output requested by a batch job is printed
fied in this command. The following data tracing information
with the job's spooled output.
is displayed:
*PRINT: The output is printed with the job's spooled
Ÿ The statement ranges or machine instruction ranges in
output.
the program
Ÿ The name or machine-interface object-definition-table- PGM
vector (MI ODV) numbers of all the variables associated Specifies the programs in the debug mode whose trace
with the trace statements data statements and associated program variables are
displayed.
Ÿ If the variables are recorded whenever the trace state-
ment is processed or only when their values are *DFTPGM: The trace data statement of the default
changed program is displayed.
*ALL: Trace statements of the programs currently in the
Restriction: This command is valid only in the debug mode. debug mode are displayed.
To start the debug mode, use the STRDBG (Start Debug)
command. program-name: Specify the names of up to 20 programs
already in the debug mode whose trace data statements
Note: To see the parameter and value descriptions for this are displayed.
command, refer to the online help text. For more
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. Example
DSPTRC
Optional Parameters This command shows all of the trace data statement ranges
OUTPUT currently specified in the default program of this debugging
Specifies whether the output from the command is dis- session. Also displayed are the program variables (but not
played at the requesting display station or printed with their values) that are associated with the trace data state-
the job's spooled output. More information on this ments.

Chapter 2. OS/400 Command Descriptions P3-259


DSPTRCDTA

DSPTRCDTA (Display Trace Data) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──┬─────────────────────┬──────────────────────────────────────────────────────────5%
55──DSPTRCDTA──┬────────────────────────┬───
│ ┌─\──────┐ │ │ ┌─\NO──┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘ └─CLEAR(──┴─\YES─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose the job's spooled output. More information on this


parameter is in Appendix A, “Expanded Parameter
The Display Trace Data (DSPTRCDTA) command shows the Descriptions.”
output of any traces performed since the most recent Clear
Note: A program statement appears in the trace data
Trace Data (CLRTRCDTA) command. All of the trace state-
prior to its processing a variable. Therefore,
ments and associated program variables within the trace
when a program statement (Statement A)
range are displayed. The display shows the sequence in
changes a variable specified in the trace, the
which the traced statements or machine instructions were
new value appears in the trace data after the
processed and the name or machine-interface object-
statement that follows Statement A.
definition-table-vector (MI ODV) number and value of any
program variables defined for the trace at each point in the *: Output requested by an interactive job is shown on
sequence. Displaying variable values is controlled by the the display. Output requested by a batch job is printed
OUTVAR parameter on the Add Trace (ADDTRC) command with the job's spooled output.
that defines which trace is being displayed. *PRINT: The output is printed with the job's spooled
output.
If a job is in debug mode, and that job ends before an
ENDDBG is done, this command will be done automatically, CLEAR
printing the output with the job's spooled output. Specifies whether the trace data is cleared after it has
been displayed.
Restriction: This command is valid only in debug mode. To
start debug mode, refer to the STRDBG (Start Debug) *NO: The trace data is not cleared.
command. *YES: The trace data is cleared after it has been dis-
Note: To see the parameter and value descriptions for this played.
command, refer to the online help text. For more
information about printing the help text, refer to Example
“Printing CL Command Descriptions” in Chapter 1.
DSPTRCDTA

Optional Parameters This command shows all of the recorded trace data at the
requesting display station. All of the trace statements in the
OUTPUT trace range and the values of the associated program vari-
Specifies whether the output from the command is dis- ables are displayed. The trace data is not cleared after it
played at the requesting display station or printed with has been displayed because CLEAR(*NO) is assumed.

P3-260 OS/400 CL Reference - Part 2 (Full Version)


DSPTM

DSPTM (Display Trademarks) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──DSPTM──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────5%

Purpose
The Display Trademarks (DSPTM) command displays a list
of trademarks that appear in the names of licensed products.

There are no parameters for this command.

Chapter 2. OS/400 Command Descriptions P3-261


DSPUDFS

DSPUDFS (Display User-Defined File System) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─┬────────────────────────┬──────────────────────────────────────────────────5%
55──DSPUDFS──UDFS(──'file-system-path-name'──)────
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Optional Parameter


The Display User-Defined File System (DSPUDFS) OUTPUT
command displays the attributes and, optionally, the Specifies whether the output from the command is
extended attributes for an existing user-defined file system shown at the requesting workstation or printed with the
(UDFS). job's spooled output. More information on this param-
eter is in Appendix A, “Expanded Parameter
Note: To see the parameter and value descriptions for this
Descriptions.”
command, refer to the online help text. For more
information about printing the help text, refer to *: Output requested by an interactive job is shown on
“Printing CL Command Descriptions” in Chapter 1. the display. Output requested by a batch job is printed
with the job's spooled output.

Required Parameter *PRINT: The output is printed with the job's spooled
output. The output is printed with the job's spooled
UDFS output.
Specifies the path name of the user-defined file system
to be displayed. It must be (or resolve to a path name)
of the form /dev/QASPXX/name.udfs, where the XX is
Example
one of the valid user Auxiliary Storage Pool (ASP) DSPUDFS UDFS('/dev/QASPð5/joe.udfs')
numbers on the system, and name is the name of the
UDFS. All other parts of the path name must appear as This command displays the attributes of a user-defined file
in the example above. system (UDFS) named joe in the user auxiliary storage pool
(ASP) 5.

P3-262 OS/400 CL Reference - Part 2 (Full Version)


DSPUSRPMN

DSPUSRPMN (Display User Permission) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──┬────────────────────────┬──┬────────────────────────┬───────────5%
55──DSPUSRPMN──┬────────────────────────────────────────┬───
│ ┌─\CURRENT─────────────────┐ │ │ ┌─\TO───┐ │ │ ┌─\──────┐ │
└─USER(──┼─\ALL─────────────────────┼──)─┘ └─GRANTED(──┴─\FROM─┴──)─┘ └─OUTPUT(──┴─\PRINT─┴──)─┘
│ ┌──
───────────────────┐ │
└──6─user-profile-name─┴───
(1) ─┘

Notes:
1 A maximum of 300 repetitions

P All parameters preceding this point can be specified in positional form.

Purpose *TO: Users who are permitted to work on behalf of the


specified user are displayed.
The Display User Permission (DSPUSRPMN) command
*FROM: Users that have permitted the specified user to
shows the names of the users who are permitted to handle
work on their behalf are displayed.
documents or folders and perform tasks on behalf of another
user, or shows the names of users who have permitted other OUTPUT
users to work on their behalf. More information on user per- Specifies whether the output from the command is
mission is in the Grant User Permission (GRTUSRPMN) shown at the requesting workstation or printed with the
command and the SNA Distribution Services book. job's spooled output. More information on this param-
Note: To see the parameter and value descriptions for this eter is in Appendix A, “Expanded Parameter
command, refer to the online help text. For more Descriptions.”
information about printing the help text, refer to *: Output requested by an interactive job is shown on
“Printing CL Command Descriptions” in Chapter 1. the display. Output requested by a batch job is printed
with the job's spooled output.
Optional Parameters *PRINT: The output is printed with the job's spooled
output.
USER
Specifies the name of the user profile for which the infor-
mation is displayed. The name in the USER parameter Examples
must be enrolled in the system distribution directory
before this command is run. Example 1: Displaying Names of Users
DSPUSRPMN USER(\CURRENT) GRANTED(\TO) OUTPUT(\PRINT)
*CURRENT: The user profile that is currently running is
used. This command prints the names of the users who are per-
*ALL: Information is displayed for all users in the infor- mitted to work on behalf of the current user.
mation directory.
Example 2: Printing Names of Users
user-profile-name: Specify the name of the user profile
for which the information is displayed. Up to 300 user DSPUSRPMN USER(\ALL) GRANTED(\TO) OUTPUT(\PRINT)
profile names can be specified.
This command prints the names of all users who have per-
GRANTED mitted other users to work on their behalf as well as the
Specifies whether the output produced should display names of the other users.
the granted-to relationships or granted-from relationships
of a user or users.

Chapter 2. OS/400 Command Descriptions P3-263


DSPUSRPRF

DSPUSRPRF (Display User Profile) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──┬──────────────────────────┬───────────────────5
55──DSPUSRPRF──USRPRF(──┬─\ALL───────────────┬──)──┬───────────────────────┬───
├─generic\-user-name─┤ │ ┌─\BASIC──┐ │ │ ┌─\────────┐ │
└─user-name──────────┘ └─TYPE(──┼─\ALL────┼──)─┘ └─OUTPUT(──┼─\PRINT───┼──)─┘
├─\CMDAUT─┤ └─\OUTFILE─┘
├─\DEVAUT─┤
├─\OBJAUT─┤
├─\OBJOWN─┤
├─\OBJPGP─┤
└─\GRPMBR─┘
5──┬────────────────────────────────────────────────────┬──┬───────────────────────────────────────────┬───────────────────────5%
│ ┌─\LIBL/────────┐ │ │ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │
└─OUTFILE(──┼───────────────┼──database-file-name──)─┘ └─OUTMBR(──┴─member-name─┴──┼──────────┼──)─┘
├─\CURLIB/──────┤ └─\ADD─────┘
└─library-name/─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose more characters followed by an asterisk (*); for example,


ABC*. The asterisk substitutes for any valid characters.
The Display User Profile (DSPUSRPRF) command displays A generic name specifies all objects with names that
the contents of a user profile. The user profile contains the begin with the generic prefix for which the user has
user's operational limits for system resources, the names of authority. If an asterisk is not included with the generic
the objects, commands, and devices that the user has spe- (prefix) name, the system assumes it to be the complete
cific authority to use, and the names of the objects that the object name. If the complete object name is specified,
user owns, and that the user is the primary group for. and multiple libraries are searched, multiple objects can
be displayed only if *ALL or *ALLUSR library values can
Objects owned by the user profile are not shown on the be specified for the name. For more information on the
*CMDAUT, *DEVAUT, *OBJAUT, or *OBJPGP displays. use of generic names, refer to “Generic Object Names”
in Chapter 2.
This command does not show the password, nor does it
show information about objects authorized for public use. user-name: Specify the name of the user profile to be
The document password is not shown on the *BASIC display displayed.
or on any CL command output. Any user on the system can
be authorized to use the DSPUSRPRF command, but the
Optional Parameters
requesting user must have read authority for the user profile
being displayed. TYPE
Specifies the types of user profile information that can
The DSPUSRPRF function may be a long-running function, be displayed. All, or one, of the following can be dis-
depending upon the number of objects the user profile owns played:
and is authorized to use.
Ÿ The basic portion of the user profile that describes
Restriction: The user name can be specified as the user
USRPRF(*ALL) or USRPRF(generic*-user-name) only when
Ÿ Commands for which the user profile has specific
TYPE(*BASIC) and OUTPUT(*OUTFILE) are specified.
authority
Note: To see the parameter and value descriptions for this
Ÿ Devices for which the user profile has specific
command, refer to the online help text. For more
authority
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. Ÿ All objects (including commands and devices) for
which the user has some specific authority and the
authorities assigned with those objects
Required Parameter
Ÿ Objects that are owned by the user
USRPRF
Ÿ Objects that the user is the primary group for.
Specifies the name of the user profile.
Ÿ Members of the group, if the user profile is a group
*ALL: All user profiles are displayed.
profile
generic*-user-name: Specify the generic name of the
user. A generic name is a character string of one or *BASIC: All parameters as defined in the user profile
are displayed.

P3-264 OS/400 CL Reference - Part 2 (Full Version)


DSPUSRPRF

*ALL: All of the information in the user profile is dis- If a new file is created and *OBJOWN is speci-
played. fied on the Type of information prompt (TYPE
parameter) the system uses QADSPUPO in
*CMDAUT: The control language (CL) commands, to
QSYS with a format name QSYDSUPO as a
which the user has specific authority, are displayed.
model.
*DEVAUT: The system devices to which the user has
If a new file is created and *OBJPGP is specified
specific authority are displayed.
on the Type of information prompt (TYPE
*OBJAUT: The total number and the names of the parameter) the system uses QADSPUPG in
objects to which the user has specific authority (except QSYS with a format name QSYDSUPG as a
those authorized for public use), the user's authority for model.
those objects, and the object types are displayed. Com-
The name of the database file can be qualified by one of
mands and devices are included if *OBJAUT is speci-
the following library values:
fied.
*OBJOWN: For each object owned by the user oper- *LIBL: All libraries in the job's library list are
ating under the user profile, the total number of owned searched until the first match is found.
objects and the object names, the types, and the *CURLIB: The current library for the job is
libraries in which the objects reside are displayed. searched. If no library is specified as the current
*OBJPGP: Displays the total number of objects the library for the job, the QGPL library is used.
user is the primary group for, the object names, the type, library-name: Specify the name of the library to be
the library the object resides in, and the primary group searched.
authority.
database-file-name: Specify the name of the database
*GRPMBR: The members of a group are displayed. file.
This display is available only if the user profile being dis-
played is a group profile. OUTMBR
Specifies the name of the database file member to which
OUTPUT the output is directed.
Specifies whether the output from the command is
shown at the requesting workstation or printed with the Element 1: Member to Receive Output
job's spooled output. More information on this param- *FIRST: The first member in the file receives the output.
eter is in Appendix A, “Expanded Parameter If OUTMBR(*FIRST) is specified and the member does
Descriptions.” not exist, the system creates a member with the name of
*: Output requested by an interactive job is shown on the file specified on the OUTFILE parameter. If the
the display. Output requested by a batch job is printed member exists, the user can choose to either add
with the job's spooled output. records to the end of the existing member or to clear the
existing records in the member and then add the new
*PRINT: The output is printed with the job's spooled
records.
output.
member-name: Specify the file member that receives
*OUTFILE: The output is directed to the database file
the output. If OUTMBR(member-name) is specified and
specified on the OUTFILE parameter.
the member does not exist, the system creates it.
OUTFILE Element 2: Operation to Perform on Member
Specifies the qualified name of the database file to
*REPLACE: The system clears the existing member
which the output of the display is directed. If the file
and adds the new records.
does not exist, this command creates a database file in
the specified library. If this function creates the file, the *ADD: The system adds the new records to the end of
text reads 'Outfile for DSPUSRPRF', and the public the existing records.
authority is *EXCLUDE.
Note: If a new file is created and *BASIC is specified Examples
on the Type of information prompt (TYPE
parameter) the system uses QADSPUPB in Example 1: Displaying Basic Information
QSYS with a format name QSYDSUPB as a DSPUSRPRF USRPRF(THSMITH)
model.
If a new file is created and *OBJAUT is specified This command shows the basic portion of the user profile
on the Type of information prompt (TYPE named THSMITH because TYPE(*BASIC) is assumed. The
parameter) the system uses QADSPUPA in commands, devices, and objects that the user is authorized
QSYS with a format name QSYDSUPA as a to use are not displayed. Because OUTPUT(*) is also
model. assumed, the operational information is either displayed or
printed, depending on where the command is submitted.

Chapter 2. OS/400 Command Descriptions P3-265


DSPUSRPRF

Example 2: Printing a List of Objects This command causes the list of objects that are owned by
DSPUSRPRF USRPRF(RTJOHNSON) TYPE(\OBJOWN) the user named RTJOHNSON to be printed. The list con-
OUTPUT(\PRINT) tains the object names, object types, and the names of the
libraries where the objects are located.

P3-266 OS/400 CL Reference - Part 2 (Full Version)


DSPUSRPRTI

DSPUSRPRTI (Display User Print Information) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─────────────────────────────────────────────────────5%
55──DSPUSRPRTI──┬─────────────────────────┬──┬────────────────────────┬───
│ ┌─\CURRENT──┐ │ │ ┌─\──────┐ │
└─USER(──┴─user-name─┴──)─┘ └─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose OUTPUT
Specifies whether the output from the command is
The Display User Print Information (DSPUSRPRTI) shown at the requesting workstation or printed with the
command displays the user print information for the specified job's spooled output. More information on this param-
user profile. eter is in Appendix A, “Expanded Parameter
Note: To see the parameter and value descriptions for this Descriptions.”
command, refer to the online help text. For more *: Output requested by an interactive job is shown on
information about printing the help text, refer to the display. Output requested by a batch job is printed
“Printing CL Command Descriptions” in Chapter 1. with the job's spooled output.
*PRINT: The output is printed with the job's spooled
Optional Parameters output.

USER
Specifies the name of the user whose print information is Example
displayed. DSPUSRPRTI USER(FEIST)
*CURRENT: The user profile that is currently running is
This command displays the user print information for user
used.
profile FEIST.
user-name: Specify the name of the user whose user
print information is displayed.

Chapter 2. OS/400 Command Descriptions P3-267


DSPWSUSR

DSPWSUSR (Display Work Station User) Command


Job: I Pgm: I Exec

(P) ────────────────────────────────────────────────────────────────────────────────────5%
55──DSPWSUSR──┬────────────────────────┬───
│ ┌─\──────┐ │
└─OUTPUT(──┴─\PRINT─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose job's spooled output. More information on this param-


eter is in Appendix A, “Expanded Parameter
The Display Work Station User (DSPWSUSR) command Descriptions.”
allows the user to display information describing the current
*: Output requested by an interactive job is shown on
job. Information displayed includes user name or description,
the display. Output requested by a batch job is printed
system name, work station ID or description, job name, job
with the job's spooled output.
group, date, and time.
*PRINT: The output is printed with the job's spooled
Note: To see the parameter and value descriptions for this
output.
command, refer to the online help text. For more
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. Example
DSPWSUSR OUTPUT(\)
Optional Parameters
This command displays the information describing the current
OUTPUT job.
Specifies whether the output from the command is
shown at the requesting workstation or printed with the

P3-268 OS/400 CL Reference - Part 2 (Full Version)


DUPDKT

DUPDKT (Duplicate Diskette) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─┬──────────────────────┬───────────────────────────────────────5
55──DUPDKT──FROMDEV(──device-name──)──TODEV(──device-name──)────
│ ┌─\NO──┐ │
└─RGZVOL(──┴─\YES─┴──)─┘
5──┬──────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─1────────────────┐ │
└─COPIES(──┴─number-of-copies─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose In addition, the following restrictions apply to the type of


diskette allowed by the Duplicate Diskette command:
The Duplicate Diskette (DUPDKT) command copies the con-
1. A Type 1 diskette may only be copied to another Type 1
tents of a single diskette onto one or more diskettes. The
diskette.
volume table of contents (VTOC) and initial program load
(IPL) record information and the data records can be copied 2. A Type 2 diskette may be copied to a Type 2 diskette or
to a diskette in a specified device. Diskette data in either the Type 2D diskette. A Type 2D diskette is allowed
basic exchange data format or the save/restore E-format can because it was made for double-density recording.
be copied. The volume identifiers of the diskettes do not Thus, it is acceptable to use a Type 2D diskette for
have to be unique. single-density recording. A message is sent to the
system operator if an attempt is made to copy from a
If the diskettes to which data is being copied do not have the Type 2 diskette to a Type 2D diskette. The operator
same sector size as the diskette from which data is being may then use the Initialize Diskette (INZDKT) command
copied, then a message is sent to the system operator. The to initialize the Type 2D diskette to a Type 2 and con-
copying of diskettes may then be stopped, or the output tinue processing. Note that the Type 2D now logically
diskette may be initialized to the same sector size as the appears as a Type 2 diskette.
input diskette before the copying continues.
3. A Type 2D diskette may be copied to a Type 2 diskette
Deleted sectors on the input diskette are ignored when or a Type 2D diskette. A Type 2 diskette is made for
copying. They are not copied to the new diskette. The single-density recording and is more prone to media
address of the last data record in the file label containing the errors if used for double-density recording (Type 2D). If
deleted sector is adjusted on the output diskette, according copying from a Type 2D diskette to a Type 2 diskette, a
to the number of sectors found deleted. Therefore, if the message is sent to the system operator. The operator
input diskette has deleted sectors, the output diskette is not may then cancel processing or use the Initialize Diskette
an exact copy. (INZDKT) command to initialize the Type 2 diskette to a
Type 2D diskette and continue processing. Note that
Diskettes that have an extended label area (up to nine cylin- the Type 2 diskette now logically appears as a Type 2D
ders, in addition to cylinder 0, which are allocated as system diskette and is more prone to media errors since it is
area for data set labels), can be copied if the following condi- meant for single-density recording.
tions are followed: Note: Results when copying to or from a diskette with
Ÿ The RGZVOL option must be *NO. labels that are not IBM standard labels are unpredict-
able. The diskette should be initialized by specifying
Ÿ No deleted sectors can exist on the input diskette. If
CHECK(*NO) on the Initialize Diskette (INZDKT)
deleted sectors are found on the input diskette with an
command.
extended label area, a message is sent and the copying
function is stopped. Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more
Once a diskette has been copied, the Rename Diskette information about printing the help text, refer to
(RNMDKT) command can be used to rename the copied “Printing CL Command Descriptions” in Chapter 1.
diskettes so that they have unique volume identifiers.

Restriction: A diskette cannot be copied if it contains Required Parameters


control records that indicate records have been relocated, but
FROMDEV
not in sequence, or that sequential sector addresses are not
Specifies the name of the device from which the diskette
in consecutive, ascending order. If deleted sectors are found
is being copied.
on a diskette with an extended label area, the diskette
cannot be copied.

Chapter 2. OS/400 Command Descriptions P3-269


DUPDKT

TODEV Examples
Specifies the name of the device to which the diskette is
being copied. Example 1: Copying Diskette Contents
DUPDKT FROMDEV(DKT1) TODEV(DKT2)
Optional Parameters
This command copies the entire contents of the diskette in
RGZVOL device DKT1 onto the diskette in device DKT2.
Specifies whether to delete the unused space between
files to allow space for additional files to be written on Example 2: Copying Diskette Contents
the diskette. DUPDKT FROMDEV(DKT2) TODEV(DKT2)
*NO: The unused space remains as it exists on the
This command copies the entire contents of the diskette in
input diskette. If no deleted sectors are found, the
device DKT2, prompts for the next diskette being inserted in
output diskette is an exact copy of the input diskette.
device DKT2, and copies the contents on that diskette.
*YES: The unused space between files is moved to the
end of the last file, making all files on the output diskette Example 3: Compressing Unused Space
connected. If unused space between files currently DUPDKT FROMDEV(DKT2) TODEV(DKT1) RGZVOL(\YES)
exists, the files on the output diskette resides at different
physical locations. This command copies the contents of the diskette in device
DKT2 to the diskette in device DKT1. The unused space of
COPIES the data area is compressed at the end of the diskette. If
Specifies, for spooled files, the number of copies being unused space exists between files on the input diskette, the
printed. files on the output diskette reside at different physical
1: One copy of the output is printed. locations.
number-of-copies: Specify the number of diskette copies
to make. Valid values range from 2 through 999.

P3-270 OS/400 CL Reference - Part 2 (Full Version)


DUPOPT

DUPOPT (Duplicate Optical) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─────5
55──DUPOPT──FROMVOL(──from-volume-identifier──)──TOVOL(──to-volume-identifier──)──NEWVOL(──┬─\TOVOL────────────────┬──)────
└─new-volume-identifier─┘
5──┬───────────────────────┬───────────────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\NO──┐ │
(1) ─┴─\YES─┴──)─┘
└─CLEAR(───
Notes:
1 This parameter is ignored if the volume is WORM media.

P All parameters preceding this point can be specified in positional form.

Purpose NEWVOL
Specifies the new volume identifier of the to-volume after
The Duplicate Optical (DUPOPT) command creates a dupli- the duplication is complete.
cate optical volume. The duplicate volume is identical to the
*TOVOL: The volume identifier does not change.
original volume except for the volume identifier and the time
it was created. new-volume-identifier: Specify a new volume identifier.

Restriction: To use this command you must have *USE


authority to the authorization list securing the volume being Optional Parameter
duplicated and *ALL authority to the authorization list CLEAR
securing the new volume. Specifies whether to clear an erasable volume if the
Note: To see the parameter and value descriptions for this volume specified on the TOVOL parameter is initialized.
command, refer to the online help text. For more Note: This parameter is ignored if the volume is
information about printing the help text, refer to WORM media.
“Printing CL Command Descriptions” in Chapter 1.
*NO: The volume is not cleared.
*YES: The volume is cleared of existing data prior to
Required Parameters duplication.
FROMVOL
Specifies the volume identifier of the optical volume
Example
being duplicated.
DUPOPT FROMVOL(VOLð1) TOVOL(VOLð2)
TOVOL NEWVOL(\TOVOL) CLEAR(\YES)
Specifies the volume identifier of the optical volume
being created (new volume). This volume must have the This command creates a duplicate of the optical volume
same physical characteristics as the volume specified on VOL01 on volume VOL02, which keeps the same volume
the FROMVOL parameter, but cannot be the volume on identifier. The previous data on VOL02 is cleared prior to the
the opposite side of the cartridge. If the volume speci- duplication process.
fied is WORM (write-once-read-many) media, it must be
a volume that is not initialized.

Chapter 2. OS/400 Command Descriptions P3-271


DUPTAP

| DUPTAP (Duplicate Tape) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─┬───────────────────────────────────────────┬──────────────────5
55──DUPTAP──FROMDEV(──device-name──)──TODEV(──device-name──)────
│ ┌─\MOUNTED─────────────────┐ │
│ │ ┌──
───────────────────┐ │ │
6 (1) ─┴──)─┘
└─FROMVOL(──┴───volume-identifier─┴───
5──┬─────────────────────────────────────────┬──┬──────────────────────────────┬──┬────────────────────────────┬────────────────5
│ ┌─\MOUNTED─────────────────┐ │ │ ┌─\DEVTYPE──┐ │ │ ┌─\FROMFILE─┐ │
└─TOVOL(──┼─\FROMVOL─────────────────┼──)─┘ └─TODENSITY(──┼─\CTGTYPE──┼──)─┘ └─COMPACT(──┼─\YES──────┼──)─┘
│ ┌──
───────────────────┐ │ ├─16ðð──────┤ └─\NO───────┘
└──6─volume-identifier─┴───
(1) ─┘ ├─32ðð──────┤
├─625ð──────┤
├─\FMT348ð──┤
├─\FMT349ðE─┤
├─\FMT357ð──┤
├─\FMT357ðE─┤
├─\FMT359ð──┤
├─\QIC12ð───┤
├─\QIC525───┤
├─\QIC1ððð──┤
├─\QIC2GB───┤
├─\QIC3ð4ð──┤
├─\QIC5ð1ð──┤
├─\FMT2GB───┤
├─\FMT5GB───┤
└─\FMT7GB───┘
5──┬────────────────────────┬──┬────────────────────────────────────────────────────────────────────┬───────────────────────────5
│ ┌─\ALL────┐ │ │ ┌─\FIRST───────────────┐ ┌─\LAST────────────────┐ │
└─FILES(──┴─\ACTIVE─┴──)─┘ └─FROMSEQNBR(──┼─\ALL─────────────────┼──┼──────────────────────┼──)─┘
└─file-sequence-number─┘ ├─\ONLY────────────────┤
└─file-sequence-number─┘
5──┬────────────────────────────────────────┬──┬───────────────────────────────────────────────────────────────┬────────────────5
│ ┌─\FROMSEQ─────────────┐ │ │ ┌─\SYSCOPY───────────────────────────────────┐ │
└─TOSEQNBR(──┼─\END─────────────────┼──)─┘ └─USRLBLPGM(──┼─\NONE──────────────────────────────────────┼──)─┘
└─file-sequence-number─┘ │ ┌─\LIBL/────────┐ │
└─┼───────────────┼──user-label-program-name─┘
├─\CURLIB/──────┤
└─library-name/─┘
5──┬─────────────────────────────┬──┬───────────────────────────┬──────────────────────────────────────────────────────────────5%
│ ┌─\REWIND─┐ │ │ ┌─\UNLOAD─┐ │
└─FROMENDOPT(──┼─\UNLOAD─┼──)─┘ └─TOENDOPT(──┼─\REWIND─┼──)─┘
└─\LEAVE──┘ └─\LEAVE──┘
Notes:
1 A maximum of 50 repetitions

P All parameters preceding this point can be specified in positional form.

Purpose second part of the file to the end of the tape is not
allowed. You must duplicate both parts of the file at the
The Duplicate Tape (DUPTAP) command copies the con- same time by specifying multiple volumes on the
tents of one tape to another tape. FROMVOL parameter.

Notes: Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more
1. The density field in the file header labels is updated to information about printing the help text, refer to
reflect the true density. “Printing CL Command Descriptions” in Chapter 1.
2. Byte 80 in the volume label of a tape written on device
type 6157 is reset from a 'Q' to a blank.
Required Parameters
Restrictions: FROMDEV
1. The user must have two tape drives or a tape media Specifies the name of the device from which the tape is
library device with two tape resources to use this copied.
command.
TODEV
2. A file that spans volumes must have both partial files Specifies the name of the device to which the tape is
duplicated at the same time. That is, duplicating a tape copied.
that ends in a partial file, followed by appending the

P3-272 OS/400 CL Reference - Part 2 (Full Version)


DUPTAP

Optional Parameters *ONLY: Only the file specified in the starting file
sequence are duplicated. If *ALL is specified in the first
FROMVOL element, then this parameter is ignored.
Specifies the volume identifier of the tape being dupli-
file-sequence-number: Specify the ending file sequence
cated, or indicates that the tape currently on the mag-
number of the range to be duplicated. The valid range
netic tape device is being duplicated.
of sequence numbers is 1 through 65535.
Note: If the tape device is contained in a library device,
then the volume specified should be the cartridge TOSEQNBR
identifier to be mounted and used. Specifies which sequence number the data files are to
be copied to.
*MOUNTED: The volume currently placed in the device
is used. *FROMSEQ: The data files are duplicated to the same
file sequences as are specified in the from file sequence
volume-identifier: Specify the identifier of the labeled number parameter.
volume being duplicated. If the tape placed on the spec-
ified device has a different volume identifier than speci- *END: The data files are added to the logical end of
fied, or if it is an unlabeled volume, an error message is tape. The next valid sequence number is used.
sent. file-sequence-number: Specify the sequence number in
which the data file will be copied to. This value is not
TOVOL
allowed if the device does not have overwriting capabili-
Specifies the volume identifiers of the tapes to be
ties and the value specified is not the next logical value
created (destination volumes).
to be used at the end of the logical tape volume. The
Note: If the tape device is contained in a library device, valid range of sequence numbers is 1 through 65535.
then the volume specified should be the cartridge The duplication begins at the specified file.
identifier to be mounted and used.
TODENSITY
*MOUNTED: The volume currently placed in the device Specifies the density or format in which to write the data
is used. For a media library device, the volume to be to the device specified on the TODEV parameter.
used is the next cartridge in the category mounted by
the Set Tape Category (SETTAPCGY) command. *DEVTYPE: The data written on the tape volume is
based on the device type.
*FROMVOL: The volume label of the tape currently
mounted on the source device is used to initialize the *CTGTYPE: The data written on the tape volume is
tape on the output device. based on the cartridge type (the type of tape cartridge).
If the device does not support special cartridge type
volume-identifier: Specify the identifier to use on the information, *DEVTYPE is used.
output volume.
Tape Device Default Density (bpi)
FILES 2440 6250
Specifies which data files are copied. 3422 6250
*ALL: All data files on the tape volume are copied. 3430 6250
3480 *FMT3480
*ACTIVE: Only data files with an expiration date later
3490E *FMT3490E
than the current system date are copied.
3570-BXX *FMT3570
FROMSEQNBR 3570-CXX *FMT3570E
Specifies which data file sequence numbers are to be 3590 *FMT3590
copied. 6335 *QIC3040
6341 *QIC120
Element 1: Starting file sequence number
6342 *QIC525
*FIRST: All files starting with the first file sequence are 6343 *QIC1000
duplicated. 6344 *QIC2GB
*ALL: All files are duplicated. 6346 *QIC120
6347 *QIC525
file-sequence-number: Specify the starting file sequence 6348 *QIC1000
| number to be duplicated. The valid range of sequence 6349 *QIC2GB
| numbers is 1 through 16777215. Only the files in the 6366 *QIC120
specified sequence number range are duplicated. 6368 *QIC1000
Element 2: Ending file sequence number 6369 *QIC2GB
6378 *QIC525
*LAST: All files ending with the last file sequence are
6379 *QIC1000
duplicated.
6380 *QIC2GB
6385 *QIC5010

Chapter 2. OS/400 Command Descriptions P3-273


DUPTAP

6390 *FMT7GB *FMT5GB: The format of this tape is FMT5GB, which is


7208-002 *FMT2GB used for 8 millimeter cartridge tapes that can hold 5
7208-012 *FMT5GB gigabytes of data.
7208-222 *FMT7GB
*FMT7GB: The format of this tape is FMT7GB, which is
9346 *QIC120
used for 8 millimeter cartridge tapes that can hold 7
9347 3200
gigabytes of data.
9348 6250
COMPACT
1600: The data density on the tape volume is 1,600 bits
Specifies whether device data compaction is performed.
per inch, which is used for 1/2 inch reel tapes.
If the device specified does not support compaction, this
3200: The data density on the tape volume is 3,200 bits parameter is ignored.
per inch, which is used for 1/2 inch reel tapes.
*FROMFILE: Device data compaction is performed only
6250: The data density on the tape volume is 6,250 bits if the file being read from the device specified on the
per inch, which is used for 1/2 inch reel tapes. FROMDEV parameter was written using device data
compaction.
*FMT3480: The format of this tape is FMT3480. The
data density on this tape volume is formatted to support *YES: Device data compaction is performed on all files
a 3480 device. This density is used for 1/2 inch car- written to the device specified on the TODEV parameter.
tridge tapes.
*NO: Device data compaction is not performed.
*FMT3490E: The format of this tape is FMT3490E. The
USRLBLPGM
data density on this tape volume is formatted to support
Specifies whether user tape labels are processed by a
a 3490E device. This density is used for 1/2 inch car-
user program. The user label program passes user
tridge tapes.
labels that are written to tape to the device specified on
*FMT3570: The format of this tape is FMT3570. The the TODEV parameter. The device specified on the
data format is written on the tape volume with a 3570 FROMDEV parameter passes user labels to the user
device. label program.
*FMT3570E: The format of this tape is FMT3570E. The *SYSCOPY: User tape labels are processed to allow
data format is written on the tape volume with a 3570E proper duplication of System/36 save and restore tapes.
device. If the tape volume specified on the FROMDEV param-
*FMT3590: The format of this tape is FMT3590. The eter has user header labels, they are copied verbatim to
data format is written on the tape volume with a 3590 the tape volume specified on the TODEV parameter.
device. This density is used for 1/2 inch cartridge tapes. The same is done for the user trailer labels at the end of
the file or for the trailer labels at the end of the file
*QIC120: The format of this tape is QIC120, which is section.
used for 1/4 inch cartridge tapes that can hold 120
megabytes of data. If an end-of-volume condition occurs on the device spec-
ified on the TODEV parameter before the logical end-of-
*QIC525: The format of this tape is QIC525, which is tape is found on the device specified on the FROMDEV
used for 1/4 inch cartridge tapes that can hold 525 parameter, user trailer and header labels are created
megabytes of data. and written to the current and next tape volumes on the
*QIC1000: The format of this tape is QIC1000, which is device specified on the TODEV parameter. These
used for 1/4 inch cartridge tapes that can hold 1200 labels replicate the data from the user header labels
megabytes of data. read at the beginning of the file.
*QIC2GB: The format of this tape is QIC2GB, which is *NONE: No user tape labels are processed. Any user
used for 1/4 inch cartridge tapes that can hold 2.5 labels read from the tape volume are ignored. No user
gigabytes of data. labels are written to the tape volume.
*QIC3040: The format of this tape is QIC3040, which is The name of the user label program can be qualified by
used for 1/4 inch mini cartridge tapes that can hold 840 one of the following library values:
megabytes of data
*LIBL: All libraries in the job's library list are
*QIC5010: The format of this tape is QIC5010, which is searched until the first match is found.
used for 1/4 inch cartridge tapes that can hold 13.5
*CURLIB: The current library for the job is
gigabytes of data.
searched. If no library is specified as the current
*FMT2GB: The format of this tape is FMT2GB, which is library for the job, the QGPL library is used.
used for 8 millimeter cartridge tapes that can hold 2
gigabytes of data.
library-name: Specify the name of the library to be
searched.

P3-274 OS/400 CL Reference - Part 2 (Full Version)


DUPTAP

user-label-program-name: Specify the name of the user *LEAVE: The tape does not rewind or unload after the
program that processes the user tape labels. operation ends. It remains at the current position on the
tape drive.
FROMENDOPT
Specifies whether the tape volume placed on the device
specified on the FROMDEV parameter is rewound or Examples
rewound and unloaded after the operation is complete.
Example 1: Duplicating a single volume to a single
*REWIND: The tape is automatically rewound, but not volume
unloaded, after the operation has ended.
DUPTAP FROMDEV(TAPEð1) TODEV(TAPEð2)
*UNLOAD: The tape is automatically rewound and
unloaded after the operation ends. This command duplicates the tape volume mounted on
*LEAVE: The tape does not rewind or unload after the device TAPE01 onto the tape volume mounted on device
operation ends. It remains at the current position on the TAPE02.
tape drive.
Example 2: Appending a volume set to the end of a
TOENDOPT single volume
Specifies whether the tape volume placed in the device DUPTAP FROMDEV(TAPEð1) TODEV(TAPEð2)
specified on the TODEV parameter is rewound, or FROMVOL( VOLðð1 VOLðð2) TOVOL(VOLABC)
rewound and unloaded after the operation is complete. FROMSEQNBR(\ALL) TOSEQNBR(\END)
*UNLOAD: The tape is automatically rewound and
This command duplicates all files from the tape volumes
unloaded after the operation ends.
VOL001 and VOL002 onto the end of the to-volume
*REWIND: The tape is automatically rewound, but not VOLABC on device TAPE02.
unloaded, after the operation has ended.

Chapter 2. OS/400 Command Descriptions P3-275


EDTAUTL

EDTAUTL (Edit Authorization List) Command


Job: I Pgm: I REXX: I Exec

(P) ─────────────────────────────────────────────────────────────────────────────5%
55──EDTAUTL──AUTL(──authorization-list-name──)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose information about printing the help text, refer to


“Printing CL Command Descriptions” in Chapter 1.
The Edit Authorization List (EDTAUTL) command shows the
list of users and their authorities. From this display, the user
can add and remove users and change users' authorities on Required Parameter
the authorization list. AUTL
Specifies the name of an authorization list with which to
Restriction: The user must have authorization list manage-
work.
ment authority to, or ownership of, the list to use this
command.
Note: To see the parameter and value descriptions for this Example
command, refer to the online help text. For more EDTAUTL AUTL(MYLIST)

This command shows the authorization list MYLIST and


allows it to be changed.

P3-276 OS/400 CL Reference - Part 2 (Full Version)


EDTBCKUPL

EDTBCKUPL (Edit Backup List) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIB─┐
(P) ────────────────────────────────────────────────────────────────────────────────────────5%
55──EDTBCKUPL──BCKUPL(──┴─\FLR─┴──)────
Note:
P All parameters preceding this point can be specified positionally.

Purpose BCKUPL
Specifies the backup list to be changed.
The Edit Backup List (EDTBCKUPL) command allows the
*LIB: The library backup list is changed.
user to select libraries and folders for backup. More informa-
tion on backup is in the Backup and Recovery book. *FLR: The folder backup list is changed.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more Example
information about printing the help text, refer to EDTBCKUPL BCKUPL(\LIB)
“Printing CL Command Descriptions” in Chapter 1.
This command displays the library backup list stored in user
index QUSRSYS/QEZBACKUPL, and allows the user to
Required Parameters
change it.

Chapter 2. OS/400 Command Descriptions P3-277


EDTCPCST

EDTCPCST (Edit Check Pending Constraints) Command


Job: I Pgm: I REXX: I Exec

55──EDTCPCST───────────────────────────────────────────────────────────────────────────────────────────────────────────────────5%

Purpose while verifying selected constraints, or continues the IPL after


verifying selected constraints.
The Edit Check Pending Constraints (EDTCPCST) command
shows a list of established referential constraints that have There are no parameters for this command.
records that are possibly in violation of the constraints (check
pending). From this display, you can verify and select or
Examples
change the sequence of the constraints to be rebuilt during
an initial program load (IPL). Example 1: Editing a List of Constraints
This command is called while you are running an attended EDTCPCST
IPL if you have check pending constraints. From the display
This command shows you the referential constraints that are
shown, you can select whether the system continues the IPL
in check pending. You can edit the sequence for verifying
the constraints from this display.

P3-278 OS/400 CL Reference - Part 2 (Full Version)


EDTDLOAUT

EDTDLOAUT (Edit Document Library Object Authority) Command


Job: I Pgm: I REXX: I Exec

(P) ─┬──────────────────────────────┬──────────────────────────────────5%
55──EDTDLOAUT──DLO(──┬─\SYSOBJNAM───────────────────┬──)────
├─\ROOT────────────────────────┤ │ ┌─\NONE───────┐ │
└─document-library-object-name─┘ (1) ─┴─folder-name─┴──)───┤
├─FLR(───
└─SYSOBJNAM(───(2) ─object-name──)─┘

Notes:
P All parameters preceding this point can be specified in positional form.

1 FLR is not valid when DLO(*ROOT) is specified.

2 The SYSOBJNAM parameter is valid only when DLO(*SYSOBJNAM) is specified.

Purpose *SYSOBJNAM: The system object name specified in


the SYSOBJNAM parameter is changed.
The Edit Document Library Object Authority (EDTDLOAUT)
*ROOT: The public authority value of the *ROOT folder
command is used to change authorization to a document
is changed.
and/or folder object.
document-library-object-name: Specify the user-
The following information is shown for the specified docu- assigned name of the document or folder that is
ment or folder: changed. Up to 12 characters can be specified.
Ÿ The name of the document library object
Ÿ The name of the authorization list securing the document Optional Parameters
or folder (if there is one)
FLR
Ÿ Personal status of the document library object Specifies the name of the folder that contains the docu-
Ÿ Specific user authority for the document or folder ment.

Ÿ The authority given to the users with no specific *NONE: A folder name is not specified. If DLO(name)
authority for the document or folder is specified and the object is located in a folder,
FLR(*NONE) cannot be specified.
Ÿ Access codes can be shown by pressing a function key
folder-name: Specify the name of the folder that con-
Restrictions: tains the object. The name can consist of a series of
folder names if the folder containing the object is located
1. You must have *ALL authority to the document or folder
in another folder. Up to 63 characters can be specified.
to change the authority or *ALLOBJ special authority.
2. You must have authority to use the ADDDLOAUT, SYSOBJNAM
CHGDLOAUT, and the RMVDLOAUT commands to use Specifies the system object name of the folder or docu-
this command. ment. This parameter is valid only when
DLO(*SYSOBJNAM) is specified. Ten characters must
3. You must have *ALLOBJ special authority to change the be specified.
*ROOT folder public authority.
Note: To see the parameter and value descriptions for this
Example
command, refer to the online help text. For more
information about printing the help text, refer to EDTDLOAUT DLO(DOCA) FLR(MYFLR)
“Printing CL Command Descriptions” in Chapter 1.
This command allows the user of this command to change
the list of authorized users and their authorities to the docu-
Required Parameters ment library object named DOCA in folder MYFLR. The user
of this command must have *ALL authority to the object or
DLO be the owner of the object.
Specifies the name of the document or folder that is
changed.

Chapter 2. OS/400 Command Descriptions P3-279


EDTDOC

EDTDOC (Edit Document) Command


Job: I Pgm: I REXX: I Exec

(P) ──┬───────────────────────┬─────────────────────────5%
55──EDTDOC──┬────────────────────────────┬──┬──────────────────────────┬───
│ ┌─\PRV──────────┐ │ │ ┌─\PRV────────┐ │ │ ┌─\YES─┐ │
└─DOC(──┴─document-name─┴──)─┘ └─FLR(──┴─folder-name─┴──)─┘ └─EXITPNL(──┴─\NO──┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *PRV: The name used in the previous session is used.


folder-name: Specify the name of the folder that con-
The Edit Document (EDTDOC) command allows the user to
tains the document to be edited.
edit a document using the word processing function of
OfficeVision. More information on editing documents is in EXITPNL
the Using OfficeVision/400 Word Processing book. Specifies whether the Exit Document display is shown
Note: To see the parameter and value descriptions for this when F3(Exit) or F12(Cancel) is pressed to end the
command, refer to the online help text. For more editing.
information about printing the help text, refer to *YES: The Exit Document display is shown when
“Printing CL Command Descriptions” in Chapter 1. F3(Exit) or F12(Cancel) is pressed to end the editing.
*NO: The Exit Document display is not shown when
Optional Parameters F3(Exit) or F12(Cancel) is pressed to end the editing.

DOC
Specifies the name of the document to edit. Example
*PRV: The name used in the previous session is used. EDTDOC DOC(TASK4) FLR(INSTTXT)

document-name: Specify the name of the document that This command displays the document TASK4 of the folder
is edited. INSTTXT, and allows the user to edit the document TASK4.
FLR
Specifies the name of the folder that contains the docu-
ment.

P3-280 OS/400 CL Reference - Part 2 (Full Version)


EDTIGCDCT

EDTIGCDCT (Edit DBCS Conversion Dictionary) Command


Job: I Pgm: I REXX: I Exec

┌─\LIBL/────────┐
(1) ─IGCDCT(──┼───────────────┼──dictionary-name──)────
55──EDTIGCDCT─── (P) ─┬────────────────────────────────┬─────────────────────────5%
├─\CURLIB/──────┤ │ ┌─\ALL────────────┐ │
└─library-name/─┘ └─ENTRY(──┼─generic\-string─┼──)─┘
└─specific-string─┘
Notes:
1 DBCS systems only

P All parameters preceding this point can be specified in positional form.

Purpose *ALL: Any entry in the dictionary can be edited. The


system first shows the Work with DBCS Conversion Dic-
The Edit DBCS Conversion Dictionary (EDTIGCDCT) tionary display showing all alphanumeric entries in the
command lets the user add, change, and delete alphameric dictionary. From this display, specific entries are chosen
entries and their related words from the specified double-byte to be edited.
character set (DBCS) conversion dictionary. The system
generic*-string: Specify the generic name of the string
refers to the DBCS conversion dictionary when doing DBCS
to be edited. A generic name is a character string of
conversion. The system displays the entries being edited
one or more characters followed by an asterisk (*); for
when this command is specified.
example, ABC*. The asterisk substitutes for any valid
Note: Use of the conversion function is not recommended characters. A generic name specifies all objects with
for Chinese and Korean DBCSs. names that begin with the generic prefix for which the
Note: To see the parameter and value descriptions for this user has authority. If an asterisk is not included with the
command, refer to the online help text. For more generic (prefix) name, the system assumes it to be the
information about printing the help text, refer to complete object name. If the complete object name is
“Printing CL Command Descriptions” in Chapter 1. specified, and multiple libraries are searched, multiple
objects can be edited only if *ALL or *ALLUSR library
values can be specified for the name. For more infor-
Required Parameters mation on the use of generic names, refer to “Generic
Object Names” in Chapter 2.
IGCDCT
Specifies the qualified name of the DBCS conversion specific-string: Specify the entry to be edited. The
dictionary being edited. If a library name is not speci- system displays the Edit Related Words display, showing
fied, the first dictionary found when searching the library a single alphanumeric entry and its related words. You
list is edited. can edit the related words on this display. The string
cannot be longer than 12 characters.
The name of the dictionary can be qualified by one of
the following library values:
Examples
*LIBL: All libraries in the job's library list are
searched until the first match is found. Example 1: Showing the Work with DBCS Conversion
*CURLIB: The current library for the job is Dictionary Display
searched. If no library is specified as the current EDTIGCDCT IGCDCT(DBCSLIB/QUSRIGCDCT) ENTRY(123\)
library for the job, the QGPL library is used.
This command shows the Work with DBCS Conversion Dic-
library-name: Specify the name of the library to be
tionary display showing all the alphanumeric entries that start
searched.
with 123 in the dictionary QUSRIGCDCT, which is stored in
dictionary-name: Specify the name of the dictionary that the library DBCSLIB.
will be edited.
Example 2: Showing the Edit Related Words Display
EDTIGCDCT IGCDCT(DBCSLIB/QUSRIGCDCT) ENTRY(WORDS)
Optional Parameters
ENTRY This command shows the Edit Related Words display
Specifies the alphanumeric entries being edited with showing the alphanumeric entry WORDS and its related
their related words. words from the dictionary QUSRIGCDCT, which is stored in
library DBCSLIB.

Chapter 2. OS/400 Command Descriptions P3-281


EDTIGCDCT

Additional Considerations – You must enclose a string of characters in apostro-


phes (') if the string to be edited contains Katakana,
Consider the following when using this command: lowercase alphabetic, or special symbols. The
system translates lowercase alphabetic characters
Ÿ You can only rearrange the words related to alphanu-
to uppercase characters unless they are specified
meric entries when editing the IBM-supplied DBCS con-
as parameter values in apostrophes. For example,
version dictionary (QSYS/QSYSIGCDCT). You cannot
specify the string abc as 'abc'.
add or remove related words or alphanumeric entries.
– When specifying a string that contains only numeric
Ÿ Editing can only be done at a display station. The fol-
or uppercase alphabetic characters, the string does
lowing display stations are needed:
not have to be enclosed in apostrophes ('). That
– If a specific string is specified with the ENTRY means that ABC is as acceptable to the system as
parameter or to display DBCS characters, use a 'ABC'.
DBCS-capable display station.
– Do not include embedded blanks ( ) in a string of
– If a specific string is not specified with the ENTRY characters. In other words, the system would not
parameter, or if the user does not want to display accept the string ABC D.
DBCS characters, use either a DBCS-capable
Ÿ Specify the correct library name.
display station or a 24-row by 80-column alphanu-
meric display station. Ÿ The first display produced by the EDTIGCDCT
command, the Work with Japanese Dictionary display,
Ÿ How to specify specific and generic strings for the
shows all of the dictionary entries. The second display,
ENTRY parameter:
the Edit Related Words display, shows individual entries
and their related words.

P3-282 OS/400 CL Reference - Part 2 (Full Version)


EDTLIBL

EDTLIBL (Edit Library List) Command


Job: I Pgm: I REXX: I Exec

55──EDTLIBL────────────────────────────────────────────────────────────────────────────────────────────────────────────────────5%

Purpose There are no parameters for this command.

The Edit Library List (EDTLIBL) command shows an entry


display that allows users to make changes to the library list. Example
This command cannot be used to change the system portion EDTLIBL
of the library list or the library list of any other job.
This command shows the Edit Library List display from which
Restriction: This command is valid only in an interactive the user can add libraries, remove libraries, and change the
environment. order of the libraries in the library list.

Chapter 2. OS/400 Command Descriptions P3-283


EDTOBJAUT

EDTOBJAUT (Edit Object Authority) Command


Job: I Pgm: I REXX: I Exec

┌─\LIBL/────────┐
(1) ─object-type──)────
55──EDTOBJAUT──OBJ(──┼───────────────┼──object-name──)──OBJTYPE(─── (P) ─────────────────────────────────────────5%
├─\CURLIB/──────┤
└─library-name/─┘
Notes:
1 A list of the valid OS/400 object types for this command is in Appendix A.

P All parameters preceding this point can be specified in positional form.

Purpose OBJ
Specifies the qualified name of the object for which the
The Edit Object Authority (EDTOBJAUT) command displays authorized users and their authorities are to be shown.
the list of authorized users of an object and their associated
The name of the object can be qualified by one of the
authorities. If you own the object or have *ALLOBJ special
following library values:
authority, you can add, change, or remove authority for the
object. If you have object management authority for the *LIBL: All libraries in the job's library list are
object, you can remove your specific authorities or grant or searched until the first match is found.
remove them for other users.
*CURLIB: The current library for the job is
The following are displayed for the specified object: searched. If no library is specified as the current
library for the job, the QGPL library is used.
Ÿ the object name
library-name: Specify the name of the library to be
Ÿ the name of the library containing the object searched.
Ÿ the name of the object's owner, the object's type, and a
object-name: Specify the name of the object for which
list of all the users who are authorized to use the object
its authorized users and their authorities are to be
Ÿ the authorities that each user has for the object shown.

If an object does not have an owner name associated with it, OBJTYPE
no authorities for the object are shown. Specifies the object type of the object that is to have its
authorized users and their authorities shown. Any one
Restrictions: of the operating system object types can be specified.
1. The user must have object management authority to the For example, to display a list of users authorized to use
object to use this command. a file, specify the value *FILE. More information on this
parameter is in Appendix A, “Expanded Parameter
2. If the object is a file, the user must have object opera- Descriptions.”
tional and object management authorities.
Note: To see the parameter and value descriptions for this
Example
command, refer to the online help text. For more
information about printing the help text, refer to EDTOBJAUT OBJ(ARLIB/PROG1) OBJTYPE(\PGM)
“Printing CL Command Descriptions” in Chapter 1.
This command causes the list of authorized users and their
authorities for the object named PROG1 to be shown, but
Required Parameters only if the user has object management authority for the
object. PROG1 is a program (*PGM) located in the library
named ARLIB.

P3-284 OS/400 CL Reference - Part 2 (Full Version)


EDTQST

EDTQST (Edit Questions and Answers) Command


Job: I Pgm: I REXX: I Exec

(P) ─────────────────────────────────────────────5%
55──EDTQST──┬──────────────────────────────────┬──┬───────────────────────────┬───
│ ┌─\SELECT───────────┐ │ │ ┌─\QSTLIB──────┐ │
└─QSTDB(──┴─question-database─┴──)─┘ └─LIB(──┴─library-name─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *SELECT: The user is asked to specify a Q & A* data-


base. If only one Q & A database exists on the system,
The Edit Questions and Answers (EDTQST) command it is the default.
allows authorized users to edit questions and answers for
question-database: Specify the name of the Q & A data-
publication in a specified database. More information is
base in which to edit questions and answers.
available in the System Operation book.
LIB
Restrictions: Specifies the name of the library that contains the Q & A
1. This command is shipped with public *EXCLUDE database.
authority. *QSTLIB: The library containing the specified Q & A*
2. A user must have authority to the command and be a Q database is searched. If *SELECT is specified on the
& A coordinator for any Q & A database referred to by QSTDB parameter, any Q & A database in any library
the command. for which the user is authorized can be selected.
3. This command is interactive only. library-name: Specify the name of the library to be
searched. If *SELECT is specified on the QSTDB
Note: To see the parameter and value descriptions for this
parameter, any database in the library for which the user
command, refer to the online help text. For more
is authorized can be selected.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1.
Example
Optional Parameters EDTQST

QSTDB This command shows the Work with Candidate Questions


Specifies the Questions-and-Answers (Q & A) database display.
in which to edit questions and answers.

Chapter 2. OS/400 Command Descriptions P3-285


EDTRBDAP

EDTRBDAP (Edit Rebuild of Access Paths) Command


Job: I Pgm: I REXX: I Exec

55──EDTRBDAP───────────────────────────────────────────────────────────────────────────────────────────────────────────────────5%

Purpose 2. If an access path is marked with HELD, the user cannot


open the access path or run a query that uses the
The Edit Rebuild of Access Paths (EDTRBDAP) command access path.
shows the editing options that are available to the user when
rebuilding an access paths. From this display, users can
selectively control the rebuilding of access paths. Example
EDTRBDAP
Restrictions:
This command shows the controls that are available when
1. This command is shipped with public *EXCLUDE
editing rebuild access paths.
authority and the QSYSOPR user profile has private
authority to use the command.

P3-286 OS/400 CL Reference - Part 2 (Full Version)


EDTRCYAP

EDTRCYAP (Edit Recovery for Access Paths) Command


Job: I Pgm: I REXX: I Exec

55──EDTRCYAP───────────────────────────────────────────────────────────────────────────────────────────────────────────────────5%

Purpose This command has no parameters.

The Edit Recovery for Access Paths (EDTRCYAP) command Restrictions:


shows a list of access path recovery times for the system 1. You must have job control special authority to use this
and for auxiliary storage pools (ASP) that are currently on command.
the system. From this list, you can change target access
path recovery times and view updated recovery status infor- 2. This command is shipped with public *EXCLUDE
mation. authority, and the QPGMR and QSYSOPR user profiles
have private authorities to use this command.
The system uses no more than the specified amount of 3. If the current access path recovery state is *OFF, the
target access path recovery time when recovering access user must be in a restricted state to activate system-
paths during an initial program load (IPL) after an abnormal managed access-path protection by specifying a target
system end. Because access path recovery time is a target, access path recovery time value.
performance may range around the target.
4. If no user auxiliary storage pools (ASPs) exist on the
The time taken to rebuild access paths exposed while system, an access path recovery time for ASP 1 cannot
running the Copy File (CPYF), the Reorganize Physical File be specified. You must specify a system access path
Member (RGZPFM), or the Restore Object (RSTOBJ) com- recovery time.
mands is not considered in the target access path recovery
time of access paths protected with this command.
Example
You can use this command or the Change Recovery for EDTRCYAP
Access Paths (CHGRCYAP) command to manage the pro-
tection of access paths that are not already protected This command shows the Edit Recovery for Access Paths
through journaling. display from which you can show or modify the target access
path recovery times for your system and configured ASPs.
For more information on using this command, see the
Backup and Recovery book.

Chapter 2. OS/400 Command Descriptions P3-287


EDTS36PGMA

EDTS36PGMA (Edit System/36 Program Attributes) Command


Job: I Pgm: I REXX: I Exec

┌─\LIBL/────────┐ ┌─\ALL─────────┐
(P) ───────────────────────────────────────────────────────────────5%
55──EDTS36PGMA──PGM(──┼───────────────┼──┴─program-name─┴──)────
├─\CURLIB/──────┤
└─library-name/─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *LIBL: All libraries in the job's library list are


searched until the first match is found.
The Edit System/36 Program Attributes (EDTS36PGMA)
*CURLIB: The current library for the job is
command presents the attributes of the specified program on
searched. If no library is specified as the current
your display to allow you to change them. The attributes of a
library for the job, the QGPL library is used.
specified program or of all programs in the specified library
can be changed. library-name: Specify the name of the library to be
searched.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more *ALL: The attributes of all programs in the library are
information about printing the help text, refer to shown for update. *ALL is not allowed if the library
“Printing CL Command Descriptions” in Chapter 1. specified is *LIBL.
program-name: Specify the name of the program whose
Required Parameters attributes you want to update.

PGM
Specifies the qualified name of the program having its Example
attributes updated. EDTS36PGMA PGM(RPGLIB/\ALL)
The name of the program can be qualified by one of the
This command shows the program attributes of all the pro-
following library values:
grams in RPGLIB and allows them to be changed.

P3-288 OS/400 CL Reference - Part 2 (Full Version)


EDTS36PRCA

EDTS36PRCA (Edit System/36 Procedure Attributes) Command


Job: I Pgm: I REXX: I Exec

(P) ───────────────────5%
55──EDTS36PRCA──MBR(──┬─\ALL──────────────────┬──)──┬───────────────────────────────────────────────────┬───
└─procedure-member-name─┘ │ ┌─\LIBL/────────┐ ┌─QS36PRC──────────┐ │
└─FILE(──┼───────────────┼──┴─source-file-name─┴──)─┘
├─\CURLIB/──────┤
└─library-name/─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose FILE
Specifies the qualified name of the source physical file
The Edit System/36 Procedure Attributes (EDTS36PRCA) that contains the procedure members to be updated.
command presents the attributes of the specified procedure
The name of the file can be qualified by one of the fol-
on your display for you to change. The attributes of a speci-
lowing library values:
fied procedure or of all procedures in the specified file can be
changed. *LIBL: All libraries in the job's library list are
Note: To see the parameter and value descriptions for this searched until the first match is found.
command, refer to the online help text. For more *CURLIB: The current library for the job is
information about printing the help text, refer to searched. If no library is specified as the current
“Printing CL Command Descriptions” in Chapter 1. library for the job, the QGPL library is used.
library-name: Specify the name of the library to be
Required Parameters searched.

MBR QS36PRC: The name of the default source physical file


Specifies the name of the procedure member for which that contains the procedure members is used.
attributes are shown or updated. source-file-name: Specify the name of the source phys-
*ALL: The attributes of all procedure members in the ical file that contains the procedure members.
file are shown for update.
procedure-member-name: Specify the name of the pro- Example
cedure member whose attributes you want to update. EDTS36PRCA MBR(RPGPROC) FILE(RPGLIB)

This command shows the attributes of procedure RPGPROC


Optional Parameters
in file QS36PRC in library RPGLIB and allows them to be
changed.

Chapter 2. OS/400 Command Descriptions P3-289


EDTS36SRCA

EDTS36SRCA (Edit System/36 Source Attributes) Command


Job: I Pgm: I REXX: I Exec

(P) ──────────────────────5%
55──EDTS36SRCA──MBR(──┬─\ALL───────────────┬──)──┬───────────────────────────────────────────────────┬───
└─source-member-name─┘ │ ┌─\LIBL/────────┐ ┌─QS36SRC──────────┐ │
└─FILE(──┼───────────────┼──┴─source-file-name─┴──)─┘
├─\CURLIB/──────┤
└─library-name/─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose FILE
Specifies the qualified name of the source physical file
The Edit System/36 Source Attributes (EDTS36SRCA) containing the source members.
command presents the attributes of the specified source
The name of the source physical file can be qualified by
member on your display for you to change. The attributes of
one of the following library values:
a specified source member or of all source members in the
specified file can be changed. *LIBL: All libraries in the job's library list are
Note: To see the parameter and value descriptions for this searched until the first match is found.
command, refer to the online help text. For more *CURLIB: The current library for the job is
information about printing the help text, refer to searched. If no library is specified as the current
“Printing CL Command Descriptions” in Chapter 1. library for the job, the QGPL library is used.
library-name: Specify the name of the library to be
Required Parameters searched.

MBR QS36SRC: The name of the default source physical file


Specifies the name of the source member that is having containing the source members.
its attributes shown or updated. source-file-name: Specify the name of the source phys-
*ALL: The attributes of all source members in the file ical file containing the source members.
are shown for update.
source-member-name: Specify the name of the source Example
member whose attributes you want to update. EDTS36SRCA MBR(\ALL) FILE(SDALIB/QS36SRC)

This command shows the source attributes of all the source


Optional Parameters
members in file QS36SRC in library SDALIB and allows them
to be changed.

P3-290 OS/400 CL Reference - Part 2 (Full Version)


EDTWSOAUT

EDTWSOAUT (Edit Workstation Object Authority) Command


Job: I Pgm: I REXX: I Exec

(P) ─────────────────────────────────────────────────────────────────────────────────5%
55──EDTWSOAUT──WSOTYPE(──┬─\TPLWRKARA─┬──)────
├─\WRKARA────┤
├─\TPLPRTOL──┤
├─\PRTOL─────┤
├─\TPLTPRTL──┤
├─\PRTL──────┤
├─\TPLOUTQ───┤
├─\TPLOUTQL──┤
├─\OUTQL─────┤
├─\TPLJOBL───┤
├─\JOBL──────┤
├─\TPLJOBQ───┤
├─\TPLJOBLOG─┤
├─\JOBLOG────┤
├─\TPLJOBQL──┤
├─\JOBQL─────┤
├─\TPLMSGL───┤
├─\MSGL──────┤
├─\TPLMSGQ───┤
├─\TPLMSGSND─┤
├─\MSGSND────┤
├─\TPLSGNUSL─┤
├─\SGNUSL────┤
├─\TPLOBJL───┤
├─\OBJL──────┤
├─\TPLLIBSL──┤
├─\LIBSL─────┤
├─\TPLLIB────┤
├─\TPLLAUNCH─┤
├─\LAUNCH────┤
└─\PRSSET────┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Restrictions:
1. The user must have object management authority to the
The Edit Workstation Object Authority (EDTWSOAUT)
object to use this command.
command shows the list of authorized users of a workstation
object and the users' associated authorities. Workstation 2. If the object is a file, the user must have object opera-
objects are used by the OS/400 Graphical Operations tional and object management authorities to use this
program. If you own the object or are the security officer, command.
you can add, change, or remove authority for the object. If Note: To see the parameter and value descriptions for this
you have object management authority for the object, you command, refer to the online help text. For more
can remove your specific authorities or grant or remove them information about printing the help text, refer to
for other users. “Printing CL Command Descriptions” in Chapter 1.
The following are shown for the specified object:
Ÿ The object name Required Parameter
Ÿ The name of the library containing the object WSOTYPE
Ÿ The name of the object owner, the object’s type, and a Specifies the name of the workstation object for which
list of all the users who are authorized to use the object specific authorities are to be shown or edited.
Ÿ The authorities that each user has for the object
The special values for this parameter are described in
If an object does not have an owner name associated with it, the following table.
no authorities for the object are shown.

Chapter 2. OS/400 Command Descriptions P3-291


EDTWSOAUT

Example
Special Value Workstation Objects EDTWSOAUT WSOTYPE(\TPLMSGQ)
*TPLWRKARA Work area template
This command shows the list of authorized users to the
*WRKARA Work area objects message queue template.
*TPLPRTOL Printer output list template
*PRTOL Printer output list objects
*TPLTPRTL Printer list template
*PRTL Printer list objects
*TPLOUTQ Output queue template
*TPLOUTQL Output queue list template
*OUTQL Output queue list objects
*TPLJOBL Job list template
*JOBL Job list objects
*TPLJOBQ Job queue template
*TPLJOBLOG Job log template
*JOBLOG Job log objects
*TPLJOBQL Job queue list template
*JOBQL Job queue list objects
*TPLMSGL Message list template
*MSGL Message list objects
*TPLMSGQ Message queue template
*TPLMSGSND Message sender template
*MSGSND Message sender
*TPLSGNUSL Signed-on user list template
*SGNUSL Signed-on user list objects
*TPLOBJL Object list template
*OBJL Object list objects
*TPLLIBSL Library list template
*LIBSL Library list objects
*TPLLIB Library template
*TPLLAUNCH Job submitter template
*LAUNCH Job submitter objects
*PRSSET Personal setting objects

Figure 1. Special Values for Workstation Objects

P3-292 OS/400 CL Reference - Part 2 (Full Version)


EJTEMLOUT

EJTEMLOUT (Eject Emulation Output) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ────────────────────────────────────────────5%
55──EJTEMLOUT──┬─EMLDEV(──emulation-device-description-name──)─────────────────┬───
└─EMLLOC(──emulation-location-name──)──PRTDEV(──printer-name──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Example
EJTEMLOUT EMLDEV(HOSTPRT1)
The Eject Emulation Output (EJTEMLOUT) command fin-
ishes the current emulation output, and then ejects to a new This command closes the printer file in the printer emulation
page. It forces the last data received from the host system job using the emulation device HOSTPRT1, forcing the latest
to the spooled file or printer by closing the printer file and data from the host system out to the spooled file or printer.
then reopening another, so that more data can be spooled or
printed. If SCHEDULE(*FILEEND) is specified on the Create
Printer File (CPTPRTF) command, printing starts. The Additional Considerations
request may not take effect immediately, because the printer
utility must complete printing a transmission block from the You must use care when running this command. Before
host system before doing this function. See “Additional Con- entering the command, you should look at the printed output
siderations” at the end of this command description for more (if SPOOL(*NO) was specified) or use the Display Spooled
information about running this command. File (DSPSPLF) command to look at the spooled file (if
SPOOL(*YES) was specified), to determine whether the
More information about device emulation is available in the printer data is at a logical breaking point. If this function is
3270 Device Emulation Support book. requested when printer emulation is in the middle of a group
of print data from the host system, the group is split into sep-
Note: To see the parameter and value descriptions for this
arate printer files on the system.
command, refer to the online help text. For more
information about printing the help text, refer to The effect of this command on the printer emulation output
“Printing CL Command Descriptions” in Chapter 1. varies, depending on the values specified for the SPOOL and
SCHEDULE parameters on the printer file.
Required Parameters The possible values and their conditions are:
EMLDEV Ÿ SPOOL(*NO): All the data received from the host
Specifies the name of the printer emulation device system is printed, and the printer moves to the top of the
requested to receive data from the host system. The next page.
printer emulation job using this device is informed of the
request and closes the printer file. This forces all of the Ÿ SPOOL(*YES) and SCHEDULE(*IMMED): If a writer is
data received from the host system to the spooled file or active to the output queue and is printing this file, all the
printer. The printer file is then reopened and printer data received from the host system is printed, and the
emulation continues. To use this function, the user must printer moves to the top of the next page. If a writer is
be authorized to the device. not active (printing this file), the effect is the same as if
SCHEDULE(*FILEEND) was specified. Another printer
EMLLOC file is opened on the output queue.
Specifies the remote location name associated with this
Ÿ SPOOL(*YES) and SCHEDULE(*FILEEND): The status
session. This name is defined during configuration and
of the printer file on the output queue changes from
refers to the remote location where communication takes
open to ready to print. If a writer is active, the data can
place. This value must be the same as that specified for
be printed. Another printer file is opened on the output
the Start Printer Emulation (STRPRTEML) command.
queue.
PRTDEV Ÿ SPOOL(*YES) and SCHEDULE(*JOBEND): The status
Specifies the name of the printer device that is used to of the printer file on the output queue changes from
print the spooled output. This value must match the open to closed. The file is not ready to print until the
value specified on the Start Printer Emulation end of the job is reached. Another printer file is opened
(STRPRTEML) command. This parameter must be on the output queue.
specified when the EMLLOC parameter is specified.

Chapter 2. OS/400 Command Descriptions P3-293


ELSE

ELSE (Else) Command


Pgm: B,I

(P) ───────────────────────────────────────────────────────────────────────────────────────────5%
55──ELSE──┬─────────────────────┬───
└─CMD(──CL-command──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose command and the right parenthesis can then be coded


on the next line. For example:
The Else (ELSE) command is used with an IF command to ELSE CMD( +
specify another command that is to be conditionally pro- GOTO C)
cessed. The ELSE command is processed only if the result
of evaluating the logical expression on the preceding IF If any part of the command continues on the next line, a
command is false, the ELSE command can specify a CL continuation character (+ or -) must be specified.
command to be processed for the false condition. If the DO If a DO command is specified, only the DO command
command is specified on the ELSE command, a Do group (not the commands specified as part of the Do group) is
can be processed. If the result of processing the IF placed in parentheses. For example:
command is true, the ELSE command and commands asso-
ELSE CMD(DO)
ciated with it are not processed. CMD1
CMD2
An ELSE command does not have to follow each IF
Ÿ
command, but each ELSE command that is coded must have Ÿ
an associated IF command preceding it. If nested levels of Ÿ
IF commands are used, a given ELSE is always matched ENDDO
with the innermost IF command that has not already been
The following commands, although valid in CL programs,
matched with another ELSE command. Although the ELSE
cannot be specified on the ELSE command:
command is optional, coding all of the matching ELSE com-
mands makes it easier to see where all of the nesting levels ENDDO (End Do)
start and end.
MONMSG (Monitor Message)
Restriction: The ELSE command is valid only in a CL PGM (Program)
program. It must have an associated IF command preceding
it. ENDPGM (End Program)

Note: To see the parameter and value descriptions for this DCL (Declare CL Variable)
command, refer to the online help text. For more DCLF (Declare File)
information about printing the help text, refer to
another ELSE command
“Printing CL Command Descriptions” in Chapter 1.
In addition, the MONMSG command cannot be specified
as the next command after the ELSE command.
Optional Parameters
CMD Examples
Specifies the command or commands (in a Do group) to
be processed if the result of evaluating the expression Example 1: Using Else and If Commands
on the corresponding IF command is false. If the
IF (&A \GT &B) THEN(CHGVAR VAR(&A) VALUE(&B))
command specified in this parameter is a DO command,
ELSE (CHGVAR &B &A)
all of the commands specified within the Do group are
considered to be part of the command specified by the If the value of &A is greater than the value of &B, &A is set
parameter. If no command is specified, no action is equal to &B. If &A is less than or equal to &B, the test result
taken for a false condition. is false. The CHGVAR command on the ELSE command is
If the command specified by the CMD keyword is not processed, and the value of &B is set to the same value as
coded on the same line as the keyword, the left paren- &A. (Refer to the CHGVAR (Change Variable) command for
thesis following CMD must be coded on the same line, the description of the command and its parameters.)
followed by a + or - to show continuation. The
Example 2: Nested Levels of Commands

P3-294 OS/400 CL Reference - Part 2 (Full Version)


ELSE

IF COND(&A \EQ &B) + This example shows the use of nested levels of IF com-
THEN(IF (&C \EQ &D) + mands where an ELSE command is associated with each IF.
THEN(IF (&C \EQ &F) THEN(DO))) The use of the ELSE commands makes the nested levels of
CMD1 IF commands easier to identify.
CMD2
Ÿ
Ÿ
Ÿ
ENDDO
ELSE CMDX
ELSE CMDY
ELSE DO

Chapter 2. OS/400 Command Descriptions P3-295


EMLPRTKEY

EMLPRTKEY (Emulate Printer Key) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\PA1─┐
(P) ──PRTKEY(──┴─\PA2─┴──)──────────────────────5%
55──EMLPRTKEY──┬─EMLDEV(──emulation-device-description-name──)─────────────────┬───
└─EMLLOC(──emulation-location-name──)──PRTDEV(──printer-name──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose is sent to the host system with the CD. If the LU


session is in send condition, the PA key signal is sent to
The Emulate Printer Key (EMLPRTKEY) command causes the host system with the CD.
the printer emulation job or session that is using the specified
printer emulation device to send either a PA1 or PA2 key EMLLOC
signal to the host system. PA keys are program attention Specifies the remote location name associated with this
keys that are used to signal the host system. The command session. This name is defined during configuration and
may not take effect immediately because the printer emu- refers to the remote location where communication takes
lation routine will complete printing the last data received place. This value is the same as the value specified for
from the host system before doing this function. In addition, the EMLLOC parameter for the Start Printer Emulation
the PA key signal, although sent to the host system, may not (STRPRTEML) command.
immediately be received. PRTDEV
Note: To see the parameter and value descriptions for this Specifies the name of the printer device that is used to
command, refer to the online help text. For more print the spooled output. This value must match the
information about printing the help text, refer to value specified on the Start Printer Emulation
“Printing CL Command Descriptions” in Chapter 1. (STRPRTEML) command. This parameter must be
specified when the EMLLOC parameter is specified.

Required Parameters PRTKEY


Specifies the PA key signal that is sent to the host
EMLDEV system. The host system program determines how the
Specifies the name of a printer emulation device that PA keys work.
receives data from the host system. This device must
be a 3287 Printer (EMLDEV(3287)) or a 3289 Printer *PA1: The PA1 key signal is sent to the host system.
(EMLDEV(3289)), and must currently be operating as an *PA2: The PA2 key signal is sent to the host system.
LU1 unit. The printer emulation job or session that is
using this device will be informed of the request. If the
LU1 session is between brackets, printer emulation Example
starts a bracket and sends the PA key signal to the host EMLPRTKEY EMLDEV(HOSTPRT2) PRTKEY(\PA2)
system with Change Direction (CD) request. If the LU
session is in receive condition, a signal (request for CD) This command causes the printer emulation session using
is sent to the host system, and printer emulation waits emulation device HOSTPRT2 to send the PA2 key signal to
for the CD. When the CD is received, the PA key signal the host system.

P3-296 OS/400 CL Reference - Part 2 (Full Version)


ENDBCHJOB

ENDBCHJOB (End Batch Job) Command


Job: B

55──//ENDBCHJOB────────────────────────────────────────────────────────────────────────────────────────────────────────────────5%

Purpose command name when entering it in the data record, for


example, //ENDBCHJOB. The user can separate the slashes
The End Batch Job (//ENDBCHJOB) command is a delimiter from this command name with blank spaces, for example,
that indicates the end of a job in a batch job stream. The // ENDBCHJOB.
//ENDBCHJOB command also can indicate the end of an
inline data file if the command is detected while the inline file There are no parameters for this command.
is being processed. Other conditions that can indicate the
end of a job are:
Example
Ÿ Batch Job (BCHJOB) command //ENDBCHJOB
Ÿ An end-of-file condition while an input stream is being
processed This command indicates the end of a job that began with the
BCHJOB command.
Restriction: The ENDBCHJOB command cannot be used
from a work station. Two slashes must precede this

Chapter 2. OS/400 Command Descriptions P3-297


ENDCLNUP

ENDCLNUP (End Cleanup) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──ENDCLNUP───────────────────────────────────────────────────────────────────────────────────────────────────────────────────5%

Purpose More information on cleanup commands is in the System


Operation book.
The End Cleanup (ENDCLNUP) command allows the user to
end the cleanup operation. Any active batch cleanup jobs, Restriction: The user must have *JOBCTL authority to use
either processing or on the job queue, are ended imme- this command.
diately.
There are no parameters for this command.
This command does not alter the parameters specified on
the Change Cleanup (CHGCLNUP) command. The cleanup
Example
operation can be restarted by specifying the Start Cleanup
(STRCLNUP) command. ENDCLNUP

This command ends the cleanup operation.

P3-298 OS/400 CL Reference - Part 2 (Full Version)


ENDCMNSVR

ENDCMNSVR (End Communications Server) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P)─┬─────────────────────────┬──┬─────────────────────────────┬──────────────────────────────────────────────────5%
55──ENDCMNSVR───
│ ┌─\CNTRLD─┐ │ │ ┌─\NOMAX─────┐ │
(1) ─┴─delay-time─┴──)─┘
└─OPTION(──┴─\IMMED──┴──)─┘ └─DELAY(───
Notes:
1 This parameter is valid only when OPTION(*CNTRLD) is specified.

P All parameters preceding this point can be specified in positional form.

Purpose *IMMED: The server is ended in an immediate fashion.


All active sessions that were started through the target
The End Communications Server (ENDCMNSVR) command display station pass-through server are ended imme-
is used to end the target display station pass-through server. diately.
The target display station pass-through server processes
AS/400 display station pass-through, AS/400 Client Access DELAY
work station function (WSF), and other 5250 emulation pro- Specifies the amount of time (in seconds) allowed in
grams on programmable workstations. which to complete a controlled end of the target display
station pass-through server. After this period of time all
Restrictions: the target display station pass-through server jobs are
ended immediately.
You must have job control (*JOBCTL) special authority to
*NOMAX: There is no maximum amount of time to wait.
use this command.
The servers will not end until all active sessions end
Note: To see the parameter and value descriptions for this normally.
command, refer to the online help text. For more
delay-time: Specify the number of seconds in which the
information about printing the help text, refer to
end operation is completed. Valid values range from 1
“Printing CL Command Descriptions” in Chapter 1.
through 86400 seconds.

Required Parameters Examples


Example 1: Ending Target Display Station Pass-through
Optional Parameters Server
OPTION ENDCMNSVR
Specifies whether the target display station pass-through
server is ended in an immediate or controlled manner. This command ends the target display station pass-through
server in a controlled manner. Any active sessions that are
*CNTRLD: The server is ended in a controlled manner. using the target display station pass-through server are not
Active sessions are allowed to complete their pro- affected. New sessions are not allowed through the target
cessing. New sessions are not allowed. After the speci- display station pass-through server. Once all of the active
fied period of time elapses, the processing for sessions have ended, the target display station pass-through
ENDCMNSVR OPTION(*IMMED) is performed. server will end.

Chapter 2. OS/400 Command Descriptions P3-299


ENDCMNTRC

ENDCMNTRC (End Communications Trace) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ───────────────────────────────────────────────────5%
55──ENDCMNTRC──CFGOBJ(────configuration-name────)──CFGTYPE(──┬─\LIN─┬──)────
├─\NWI─┤
└─\NWS─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Required Parameters


The End Communications Trace (ENDCMNTRC) command CFGOBJ
ends the trace running on the specified line, network inter- Specifies the name of the configuration object being
face, or network server description. traced. The object is either a line description, a network
interface description, or a network server description.
Restrictions:
CFGTYPE
1. The user must have *USE authority for the line, network Specifies the type of configuration description being
interface, or network server to be traced. traced.
2. *SERVICE authority is required to use this command. *LIN: The type of configuration object is a line
3. This command is shipped with public *EXCLUDE description.
authority. *NWI: The type of configuration object is a network
4. The following user profiles have authority to this interface description.
command: *NWs: The type of configuration object is a network
Ÿ QSECOFR server description.

Ÿ QSRV
Note: To see the parameter and value descriptions for this
Example
command, refer to the online help text. For more ENDCMNTRC CFGOBJ(\QESLINE) CFGTYPE(\LIN)
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. This command ends the communications trace of line
description QESLINE.

P3-300 OS/400 CL Reference - Part 2 (Full Version)


ENDCMTCTL

ENDCMTCTL (End Commitment Control) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──ENDCMTCTL──────────────────────────────────────────────────────────────────────────────────────────────────────────────────5%

Purpose More information on the use of commitment control is in the


Backup and Recovery book.
The End Commitment Control (ENDCMTCTL) command
ends the commitment definition associated with the activation There are no parameters for this command.
group for the program that issued the command. Changes to
commitment resources associated with the commitment defi-
Example
nition are no longer made after this command is processed.
ENDCMTCTL
This command either ends the activation group level or the
job level commitment definition associated with the activation This command specifies that the commitment definition
group for the program that issued the command. A commit- established with the STRCMTCTL command is to end. The
ment definition is first established by the Start Commitment system determines if any changes have been made to the
Control (STRCMTCTL) command. commitment resources after the last commitment boundary
(at the last completed Commit (COMMIT) command or
If there are uncommitted changes for an interactive job, a Rollback (ROLLBACK) command). If changes have been
message is sent asking the user whether the changes should made for an interactive job, a message is sent asking the
be committed or rolled back before a commitment definition user whether the changes should be made permanent (com-
is ended. For a batch job, the changes are rolled back. mitted) or removed (rolled back). For batch jobs, any
changes are rolled back.

Chapter 2. OS/400 Command Descriptions P3-301


ENDCPYSCN

ENDCPYSCN (End Copy Screen) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ───────────────────────────────────────────────────────────────────────5%
55──ENDCPYSCN──┬────────────────────────────────────┬───
│ ┌─\REQUESTER─────────┐ │
└─SRCDEV(──┴─source-device-name─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose SRCDEV
Specifies the name of the display station that is currently
The End Copy Screen (ENDCPYSCN) command ends the having its screen images copied. If no display station
copy screen image operation. This command can be name is specified, processing for the requesting display
entered from any display station capable of command entry. station is canceled.
Note: The target display station also stops the copy screen *REQUESTER: The source display station that
image operation when the user presses the System requested the command is used.
Request key and types ENDCPYSCN (End Copy
source-device-name: Specify the display station name
Screen command) on the command line. No param-
whose screen images are being copied.
eters can be specified.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more Example
information about printing the help text, refer to ENDCPYSCN SRCDEV(CHARLIE)
“Printing CL Command Descriptions” in Chapter 1.
The command sends a message to 'CHARLIE' (the source
display station). The message indicates the copy screen
Optional Parameters image operation is about to end. The target work station
display is restored to the same display image that was
shown before the operation started. The sign-on display is
normally shown.

P3-302 OS/400 CL Reference - Part 2 (Full Version)


ENDCTLRCY

ENDCTLRCY (End Controller Recovery) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ────────────────────────────────────────────────────────────────────────────────────5%
55──ENDCTLRCY──CTL(──controller-name──)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Required Parameters


The End Controller Recovery (ENDCTLRCY) command ends CTL
error recovery procedures for a specific controller. If any Specifies the controller whose recovery is ended.
type of failure occurs after this command is run, an inquiry Specify the name of the controller in the controller
message is sent. description.

Use the Resume Controller Recovery (RSMCTLRCY)


command to reestablish error recovery procedures for the
Example
controller. ENDCTLRCY CTL(TROLL3)
Note: To see the parameter and value descriptions for this This command ends error recovery procedures for the con-
command, refer to the online help text. For more troller TROLL3.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1.

Chapter 2. OS/400 Command Descriptions P3-303


ENDDBG

ENDDBG (End Debug) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──ENDDBG─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────5%

Purpose Restriction: This command is valid only in debug mode. To


start debug mode, refer to the STRDBG (Start Debug)
The End Debug (ENDDBG) command ends debug mode for command.
a job, removes all breakpoints and traces, clears any trace
data, and removes all programs from debug mode. This If the user is servicing another job while in debug mode, then
command cannot be entered when one or more of the pro- this command must be specified before the ENDSRVJOB
grams in the call stack are stopped at a breakpoint. All (End Service Job) command is allowed.
breakpoints must be canceled by Resume Breakpoint
(RSMBKP) or End Request (ENDRQS) commands. After There are no parameters for this command.
this command has been entered, all database files in pro-
duction libraries can be updated normally. Example
If ENDDBG is not done before the job has ended, all trace ENDDBG
data is printed.
Assuming that this command is entered interactively and no
program in the call stack is stopped at a breakpoint, debug
mode for the job is ended.

P3-304 OS/400 CL Reference - Part 2 (Full Version)


ENDDBGSVR

ENDDBGSVR (End Debug Server) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──ENDDBGSVR──────────────────────────────────────────────────────────────────────────────────────────────────────────────────5%

Purpose There are no parameters for this command.

The End Debug Server (ENDDBGSVR) command ends the


debug server router function. If there are active server jobs Example
running when the router function is ended, the servers ENDDBGSVR
remain active until the connection with the client is ended.
Subsequent connection requests fail until the debug server This command ends the debug server router function.
router function is started again.

Chapter 2. OS/400 Command Descriptions P3-305


ENDDBMON

ENDDBMON (End Database Monitor) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──ENDDBMON──┬────────────────────────────────────────────────────────┬───(P) ──┬─────────────────────────┬───────────────────────5%
│ ┌─\─────────────────────────────────────────┐ │ │ ┌─\BLANK─┐ │
(1) ───────────────────────────────────┼──)─┘
└─JOB(──┼─\ALL─── └─COMMENT(──┴─text───┴──)─┘
└─┬─────────────────────────────┬──job-name─┘
└─┬─────────────┬──user-name/─┘
└─job-number/─┘
Notes:
1 This value is valid only if JOB(*ALL) was specified using the STRDBMON command.

P All parameters preceding this point can be specified in positional form.

Purpose this parameter is in Appendix A, “Expanded Parameter


Descriptions.”
The End Database Monitor (ENDDBMON) command ends
*: The current job's monitor is ended.
the collection of database performance statistics for a speci-
fied job or all jobs on the system. job-name: Specify the name of the job whose monitor is
ended.
Restriction:
user-name: Specify the name of the user of the job
You cannot end database monitoring for a specific job by whose monitor is ended.
using JOB(*ALL) on the ENDDBMON command. If job-number: Specify the number of the job whose
JOB(*ALL) was specified on the STRDBMON command, you monitor is ended.
cannot end database monitoring for a specific job unless a
STRDBMON was done on that specific job. COMMENT
Specifies the description that is associated with the data-
Note: To see the parameter and value descriptions for this base monitor record whose ID is 3018.
command, refer to the online help text. For more
information about printing the help text, refer to *BLANK: Text is not specified.
“Printing CL Command Descriptions” in Chapter 1. text: Specify up to 100 characters of text.

Optional Parameters Examples


JOB Example 1: Ending Database Monitoring for All Jobs
Specifies the qualified name of the job and consists of
ENDDBMON JOB(\ALL)
as many as three elements. For example:

job-name This command ends database monitoring for all jobs on the
user-name/job-name system.
job-number/user-name/job-name
Example 2: Ending Database Monitoring for a Specific
*N may be used in place of the user-name element to Job
maintain position in the sequence. More information on ENDDBMON JOB(\)

This command ends database monitoring for the current job.

P3-306 OS/400 CL Reference - Part 2 (Full Version)


ENDDEVRCY

ENDDEVRCY (End Device Recovery) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ────────────────────────────────────────────────────────────────────────────────────────5%
55──ENDDEVRCY──DEV(──device-name──)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Required Parameters


The End Device Recovery (ENDDEVRCY) command ends DEV
error recovery procedures for a specific device. If any type Specifies the device whose recovery is ended. Specify
of failure occurs after this command is run, an inquiry the name specified for the device in the device
message is sent. The user must have object operational description.
authority for the device.

Use the Resume Device Recovery (RSMDEVRCY) command


Example
to reestablish error recovery procedures for the device. ENDDEVRCY DEV(WSPRð3)
Note: To see the parameter and value descriptions for this This command ends error recovery procedures for the device
command, refer to the online help text. For more WSPR03.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1.

Chapter 2. OS/400 Command Descriptions P3-307


ENDDIRSHD

ENDDIRSHD (End Directory Shadowing) Command


Job: I Pgm: I REXX: I Exec

┌─\CNTRLD─┐ ┌─3ð─────────┐
55──ENDDIRSHD──OPTION(──┴─\IMMED──┴──)──DELAY(──┴─delay-time─┴──)──────────────────────────────────────────────────────────────5%

Purpose Note: Using the *IMMED option can cause unexpected


results if data has been only partially updated.
The End Directory Shadowing (ENDDIRSHD) command ends
the directory shadow controlling job in the system work sub- DELAY
system (QSYSWRK). Specifies the amount of time (in seconds) allowed for the
directory shadow controlling job to complete its cleanup
Any active collector jobs running are allowed to complete. processing during a controlled end. This parameter is
No new collector jobs are started. Supplier jobs are pre- not valid if OPTION(*IMMED) is specified. If the cleanup
vented from starting if a collector system requests data is not complete before the end of the delay time, the
through directory shadowing. The Start Directory Shadowing directory shadow controlling job is immediately ended.
(STRDIRSHD) command can be used to re-start directory 30: A maximum delay time of 30 seconds is allowed for
shadowing. cleanup before the directory shadow controlling job is
ended.
Restriction: You must have job control (*JOBCTL) authority
to use this command. delay-time: Specify the maximum amount of delay time
in seconds before the controlling job is ended. Valid
Note: To see the parameter and value descriptions for this
values range from 1 through 999999.
command, refer to the online help text. For more
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. Examples
Example 1: Ending Directory Shadowing in a Controlled
Required Parameters Manner
OPTION ENDDIRSHD OPTION(\CNTRLD) DELAY(6ð)
Specifies whether the directory shadow controlling job is
ended in a controlled manner or immediately. The directory shadow controlling job is ended in the system
work subsystem in a controlled manner and will have 60
*CNTRLD: The directory shadow controlling job is seconds to complete its end-of-job processing.
ended in a controlled manner. This allows the directory
shadow controlling job to perform cleanup (end-of-job Example 2: Ending Directory Shadowing Immediately
processing).
ENDDIRSHD OPTION(\IMMED)
*IMMED: The directory shadow controlling job is ended
immediately. The directory shadow controlling job is not The directory shadow controlling job is ended in the system
allowed to perform any cleanup. work subsystem immediately. The directory shadow control-
ling job does not perform end-of-job processing.

P3-308 OS/400 CL Reference - Part 2 (Full Version)


ENDDO

ENDDO (End Do) Command


Pgm: B,I

55──ENDDO──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────5%

Purpose be associated with a DO command; if too many ENDDO


commands occur in the CL program source, a message is
The End Do (ENDDO) command is used with the DO issued and the program is not created.
command to identify a group of commands that are run
together as a group. The ENDDO command specifies the Restriction: This command is valid only within a CL
end of the Do group that is started with an associated DO program.
command. The ENDDO command must be specified after
the last command in the Do group. There are no parameters for this command.

When Do groups are nested, each group must have its own See the examples for the DO and IF commands.
ENDDO command at its end. Every ENDDO command must

Chapter 2. OS/400 Command Descriptions P3-309


ENDDSKRGZ

| ENDDSKRGZ (End Disk Reorganization) Command


| Job: B,I Pgm: B,I REXX: B,I Exec
|
| 55──ENDDSKRGZ──┬───────────────────────────────────────────────────┬─── (P) ────────────────────────────────────────────────────────5%
| │ ┌─\ALL─────────────────────────────────┐ │
| │ │ ┌──
───────────────────────────────┐ │ │
| └─ASP(──┴──6─auxiliary-storage-pool-number─┴───
(1) ─┴──)─┘

| Notes:
| 1 A maximum of 16 repetitions.
| P All parameters preceding this point can be specified in positional form.

| Purpose | *ALL: Disk reorganization will be ended for all ASPs.


| auxiliary-storage-pool-number: Specify the ASP for
| The End Disk Reorganization (ENDDSKRGZ) command
| which disk reorganization is to be ended. Up to sixteen
| allows the user to end the disk reorganization function
| ASP numbers may be specified.
| started using the Start Disk Reorganization (STRDSKRGZ)
| CL command. The user can select to end disk reorganiza-
| tion for all auxiliary storage pools (ASPs) or for one or more | Examples
| specific ASPs. A message will be sent to the system history
| (QHST) log when the reorganization function is ended for | Example 1: Ending Disk Reorganization for ASP 1
| each ASP. | ENDDSKRGZ ASP(1)

| Restrictions: | This command allows the user to end the disk reorganization
| function for ASP 1.
| You must have *ALLOBJ special authority to use this
| command. | Example 2: Ending Disk Reorganization for all ASPs
| ENDDSKRGZ ASP(\ALL)
| Optional Parameters
| This command allows the user to end the reorganization
| ASP | function for each ASP that is currently being reorganized.
| Specifies for which auxiliary storage pools the disk reor-
| ganization function is to be ended.

P3-310 OS/400 CL Reference - Part 2 (Full Version)


ENDGRPJOB

ENDGRPJOB (End Group Job) Command


Job: I Pgm: I REXX: I Exec

(P) ──┬───────────────────────────────────┬──┬──────────────────────┬──────────5%
55──ENDGRPJOB──┬────────────────────────────────┬───
│ ┌─\──────────────┐ │ │ ┌─\PRV───────────┐ │ │ ┌─\NOLIST─┐ │
└─GRPJOB(──┴─group-job-name─┴──)─┘ └─RSMGRPJOB(──┴─group-job-name─┴──)─┘ └─LOG(──┴─\LIST───┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose When the only job in a group is ending, one of two situ-
ations can occur:
The End Group Job (ENDGRPJOB) command ends a single
job in a group and resumes another job in the group. (Issue Ÿ The ending group job is part of a secondary job
the Sign Off (SIGNOFF) command to end all jobs in a pair. In this case, the other job in the secondary job
group.) The user can specify the following: pair is resumed, and control is passed back to that
job.
Ÿ Which job in the group is ended
Ÿ The ending group job is not part of a secondary job
Ÿ Which job in the group gains control (this is valid only pair. In this case, the sign-on display is shown at
when a job is ending itself) the work station (if the work station entry for the
Ÿ Whether the job ended has a job log spooled to an work station device in the subsystem specifies
output queue *SIGNON).
Note: The job that issues the ENDGRPJOB command can *NOLIST: An intermediate representation of the
only end itself or some other job in the group to program listing is not created.
which this job belongs. To end a job outside the
*LIST: The information in the job log is spooled to an
group, the END Job (ENDJOB) command must be
output queue.
used.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more Examples
information about printing the help text, refer to Example 1: Ending Group Job that Issued Command
“Printing CL Command Descriptions” in Chapter 1.
ENDGRPJOB GRPJOB(\) LOG(\PRINT) RSMGRPJOB(GROUPJOB1)

Optional Parameters This command ends the job that is currently running. Its job
log is spooled to an output file for printing. When the job
GRPJOB completes running, group job GROUPJOB1 becomes the
Specifies the group job name of the job that is ended. active job in the group.
*: This special value ends the group job that issued the
ENDGRPJOB command. Example 2: Printing Output of Ended Job

group-job-name: Specify the group job name of the job ENDGRPJOB GRPJOB(GROUPJOB2) LOG(\PRINT)
that is ended.
Assume that the job issuing the ENDGRPJOB command is
RSMGRPJOB group job GROUPJOB1, which wants to end GROUPJOB2.
Specifies the group job name of the job that is to be Group job GROUPJOB2 ends. Its job log is spooled to an
resumed after the active job in the group has ended. output file for printing.
This parameter is valid only when the job that issues this
command is ending itself. Example 3: Ending a Job That's Part of a Secondary Job
Pair
*PRV: The group job most recently active is resumed.
ENDGRPJOB GRPJOB(\) LOG(\NOLIST)
group-job-name: Specify the group job name of the job
that gains control after the active job in the group ends. Assume that the job issuing the ENDGRPJOB command is
the only job in the group and is part of a secondary job pair.
LOG The job issuing the command ends. The job's job log is not
Specifies whether the job log of the ending group is spooled to an output file. When the job ends, the other job
spooled to an output queue. in the secondary job pair is resumed.

Chapter 2. OS/400 Command Descriptions P3-311


ENDHOSTSVR

ENDHOSTSVR (End Host Server) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─────────────────────────────────────────────────────────────────────────5%
55──ENDHOSTSVR──SERVER(──┬─\ALL───────────────┬──)────
│ ┌──
─────────────┐ │
6 (1) ─┘
└──┬─\CENTRAL──┬┴───
├─\DATABASE─┤
├─\DTAQ─────┤
├─\FILE─────┤
├─\NETPRT───┤
├─\RMTCMD───┤
├─\SIGNON───┤
└─\SVRMAP───┘
Notes:
| 1 A maximum of 8 repetitions.
P All parameters preceding this point can be specified in positional form.

Purpose *DATABASE: The database server daemon in the


QSERVER subsystem, if active, is ended.
The End Host Server (ENDHOSTSVR) command is used to
*DTAQ: The data queue server daemon in the
end the optimized host server daemons. One or more server
QSYSWRK subsystem, if active, is ended.
daemons can be ended and the server mapper daemon can
be ended. *FILE: The file server daemon in the QSERVER sub-
system, if active, is ended.
If a server daemon is ended, and there are servers of that
*NETPRT: The network print server daemon in the
type that have active connections to client applications, the
QSYSWRK subsystem, if active, is ended.
server jobs will remain active until communication with the
client application is ended. Subsequent connection requests *RMTCMD: The remote command and distributed
from the client application to that server daemon will fail program call server daemon in the QSYSWRK sub-
however until the server daemon is started again. system, if active, is ended.
*SIGNON: The signon server daemon in the
If the server mapper daemon is ended, any existing client
QSYSWRK subsystem, if active, is ended.
connections to the server jobs are unaffected. Subsequent
requests from a client application to connect to the server *SVRMAP: The server mapper daemon in the
mapper daemon (to obtain a server's port number) will fail QSYSWRK subsystem, if active, is ended.
however until the server mapper is started again.

A request to end *ALL host server daemons will end any Examples
active daemons.
Example 1: Ending All Host Server Daemons
Note: To see the parameter and value descriptions for this ENDHOSTSVR SERVER(\ALL)
command, refer to the online help text. For more
information about printing the help text, refer to This command ends all active server daemons and the
“Printing CL Command Descriptions” in Chapter 1. server mapper daemon. Any active connections to client
applications with the server jobs are unaffected. Ending all
host server daemons prevents any subsequent client con-
Required Parameters nection requests from succeeding.
SERVER
Specifies the server daemons to be ended. Example 2: Ending Specific Server Daemons

*ALL: All of the server daemons and the server mapper ENDHOSTSVR SERVER(\CENTRAL \SVRMAP)
daemon are ended.
This command ends the central server daemon and the
*CENTRAL: The central server daemon in the server mapper daemon. Both daemon jobs run in the
QSYSWRK subsystem, if active, is ended. QSYSWRK subsystem.

P3-312 OS/400 CL Reference - Part 2 (Full Version)


ENDINP

ENDINP (End Input) Command


Job: B

55──//ENDINP───────────────────────────────────────────────────────────────────────────────────────────────────────────────────5%

Purpose There are no parameters for this command.

The End Input (//ENDINP) command is a delimiter that indi-


cates the end of the input in a batch input stream. The Example
//ENDINP command also can indicate the end of an inline //BCHJOB
data file if the command is detected while the inline file is Ÿ
being processed. If the inline file is using ending characters Ÿ
which are not defaults, the //ENDINP command is embedded Ÿ
without being recognized. //DATA
Ÿ
Restriction: The ENDINP command cannot be used from a Ÿ
work station. Two slashes must precede this command Ÿ
//ENDINP
name when entering it in the data record, that is, //ENDINP.
The user can separate the slashes from this command name The ENDINP command indicates the end of a input stream
with blank spaces, for example, // ENDINP. that began with the Batch Job (BCHJOB) command.

Chapter 2. OS/400 Command Descriptions P3-313


ENDIPIIFC

ENDIPIIFC (End IP over IPX Interface) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P)──────────────────────────────────────────────────────────────────────────────5%
55──ENDIPIIFC──INTNETADR(──internet-address──)───
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Required Parameter


The End IP over IPX Interface (ENDIPIIFC) command is INTNETADR
used to end an AF_INET sockets over IPX interface. An Specifies the IP address of an IP over IPX interface
interface is an IP address by which this local host is known being ended.
on the IPX transport.

Ending an interface causes all routes associated with this


Example
interface to be deactivated immediately. All existing con- ENDIPIIFC '9.5.2.3'
nections are ended immediately and no new connections can
be made using this interface. This command ends data transmission for an IP interface
Note: To see the parameter and value descriptions for this that has an IP address of 9.5.2.3. All data communication on
command, refer to the online help text. For more this interface is ended.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1.

P3-314 OS/400 CL Reference - Part 2 (Full Version)


ENDIPSIFC

ENDIPSIFC (End IP over SNA Interface) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P)──────────────────────────────────────────────────────────────────────────────5%
55──ENDIPSIFC──INTNETADR(──internet-address──)───
Note:
P All parameters preceding this point can be specified in positional form.

Purpose INTNETADR
Specifies the internet address of an active (started) inter-
The End IP over SNA Interface (ENDIPSIFC) command is face that had previously been added to the IP SNA con-
used to end an AF_INET sockets over SNA interface (an IP figuration with the Add IP over SNA Interface
address by which this local host is known on the SNA trans- (ADDIPSIFC) CL command. The internet address is
port). specified in the form nnn.nnn.nnn.nnn, where nnn is a
Note: Ending an interface causes all routes associated with decimal number ranging from 0 through 255. If the
this interface to be deactivated immediately unless internet address is entered from a command line, the
there are other active interfaces that the routes can address must be enclosed in apostrophes.
switch to.
Note: To see the parameter and value descriptions for this Example
command, refer to the online help text. For more
ENDIPSIFC INTNETADR('9.5.1.248')
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. This command deactivates (ends) the interface with IP
address 9.5.1.248 and
Required Parameter

Chapter 2. OS/400 Command Descriptions P3-315


ENDIPX

ENDIPX (End IPX) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──ENDIPX─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────5%

Purpose 4. Partially updated data may result if an application is pro-


cessing data and has not completed an operation when
The End IPX (ENDIPX) command ends AS/400 IPX support the ENDIPX command is issued.
processing.
It is suggested that you do the following:
There are no parameters for this command.
Ÿ Notify all users before issuing the ENDIPX command so
| ATTENTION: that they can end their applications.
Ÿ Issue the ENDIPX command at a time when you know
1. The ENDIPX command must be used carefully. There is no IPX traffic is occurring on the AS/400 system. To
no confirmation display shown when ENDIPX is entered. display the current IPX activity on the AS/400, enter the
2. When it is used, it ends all IPX processing on the Work with IPX Status (WRKIPXSTS) CL command using
AS/400 system that you are working on. All IPX con- an OPTION value of *CNN.
nections and all IPX circuits are ended. This affects all
currently active applications using sockets over IPX.
Example
3. No new open operations are allowed to IPX or SPX ENDIPX
sockets. If Anynet/400 has been activated on the
AS/400 then all IP over IPX and SNA over IPX pro- This command immediately ends all IPX processing on the
cessing will also be ended by the ENDIPX command. AS/400 system.

P3-316 OS/400 CL Reference - Part 2 (Full Version)


ENDIPXCCT

ENDIPXCCT (End IPX Circuit) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ───────────────────────────────────────────────────────────────────────────5%
55──ENDIPXCCT──CCTNAME(────IPX-circuit-name────)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose information about printing the help text, refer to


“Printing CL Command Descriptions” in Chapter 1.
The End IPX Circuit (ENDIPXCCT) command is used to end
an existing Internetwork Packet Exchange (IPX) circuit.
When this command has completed, IPX will no longer use Required Parameters
this circuit for data transmission. Any other communication CCTNAME
protocol, such as TCP/IP or APPN, using the line description Specifies the name of the IPX circuit being ended. This
associated with the circuit being ended is not affected. circuit must have been previously started using the Start
IPX Circuit (STRIPXCCT) command or by selecting
This command can be used to:
Option 9 from the Work with IPX Circuits display. Also,
Ÿ End circuits that have been activated by the Start IPX this circuit could have been automatically started by
(STRIPX) CL command because the circuits had been Start IPX (STRIPX) processing if AUTOSTART(*YES)
configured with an AUTOSTART parameter value of was specified on the Add IPX Circuit (ADDIPXCCT), or
*YES on the Add IPX Circuit (ADDIPXCCT), or the Change IPX Circuit (CHGIPXCCT) commands.
Change IPX Circuit (CHGIPXCCT) commands.
Ÿ End a circuit that was previously started using the Start
IPX Circuit (STRIPXCCT) command. Example
Note: To see the parameter and value descriptions for this ENDIPXCCT CCTNAME(CIRCUIT2)
command, refer to the online help text. For more
This command causes all IPX activity to end on the circuit
named CIRCUIT2.

Chapter 2. OS/400 Command Descriptions P3-317


ENDJOB

ENDJOB (End Job) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──ENDJOB──JOB(────┬─────────────────────────────┬──job-name────)──┬─────────────────────────┬─────────────────────────────────5
└─┬─────────────┬──user-name/─┘ │ ┌─\CNTRLD─┐ │
└─job-number/─┘ └─OPTION(──┴─\IMMED──┴──)─┘
(P) ──┬────────────────────────────────────────┬────────────────────5
5──┬─────────────────────────────┬──┬───────────────────────┬───
│ ┌─3ð─────────┐ │ │ ┌─\NO──┐ │ │ ┌─\SAME──────────────────┐ │
(1) ─┴─delay-time─┴──)─┘ └─SPLFILE(──┴─\YES─┴──)─┘
└─DELAY(─── └─LOGLMT(──┼─\NOMAX─────────────────┼──)─┘
└─maximum-logged-entries─┘
5──┬─────────────────────────────┬──┬────────────────────────────┬─────────────────────────────────────────────────────────────5%
│ ┌─\NONE───┐ │ │ ┌─\SELECT─┐ │
└─ADLINTJOBS(──┼─\GRPJOB─┼──)─┘ └─DUPJOBOPT(──┴─\MSG────┴──)─┘
└─\ALL────┘
Notes:
1 This parameter is valid only when OPTION(*CNTRLD) is specified.

P All parameters preceding this point can be specified in positional form.

Purpose information about printing the help text, refer to


“Printing CL Command Descriptions” in Chapter 1.
The End Job (ENDJOB) command ends the specified job
and any associated inline data files. The job may be on a
job queue, it may be active within a system, or it may have Required Parameter
already completed running. JOB
Specifies the name of the job that is ended. If no job
You can specify that the application program is given time to
qualifier is given, all of the jobs currently in the system
control end-of-job processing. If no time is given or if
are searched for the simple job name. If more than one
cleanup cannot be performed within the given time, the
of the specified name is found, a qualified job name
system performs minimal end-of-job processing, which can
must be specified.
include:
A job identifier is a qualified name with up to three ele-
Ÿ Closing the database files.
ments. For example:
Ÿ Spooling the job log to an output queue. job-name
Ÿ Cleaning up internal objects in the operating system. user-name/job-name
job-number/user-name/job-name
Ÿ Showing the end-of-job display (for interactive jobs).
More information on this parameter is in Appendix A,
Ÿ Completing commitment control processing
“Expanded Parameter Descriptions.”
Before ending the job, you should verify that no logical
job-name: Specify the name of the job that is ended.
unit of work is in an in doubt state due to a two-phase
commit operation that is in progress. If it is, then the user-name: Specify the name of the user of the job that
value of the Action if ENDJOB commitment option can is ended.
greatly impact the ENDJOB processing. For example, if job-number: Specify the number of the job that is
the Action if ENDJOB commitment option is the default ended.
value of WAIT, this job will be held up and will not com-
plete its end of job processing until the commitment
control operation is completed. This ensures database Optional Parameters
integrity on all related systems. For specific instructions OPTION
on how to determine these conditions, and for a Specifies whether the job is ended in a controlled
description of all the impacts of ending this job under manner, which lets the application program perform end-
these conditions, see the Backup and Recovery book. of-job processing, or is ended immediately. In either
All spooled files associated with the job being ended can case, the system performs certain job cleanup pro-
also be deleted or allowed to remain on the output queue. cessing.
*CNTRLD: The job is ended in a controlled manner.
Restriction: To use this command, the user must have
This allows the program to perform cleanup (end-of-job
*JOBCTL special authority.
processing). The application has the amount of time
Note: To see the parameter and value descriptions for this specified on the DELAY parameter to complete cleanup
command, refer to the online help text. For more before the job is ended.

P3-318 OS/400 CL Reference - Part 2 (Full Version)


ENDJOB

*IMMED: The job ends immediately and the system per- 1. If the value specified is greater than the number of
forms end-of-job cleanup. System cleanup can take messages written at the time the command is
from a brief amount of time to several minutes. issued, messages continue to be written until the
new limit is reached.
Note: This value is recommended only if specifying the
*CNTRLD value has been unsuccessful. When 2. If the value specified is less than the number of
you specify the *IMMED value, you can get messages already written to the spooled file, a
undesirable results, for example, from data that message indicating that the limit has been reached
has been partially updated. is immediately put in the spooled file as the last
entry. The remaining messages on the queue are
DELAY
ignored.
Specifies the amount of time (in seconds) that the job
has to complete its end-of-job processing during a con- 3. If 0 (zero) is specified before any messages are
trolled end. If the end-of-job processing is not com- written to the spooled file, no job log is produced for
pleted before the end of the delay time, the job is ended the job that is ending.
immediately, and only system cleanup is performed.
*SAME: The value does not change. If no logging limit
The delay time does not start until the job becomes has been established previously for the job, the system
active if the job is suspended because of one of the fol- uses the *NOMAX value.
lowing conditions:
*NOMAX: There is no maximum number of message
Ÿ The system request option 1 is selected. entries logged. All messages on the job message queue
Ÿ The job is held by the Hold Job (HLDJOB) are written to the job log.
command. maximum-logged-entries: Specify the maximum number
Ÿ The job is transferred by the Transfer Secondary of messages written to the job log.
Job (TFRSECJOB) command.
Ÿ The job is transferred by the Transfer Group Job ADLINTJOBS
(TFRGRPJOB) command. Specifies whether additional interactive jobs associated
with the job specified in the JOB parameter are being
Note: This parameter is valid only when ended. The additional interactive jobs can be group jobs
OPTION(*CNTRLD) is specified. or all jobs associated with the work station (group and
30: A maximum delay time of 30 seconds is allowed for secondary jobs) where the job specified in the JOB
cleanup before the job is ended. parameter is running. The job specified in the JOB
parameter does not have to be the active job. A job
delay-time: Specify the maximum amount of delay time name entered on the JOB parameter must resolve to a
(in seconds) before the job is ended. Valid values range
single interactive job for this parameter to be used. If
from 1 through 999999 seconds. For additional informa-
the job is not an interactive job, an error message is
tion on the use of the DELAY parameter for ending an
sent.
end-of-file delay job, refer to the EOFDLY (End of File
Delay) parameter of the Override Database File *NONE: Only the job specified in the JOB parameter is
(OVRDBF) command. ended.
*GRPJOB: If the job specified in the JOB parameter is
SPLFILE
a group job, all jobs associated with the group are
Specifies whether to delete the spooled files created by
ended. If the job is not a group job, the job specified in
this job. Regardless of whether the spooled files are
the JOB parameter is ended.
deleted, the job logs related to the spooled files are kept.
*ALL: All interactive jobs running on the work station
*NO: The spooled files are not deleted. They are kept
associated with the job specified in the JOB parameter
for normal processing by a writer.
are ended, including group jobs and secondary jobs.
*YES: The spooled files are deleted.
DUPJOBOPT
LOGLMT Specifies the action taken when duplicate jobs are found
Specifies the logging limit, which is the maximum by this command.
number of message entries that are written to the job log
*SELECT: The selection display is shown when dupli-
printer file (QPJOBLOG) from the message queue of an
cate jobs are found during an interactive session. Other-
ending job.
wise, a message is issued.
If a job to be ended with this command is already
*MSG: A message is issued when duplicate jobs are
ending, the value specified on this parameter can
found.
change the logging limit of the job that is ending. The
following are examples of how the logging limit can be
changed: Examples
Example 1: Ending a Job Immediately

Chapter 2. OS/400 Command Descriptions P3-319


ENDJOB

ENDJOB JOB(JOB1) OPTION(\IMMED) SPLFILE(\YES) ENDJOB JOB(ðð1234/XYZ/JOB2) OPTION(\CNTRLD)


DELAY(5ð) SPLFILE(\NO)
This command ends a job named JOB1 immediately.
Spooled output produced by the job is deleted; the job log is This command ends a job named 001234/XYZ/JOB2.
saved. Spooled output is saved for normal processing by the
spooling writer. The job has 50 seconds to perform any
Example 2: Saving Spooled Output cleanup routines, after which it is ended immediately.

P3-320 OS/400 CL Reference - Part 2 (Full Version)


ENDJOBABN

ENDJOBABN (End Job Abnormal) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─┬────────────────────────────┬───────────────────────5%
55──ENDJOBABN──JOB(────┬─────────────────────────────┬──job-name────)────
└─┬─────────────┬──user-name/─┘ │ ┌─\SELECT─┐ │
└─job-number/─┘ └─DUPJOBOPT(──┴─\MSG────┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Before ending the job abnormally, you should verify that
no logical unit of work is in an in doubt state due to a
The End Job Abnormal (ENDJOBABN) command ends a job two-phase commit operation that is in progress. If it is,
that cannot be ended successfully by running the End Job then pending committable changes at this system will
(ENDJOB) command with OPTION(*IMMED) specified. The not be committed or rolled back. Therefore, database
ENDJOBABN command cannot be issued against a job until integrity may not be maintained on all related systems.
10 minutes have passed following the request for immediate For specific instructions on how to determine these con-
ending. This allows sufficient time for normal job ending ditions, and for a description of all the impacts of ending
functions to occur. this job abnormally under these conditions, see the
Backup and Recovery book.
When the ENDJOBABN command is issued, most of the
end-of-job processing is bypassed (including spooling of the Ÿ Making database files available for use by others
job log, the end of job display for interactive jobs, and the Ÿ Releasing file locks
end-of-job processing for the specific functions that are being
performed). The part of the end-of-job processing that is This command fails to end a job or takes more than five
attempted is allowed only five minutes to complete. If it does minutes to do so in the following situations:
not do so in five minutes, the job is forced to end at that Ÿ When the job runs under a subsystem monitor that is
point. Because some of the job cleanup is not performed, hung, is abnormally slow, or has ended abnormally (the
the ENDJOBABN command should only be used when a job subsystem monitor performs part of the ending function).
that is in the process of immediate ending does not finish
ending and resources in use by the job are needed by Ÿ When the machine interface (MI) instruction running in
another job or by the system. When the ENDJOBABN the job is hung or is abnormally slow. The job cannot
command is used, some resources in use by the ended job end until the MI instruction that is currently running com-
may be left unavailable until the next IPL. pletes or reaches a point of interruption.

Use of the ENDJOBABN command causes the next system Restrictions:


end to be marked as ABNORMAL. Certain system functions 1. This command is shipped with public *EXCLUDE
are then called during the subsequent IPL to clear up condi- authority and the QPGMR, QSYSOPR, and QSRV user
tions that may have resulted from running the ENDJOBABN profiles have private authorities to use the command.
command. This does not, however, cause any machine
2. After the ENDJOBABN command is run, subsequent
recovery functions to be called, nor do any access paths
ENDJOBABN commands cannot be issued against the
need to be rebuilt. Some storage in use by the job may
job.
become unavailable after the ENDJOBABN command is run
and that available storage can be reclaimed by using the 3. Users cannot end a reader, writer, subsystem monitor,
Reclaim Storage (RCLSTG) command. or system job.
4. Users cannot run the ENDJOBABN command until ten
Bypassing the job log writing process causes the job to have
minutes after immediate ending of the job is started.
the status of JOBLOG PENDING (as shown on the DSPJOB
Immediate ending of the job is started in the following
status attributes display) after it has been ended with the
ways:
ENDJOBABN command. The job log writing is not per-
formed until the next IPL. However, the contents of the job Ÿ When the End Job (ENDJOB) command with
log can be printed or shown by using the Display Job Log OPTION(*CNTRLD) is specified and the delay time
(DSPJOBLOG) command. ends
Ÿ When the End Job (ENDJOB) command with
When the ENDJOBABN command is run, the following func-
OPTION(*IMMED) is issued
tions are performed successfully:
Ÿ When the End Subsystem (ENDSBS) command
Ÿ Journaling entries
with OPTION(*CNTRLD) is issued against the sub-
Ÿ Commitment control

Chapter 2. OS/400 Command Descriptions P3-321


ENDJOBABN

system in which the job is running and the delay More information on this parameter is in Appendix A,
time ends “Expanded Parameter Descriptions.”
Ÿ When the End Subsystem (ENDSBS) command job-name: Specify the name of the job to be ended.
with OPTION(*IMMED) is issued against the sub-
user-name: Specify the name of the user of the job to
system in which the job is running
be ended.
Ÿ When the End System (ENDSYS) command with
job-number: Specify the number of the job to be ended.
OPTION(*IMMED) is issued, or OPTION(*CNTRLD)
is issued and the delay time ends DUPJOBOPT
Specifies the action taken when duplicate jobs are found
Note: To see the parameter and value descriptions for this
by this command.
command, refer to the online help text. For more
information about printing the help text, refer to *SELECT: The selection display is shown when dupli-
“Printing CL Command Descriptions” in Chapter 1. cate jobs are found during an interactive session. Other-
wise, a message is issued.
Required Parameters *MSG: A message is issued when duplicate jobs are
found.
JOB
Specifies the name of the job to be ended. If no job
qualifier is given, all of the jobs currently in the system Example
are searched for the simple job name. If more than one ENDJOBABN JOB(ððð31ð/SMITH/PAYROLL)
of the specified names are found, a qualified job name
must be specified to distinguish them. This command ends the batch job 000310/SMITH/PAYROLL
after the failure of an earlier attempt to end it with the
A job identifier is a qualified name with up to three ele-
ENDJOB command. The ENDJOBABN command can be
ments. For example:
issued only after waiting at least ten minutes for the job to
job-name end after issuing the ENDJOB command.
user-name/job-name
job-number/user-name/job-name

P3-322 OS/400 CL Reference - Part 2 (Full Version)


ENDJRNAP

| ENDJRNAP (End Journal Access Path) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ───────────5%
55──ENDJRNAP──FILE(──┬─\ALL────────────────────────────────┬──)──┬──────────────────────────────────────────────┬───
│ ┌──
──────────────────────────────┐ │ │ ┌─\FILE───────────────────────────┐ │
│ │ ┌─\LIBL/────────┐ │ │ │ │ ┌─\LIBL/────────┐ │ │
└──6─┼───────────────┼──file-name─┴───
(1) ─┘ └─JRN(──┴─┼───────────────┼──journal-name─┴──)─┘
├─\CURLIB/──────┤ ├─\CURLIB/──────┤
└─library-name/─┘ └─library-name/─┘
Notes:
1 A maximum of 50 repetitions

P All parameters preceding this point can be specified in positional form.

Purpose *LIBL: All libraries in the job's library list are


searched until the first match is found.
The End Journal Access Path (ENDJRNAP) command is
*CURLIB: The current library for the job is
used to end journaling of the access paths of a file.
searched. If no library is specified as the current
All access paths currently being journaled to a specific library for the job, the QGPL library is used.
journal may also have journaling stopped. library-name: Specify the name of the library to be
searched.
Restrictions:
file-name: Specifies the name of the database file that
1. The access paths for the files specified on the command
has journaling ended for its access paths.
cannot be in use for any reason at the time the
command is running.
2. Overrides are not applied to the files listed in the FILE Optional Parameter
parameter. JRN
3. If FILE(*ALL) is specified, a journal name must be speci- Specifies the qualified name of the journal to which the
fied. access paths for the indicated files are currently being
journaled.
4. If a journal name and a list of file names are specified,
then all the access paths for the listed files must be cur- *FILE: The journal is determined by the system from
rently journaled to the indicated journal. the specified file names.
5. Journaling entries for any physical file does not end by The name of the journal can be qualified by one of the
the running of this command. following library values:
| 6. This command cannot be used on or with a remote *LIBL: All libraries in the job's library list are
| journal. searched until the first match is found.
Note: To see the parameter and value descriptions for this *CURLIB: The current library for the job is
command, refer to the online help text. For more searched. If no library is specified as the current
information about printing the help text, refer to library for the job, the QGPL library is used.
“Printing CL Command Descriptions” in Chapter 1.
library-name: Specify the name of the library to be
searched.
Required Parameter journal-name: Specifies the name of the journal to
FILE which the access paths for the indicated files are cur-
Specifies a maximum of 50 qualified names of the data- rently being journaled.
base files for which journaling for their access paths is
ended.
Example
*ALL: Journaling ends for all access paths that are cur- ENDJRNAP FILE(MYLIB/MYFILE)
rently being journaled to the specified journal.
The name of the database file can be qualified by one of This command ends the journaling for all access paths of the
the following library values: file MYFILE in the library MYLIB.

Chapter 2. OS/400 Command Descriptions P3-323


ENDJRNPF

| ENDJRNPF (End Journal Physical File) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ───────────5%
55──ENDJRNPF──FILE(──┬─\ALL────────────────────────────────┬──)──┬──────────────────────────────────────────────┬───
│ ┌──
──────────────────────────────┐ │ │ ┌─\FILE───────────────────────────┐ │
│ │ ┌─\LIBL/────────┐ │ │ │ │ ┌─\LIBL/────────┐ │ │
└──6─┼───────────────┼──file-name─┴───
(1) ─┘ └─JRN(──┴─┼───────────────┼──journal-name─┴──)─┘
├─\CURLIB/──────┤ ├─\CURLIB/──────┤
└─library-name/─┘ └─library-name/─┘
Notes:
1 A maximum of 50 repetitions

P All parameters preceding this point can be specified in positional form.

Purpose *ALL: All files currently being journaled to the indicated


journal are to stop having their changes journaled.
The End Journal Physical File (ENDJRNPF) command is
The name of the database file can be qualified by one of
used to end journaling of changes for a specific physical file
the following library values:
and all of its members.
*LIBL: All libraries in the job's library list are
All physical files currently being journaled to a specific journal searched until the first match is found.
may also have journaling stopped.
*CURLIB: The current library for the job is
When the file for which journaling is ended is a distributed searched. If no library is specified as the current
file, an attempt is made to distribute the ENDJRNPF library for the job, the QGPL library is used.
command if journaling was successfully ended locally. Even library-name: Specify the name of the library to be
if the distribution request fails, the local file is not journaled. searched.
In addition, if a journal and file name are specified, and the
file is distributed, an attempt to distribute the ENDJRNPF file-name: Specify the name of the database file for
request is made even if the file is not journaled locally. which journaling has ended.

Restrictions:
Optional Parameter
1. Members in the files specified on the command cannot
be in use for any reason at the time the command is JRN
running. Specifies the qualified name of the journal to which
changes in the files are currently being journaled.
2. Overrides are not applied to the files listed in the FILE
parameter. *FILE: The journal is determined by the system from
the specified file names.
3. If FILE(*ALL) is specified, a journal name must be speci-
fied. The name of the journal can be qualified by one of the
following library values:
4. If a journal name and a list of file names are specified,
all files must be currently journaled to the indicated *LIBL: All libraries in the job's library list are
journal. searched until the first match is found.
| 5. This command cannot be used on or with a remote *CURLIB: The current library for the job is
| journal. searched. If no library is specified as the current
Note: To see the parameter and value descriptions for this library for the job, the QGPL library is used.
command, refer to the online help text. For more library-name: Specify the name of the library to be
information about printing the help text, refer to searched.
“Printing CL Command Descriptions” in Chapter 1.
journal-name: Specify the name of the journal to which
the indicated files are currently being journaled.
Required Parameter
FILE Example
Specifies a maximum of 50 qualified names of the phys- ENDJRNPF FILE(MYLIB/MYFILE)
ical files for which changes are no longer being jour-
naled. This command stops the journaling of all changes to all
members of file MYFILE in library MYLIB. Changes made
after this command is run are not journaled.

P3-324 OS/400 CL Reference - Part 2 (Full Version)


ENDLINRCY

ENDLINRCY (End Line Recovery) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─────────────────────────────────────────────────────────────────────────────────────────5%
55──ENDLINRCY──LINE(──line-name──)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Required Parameters


The End Line Recovery (ENDLINRCY) command ends error LINE
recovery procedures for a specific line. If any type of failure Specifies the name of the line whose recovery is
occurs after this command is run, an inquiry message is stopped.
sent.

Use the Resume Line Recovery (RSMLINRCY) command to


Example
reestablish error recovery procedures for the line. ENDLINRCY LINE(NYC2)
Note: To see the parameter and value descriptions for this This command ends error recovery procedures for the line
command, refer to the online help text. For more named NYC2.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1.

Chapter 2. OS/400 Command Descriptions P3-325


ENDMOD

ENDMOD (End Mode) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─┬──────────────────────────┬──┬─────────────────────────┬──────────────────5
55──ENDMOD──RMTLOCNAME(──remote-location-name──)────
│ ┌─\LOC────────┐ │ │ ┌─\NETATR───┐ │
└─DEV(──┴─device-name─┴──)─┘ └─MODE(──┼─\ALL──────┼──)─┘
├─BLANK─────┤
└─mode-name─┘
5──┬─────────────────────────────────────────┬──┬─────────────────────────────────────┬──┬─────────────────────────┬───────────5%
│ ┌─\LOC────────────────┐ │ │ ┌─\LOC──────────────┐ │ │ ┌─\NO──┐ │
└─LCLLOCNAME(──┼─\NETATR─────────────┼──)─┘ └─RMTNETID(──┼─\NETATR───────────┼──)─┘ └─CPLPNDRQS(──┴─\YES─┴──)─┘
└─local-location-name─┘ ├─\NONE─────────────┤
└─remote-network-ID─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose MODE
Specifies the mode that is ended.
The End Mode (ENDMOD) command ends (deactivates) a
*NETATR: The mode name specified in the network
single mode or all active modes for a specific advanced
attributes is used.
program-to-program communications (APPC) remote
location. The mode remains inactive until a Start Mode *ALL: All modes currently active by the remote location
(STRMOD) command is run to start the mode. This are ended.
command can be used to end all the sessions for a particular BLANK: The mode name consisting of 8 blank charac-
remote location and to cause an active switched connection ters is used.
to disconnect. The user can also specify how activities that
have been requested on the remote system but have not yet mode-name: Specify a mode name for the device.
been performed are to be handled. LCLLOCNAME
Specifies the local location name.
The APPC Programming book has more information on the
ENDMOD command. *LOC: The device associated with the remote location
is used. If several devices are associated with the
Restriction: This command cannot be used to end (deacti- remote location, the system determines which device is
vate) Client Access/400 mode (QPCSUPP) at a remote used.
location.
*NETATR: The LCLLOCNAME value specified in the
Note: To see the parameter and value descriptions for this system network attributes is used.
command, refer to the online help text. For more
local-location-name: Specify the local location name.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. RMTNETID
Specifies the remote network ID used with the remote
location.
Required Parameters
*LOC: The remote network identifier (ID) associated
RMTLOCNAME with the remote location is used. If several remote
Specifies the remote location name for one or more network IDs are associated with the remote location, the
modes which are being ended. system determines which remote network ID is used.
*NETATR: The LCLLOCNAME value specified in the
Optional Parameters system network attributes is used.
DEV *NONE: No remote network identifier (ID) is used.
Specifies the device description name used with the remote-network-ID: Specify the name of the remote
remote location. network ID used.
*LOC: The device associated with the remote location
CPLPNDRQS
is used. If several devices are associated with the
Specifies how the remote location processes all pending
remote location, the system determines which device is
user work before ending the mode.
used.
*NO: Requested activities currently in progress at the
device-name: Specify the name of the device for which
remote location can complete; activities that have been
one or more modes are being ended.

P3-326 OS/400 CL Reference - Part 2 (Full Version)


ENDMOD

requested, but not started at the remote location will not Example
be performed.
ENDMOD RMTLOCNAME(APPCRLOC) MODE(APPCMOD)
*YES: All requested activities are allowed to complete
before the mode is ended. This command ends a mode named APPCMOD for remote
location APPCRLOC.

Chapter 2. OS/400 Command Descriptions P3-327


ENDMSF

ENDMSF (End Mail Server Framework) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──────────────────────────────────────────────────────5%
55──ENDMSF──┬─────────────────────────┬──┬───────────────────────────┬───
│ ┌─\CNTRLD─┐ │ │ ┌─3ð─────────┐ │
└─OPTION(──┴─\IMMED──┴──)─┘ └─DELAY(──┴─delay-time─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose during a controlled end. This parameter is ignored if


OPTION(*IMMED) is specified. If the jobs do not end
The End Mail Server Framework (ENDMSF) command ends before the end of the delay time, they are then imme-
the mail server framework jobs in the system work sub- diately ended.
system (QSYSWRK).
30: A maximum delay time of 30 seconds is allowed
Note: To see the parameter and value descriptions for this before the mail server framework jobs are ended.
command, refer to the online help text. For more
delay-time: Specify the maximum amount of delay time
information about printing the help text, refer to
in seconds before the jobs are ended. Valid values
“Printing CL Command Descriptions” in Chapter 1.
range from 1 through 999999.

Optional Parameters Examples


OPTION
Specifies whether the mail server framework jobs that Example 1: Ending Mail Server Framework in a Con-
are in the system work subsystem (QSYSWRK) end trolled Manner
immediately or in a controlled manner. ENDMSF OPTION(\CNTRLD) DELAY(6ð)
*CNTRLD: All mail server framework jobs are ended in This command ends the mail server framework jobs in the
a controlled manner. This allows each framework job a system work subsystem in a controlled manner and has 60
chance to complete processing the current mail server seconds to complete processing any mail server framework
framework messages before it ends. messages currently being handled.
*IMMED: All mail server framework jobs are ended
immediately. Any mail server framework messages Example 2: Ending Mail Server Framework Immediately
being processed at the time the job ended are pro- ENDMSF OPTION(\IMMED)
cessed when the mail server framework is restarted.
This command ends the mail server framework jobs in the
DELAY system work subsystem immediately. The mail server frame-
Specifies the amount of time (in seconds) allowed for the work jobs do not complete processing any mail server frame-
mail server framework jobs to complete their processing work messages currently being handled.

P3-328 OS/400 CL Reference - Part 2 (Full Version)


ENDM36

ENDM36 (End AS/400 Advanced 36 Machine) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ────────────────────────────────────────────────5%
55──ENDM36──M36(──┼───────────────┼──machine-name──)──┬────────────────────┬───
├─\CURLIB/──────┤ │ ┌─\NO──┐ │
└─library-name/─┘ └─DUMP(──┴─\YES─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose library-name: Specify the name of the library to be


searched.
The End AS/400 Advanced 36 Machine (ENDM36) command
immediately ends the specified AS/400 Advanced 36 machine-name: Specify the name of the AS/400
machine. This command should only be run after attempts Advanced 36 machine to end.
to use the System Support Program (SSP) Product POWER
OFF Control Command, from within the specified AS/400 Optional Parameters
Advanced 36 machine, have failed. The use of this
command may cause undesirable results, since programs DUMP
that are running in the AS/400 Advanced 36 machine are not Specifies whether an SSP main storage dump is gener-
allowed to perform any cleanup. ated, for problem diagnosis, while the AS/400 Advanced
36 machine is being ended.
Restrictions:
*NO: An SSP main storage dump is not generated
1. The user must have *JOBCTL special authority to run while the AS/400 Advanced 36 machine is being ended.
this command.
*YES: An SSP main storage dump is generated while
2. The specified AS/400 Advanced 36 machine must cur- the AS/400 Advanced 36 machine is being ended.
rently be active in order to use this command.
Note: To see the parameter and value descriptions for this Examples
command, refer to the online help text. For more
information about printing the help text, refer to Example 1: Ending an AS/400 Advanced 36 Machine
“Printing CL Command Descriptions” in Chapter 1. Without a Dump
ENDM36 M36(BOULDERJCT)
Required Parameters This command immediately ends an AS/400 Advanced 36
M36 machine named BOULDERJCT, located through the library
Specifies the qualified name of the AS/400 Advanced 36 list of the OS/400 job in which the command is run. A main
machine to end. storage dump of the AS/400 Advanced 36 machine is not
generated.
The name of the *M36 object can be qualified by one of
the following library values: Example 2: Ending an AS/400 Advanced 36 Machine
*LIBL: All libraries in the job's library list are With a Dump
searched until the first match is found. ENDM36 M36(IRONCOUNTY/MERCER) DUMP(\YES)
*CURLIB: The current library for the job is
This command immediately ends an AS/400 Advanced 36
searched. If no library is specified as the current
machine named MERCER, located in a library named
library for the job, the QGPL library is used.
IRONCOUNTY. A main storage dump of the AS/400
Advanced 36 machine is generated.

Chapter 2. OS/400 Command Descriptions P3-329


ENDNFSSVR

ENDNFSSVR (End Network File System Server) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\ALL─┐
(P) ─┬─────────────────────────────────────┬────────────────────────────────────────────────5%
55──ENDNFSSVR──SERVER(──┼─\RPC─┼──)────
├─\BIO─┤ │ ┌─3ð──────────────┐ │
├─\SVR─┤ └─ENDJOBTIMO(──┼─\NOMAX──────────┼──)─┘
├─\MNT─┤ └─'timeout-value'─┘
├─\NSM─┤
└─\NLM─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Required Parameter


The End Network File System Server (ENDNFSSVR) SERVER
command ends one or all of the Network File System (NFS) Specifies the Network File System (NFS) daemon jobs
server daemons. For more information about these daemon to be ended.
jobs, see the OS/400 Network File System Support book. *ALL: All NFS daemons are ended.

You should use SERVER(*ALL), which will end the daemons *RPC: The NFS Remote Procedure Call (RPC) binder
in the following order. (This order is the recommended order daemon is ended.
for ending the Network File System daemons.) *BIO: All NFS block I/O daemons that are running are
Ÿ The network lock manager (NLM) daemon ended.
Ÿ The network status monitor (NSM) daemon *SVR: All NFS server daemons that are running are
Ÿ The mount (MNT) daemon ended.
Ÿ The server (SVR) daemon
*MNT: The NFS mount daemon is ended.
Ÿ The block I/O (BIO) daemon
Ÿ The Remote Procedure Call (RPC) binder daemon *NSM: The NFS network status monitor daemon is
ended.
If you are choosing to end just one daemon, be sure you
understand the appropriate order for ending NFS daemons *NLM: The NFS network lock manager daemon is
and the possible consequences of ending deamons in an ended.
order other than that specified above. For more information
about ending NFS daemons, see the OS/400 Network File
System Support book.
Optional Parameter
ENDJOBTIMO
If you attempt to end a daemon or daemons that are not Specifies the number of seconds to wait for each
running, they will not cause the command to fail, and it will daemon to successfully end. If a daemon has not ended
continue to end other daemons you have requested to end. within the timeout value, the command will fail.
To determine if an NFS daemon is running, use the Work 30: Wait 30 seconds for the daemon job to end.
with Active Jobs (WRKACTJOB) command and look in the *NOMAX: Wait forever for daemons to end; do not
subsystem QSYSWRK for existence of the following jobs: timeout.
QNFSRPCD The RPC binder daemon
timeout-value: Specify the number of seconds to wait
QNFSBIOD The block I/O (BIO) daemon
QNFSNFSD The server (SVR) daemon for each daemon to end before timing out and failing the
QNFSMNTD The mount (MNT) daemon command. Valid values range from 1 to 3600 seconds.
QNFSNSMD The network status monitor (NSM) daemon
QNFSNLMD The network lock manager (NLM) daemon
Examples
Restriction: You must have *IOSYSCFG special authority
Example 1: End All Daemons
to use this command.
ENDNFSSVR SERVER(\ALL)
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more This command ends all NFS daemon jobs that are running.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. Example 2: End a Single Daemon
ENDNFSSVR SERVER(\MNT) ENDJOBTIMO(\NOMAX)

P3-330 OS/400 CL Reference - Part 2 (Full Version)


ENDNFSSVR

This command ends the NFS mount daemon, and waits running, and other daemons have been ended in the appro-
forever for it to end. The mount daemon was previously priate order.

Chapter 2. OS/400 Command Descriptions P3-331


ENDNWIRCY

ENDNWIRCY (End Network Interface Recovery) Command


Job: B,I Pgm: B,I Exec

(P) ────────────────────────────────────────────────────────────5%
55──ENDNWIRCY──NWID(────network-interface-description-name────)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Required Parameters


The End Network Interface Recovery (ENDNWIRCY) NWID
command ends automatic error recovery procedures for a Specifies the name of the network interface description
network interface description. for which recovery is to be ended.

Note: To see the parameter and value descriptions for this


command, refer to the online help text. For more Example
information about printing the help text, refer to ENDNWIRCY NWID(ISDNNET)
“Printing CL Command Descriptions” in Chapter 1.
This command ends automatic error recovery procedures for
the network interface named ISDNNET.

P3-332 OS/400 CL Reference - Part 2 (Full Version)


ENDNWSAPP

ENDNWSAPP (End Network Server Application) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─┬─────────────────────────┬───────────────────────────5
55──ENDNWSAPP──NWSAPP(──┬─\NOTES────┬──)──NWS(────network-server────)────
├─\FIREWALL─┤ │ ┌─\CNTRLD─┐ │
└─\FLOWMARK─┘ └─OPTION(──┴─\IMMED──┴──)─┘
5──┬───────────────────────────┬──┬────────────────────────────┬──┬─────────────────────────────────────────┬───────────────────5
│ ┌─3ð─────────┐ │ │ ┌─\ALL─────┐ │ │ ┌─EXMDB──────────────────┐ │
(1) ─┼─\NTSSVR──┼──)─┘ └─FLMDB(───
└─DELAY(──┴─delay-time─┴──)─┘ └─NTSFCN(─── (2) ─┴─FlowMark-database-name─┴──)─┘
├─\MAIL────┤
├─\DIRSHD──┤
├─\DBINTEG─┤
└─\CALCNN──┘
5──┬─────────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\YES─┐ │
(2) ─┴─\NO──┴──)─┘
└─FLMOSDB(───
Notes:
1 This parameter is valid only when NWSAPP(*NOTES) is specified.

2 This parameter is valid only when NWSAPP(*FLOWMARK) is specified.

P All parameters preceding this point can be specified in positional form.

Purpose case, the system performs certain job cleanup pro-


cessing.
The End Network Server Application (ENDNWSAPP)
Note: This parameter is only applicable to the directory
command is used to end a network server application on an
shadowing integration function.
Integrated PC Server, also known as a File Server I/O
Processor (FSIOP). For applications with IBM AS/400 inte- *CNTRLD: The integration function is allowed time to
gration support, this command can also end the integration perform end-of-job cleanup. Use the DELAY parameter
functions. to specify the amount of delay time allowed.
*IMMED: The integration function is ended immediately.
Restrictions:
DELAY
This command requires *JOBCTL special authority. Specifies the amount of time (in seconds) allowed for the
Note: To see the parameter and value descriptions for this integration function to complete its cleanup processing
command, refer to the online help text. For more during a controlled end. This parameter is not used if
information about printing the help text, refer to OPTION(*IMMED) is specified. If the cleanup is not
“Printing CL Command Descriptions” in Chapter 1. completed before the end of the delay time, the inte-
gration function is immediately ended.

Required Parameters Note: This parameter is only applicable to the directory


shadowing integration function.
NWSAPP
30: A maximum delay time of 30 seconds is allowed for
Specifies which application is to be ended.
cleanup before the integration function is ended.
*NOTES: The Lotus Notes application is ended.
delay-time: Specify the maximum amount of delay time
*FIREWALL: The Firewall application is ended. (in seconds) before the integration function is ended.
*FLOWMARK: The FlowMark application is ended. Valid values range from 1 through 999999 seconds.

NWS NTSFCN
Specifies the name of the network server on which the Specifies which Lotus Notes functions are to be ended.
application is currently started. Note: This parameter is valid only when
NWSAPP(*NOTES) is specified.
Optional Parameters *ALL: The Notes server and all IBM AS/400 integration
functions are ended.
OPTION
Specifies that the integration function is either ended in a *NTSSVR: The Notes server is ended. The mail inte-
controlled manner, which lets the program perform end- gration function is also ended if it is active.
of-job processing, or it is ended immediately. In either *MAIL: The IBM AS/400 mail integration function is
ended. The Notes server is not ended.

Chapter 2. OS/400 Command Descriptions P3-333


ENDNWSAPP

*DIRSHD: The IBM AS/400 directory shadowing inte- *NO: Do not end the ObjectStore database server.
gration function is ended. The Notes server is not
ended.
*DBINTEG: The IBM DB2 for OS/400 integration func- Examples
tion is ended. The Notes server is not ended.
Example 1: Ending the Lotus Notes Server Application
*CALCNN: The IBM Lotus calendar conversion for
ENDNWSAPP NWSAPP(\NOTES) NWS(DEPT44C)
office vision integration function is ended. The Notes
server is not ended. This command ends the Lotus Notes server application on
FLMDB the network server named DEPT44C in a controlled manner.
Specifies the name of the FlowMark database to be The IBM AS/400 mail, directory shadowing, and DB2 for
ended. OS/400 integration functions are also ended.

Note: This parameter is valid only when Example 2: Ending the Firewall Server Application
NWSAPP(*FLOWMARK) is specified. ENDNWSAPP NWSAPP(\FIREWALL) NWS(FIREWALL)
EXMDB: The EXMDB database is ended.
This command ends the Firewall server application on the
FlowMark-database-name: Specify the name of a network server named FIREWALL.
FlowMark database to be ended.
Example 3: Ending the FlowMark Server Application
FLMOSDB
Specifies that the FlowMark ObjectStore server is to be ENDNWSAPP NWSAPP(\FLOWMARK) NWS(FMSVR) OPTION(\CNTRLD)
ended. FLMOSDB(\YES)
Note: This parameter is valid only when This command ends the FlowMark server application and
NWSAPP(*FLOWMARK) is specified. FlowMark database EXMDB on network server FMSVR in a
*YES: End the ObjectStore database server. controlled manner.

P3-334 OS/400 CL Reference - Part 2 (Full Version)


ENDPASTHR

ENDPASTHR (End Pass-Through) Command


Job: I Pgm: I REXX: I Exec

(P) ─────────────────────────────────────────────────────────────────────────────────────5%
55──ENDPASTHR──┬──────────────────────┬───
│ ┌─\NOLIST─┐ │
└─LOG(──┴─\LIST───┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose If the ENDPASTHR command is entered and there is not a


pass-through session, an error message is sent.
The End Pass-Through (ENDPASTHR) command ends a
pass-through session. The ENDPASTHR command signs More information about pass-through is in the Remote Work
you off the target system, and ends the advanced program- Station Support book.
to-program communications (APPC) session. This releases Note: To see the parameter and value descriptions for this
the virtual display device from the subsystem and returns it command, refer to the online help text. For more
to the vary-on pending condition. The job at each interme- information about printing the help text, refer to
diate node for the pass-through session also ends. Control “Printing CL Command Descriptions” in Chapter 1.
returns to the source system for the next command following
the Start Pass-Through (STRPASTHR) command.
Optional Parameters
Note: The ENDPASTHR command uses the SIGNOFF
command as part of its processing. If the system has LOG
a SIGNOFF command that appears in the library list Specifies whether the JOBLOG is saved at the remote
before QSYS/SIGNOFF, the SIGNOFF command is system.
used by ENDPASTHR. The SIGNOFF command
*NOLIST: The information in the job log is deleted when
should not use the ENDPASTHR command. It sends
the job ends.
the system into a loop when you end your pass-
through session. *LIST: The JOBLOG is saved at the remote system.

The ENDPASTHR command does not end the passthrough


session when there is a secondary interactive job at the Example
target system. One of the jobs must be ended (by using ENDPASTHR LOG(\LIST)
SIGNOFF or ENDJOB) before the ENDPASTHR command
can be entered. This command ends a pass-through session and prints a job
log.

Chapter 2. OS/400 Command Descriptions P3-335


ENDPEX

ENDPEX (End Performance Explorer) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──┬──────────────────────────┬──┬─────────────────────────┬─────────────────5
55──ENDPEX──┬───────────────────────────────────┬───
│ (1) ─────────┐
┌─\SELECT─── │ │ ┌─\END─────┐ │ │ ┌─\LIB──┐ │
└─SSNID(──┴─session-identifier─┴──)─┘ (2) ─┼─\FILE─┼──)─┘
└─OPTION(──┴─\SUSPEND─┴──)─┘ └─DTAOPT(───
└─\DLT──┘
5──┬───────────────────────────────────────┬──┬──────────────────────────────────────┬──────────────────────────────────────────5
│ ┌─QPEXDATA──────────┐ │ │ ┌─\SSNID───────────┐ │
(2, 3) ─┴─data-library-name─┴──)─┘ └─DTAMBR(─────
└─DTALIB(───── (2, 3) ─┴─data-member-name─┴──)─┘

5──┬────────────────────────────────────────────────────────────┬──┬────────────────────────┬──┬──────────────────────────┬────5%
│ ┌─QPEXDATA──────────┐ ┌─\SSNID─────────┐ │ │ ┌─\NO──┐ │ │ ┌─\BLANK────────┐ │
(2, 4) ─┴─data-library-name─┴──┴─data-file-name─┴──)─┘ └─RPLDTA(───
└─DTAFILE(───── (2) ─┴─\YES─┴──)─┘ └─TEXT(──┴─'description'─┴─┘

Notes:
1 *SELECT is only valid if ENDPEX command is being run interactively.

2 Only valid when OPTION(*END) is specified.

3 Only valid when DTAOPT(*LIB) is specified.

4 Only valid when DTAOPT(*FILE) is specified.

P All parameters preceding this point can be specified in positional form.

Purpose session-identifier: Specify the performance explorer data


collection session to end.
The End Performance Explorer (ENDPEX) command
instructs the performance explorer tool to stop collecting OPTION
data. The command expects a session name to accompany Specifies whether to end the data collection session or
the request which identifies which instance of the perfor- just suspend collection of performance data for the
mance explorer session to end. session.
*END: The performance explorer session is ended.
The user can either end the data collection session or The user is prompted for a choice of three methods to
suspend the data collection session. If the user chooses to handle the collected data:
end the session, the collected data is put into a single phys-
ical file or multiple data base files, or it is deleted, based on 1. Save the collected data to a set of database files.
the value specified for the DTAOPT parameter. 2. Save the data to a single file (used for sending data
to IBM for analysis).
If the user chooses to suspend the collection of performance 3. Discard the data.
data, the session remains active. To resume data collection
for a suspended session, the user can specify *SUSPEND: The performance explorer session is sus-
OPTION(*RESUME) on a subsequent call of the STRPEX pended, and the session remains active but no addi-
(Start Performance Explorer) command. tional data is collected for this session. Once a session
is suspended, the user can either use STRPEX with
Note: To see the parameter and value descriptions for this OPTION(*RESUME) to resume data collection, or the
command, refer to the online help text. For more suspended session can be ended by specifying
information about printing the help text, refer to ENDPEX with OPTION(*END).
“Printing CL Command Descriptions” in Chapter 1.
DTAOPT
Specifies how to handle the collected data.
Optional Parameters
Note: This parameter is valid only if OPTION(*END) is
SSNID specified.
Specifies which performance explorer session to end.
*LIB: Indicates to store all of the collected performance
This is the session identifier that was specified on the
data for the session into a set of database files located
STRPEX (Start Performance Explorer) command.
in the library specified on the DTALIB parameter. The
*SELECT: A list panel of all active performance performance explorer tool creates all the necessary files
explorer data collection sessions will be displayed with if this is the first time that a library is being used to store
an option to select which session to end. *SELECT is performance data. The member name for each of the
only valid if the ENDPEX command is being run interac- files where the session data is stored can be controlled
tively. If the command is being run in batch, a session through the DTAMBR parameter, but defaults to be the
identifier must be specified. same name as the session identifier.

P3-336 OS/400 CL Reference - Part 2 (Full Version)


ENDPEX

*FILE: All of the collected performance data for the data-library-name: Specify the name of the library to
session is stored in a single physical file. This option is store the collected data. If the library does not exist, the
used if the collected information will be sent to IBM for command will terminate in an error condition. After the
analysis. library is created, retry the command.
*DLT: The collected performance data for the session is *SSNID: The name specified for the SSNID parameter
to be deleted from the system. is used when creating the file to contain the collected
performance data.
DTALIB
Specifies the name of the library that contains the set of data-file-name: Specify the name to use when creating
database files where the collected performance data is the file to contain the collected performance data.
stored.
RPLDTA
Note: This parameter is valid only if the user specified Specifies whether to replace the data in an existing file
DTAOPT(*LIB). member with the new performance data. If DTAMBR
was specified and a member with the same name
QPEXDATA: The QPEXDATA library is the recom-
already exists in any of the performance explorer data-
mended library for storing data collected with the perfor-
base files in the specified library (DTALIB parameter),
mance explorer tool. The first time the performance
this parameter controls whether the member data is
explorer tool is used, this library is created for the user,
replaced. If DTAFILE was specified, the file already
and a set of database files to store the information is
exists, and the file has a member with the same name
created in that library.
as the file, this parameter controls whether the data in
library-name: Specifies the name of the library in which that file member is replaced.
to store the collected data. If the library does not exist,
*NO: If a member already exists with the same name,
the command will terminate in an error condition. After
an error message is sent to the user. This prevents the
the library is created, retry the command. If the library
user from inadvertently writing over existing data.
specified does not already have the performance
explorer database files, they are created and the data is *YES: If a member already exists with the same name,
stored. the old data is lost and is replaced by the new data.

DTAMBR TEXT
Specifies the name to be used for the database file Specifies the text that briefly describes the type of data
members where the collected performance data is collected. More information on this parameter is in
stored. If a member does not exist by the specified Appendix A, “Expanded Parameter Descriptions.”
name, it is created.
*BLANK: Text is not specified.
Note: This parameter is valid only when DTAOPT(*LIB)
'description': Specify no more than 50 characters of text,
is specified.
enclosed in apostrophes.
*SSNID: The member name is the same as the value
specified for the SSNID parameter.
Examples
member-name: Specify the member name to use when
storing the collected data in performance explorer data- Example 1: End a Session and Save the Data
base files. ENDPEX SSNID(TEST3) OPTION(\END)
DTAFILE DTAOPT(\LIB) DTAMBR(SYS1DATA)
Specifies the name of a database physical file to store
This command ends the performance explorer session
the collected performance data. If a file does not exist
named TEST3 and saves the data in a set of database files
by the specified name, it is created.
in library QPEXDATA. The member name to be used for
Note: This parameter is valid only if DTAOPT(*FILE) is each file is SYS1DATA.
specified.
Example 2: End a Session and Delete the Data
QPEXDATA: The QPEXDATA library is the recom-
mended library for storing data collected by the perfor- ENDPEX SSNID(TESTRUN) OPTION(\END) DTAOPT(\DLT)
mance explorer tool. The first time the performance
This command ends the performance explorer session
explorer tool is used, this library is created for the user.
named TESTRUN and deletes the collected performance
data.

Chapter 2. OS/400 Command Descriptions P3-337


ENDPFRCOL

ENDPFRCOL (End Performance Collection) Command


Job: B,I Pgm: B,I REXX: B,I EXEC

55──ENDPFRCOL──────────────────────────────────────────────────────────────────────────────────────────────────────────────────5%

Purpose Example
ENDPFRCOL
The End Performance Collection (ENDPFRCOL) command
stops the automatic collection of performance data that is This command stops the collection of performance data.
defined on the Work with Performance Collection
(WRKPFRCOL) command.

There are no parameters for this command.

P3-338 OS/400 CL Reference - Part 2 (Full Version)


ENDPFRMON

ENDPFRMON (End Performance Monitor) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──────────────────────────5%
55──ENDPFRMON──┬───────────────────────┬──┬──────────────────────────────────────────────────────┬───
│ ┌─\SAME─┐ │ │ ┌─\SAME───────────────────────────────┐ │
└─DMPTRC(──┼─\YES──┼──)─┘ └─EXITPGM(──┼─\NONE───────────────────────────────┼──)─┘
└─\NO───┘ │ ┌─\LIBL────────┐ │
└─┼──────────────┼──user-exit-program─┘
├─\CURLIB──────┤
└─library-name─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *SAME: The value does not change.


*NONE: No exit program is specified.
The End Performance Monitor (ENDPFRMON) command
stops the collection of performance data. After the collection The name of the exit program can be qualified by one of
of performance data stops, all of the database files are the following library values:
closed, and the performance monitor job ends.
*LIBL: All libraries in the job's library list are
Note: To see the parameter and value descriptions for this searched until the first match is found.
command, refer to the online help text. For more
*CURLIB: The current library for the job is
information about printing the help text, refer to
searched. If no library is specified as the current
“Printing CL Command Descriptions” in Chapter 1.
library for the job, the QGPL library is used.
library-name: Specify the name of the library to be
Optional Parameters searched.
DMPTRC user-exit-program: Specify the name of the user exit
Specifies whether the trace is dumped to a database file program to be used.
(QAPMDMPT). If the trace is started, but is not dumped
when the performance monitor ends, the trace can be
dumped at a later time by using the Dump Trace Example
(DMPTRC) command. ENDPFRMON
*SAME: The value does not change.
This command stops the collection of performance data.
*YES: The trace data, if any, is dumped. Depending on what was specified by the DMPTRC param-
*NO: The trace data is not dumped. eter of the STRPFRMON command, the trace data may be
dumped to the QAPMDMPT database file.
EXITPGM
Specifies the user-written exit program that is called to
process the performance data collected by this
command.

Chapter 2. OS/400 Command Descriptions P3-339


ENDPGM

ENDPGM (End Program) Command


Pgm: B,I

55──ENDPGM─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────5%

Purpose Restriction: This command is valid only within a CL


program.
The End Program (ENDPGM) command specifies the end of
a CL program. When the command is processed, it performs There are no parameters for this command.
the same function as a RETURN command. That is, control
is returned to the command immediately following the CALL
Example
command in the calling program.
PGM
The ENDPGM command is not required at the end of a CL Ÿ
program. If the last statement in a CL program source file is Ÿ
reached and no ENDPGM command is found, an ENDPGM Ÿ
command is assumed by the compiler. ENDPGM

This program is identified by a PGM command that contains


no parameters and is ended by the ENDPGM command.

P3-340 OS/400 CL Reference - Part 2 (Full Version)


ENDPGMPRF

| ENDPGMPRF (End Program Profiling) Command


| Job: B,I Pgm: B,I REXX: B,I Exec
|
| 55──ENDPGMPRF──────────────────────────────────────────────────────────────────────────────────────────────────────────────────5%

| Purpose | There are no parameters for this command.

| The End Program Profiling (ENDPGMPRF) command ends


| collection of program profiling data for ILE programs or | Example
| service programs that have been enabled to collect profiling | ENDPGMPRF
| data.
| Program profile data collection is ended.
| Restriction: This command requires *ALLOBJ authority.

Chapter 2. OS/400 Command Descriptions P3-341


ENDPJ

ENDPJ (End Prestart Jobs) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
55──ENDPJ──SBS(──subsystem-name──)──PGM(──┼───────────────┼──program-name──)──┬─────────────────────────┬───────────────────────5
├─\CURLIB/──────┤ │ ┌─\CNTRLD─┐ │
└─library-name/─┘ └─OPTION(──┴─\IMMED──┴──)─┘
(P) ──┬────────────────────────────────────────┬─────────────────────5%
5──┬───────────────────────────┬──┬───────────────────────┬───
│ ┌─3ð─────────┐ │ │ ┌─\NO──┐ │ │ ┌─\SAME──────────────────┐ │
└─DELAY(──┴─delay-time─┴──)─┘ └─SPLFILE(──┴─\YES─┴──)─┘ └─LOGLMT(──┼─\NOMAX─────────────────┼──)─┘
└─maximum-logged-entries─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Optional Parameters


The End Prestart Jobs (ENDPJ) command ends all jobs and OPTION
any associated inline data files for a prestart job entry in an Specifies that the job is either ended in a controlled
active subsystem. Jobs may be waiting for a program start manner, which lets the application program perform end-
request or may already be associated with a program start of-job processing, or is ended immediately. In either
request. Spooled files associated with the jobs being ended case, the system performs certain job cleanup pro-
can also be deleted or allowed to remain on the output cessing.
queue. The limit on the number of messages being written *CNTRLD: The job is ended in a controlled manner.
to each of the job logs can also be changed. This allows the program to perform cleanup (end-of-job
processing).
Restriction: This command is restricted to a user with job
control special authority. Note: If a controlled end is issued against a job that is
suspended because of a Hold Job (HLDJOB)
Note: To see the parameter and value descriptions for this
command, a system request option 1, Transfer
command, refer to the online help text. For more
Secondary Job (TFRSECJOB) command, or
information about printing the help text, refer to
Transfer Group Job (TFRGRPJOB) command,
“Printing CL Command Descriptions” in Chapter 1.
the delay time does not start until the job is
active.
Required Parameters *IMMED: The job is ended immediately. This option
SBS may cause undesirable results (for example, if data has
Specifies the name of the active subsystem that contains been partially updated) and should be used only after a
the prestart job entry. Specify the name of the sub- controlled end has been attempted unsuccessfully.
system. Note: Ending a prestart job with the *IMMED option
does not immediately remove the job from the
PGM
system. The system starts to perform end-of-job
Specifies the qualified name of the program for the pre-
cleanup even though the immediate option is
start job entry.
specified. This cleanup can be very brief or last
The name of the program can be qualified by one of the several minutes. Functions performed during
following library values: end-of-job cleanup can include:
*LIBL: All libraries in the job's library list are Ÿ Closing of database files
searched until the first match is found.
Ÿ Spooling of the job log to an output queue
*CURLIB: The current library for the job is
Ÿ End-of-job processing of OS/400 system
searched. If no library is specified as the current
internal objects
library for the job, the QGPL library is used.
Ÿ Displaying the end-of-job display (for interac-
library-name: Specify the name of the library to be
tive jobs)
searched.

program-name: Specify the name of the program for the DELAY


prestart job entry. Specifies the time (in seconds) allowed for the program
to complete end-of-job processing during a controlled
end. This parameter is not used if OPTION(*IMMED) is
specified. If the cleanup is not complete before the end

P3-342 OS/400 CL Reference - Part 2 (Full Version)


ENDPJ

of the delay time, the job is immediately ended. (Only rest of the messages on the queue are ignored. If the
end-of-job processing is performed.) limit is set to zero before any messages are written to
the spooled file, no job log is produced for the ended
30: Up to 30 seconds of delay time is allowed for
job.
cleanup before the job is ended.
*SAME: The value does not change.
delay-time: Specify the maximum delay time (in
seconds) before the job is ended. Valid values range *NOMAX: There is no limit on the number of messages
from 1 through 999999 seconds. For additional informa- being logged. Messages on each job message queue
tion on ending an end-of-file delay job, refer to the are written to the log of each job.
EOFDLY parameter in the Override Database File
maximum-logged-entries: Specify the maximum number
(OVRDBF) command description.
of messages being written to the job log for each job.
SPLFILE This value is the maximum if it is entered before the job
Specifies whether spooled files created by the job are log contains that many messages. Otherwise, the limit
retained for normal processing by a writer or are deleted. merely stops the process of writing any more messages
to the job log. If zero is specified before any messages
*NO: The spooled files created by the job being ended
are written to the log, no job log is produced.
are retained for normal processing by a writer.
*YES: The spooled files created by the job being ended
are deleted. The job log is not deleted.
Examples
LOGLMT Example 1: Ending a Job Immediately
Specifies the maximum number of entries in the ENDPJ SBS(SBS1) PGM(PJLIB/PJPGM) OPTION(\IMMED)
message queue of the job being ended that are written SPLFILE(\YES)
to the job log. This parameter can be used to limit the
number of messages written to the job log printer file, This command ends all jobs associated with prestart job
QPJOBLOG, for a job that is ended. This option is par- entry PJPGM in subsystem SBS1 immediately. Spooled
ticularly useful when a job is ended and its message output produced by these prestart jobs is deleted and the job
queue contains an excessive number of entries. log is saved.

If this command is used to change the message logging Example 2: Delaying a Job End
limit while the messages for the ended job are being
ENDPJ SBS(SBS2) PGM(PJPGM2) OPTION(\CNTRLD)
written to the spooled file, and if the new limit is greater
DELAY(5ð) SPLFILE(NO)
than the number written at the time the command is
entered, messages continue to be written until the new This command ends all the jobs associated with prestart job
limit is reached. If the new limit is less than the number entry PJPGM2 in subsystem SBS2. Spooled output for
of messages already written to the spooled file, a these prestart jobs is saved for normal processing by the
message indicating that the limit is reached is imme- spooling writer. The jobs have 50 seconds to perform any
diately put in the spooled file as the last entry, and the cleanup routines, after which they are immediately ended.

Chapter 2. OS/400 Command Descriptions P3-343


ENDPRTEML

ENDPRTEML (End Printer Emulation) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ────────────────────────────────────────────5%
55──ENDPRTEML──┬─EMLDEV(──emulation-device-description-name──)─────────────────┬───
└─EMLLOC(──emulation-location-name──)──PRTDEV(──printer-name──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Required Parameters


The End Printer Emulation (ENDPRTEML) command ends EMLDEV
printer emulation without ending the job. If there is another Specifies the name of the printer emulation device
request in the job, that request is then processed. requested to receive data from the host system. The
printer emulation job using this device is informed of the
This command closes the file to the host system, and then request and closes the printer file. This forces all of the
writes the last data received from the host system to the data received from the host system to the spooled file or
spooled file or printer by closing the printer file. printer. The printer file is then reopened and printer
emulation continues. To use this function, the user must
In some cases, the request does not take effect immediately. be authorized to the device.
The request is delayed while any of the following conditions
exist in the printer emulation request: EMLLOC
Specifies the remote location name associated with this
Ÿ Printing a block sent from the host system.
session. This name is defined during configuration and
Ÿ Waiting for a printer error to be cleared (for example, a refers to the remote location where communication takes
paper jam). place. This value was specified on the Start Printer
Emulation (STRPRTEML) command.
Ÿ Waiting for a reply to a PA1 or PA2 inquiry message.
Ÿ Waiting for error recovery to be done to the host system PRTDEV
or printer device. Specifies the name of the printer device that is used to
print the spooled output. This value must match the
Ÿ The job has been held by using the HLDJOB command. value specified on the Start Printer Emulation
When the condition is cleared, the End Printer Emulation (STRPRTEML) command. This parameter must be
request takes effect, and the printer emulation request specified when the EMLLOC parameter is specified.
ends.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more
Example
information about printing the help text, refer to ENDPRTEML EMLDEV(HOSTPRT3)
“Printing CL Command Descriptions” in Chapter 1.
This command ends the printer emulation request that is
using the device HOSTPRT3.

P3-344 OS/400 CL Reference - Part 2 (Full Version)


ENDRCV

ENDRCV (End Receive) Command


Pgm: B,I

(P) ────────────────────────────────────────────────────────────────────────────────────5%
55──ENDRCV──┬──────────────────────────┬───
│ ┌─\FILE───────┐ │
└─DEV(──┴─device-name─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose DEV
Specifies the name of the display device for which the
The End Receive (ENDRCV) command is used to end request for input is being ended.
(cancel) a request for input made by a previously issued
*FILE: The name of the device having the response
Receive File (RCVF) or Send/Receive File (SNDRCVF)
from it ended is contained in the device file that was
command that had WAIT(*NO) specified. The ENDRCV
declared in the FILE parameter of the Declare File
command ends an input request even if the user enters the
(DCLF) command. If the device file has more than one
requested data at the display station at the same time that
device name specified in it, *FILE cannot be specified.
the command is processed. If the requested data is entered
and is being sent to the program when the end receive oper- device-name: Specify the name of the display device
ation is performed, the entered data is lost. If there is no from which a response is being ended.
outstanding input request, the command is ignored.

Restriction: This command is valid only for display files Example


within CL programs. It cannot be used for database files. ENDRCV DEV(MYDISPLAY)
Note: To see the parameter and value descriptions for this Assume that a RCVF command with WAIT(*NO) was issued
command, refer to the online help text. For more earlier in the CL program to request input from the device file
information about printing the help text, refer to declared earlier in the DCLF command and from the display
“Printing CL Command Descriptions” in Chapter 1. device MYDISPLAY. When this ENDRCV command is pro-
cessed, that request for input from MYDISPLAY is ended.
Optional Parameters

Chapter 2. OS/400 Command Descriptions P3-345


ENDRDR

ENDRDR (End Reader) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ───────────────────────────────────────────────────────────────5%
55──ENDRDR──RDR(──reader-name──)──┬─────────────────────────┬───
│ ┌─\CNTRLD─┐ │
└─OPTION(──┴─\IMMED──┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Optional Parameters


The End Reader (ENDRDR) command ends the specified OPTION
diskette or database reader and makes its associated input Specifies when the ended reader stops processing.
device available to the system. The reader can be stopped *CNTRLD: The job is ended in a controlled manner.
either immediately, without completing the current job being This allows the program to perform cleanup (end-of-job
read, or at the end of the current job. If the reader is in a processing).
hold state when this command is issued, the reader is
*IMMED: The reader stops processing in a controlled
stopped immediately.
manner immediately. The job being read in is not
Note: To see the parameter and value descriptions for this placed on the job queue.
command, refer to the online help text. For more
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. Example
ENDRDR RDR(DISKETTE)
Required Parameters This command stops the reader DISKETTE as soon as the
RDR current job is completely read in and releases that device to
Specifies the name of the diskette or database reader the system.
being ended. The reader's associated input device is
made available to the system.

P3-346 OS/400 CL Reference - Part 2 (Full Version)


ENDRMTSPT

ENDRMTSPT (End Remote Support) Command


Job: I Pgm: I Exec

55──ENDRMTSPT──┬──────────────────────┬────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\NO──┐ │
└─DLTLIB(──┴─\YES─┴──)─┘

Purpose Optional Parameters


The End Remote Support (ENDRMTSPT) command varies DLTLIB
off and deletes the configuration objects created by the Start Specifies whether the remote support library QTILIB is
Remote Support (STRRMTSPT) command. deleted when remote support is ended.
*NO: The remote support library is not deleted.
Restriction: This command is not valid when the user is
signed on the remote support work station. *YES: The remote support library is deleted.

Note: To see the parameter and value descriptions for this


command, refer to the online help text. For more Example
information about printing the help text, refer to ENDRMTSPT
“Printing CL Command Descriptions” in Chapter 1.
This command varies off and deletes the configuration
objects that have been created.

Chapter 2. OS/400 Command Descriptions P3-347


ENDRQS

ENDRQS (End Request) Command


Job: I Pgm: I REXX: I Exec

(P) ───────────────────────────────────────────────────────────────────────────────5%
55──ENDRQS──┬───────────────────────────────┬───
│ ┌─\PRV──────────┐ │
└─RQSLVL(──┴─request-level─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *PRV: The command entered at the immediately pre-


vious level is being canceled.
The End Request (ENDRQS) command ends (cancels) a
request-level: Specify the request level at which the
previously requested operation (command). One common
command being canceled was entered. All request
use of the ENDRQS command is to cancel a request that is
levels from the level specified to the current level are
currently stopped at a breakpoint. This command function is
canceled.
also available as an option on the System Request menu.

If the ENDRQS command cannot be processed immediately Examples


because a system function that cannot be interrupted is cur-
rently running, the command is delayed until interruption is Example 1: Ending a Command
allowed. CALL PROGA (This is level 1)
Ÿ
When a request is ended, an escape message (see the Pro- Ÿ
gramming Reference Summary book) is sent to the request Ÿ
processing program that is currently called at the request Breakpoint occurs
level being canceled. Request processing programs can
monitor for the escape message so that cleanup processing CALL PROGB (This is level 2)
can be done when the request is canceled. The static Ÿ
storage and open files are reclaimed for any program that Ÿ
was called by the request processing program. None of the Ÿ
programs called by the request processing program are noti- Breakpoint occurs
fied of the cancelation, so they have no opportunity to stop ENDRQS (This is level 3)
processing. To become a request processing program, the
program must receive a request message. In this example, because RQSLVL(*PRV) is the default, the
request made at level 2 is canceled. The user can then
If the ENDRQS command is in a program, that program must enter another command at level 2 or press F3 to show the
become a request processor before it issues this command. PROGA breakpoint display again.
More information on how to set up a program to become a Example 2: Ending a Command
request processor is in the CL Programming book.
CALL PROGA (This is level 1)
Note: External objects that are locked by the Allocate Ÿ
Object (ALCOBJ) command are not unlocked (deallo- Ÿ
cated) by the canceled request. Ÿ
Breakpoint occurs
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more CALL PROGB (This is level 2)
information about printing the help text, refer to Ÿ
“Printing CL Command Descriptions” in Chapter 1. Ÿ
Ÿ
Breakpoint occurs
Optional Parameter
ENDRQS RQSLVL(1) (This is level 3)
RQSLVL
Specifies the (command) request level at which the In this example, the request made at the highest level (CALL
command being canceled was entered. PROGA) is canceled. Consequently, any requests made
between level 1 and level 3 are also canceled.

P3-348 OS/400 CL Reference - Part 2 (Full Version)


ENDSBS

ENDSBS (End Subsystem) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(1) ──)──┬─────────────────────────┬───
55──ENDSBS──SBS(──┬─\ALL───────────┬─── (P) ──┬───────────────────────────┬───────────────────────5
└─subsystem-name─┘ │ ┌─\CNTRLD─┐ │ │ ┌─\NOLIMIT───┐ │
└─OPTION(──┴─\IMMED──┴──)─┘ └─DELAY(──┴─delay-time─┴──)─┘
5──┬─────────────────────────────────────────┬─────────────────────────────────────────────────────────────────────────────────5%
| │ ┌─\DFT─────────────────┐ │
| │ │ ┌──
───────────────┐ │ │
| 6 (2)
└─ENDSBSOPT(──┴───┬─\NOJOBLOG─┬─┴────┴──)─┘
| ├─\CHGPTY───┤
| └─\CHGTSL───┘
Notes:
1 SBS(*ALL) is not valid in a pass-through job or in a work station function job.

P All parameters preceding this point can be specified in positional form.

| 2 A maximum of 3 repetitions

Purpose information about printing the help text, refer to


“Printing CL Command Descriptions” in Chapter 1.
The End Subsystem (ENDSBS) command ends the specified
subsystem (or all active subsystems) and specifies what
happens to active work being processed. No new jobs are Required Parameters
started in the subsystem or subsystems after this command SBS
is run. Specifies the name of the subsystem to be ended, or it
specifies that all active subsystems are to be ended.
Interactive jobs that have been transferred to a job queue by
the Transfer Job (TFRJOB) command are ended as part of *ALL: All the subsystems that are currently active are
ending the subsystem. If an initial program load (IPL) occurs ended. All jobs are ended except the job in which this
while either a batch or interactive job is on a job queue command is entered. When this value is specified, the
(because of the TFRJOB command), that job is removed QSYSOPR message queue should be in break delivery
from the job queue during IPL and its job log is produced. mode in the job issuing the ENDSBS command.
subsystem-name: Specify the simple name of the sub-
You can specify that the application programs running in the
system to be ended.
subsystem are given time to control end-of-job processing. If
no time is given or if cleanup cannot be performed within the Note: If the subsystem specified is the controlling sub-
given time, the system performs minimal end-of-job pro- system, the interactive job from which the
cessing, which can include: command was issued remains active. Also, if
the subsystem specified is the controlling sub-
Ÿ Closing the database files.
system and the job that issues this command is
Ÿ Spooling the job log to an output queue. one of two jobs that are active at the work station
Ÿ Cleaning up internal objects in the operating system. (through the use of the system request key or
the Transfer Secondary Job (TFRSECJOB)
Restrictions: command), neither of the jobs is forced to end.
The controlling subsystem does not end until you
1. If the controlling subsystem is being ended, because
end one of the jobs (either by signing off in one
either its name or *ALL is specified for the SBS param-
job or by ending one job from the other).
eter, this command can be entered only in an interactive
job. The interactive job must be in the controlling sub-
system, and the command can be entered only from a
work station (associated with the interactive job) whose Optional Parameters
work station entry in the controlling subsystem OPTION
description specifies AT(*SIGNON). Specifies whether jobs in the subsystem are ended in a
2. You must have job control (*JOBCTL) authority and controlled manner, which means that the application pro-
object operational authority to the subsystem to use this grams running in the subsystem are given time to
command. perform end-of-job processing, or are ended imme-
diately. In either case, the system performs certain
Note: To see the parameter and value descriptions for this
cleanup processing.
command, refer to the online help text. For more
*CNTRLD: The jobs are ended in a controlled manner.
This allows the programs that are running to perform

Chapter 2. OS/400 Command Descriptions P3-349


ENDSBS

cleanup (end of job processing). The applications have | *NOJOBLOG: No joblogs will be created for jobs that
the amount of time specified on the DELAY parameter to | are ended due to this command being invoked. This
complete cleanup before the job is ended. | includes subsystem monitor jobs and all user jobs in the
| subsystem. This option can significantly reduce the
*IMMED: The jobs are ended immediately and the
| amount of time necessary to complete the ENDSBS
system performs end-of-job cleanup. System cleanup
| command. However, if a problem occurs in a job, there
can take from a brief amount of time to several minutes.
| will be no joblog to record the problem, which may make
Note: This value is recommended only if specifying the | problem diagnosis difficult or impossible.
*CNTRLD value has been unsuccessful. When
| *CHGPTY: The CPU priority of jobs that are ending is
you specify the *IMMED value, you can get
| changed to a higher value (worse priority). The
undesirable results, for example, from data that
| remaining active jobs on the system may have better
has been partially updated.
| performance when *CHGPTY is specified. However,
DELAY | jobs that are ending may take longer to finish. This
Specifies the amount of time (in seconds) allowed in | option is ignored if the subsystem is ending controlled.
which to complete a controlled subsystem end operation. | But if the DELAY time limit expires, this option will take
If this amount of time is exceeded, any jobs still running | affect immediately.
in the subsystem are ended immediately.
| *CHGTSL: The timeslice of jobs that are ending is
*NOLIMIT: The amount of time in which to complete a | changed to a lower value. The remaining active jobs on
controlled end operation is not limited. | the system may have better performance when
| *CHGTSL is specified. However, jobs that are ending
delay-time: Specify the number of seconds in which the
| may take longer to finish. This option is ignored if the
end operation is completed. Valid values range from 1
| subsystem is ending controlled. But if the DELAY time
through 99999 seconds.
| limit expires, this option will take affect immediately.
| ENDSBSOPT
| Note:Specifying *CHGPTY and *CHGTSL will reduce the
| Specifies the options to take when ending the active
| impact on other active jobs on the system, but this may
| subsystems. In general, specifying these options will
| cause undesirable delays if there are active workstations
| improve the performance of the ENDSBS command.
| that were allocated to the ending subsystem. It may
| Each option has certain side effects that you need to
| take longer for those workstations to have their signon
| analyze before using that option.
| screens re-displayed since the job using the display
| This parameter has no effect on jobs that are already in | must end before the workstation is ready to be allocated
| the ending status. | to another subsystem.
| *DFT: The subsystems will end with no special ending
| options. Example
| Ÿ Joblogs will be produced. ENDSBS SBS(QBATCH) OPTION(\CNTRLD) DELAY(6ð)
| Ÿ The run priority will not change. This command ends all active jobs in the QBATCH sub-
| Ÿ The timeslice value will not change. system and ends the subsystem. The active jobs are
allowed 60 seconds to perform application-provided
end-of-job processing.

P3-350 OS/400 CL Reference - Part 2 (Full Version)


ENDSRVJOB

ENDSRVJOB (End Service Job) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──ENDSRVJOB──────────────────────────────────────────────────────────────────────────────────────────────────────────────────5%

Purpose Ÿ QPGMR
Ÿ QSYSOPR
The End Service Job (ENDSRVJOB) command ends the
remote job service operation. This command stops the Ÿ QSRV
service operation that began when the Start Service Job Ÿ QSRVBAS
(STRSRVJOB) command was entered.
There are no parameters for this command.
Restrictions:
1. If tracing or debugging is active in the serviced job when
Example
this command is entered, the remote service operation is
not ended. ENDSRVJOB

2. This command is shipped with public *EXCLUDE This command stops the service operation of the job cur-
authority. rently being serviced.
3. The following user profiles have private authorities to
use the command:

Chapter 2. OS/400 Command Descriptions P3-351


ENDSYS

ENDSYS (End System) Command


Job: I Pgm: I REXX: I Exec

(P) ──┬───────────────────────────┬──┬─────────────────────────────────────────┬─────────5%
55──ENDSYS──┬─────────────────────────┬───
| │ ┌─\CNTRLD─┐ │ │ ┌─\NOLIMIT───┐ │ │ ┌─\DFT─────────────────┐ │
| └─OPTION(──┴─\IMMED──┴──)─┘ └─DELAY(──┴─delay-time─┴──)─┘ │ │ ┌──
───────────────┐ │ │
| 6 (1) ─┴──)─┘
└─ENDSBSOPT(──┴───┬─\NOJOBLOG─┬─┴───
| ├─\CHGPTY───┤
| └─\CHGTSL───┘
Notes:
P All parameters preceding this point can be specified in positional form.

| 1 A maximum of 3 repetitions

Purpose perform end of processing) or immediately. In either


case, the system performs certain job cleanup functions.
The End System (ENDSYS) command ends most activity on
*CNTRLD: The job is ended in a controlled manner.
the system and leaves the system in a condition in which
This allows the program to perform cleanup (end-of-job
only the console is active in the controlling subsystem. This
processing).
is normally done so that the programs to diagnose equipment
problems can be run. This condition is called the restricted *IMMED: The job is ended immediately. This option
state and is required for operations like SAVSYS or may cause undesirable results (for example, if data has
RCLSTG. been partially updated) and should be used only after a
controlled end has been attempted unsuccessfully.
If two jobs are active in the controlling subsystem at the
console (through the use of the system request key), neither DELAY
of the jobs is forced to end. The ENDSYS command cannot Specifies the amount of time (in seconds) that the con-
complete running until the user ends one of the jobs (either trolled end operation is allowed. If this amount of time is
by signing off in one job or by canceling one job from the exceeded and the end operation is not complete, any
other). jobs still being processed are ended immediately, except
for those running long-running system instructions.
All active subsystems are notified that an end system opera- *NOLIMIT: The amount of time to complete a controlled
tion is in process. No new jobs or routing steps can be end operation is not limited.
accepted by the subsystems. The ENDSYS command also
specifies what happens to all active work. delay-time: Specify the number of seconds in which the
end operation is completed. Valid values range from 1
Interactive jobs that are transferred to a job queue by the through 99999 seconds.
Transfer Job (TFRJOB) command are ended as part of sub-
| ENDSBSOPT
system ending. If an initial program load (IPL) occurs while
| Specifies the options to take when ending the active
either a batch or interactive job is on a job queue (because
| subsystems. In general, specifying these options will
of the TFRJOB command), that job is removed from the job
| improve the performance of the ENDSYS command.
queue during IPL and its job log is produced.
| Each option has certain side effects that you need to
Restriction: This command can be entered only in an inter- | analyze before using that option.
active job in the controlling subsystem. To use this | This parameter has no effect on jobs that are already in
command, the user must have job control (*JOBCTL) | the ending status.
authority. This command is not allowed in a pass-through
| *DFT: The subsystems will end with no special ending
job or in a work station function job.
| options.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more | Ÿ Joblogs will be produced.
information about printing the help text, refer to | Ÿ The run priority will not change.
“Printing CL Command Descriptions” in Chapter 1.
| Ÿ The timeslice value will not change.

Optional Parameters | *NOJOBLOG: No joblogs will be created for jobs that


| are ended due to this command being invoked. This
OPTION | includes subsystem monitor jobs and all user jobs in the
Specifies whether all active jobs are ended in a con- | subsystem. This option can significantly reduce the
trolled manner (which lets the application programs | amount of time necessary to complete the ENDSYS
| command. However, if a problem occurs in a job, there

P3-352 OS/400 CL Reference - Part 2 (Full Version)


ENDSYS

| will be no joblog to record the problem, which may make Examples


| problem diagnosis difficult or impossible.
| *CHGPTY: The CPU priority of jobs that are ending is Example 1: Ending System Activity
| changed to a higher value (worse priority). The ENDSYS
| remaining active jobs on the system may have better
| performance when *CHGPTY is specified. However, This command ends the system activity after all active jobs in
| jobs that are ending may take longer to finish. This the system are allowed to perform their own end of pro-
| option is ignored if the subsystem is ending controlled. cesses. The amount of time the end can take is not limited.
| But if the DELAY time limit expires, this option will take
Example 2: Ending System Activity After Jobs are
| affect immediately.
Ended
| *CHGTSL: The timeslice of jobs that are ending is
ENDSYS OPTION(\IMMED)
| changed to a lower value. The remaining active jobs on
| the system may have better performance when This command ends system activity after all active jobs are
| *CHGTSL is specified. However, jobs that are ending immediately ended.
| may take longer to finish. This option is ignored if the
| subsystem is ending controlled. But if the DELAY time
| limit expires, this option will take affect immediately.

Chapter 2. OS/400 Command Descriptions P3-353


ENDS36

ENDS36 (End System/36) Command


Job: I Pgm: I REXX: I Exec

55──ENDS36─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────5%

Purpose Example
ENDS36
The End System/36 (ENDS36) command allows the user to
end the System/36 Environment session that was started This command immediately ends the System/36 Environment
with a Start System/36 (STRS36) command. session and any programs or procedures that are running in
the System/36 Environment. If the ENDS36 command is in a
There are no parameters for this command.
procedure or in a program, the statements following the
command are ignored.

P3-354 OS/400 CL Reference - Part 2 (Full Version)


ENDTCP

ENDTCP (End TCP/IP) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──┬──────────────────────┬────────────────5%
55──ENDTCP──┬─────────────────────────┬──┬───────────────────────────────────────┬───
│ ┌─\IMMED──┐ │ └─DELAY(────delay-time,-if-\cntrld────)─┘ │ ┌─\YES─┐ │
└─OPTION(──┴─\CNTRLD─┴──)─┘ └─ENDSVR(──┴─\NO──┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *IMMED: TCP/IP processing is ended immediately.


Attention:
The End TCP/IP (ENDTCP) command ends TCP/IP pro-
cessing. The ENDTCP OPTION(*IMMED) command should be
used carefully. Partially updated data may result if an
Attention: application is processing data and has not completed an
operation when the ENDTCP *IMMED command is
There is no confirmation display shown when ENDTCP is issued. It is suggested that you do the following:
entered. The ENDTCP command must be used carefully.
When it is used, it ends all TCP/IP processing on the AS/400 Ÿ Notify all users before issuing the ENDTCP
system that you are working on. command so that they can end their applications.
Ÿ Issue the ENDTCP command at a time when you
If OPTION(*IMMED) is specified for the ENDTCP command,
know no TCP/IP traffic is occurring on the AS/400
the following is true:
system. To display the current TCP/IP traffic on the
Ÿ All TCP/IP connections are ended. This affects all cur- AS/400, use option 3 on the Work with TCP/IP
rently active applications using sockets or the Pascal Status (WRKTCPSTS or NETSTAT) command.
API.
*CNTRLD: TCP/IP processing is ended in a controlled
Ÿ Unless ENDSVR(*NO) is specified, all TCP/IP server manner. Applications using TCP/IP are given time to
jobs for TELNET, FTP, SMTP, LPD, HTTP, WSG, POP, complete their processing. New application processing
RouteD, and the SNMP agent that are currently active in is not allowed. After the specified period of time
the QSYSWRK subsystem are ended. See the elapses, the processing for ENDTCP OPTION(*IMMED)
description of the ENDSVR parameter below. is performed.
Ÿ All active TCP/IP interfaces are ended. The controlled end processing does not do any of the
following:
If OPTION(*CNTRLD) is specified for the ENDTCP
command, the following is true: Ÿ It does not monitor to see if all TCP/IP processing
Ÿ No new open operations are allowed to TCP, UDP, or has completed before the specified period of time
raw sockets. has elapsed.

Ÿ A job is submitted to the QSYSWRK subsystem that will, Ÿ It does not notify an application that is actively using
after the time indicated in the DELAY parameter value a TCP/IP connection that TCP/IP processing will be
has expired, do an ENDTCP *IMMED operation. ended.

Ÿ An ENDTCP OPTION(*IMMED) can be submitted at any DELAY


time after issuing ENDTCP OPTION(*CNTRLD). This Specifies the amount of time (in seconds) allowed in
cancels the controlled end. TCP/IP processing is ended which to complete a controlled end of TCP/IP pro-
immediately when the ENDTCP OPTION(*IMMED) is cessing. After this period of time all TCP/IP processing
issued. is ended immediately.
Note: To see the parameter and value descriptions for this delay-time: Specify the number of seconds in which the
command, refer to the online help text. For more end operation is completed. Valid values range from 1
information about printing the help text, refer to through 86400 seconds.
“Printing CL Command Descriptions” in Chapter 1.
ENDSVR
Specifies whether or not all TCP/IP application server
Optional Parameters jobs are ended when the End TCP/IP (ENDTCP)
command ends TCP/IP processing.
OPTION
Specifies whether TCP/IP processing is ended in an Caution: Before specifying *NO for this parameter,
immediate or controlled manner. please consider the following:

Chapter 2. OS/400 Command Descriptions P3-355


ENDTCP

Ÿ It is not possible to end all the TCP/IP processing Examples


on your system without affecting the applications
which use TCP/IP. Example 1: Ending TCP/IP Immediately
Ÿ If TCP/IP processing is ended and no form of ENDTCP \IMMED
TCP/IP emulation (such as AnyNet) is active, then
TCP/IP applications which are not restarted will not This command ends all TCP/IP processing on the AS/400
function correctly. system immediately.

Ÿ Applications that use the Pascal API must always Example 2: Ending TCP/IP in a Controlled Time
be ended and restarted whenever TCP/IP pro-
ENDTCP OPTION(\CNTRLD) DELAY(12ð)
cessing is ended and restarted.

*YES The ENDTCP command ends all TCP/IP applica- This command ends all TCP/IP processing after 120 seconds
tion servers prior to ending TCP/IP processing. *NO have expired. During this time, new TCP/IP processing is
The ENDTCP command does not end any TCP/IP appli- not allowed.
cation server jobs when it ends TCP/IP processing.
Example 3: Ending TCP/IP Immediately Without Ending
Note: ENDTCP ENDSVR(*NO) can be used to end TCP/IP Application Servers
processing without disturbing the operation of jobs ENDTCP \IMMED ENDSVR(\NO)
using AnyNet. TCP/IP processing will be ended,
however TCP/IP application servers that are using This command ends all TCP/IP processing on the AS/400
AnyNet will continue to function. system immediately. However, any TCP/IP application
servers (FTP, SMTP, and so on) that are active are not
If both TCP/IP and AnyNet are inactive, use the End ended when TCP/IP processing is ended.
TCP/IP Server (ENDTCPSVR) command to end
TCP/IP application server jobs.

P3-356 OS/400 CL Reference - Part 2 (Full Version)


ENDTCPCNN

ENDTCPCNN (End TCP/IP Connection) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──ENDTCPCNN──PROTOCOL(──┬─\UDP─┬──)──LCLINTNETA(──┬─\──────────────────────┬──)──LCLPORT(────local-port────)──────────────────5
└─\TCP─┘ └─local-internet-address─┘
(P) ────────────────────────────────────────5%
5──┬─────────────────────────────────────────────┬──┬──────────────────────────────┬───
└─RMTINTNETA(──┬─\───────────────────────┬──)─┘ └─RMTPORT(──┬─\───────────┬──)─┘
└─remote-internet-address─┘ └─remote-port─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose portion of the address. If the internet address is entered


from a command line, the address must be enclosed in
The End TCP/IP Connection (ENDTCPCNN) command is apostrophes.
used to end a Transmission Control Protocol/Internet Pro-
tocol (TCP/IP) connection. This command ends a connection LCLPORT
immediately and should be used only when a normal end is Specifies the local port number of the connection to end.
not possible. This parameter is required for both UDP and TCP. A
decimal number identifying a local port must always be
Note: The ENDTCPCNN command is usually used by spec- specified for this command.
ifying option 4 on the Work with TCP/IP Connection
Status list of the WRKTCPSTS (NETSTAT) display. local-port: Specify the local port number of the con-
The ENDTCPCNN command is provided as a sepa- nection to end. Valid values range from 1 through
rate command to give system administrators control 65535.
over this function. By limiting the authority to the Attention:
ENDTCPCNN command, the system administrator
Ports 1 through 1024 are reserved for use by system-
limits which users can end TCP/IP connections
supplied TCP/IP applications. If the user specifies ports
without restricting access to the NETSTAT utility.
1 through 1024, it can affect the operation of those appli-
Note: To see the parameter and value descriptions for this cations.
command, refer to the online help text. For more
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. Optional Parameters
RMTINTNETA
Required Parameters Specifies the remote internet address of the connection
to end. This parameter is required for TCP.
PROTOCOL
*: The remote internet address was left unspecified
Specifies the protocol used by the connection that is to
when this connection was opened.
be ended. The protocol value must be either *TCP or
*UDP. remote-internet-address: Specify the remote internet
address. The internet address is specified in the form
*UDP: The connection was created for use with the
nnn.nnn.nnn.nnn, where nnn is a decimal number
User Datagram Protocol (UDP).
ranging from 0 through 255. An internet address is not
*TCP: The connection was created for use with the valid if it has a value of all binary ones or all binary
Transmission Control Protocol (TCP). zeros for the network identifier (ID) portion or the host ID
portion of the address. If the internet address is entered
LCLINTNETA
from a command line, the address must be enclosed in
Specifies the local internet address of the connection to
apostrophes.
end. This parameter is required for both UDP and TCP.
*: The local internet address was left unspecified when RMTPORT
this connection was opened. Specifies the remote port number of the connection to
end.
local-internet-address: Specify the local internet
address. The internet address is specified in the form This parameter is required for TCP.
nnn.nnn.nnn.nnn, where nnn is a decimal number *: The remote port number was left unspecified when
ranging from 0 through 255. An internet address is not this connection was opened.
valid if it has a value of all binary ones or all binary
remote-port: Specify the remote port number of the con-
zeros for the network identifier (ID) portion or the host ID
nection to end.

Chapter 2. OS/400 Command Descriptions P3-357


ENDTCPCNN

Examples This command closes the UDP socket using local port 596
and local internet address 9.130.28.144. The TCP/IP pro-
Example 1: Ending a TCP Connection tocol stack ends all activity on the connection and returns the
ENDTCPCNN PROTOCOL(\TCP) resources to the free storage pools.
LCLINTNETA('9.5.1.1ð9') LCLPORT(13ð54)
RMTINTNETA('9.13ð.28.144') RMTPORT(23) Example 3: Ending a LISTEN State TCP Socket
ENDTCPCNN PROTOCOL(\TCP)
This command ends the TCP connection between local port LCLINTNETA(\) LCLPORT(5ð23)
13054 for local internet address 9.5.1.109 and remote port RMTINTNETA(\) RMTPORT(\)
23 for remote internet address 9.130.28.144. The TCP/IP
protocol stack ends all activity on the connection and returns This command ends the TCP socket that is listening on local
the resources to the free storage pools. port 5023. The application that created this socket did not
specify a local internet address. The socket is closed and
Example 2: Closing a UDP Socket the local port is made available for use by another applica-
ENDTCPCNN PROTOCOL(\UDP) tion.
LCLINTNETA('9.13ð.28.144') LCLPORT(596)

P3-358 OS/400 CL Reference - Part 2 (Full Version)


ENDTCPIFC

ENDTCPIFC (End TCP/IP Interface) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─────────────────────────────────────────────────────────────────────────────5%
55──ENDTCPIFC──INTNETADR(──internet-address──)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose information about printing the help text, refer to


“Printing CL Command Descriptions” in Chapter 1.
The End TCP/IP Interface (ENDTCPIFC) command is used
to end a Transmission Control Protocol/Internet Protocol
(TCP/IP) interface. When an interface is ended with this Required Parameter
command, datagrams addressed to the IP addresses associ- INTNETADR
ated with this interface will no longer be accepted. However, Specifies the internet address of an interface that had
the operation of any other TCP/IP or IP over SNA interface previously been added to the TCP/IP configuration with
that is using the same line description as the the interface the Add TCP/IP Interface (ADDTCPIFC) command and
being ended is not affected. which had been previously started by the STRTCPIFC or
STRTCP command. The internet address is specified in
This command can be used to end an interface that was pre-
the form nnn.nnn.nnn.nnn, where nnn is a decimal
viously started by the Start TCP/IP Interface (STRTCPIFC) or
number ranging from 0 through 255. An internet
Start TCP (STRTCP) command.
address is not valid if it has a value of all binary ones or
Use this command to end all TCP/IP interfaces prior to all binary zeros for the network identifier (ID) portion or
ending TCP/IP. Also, use this command to end all TCP/IP the host ID portion of the address. If the internet
interfaces prior to varying off a device, controller, or line address is entered from a command line, the address
associated with TCP/IP. Failure to do so may cause unpre- must be enclosed in apostrophes.
dictable results.
Examples
Notes on Route to Interface Binding: Interfaces
define direct paths to networks or subnetworks that this Example 1: Ending an X.25 Interface
AS/400 is directly attached to. Routes define indirect paths. ENDTCPIFC INTNETADR('9.5.11.125')
A route defines the first hop on the path to a network or sub-
network that this AS/400 is not directly attached to. This command causes the TCP/IP protocol stack to deacti-
vate (end) the interface associated with the internet address
Routes are bound to interfaces using a best match first algo- 9.5.11.125.
rithm. This algorithm is based on the state of the interface
and on the type of service (TOS) specified for the route and Example 2: Ending a Token-Ring Interface
interface. When ending an interface, the routes associated
ENDTCPIFC INTNETADR('156.93.81.7')
with the interface can move to another existing active inter-
face. This provides the widest available level of connectivity. This command causes the TCP/IP protocol stack to deacti-
Note: To see the parameter and value descriptions for this vate (end) the interface associated with the internet address
command, refer to the online help text. For more 156.93.81.7.

Chapter 2. OS/400 Command Descriptions P3-359


ENDTCPPTP

ENDTCPPTP (End Point-to-Point TCP/IP) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──────────────────────────────5%
55──ENDTCPPTP──CFGPRF(──┬─\ALL────────────────────────────────┬──)──┬────────────────────────┬───
├─generic\-configuration-profile-name─┤ │ ┌─\ANY──┐ │
└─configuration-profile-name──────────┘ └─OPRMODE(──┼─\ANS──┼──)─┘
└─\DIAL─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose the value specified in the point-to-point configuration


profile specified by CFGPRF.
The End Point-to-Point TCP/IP (ENDTCPPTP) command is
*ANY: Any point-to-point TCP/IP session job that
used to end a point-to-point TCP/IP session job. A session
matches the configuration profile name specified on the
job operates in one of two possible modes. Answer mode
CFGPRF parameter is ended, regardless of operating
sessions (*ANS) allow a remote system to contact this
mode.
AS/400 and establish a point-to-point TCP/IP session. Dial
mode sessions (*DIAL) allow this AS/400 to contact a remote *ANS: The operating mode of the session to be ended
system that supports point-to-point TCP/IP. is *ANS. All *ANS point-to-point TCP/IP session jobs
that are currently active that match the specified
The TCP/IP point-to-point session jobs run in the QSYSWRK CFGPRF parameter will be ended.
subsystem.
*DIAL: The operating mode of the session to be ended
Note: To see the parameter and value descriptions for this is *DIAL. All *DIAL point-to-point TCP/IP session jobs
command, refer to the online help text. For more that are currently active that match the specified
information about printing the help text, refer to CFGPRF parameter will be ended.
“Printing CL Command Descriptions” in Chapter 1.

Examples
Required Parameter
Example 1: End a TCP/IP point-to-point session job.
CFGPRF
ENDTCPPTP CFGPRF(DIALPRF)
Specifies which point-to-point TCP/IP sessions job or
jobs should be ended. This command ends the point-to-point TCP/IP session job
*ALL: All currently active point-to-point TCP/IP sessions that is using configuration profile DIALPRF. The operating
jobs operating in the mode specified by the OPRMODE mode (OPRMODE) value will default to *ANY so the oper-
parameter are ended. ating mode is not used in deciding whether to end the
session job.
generic*-configuration-profile-name: Specify the generic
name of the point-to-point TCP/IP configuration profile. Example 2: End all answer (*ANS) mode TCP/IP point-
A generic name is a character string of one or more to-point session jobs.
characters followed by an asterisk (*); for example,
ABC*. If a generic name is specified, then all profiles ENDTCPPTP CFGPRF(\ALL) OPRMODE(\ANS)
with names that begin with the generic name are ended.
This command ends all active or activating point-to-point
If an asterisk is not included, the name is assumed to be
answer mode (*ANS) TCP/IP session jobs.
a complete point-to-point TCP/IP configuration profile
name. All currently active point-to-point TCP/IP session Example 3: End all TCP/IP point-to-point session jobs.
jobs using the profiles indicated and operating in the
ENDTCPPTP CFGPRF(\ALL)
mode specified by the OPRMODE parameter are ended.
configuration-profile-name: Specify the name of a This command ends all active or activating point-to-point
TCP/IP point-to-point configuration profile. The active TCP/IP session jobs.
point-to-point session job using this profile is ended.
Example 4: End all TCP/IP point-to-point session jobs
starting with XYZ.
Optional Parameter ENDTCPPTP CFGPRF(XYZ\)
OPRMODE
Specifies the operating mode of the TCP/IP point-to- This command ends all active or activating point-to-point
point session job to be ended. This value must match TCP/IP session jobs that have profiles that begin with XYZ.

P3-360 OS/400 CL Reference - Part 2 (Full Version)


ENDTCPPTP

Example 5: End an answer mode TCP/IP point-to-point This command will end the point-to-point TCP/IP session job
session job using a specific profile name. using profile DIALPRF if this profile is defined to run in
ENDTCPPTP CFGPRF(DIALPRF) OPRMODE(\ANS) answer mode. If the profile is defined to run in dial mode
then no action will be taken.

Chapter 2. OS/400 Command Descriptions P3-361


ENDTCPSVR

ENDTCPSVR (End TCP/IP Server) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──ENDTCPSVR──┬──────────────────────────────────┬─── (P) ──┬─────────────────────────────────────────┬────────────────────────────5%


│ ┌─\ALL─────────────┐ │ │ ┌─\ALL─────────────────┐ │
│ │ ┌──
───────────┐ │ │ (2) ─┼─server-instance-name─┼──)─┘
└─HTTPSVR(───
6 (1) ─┴──)─┘
└─SERVER(──┴──┬─\SNMP───┬┴─── └─\ADMIN───────────────┘
├─\ROUTED─┤
├─\BOOTP──┤
├─\TFTP───┤
| ├─\DNS────┤
| ├─\DHCP───┤
| ├─\DDM────┤
├─\TELNET─┤
├─\FTP────┤
├─\SMTP───┤
├─\LPD────┤
├─\HTTP───┤
├─\WSG────┤
├─\POP────┤
├─\REXEC──┤
└─\NSMI───┘
Notes:
1 A maximum of 16 repetitions.

P All parameters preceding this point can be specified in positional form.

2 This parameter only takes effect if SERVER(*HTTP) is specified.

Purpose *FTP: All FTP server jobs are ended.


*SMTP: All jobs associated with SMTP in the
The ENDTCPSVR command is used to end the TCP/IP
QSYSWRK subsystem are ended. The bridge job in the
application server jobs that are specified in the SERVER
QSNADS subsystem is not ended.
parameter. If the jobs have any current active connections,
these connections are ended immediately. If the *LPD: All LPD server jobs are ended.
ENDTCPSVR command is used to end a server that is not *HTTP: All World Wide Web HyperText Transfer Pro-
active, a diagnostic message may be returned. tocol (HTTP) server jobs are ended.
Note: To see the parameter and value descriptions for this *WSG: All 5250/Hypertext Markup Language (HTML)
command, refer to the online help text. For more Workstation Gateway (WSG) server jobs are ended.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. *POP: All Post Office Protocol (POP) Version 3 server
jobs are ended.
*REXEC: All REXEC server jobs are ended.
Optional Parameter
*NSMI: All NSMI server jobs are ended.
SERVER
Specifies which of the TCP/IP application server jobs is HTTPSVR
to be ended by this command. Specifies the name of the HTTP server instance to end.
*ALL: All of the TCP/IP server jobs are ended. The SERVER parameter specified must be *HTTP or
this parameter will be ignored.
*SNMP: All jobs associated with the SNMP agent in the
QSYSWRK subsystem are ended. If multiple HTTP server instances have been defined,
you can choose to end all instances, or end one specific
*ROUTED: RouteD server job ended.
instance by specifying the instance name to be ended.
*BOOTP: The BOOTP server is ended.
*ALL: All server instances for the HTTP server that are
*TFTP: All jobs associated with TFTP are ended. currently running will be ended.
| *DNS: All jobs associated with DNS are ended. server-instance-name: The specified HTTP server
| *DHCP: All jobs associated with DHCP are ended. instance will be ended.

| *DDM: The program that listens for DDM and DRDA *ADMIN: The administration HTTP server will be ended.
| connect requests and dispatches pre-started jobs to The administration server is an instance of the HTTP
| service them is ended. server that allows administration of certain AS400 func-
tions using a web browser.
*TELNET: All TELNET server jobs are ended.

P3-362 OS/400 CL Reference - Part 2 (Full Version)


ENDTCPSVR

Examples ENDTCPSVR SERVER(\LPD)

Example 1: Ending All TCP/IP Servers This command ends the TCP/IP LPD application server jobs.

ENDTCPSVR SERVER(\ALL) Example 3: Ending a specific HTTP server instance

This command ends all active TCP/IP application server jobs ENDTCPSVR SERVER(\HTTP) HTTPSVR(http1)
running in the QSYSWRK subsystem.
This command ends the TCP/IP HTTP application server
Example 2: Ending the LPD Servers instance named 'http1'.

Chapter 2. OS/400 Command Descriptions P3-363


ENDTIESSN

ENDTIESSN (End Technical Information Exchange Session) Command


Job: B Pgm: B REXX: B Exec

55──ENDTIESSN──────────────────────────────────────────────────────────────────────────────────────────────────────────────────5%

Purpose Example
ENDTIESSN
The End Technical Information Exchange Session
(ENDTIESSN) command allows the user to disconnect the This command ends the TIE function by disconnecting the
communications line used for TIE batch commands. communications line used for TIE batch commands.
There are no parameters for this command.

P3-364 OS/400 CL Reference - Part 2 (Full Version)


ENDTRPMGR

ENDTRPMGR (End Trap Manager) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──ENDTRPMGR──────────────────────────────────────────────────────────────────────────────────────────────────────────────────5%

Purpose
The End Trap Manager (ENDTRPMGR) command allows
you to end the OS/400 SNMP Manager Framework trap
manager job.

There are no parameters for this command.

Chapter 2. OS/400 Command Descriptions P3-365


ENDUSF

ENDUSF (End Ultimedia System Facilities) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──ENDUSF─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────5%

Purpose Example
ENDUSF
The End Ultimedia System Facilities (ENDUSF) command
ends the Ultimedia Facilities server and router programs, This command ends the Ultimedia System Facilities program.
QUMBVSERVR and QUMBVROUTR, in the QSYSWRK sub-
system of the operating system.

There are no parameters for this command.

P3-366 OS/400 CL Reference - Part 2 (Full Version)


ENDWTR

ENDWTR (End Writer) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──────────────────────────────────────────────────────────5%
55──ENDWTR──WTR(──┬─\ALL────────┬──)──┬──────────────────────────┬───
├─\SYSVAL─────┤ │ ┌─\CNTRLD──┐ │
└─writer-name─┘ └─OPTION(──┼─\IMMED───┼──)─┘
└─\PAGEEND─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Optional Parameters


The End Writer (ENDWTR) command ends the specified OPTION
spooling writer and makes its associated output device avail- Specifies when the writer stops processing. Output
able to the system. The writer can be ended immediately or stops at the end of the spooled file (or copy of a file)
in a controlled manner. If it is ended immediately, the writer currently being written to an output device.
stops writing the file and the file is again available on the *CNTRLD: The job is ended in a controlled manner.
output queue. If it is ended in a controlled manner, the writer This allows the program to perform cleanup (end-of-job
finishes writing the current file (or a copy of a file), or it fin- processing).
ishes printing a page of the file, if it is a printer writer, before
Note: The spooled file that is currently being processed
it is ended.
remains on the output queue. If the printer is a
Note: To see the parameter and value descriptions for this printer writer, printing stops and a form feed is
command, refer to the online help text. For more done.
information about printing the help text, refer to
*IMMED: The operation ends immediately.
“Printing CL Command Descriptions” in Chapter 1.
*PAGEEND: The writer is stopped after processing of
the current buffer. This value is valid only if the spooling
Required Parameters writer is a printer writer.
WTR
Specifies the name of the spooling writer being ended.
Example
The writer's output device is available to the system.
ENDWTR WTR(PRINTER)
*ALL: All writers that are started are ended.
*SYSVAL: The writer started to the system default This command stops the writer named PRINTER at the end
printer is ended. of the spooled file whose output is being printed, and then
releases the device to the system.
writer-name: Specify the name of the writer being
ended.

Chapter 2. OS/400 Command Descriptions P3-367


ERASE

ERASE (Remove Link) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(1) ─'object-link-path-name'──)────
55──RMVLNK──OBJLNK(─── (P) ──────────────────────────────────────────────────────────────────────────5%

Notes:
1 You can specify a pattern for this path name.

P All parameters preceding this point can be specified in positional form.

Purpose in the last part of the path name. An asterisk (*)


This command is an alias for the Remove Link (RMVLNK) matches any number of characters and a question mark
command and can also be issued using the following alterna- (?) matches a single character. If the path name is qual-
tive command names: ified or contains a pattern, it must be enclosed in apos-
trophes.
Ÿ DEL
Ÿ RMVLNK
Example
The Remove Link (ERASE) command removes the link to
the object specified on the OBJLNK parameter. If this is the ERASE OBJLNK('PAY')
only hard link to the object, the object is removed when no
This command removes a link named PAY.
longer in use. The object can be removed even if a symbolic
link to it exists. The symbolic link remains until it is removed.
Additional Considerations
For more information about integrated file system commands,
see the Integrated File System Introduction book. If you use this command to remove links for an object that is
in QDLS or in QSYS.LIB, additional restrictions may apply.
Restrictions: To identify these restrictions, see the description of the other
1. In QOpenSys, you must have write and execute OS/400 command that can be used to delete the type of
authority to the directory containing the object. In QDLS, object you are removing.
you must have *ALL authority to the object and Ÿ For QDLS restrictions, see the DLTDLO (Delete Docu-
*CHANGE authority to the parent directory. If a hard link ment Library Object) command.
is being unlinked, you must also have object existence
authority to the object. Ÿ For QSYS.LIB restrictions, see the delete command for
the object you are removing. In general, the name of
2. You must have execute authority to each directory in the this command is formed using the OS/400 object type
path. value, from which you remove the character * and add
3. A directory cannot be unlinked. the verb DLT to the beginning. For example:
4. The restrictions listed above are for the OS/400 objects To delete an alert table, which has the object type
of the types *DDIR, *DSTMF, *SOCKET, *STMF, and value of *ALRTBL, see the description for the
*SYMLNK. DLTALRTBL (Delete Alert Table) command for any
additional restrictions.
More information about restrictions for using this command
You can use the table in the "OBJTYPE Parameter"
can be found in the “Additional Considerations” section at the
section of Appendix A to identify the object type values.
end of this command description.
Exceptions:
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more 1. The names of the delete commands for the fol-
information about printing the help text, refer to lowing objects are not formed in the general manner
“Printing CL Command Descriptions” in Chapter 1. described above, so they are supplied here for your
reference:

Required Parameter Object Type (Value) Command


Compiler unit (*MODULE) DLTMOD
OBJLNK
Specifies the path name of the object to unlink. Multiple File 1 (*FILE) DLTF
links can be removed with a name pattern. Menu description (*MENU) DLTMNU
The object path name can be either a simple name or a Server storage space (*SVRSTG)
name that is qualified with the name of the directory in DLTNWSSTG
which the object is located. A pattern can be specified

P3-368 OS/400 CL Reference - Part 2 (Full Version)


ERASE

1 See Exception 2. Remove Directory (RMVDIR or alias RMDIR or RD)


command instead.
2. In the QSYS.LIB file system, libraries and database
files cannot be deleted using the Remove Link 3. The following QSYS.LIB object types cannot be
(RMVLNK or alias DEL or ERASE) command. deleted using another OS/400 command: *EXITRG,
However, these objects can be deleted using the *IGCSRT, *JOBSCD, *PRDAVL, *QRYDFN, *RCT.

Chapter 2. OS/400 Command Descriptions P3-369


EXPORTFS

EXPORTFS (Change Network File System Export) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──EXPORTFS──┬───────────────────────────────────┬──┬────────────────────────────────────────┬─── (P) ──────────────────────────────5


│ ┌─\NONE──────────┐ │ │ ┌─\NONE───────────────────┐ │
(1) ─┴─'options-list'─┴──)─┘ └─DIR(───
└─OPTIONS(─── (1) ─┴─'directory-path-name'───
(2) ┴──)─┘

5──┬───────────────────────────────────────────────────────────────────────────────────────────────────────────┬───────────────5%
│ ┌─\DFT─────────────────────────────────────────────────────────────────────────────────────┐ │
│ │ ┌──
───────────────────────────────────────────────────────────────────────────────────┐ │ │
│ │ │ ┌─\BINARY────────┐ ┌─\ASCII──────────────┐ ┌─\SYNC──┐ │ │ │
6 (3) (4)
└─HOSTOPT(──┴───(────'host-name'────┼─\ASCII─────────┼──┼─\JOBCCSID───────────┼──┴─\ASYNC─┴─────)─┴────┴──)─┘
├─\JOBCCSID──────┤ └─path-name-code-page─┘
└─data-code-page─┘
Notes:
1 A value other than *NONE must be specified for either OPTIONS or DIR.

2 A directory path name is not allowed when '-A' is specified in the OPTIONS parameter value.

3 Write mode

4 A maximum of 10 repetitions.

P All parameters preceding this point can be specified in positional form.

EXPORTFS Command

For the description of the EXPORTFS command, see the CHGNFSEXP (Change Network File System Export) command
description.

P3-370 OS/400 CL Reference - Part 2 (Full Version)


FILDOC

FILDOC (File Document) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─┬────────────────────────────────────────────────────────┬─────────────────────────────────5
55──FILDOC──TYPE(──┬─\FILE──┬──)────
├─\IDP───┤ │ ┌─\NONE─────────────────────────────────┐ │
└─\DSTID─┘ │ │ ┌─\LIBL/────────┐ │ │
└─DOCFILE(──┴─┼───────────────┼──database-file-name─┴──)─┘
├─\CURLIB/──────┤
└─library-name/─┘
5──┬─────────────────────────────┬──┬────────────────────────────────┬──┬───────────────────────────────────────────────┬───────5
│ ┌─\FIRST──────┐ │ │ ┌─\NONE───────────┐ │ │ ┌─\NONE─────────────────────┐ │
└─DOCMBR(──┴─member-name─┴──)─┘ └─DSTID(──┴─distribution-ID─┴──)─┘ └─DSTIDEXN(───(1) ─┴─distribution-ID-extension─┴──)─┘

5──┬────────────────────┬──┬────────────────────────────────────────────────────────────────────┬───────────────────────────────5
│ ┌─\NO──┐ │ │ ┌─\NONE────────────────┐ ┌─\ENDOFDAY────────────┐ │
└─KEEP(──┼─\YES─┼──)─┘ └─DSTEXPDATE(──┼─\CURRENT─────────────┼──┴─dist-expiration-time─┴──)─┘
└─\REF─┘ └─dist-expiration-date─┘
5──┬──────────────────────────────────────┬──┬──────────────────────────────┬──┬────────────────────────────┬───────────────────5
│ ┌─\CURRENT──────────────┐ │ │ ┌─\NONE─────────┐ │ │ ┌─\NONE───────┐ │
└─USRID(──┴─user-ID──user-address─┴──)─┘ └─TODOC(──┴─document-name─┴──)─┘ └─TOFLR(──┴─folder-name─┴──)─┘
5──┬────────────────────────────────────┬──┬─────────────────────────────────┬──────────────────────────────────────────────────5
│ ┌─\NONE─────────┐ │ │ ┌─\NONE──────────────┐ │
(6) ──)─┤ │
├─SENSITIV(──┼─\PERSONAL─────┼─── │ ┌──
─────────────┐ │ │
│ ├─\PRIVATE──────┤ 6 (2)
│ └─ACC(──┴───access-code─┴────┴──)─┘
│ └─\CONFIDENTIAL─┘ │
│ ┌─\NO──┐ │
(6)
└─PERSONAL(──┴─\YES─┴─────)──────────┘
5──┬──────────────────────────────────────────────────────────────────┬──┬──────────────────────────────────┬───────────────────5
│ ┌─\NONE────────────────────────────────────────────┐ │ │ ┌─\NONE──────────────┐ │
│ │ ┌──
───────────────────────────────────────────┐ │ │ └─AUTL(──┴─authorization-list─┴──)─┘
│ │ │ ┌─\EXCLUDE─┐ │ │ │
└─USRAUT(──┴──6─(──┬─\PUBLIC───────────┬──┼─\USE─────┼──)─┴───
(2) ─┴──)─┘
└─user-profile-name─┘ ├─\CHANGE──┤
├─\ALL─────┤
└─\AUTL────┘
5──┬──────────────────────┬──┬────────────────────────────────────────────────────────┬──┬─────────────────────────────┬────────5
│ ┌─\NO──┐ │ │ ┌─\NONE─────────────────────────────────┐ │ │ ┌─\FIRST──────┐ │
(3) ───────────────────────────┼──)─┘ └─IDPMBR(──┴─member-name─┴──)─┘
└─ALWRPL(──┴─\YES─┴──)─┘ └─IDPFILE(──┼─\DOCFILE───
(4) ──────────────────────────┤
├─\DSTIDIDP───
│ ┌─\LIBL/────────┐ │
└─┼───────────────┼──database-file-name─┘
├─\CURLIB/──────┤
└─library-name/─┘
5──┬───────────────────────────────────────┬──┬───────────────────────────────┬──┬──────────────────────────────────────┬───────5
│ (5) ──────────────┐
┌─\DFT─── │ │ ┌─\DFT──────────┐ │ │ ┌─\DFT───────────────────┐ │
└─DOCTYPE(──┼─\FFT─────────────────┼──)─┘ └─SYSCOD(──┴─'system-code'─┴──)─┘ └─DOCD(──┴─'document-description'─┴──)─┘
├─\RFT─────────────────┤
└─document-type-number─┘
5──┬──────────────────────────────────────────┬──┬──────────────────────────────────┬───────────────────────────────────────────5
│ ┌─\NONE────────────────────┐ │ │ ┌─\NONE────────────┐ │
└─AUTHOR(──┼─\USRID───────────────────┼──)─┘ └─DOCCLS(──┴─'document-class'─┴──)─┘
│ ┌──
───────────────────┐ │
└──6─'document-author'─┴───
(7) ─┘

5──┬──────────────────────────────────────────┬──┬────────────────────────────────────────────┬─────────────────────────────────5
│ ┌─\NONE───────────────────────┐ │ │ ┌─\NONE─────────────────────┐ │
│ │ ┌──
──────────────────────┐ │ │ └─SUBJECT(──┼─\DOCD─────────────────────┼──)─┘
6 (7)
└─KWD(──┴───'document-parameter'─┴────┴──)─┘ │ ┌──
────────────────────┐ │
└──6─'document-subject'─┴───
(7) ─┘

5──┬─────────────────────────────────┬──┬──────────────────────────────────────────────┬────────────────────────────────────────5
│ ┌─\NONE──────────┐ │ │ ┌─\NONE──────────────────────┐ │
(8) ─┴─'filing-cabinet-reference'─┴──)─┘
└─DOCDATE(──┼─\CURRENT───────┼──)─┘ └─FILCAB(───
└─'date-written'─┘
5──┬─────────────────────────────────────────┬──┬──────────────────────────────────┬──┬──────────────────────────────┬──────────5
│ ┌─\NONE───────────────────┐ │ │ ┌─\NONE───────────┐ │ │ ┌─\NONE─────┐ │
│ │ ┌──
──────────────────┐ │ │ └─EXPDATE(──┴─expiration-date─┴──)─┘ └─REFERENCE(──┴─reference─┴──)─┘
└─CPYLST(──┴──6─'recipient-name'─┴───
(7) ─┴──)─┘

5──┬──────────────────────────────┬──┬──────────────────────────────────────┬──┬────────────────────────────────┬───────────────5
│ ┌─\NONE───────┐ │ │ ┌─\NONE────────────────┐ │ │ ┌─\NONE─────────┐ │
└─ACTDATE(──┼─\CURRENT────┼──)─┘ └─STATUS(──┴─'status-of-document'─┴──)─┘ └─CMPDATE(──┼─\CURRENT──────┼──)─┘
└─action-date─┘ └─date-complete─┘

Chapter 2. OS/400 Command Descriptions P3-371


FILDOC

5──┬──────────────────────────┬──┬────────────────────────────────────────────────────┬─────────────────────────────────────────5
│ ┌─\NONE───┐ │ │ ┌─\SYSVAL──────────────────────────┐ │
└─PROJECT(──┴─project─┴──)─┘ └─DOCCHRID(──┼─\DEVD────────────────────────────┼──)─┘
└─graphic-character-set──code-page─┘
5──┬────────────────────────────────────────┬──┬────────────────────────────────────────┬───────────────────────────────────────5
│ ┌─\JOB────────────────┐ │ │ ┌─\JOB───────────────┐ │
└─DOCLANGID(──┴─language-identifier─┴──)─┘ └─DOCCNTRYID(──┴─country-identifier─┴──)─┘
5──┬──────────────────────────────────────────────────────┬────────────────────────────────────────────────────────────────────5%
│ ┌─\SYSVAL──────────────────────────┐ │
(9) ─┼─\DEVD────────────────────────────┼──)─┘
└─CMDCHRID(───
└─graphic-character-set──code-page─┘
Notes:
1 This parameter is valid only when TYPE(*IDP) is specified.

2 A maximum of 50 repetitions

3 This value is valid only when TYPE(*FILE) is specified.

4 This value is valid only when TYPE(*DSTID) is specified.

5 If DOCFILE( database-file-name) is specified, this value cannot be specified.

6 PERSONAL and SENSITIV are mutually exclusive.

P All parameters preceding this point can be specified in positional form.

7 A maximum of 50 repetitions

8 This parameter is required when TYPE(*IDP) and IDPFILE(*NONE) are specified.

9 This parameter applies to the following parameters: DSTID, USRID, SYSCOD, DOCD, AUTHOR, DOCCLS, KWD,

SUBJECT, FILCAB, CPYLST, REFERENCE, STATUS, and PROJECT.

Purpose Required Parameters


The File Document (FILDOC) command is used to file infor- TYPE
mation from a database file, a mail item, or command param- Specifies the type of information that is filed and the
eters to a document or as an Interchange Document Profile parameters that are valid on this command. Dependent
in the document library. parameter codes for this parameter (see syntax diagram)
determine which parameters are valid. If the dependent
The database file from which the information is taken can be parameter code is listed in the syntax diagram, the
created using the Retrieve Document (RTVDOC) or Receive parameter is valid when that type is specified.
Distribution (RCVDST) commands. The user of these com-
*FILE: The database file specified in the DOCFILE and
mands typically does not have OfficeVision installed but
the DOCMBR parameter is filed.
wants to use portions of it to interface with other OfficeVision
functions. Note: If this value is specified, you must specify the
default values on the FILCAB, DSTID,
The user also uses the FILDOC command to create a hard- DSTIDEXT, and KEEP parameters and you
copy reference (details, no content) to search the library for cannot specify DOCFILE(*NONE).
the document.
*IDP: The interchange document profile (IDP) specified
Restrictions: in the IDPFILE and the IDPMBR parameter or the docu-
ment profile built from the parameters DOCD, AUTHOR,
1. You can file a document on behalf of another user if you DOCCLS, KWD, SUBJECT, REFERENCE, STATUS,
are authorized to work on behalf of the other user. You PROJECT, ACTDATE, CMPDATE, DOCDATE, FILCAB,
must be granted authority to work on behalf of another CPYLST, and EXPDATE is filed.
with the Grant User Permission (GRTUSRPMN)
command. Note: If this value is specified, you must specify the
default values on the DOCFILE, DOCMBR,
2. The user ID and address must be enrolled in the system DOCTYPE, SYSCODE, DOCCHRID, DSTID,
distribution directory. DSTIDEXT, and KEEP parameters. If this value
3. Security for the new document is taken from the param- is specified, IDPFILE and FILCAB cannot both
eters in the FILDOC command and not inherited from specify *NONE.
the folder. *DSTID: The distribution document identified by the dis-
Note: To see the parameter and value descriptions for this tribution ID specified in the DSTID parameter is filed
command, refer to the online help text. For more from the mail log into the document library.
information about printing the help text, refer to Note: If this value is specified, you cannot specify
“Printing CL Command Descriptions” in Chapter 1. DSTID(*NONE).

P3-372 OS/400 CL Reference - Part 2 (Full Version)


FILDOC

Optional Parameters DSTIDEXN


Specifies the extension of the distribution ID specified on
DOCFILE the DSTID parameter. This extension uniquely identifies
Specifies the qualified name of the database file that duplicate distributions. This extension is a 2-digit exten-
contains the document data being filed. The database sion that ranges from 01 through 99. For example, if the
file can be a user-defined file, or the file specified in the distribution ID is NEWYORK SMITH 0204 and two
OUTFILE parameter of the Receive Distribution copies of this distribution are sent to a user, then the
(RCVDST) command or the Retrieve Document user has two distributions with the same distribution ID.
(RTVDOC) command. Database files are filed as they To uniquely distinguish the two distributions, an exten-
exist without any changes. If an output file is specified, sion is added to each distribution. One distribution is
only the document data record format is read from the identified by distribution ID and extension as NEWYORK
output file, and the prefix is removed from the document SMITH 020401 and the other by NEWYORK SMITH
data. More information on defining the format of data- 020402. If there are no duplicates, the extension
base files (output files) is in the DB2 for AS/400 Data- defaults to 01. This extension will map one to one with
base Programming book. the distribution identifier specified on the DSTID param-
*NONE: A database file containing document data is eter.
not specified. *NONE: There is no duplicate distribution. This value is
The name of the database file can be qualified by one of equivalent to an extension of 01.
the following library values: distribution-ID-extension: Specify the extension that is
associated with the distribution. This is used to uniquely
*LIBL: All libraries in the job's library list are
identify duplicate distributions.
searched until the first match is found.
*CURLIB: The current library for the job is KEEP
searched. If no library is specified as the current Specifies whether to keep a copy of the distribution doc-
library for the job, the QGPL library is used. ument by filing it from the mail log, to delete it from the
mail log, or to keep a reference in the mail log of the
library-name: Specify the name of the library to be filed document.
searched.
*NO: The distribution document is deleted from the mail
database-file-name: Specify the name of the database log after the file is complete.
file that contains the document data being filed.
*YES: The distribution document is filed and a copy is
DOCMBR kept in the mail log.
Specifies the document database file member that is *REF: The distribution is deleted and a reference to the
being filed. filed distribution document is kept in the mail log.
*FIRST: The first member (in order of creation) in the
DSTEXPDATE
database file is filed.
Specifies the date and time on which the distribution is
member-name: Specify the name of the database file no longer . needed in the mail log.
being filed.
Element 1: dist-expiration-date
DSTID *NONE: No expiration date.
Specifies the unique distribution ID of the distribution.
The ID is assigned to the distribution by the system that *CURRENT: The current date is used.
originates it. Distribution IDs can be found by using the expiration-date: Specify the value to use as the expira-
Query Distribution (QRYDST) command. IDs are also tion date. The date must be specified in the format
returned from the Send Distribution (SNDDST) specified by the system value QDATFMT.
command.
Element 2: dist-expiration-time
*NONE: No distribution ID is used.
*ENDOFDAY: An expiration time is requested by the
distribution-ID: Specify a distribution ID composed of the end of the specified date. The time will be set to
second part of the sender's user ID (padded on the right 23:59:59.
with blanks to 8 characters), the first part of the sender's
expiration-time: Specify the value used as the expiration
user ID (padded on the right with blanks to 8 charac-
time.
ters), and a 4-digit zoned sequence number with the
leading zeros. For example, NEWYORK SMITH 0204. USRID
The distribution ID is entered this way because a blank Specifies the user ID and address of the user for whom
character is valid with a user ID address. the request is made. The current user of this command
The status of the distribution is changed to FILED if must have the authority to work on behalf of the speci-
KEEP(*REF) is specified and the mail log entry is fied user profile. Authority to work on behalf of another
changed to OPENED if KEEP(*YES) is specified.

Chapter 2. OS/400 Command Descriptions P3-373


FILDOC

user is granted with the Grant User Permission but is unavailable to users who are working on your
(GRTUSRPMN) command. If a user files a document behalf (even though it may be available to them when
on behalf of another user's user ID, the other user is the they are not working on your behalf). This parameter is
owner of the document. replaced by SENSITIV but the PERSONAL parameter
can still be used. However, because this parameter may
*CURRENT: The user profile that is currently running is
be removed in a later release, whenever possible use
used.
the SENSITIV parameter.
Element 1: User ID
*NO: The document is not filed as personal. This value
user-ID: Specify the user ID of the user for whom the will map to SENSITIV(*NONE).
document is filed.
*YES: The document is filed as personal. This value
Element 2: User Address will map to SENSITIV(*PRIVATE).
user-address: Specify the user address of the user for ACC
whom the document is filed.
Specifies the access codes that are used with this docu-
TODOC ment. Access codes are specified to allow groups of
Specifies the name of the newly filed document. users access to the document. Access codes must be
added on the system with the Add Access Code
*NONE: The newly filed document does not have a
(ADDACC) command.
user-defined document name and is not filed in a folder.
Up to 12 characters can be specified. This document *NONE: No access codes are assigned to this docu-
name must not exist in the folder into which the docu- ment. Authority for this document is controlled by the
ment is being filed. values specified in the AUTUSR and AUTL parameters.

document-name: Specify the name of the document that access-code: Specify the access codes, ranging from 1
is filed. through 2047, that control who can use the document.
Up to 50 access codes can be specified. Access code 0
TOFLR gives *USE authority to all users. Other access codes
Specifies the name of the folder that contains the docu- specified must exist on the system.
ment being filed. TOFLR can be specified only when
TODOC is also specified. USRAUT
Specifies the users that can access the document and
*NONE: The newly filed document does not have a
the authority each user has. This parameter is used to
user-assigned name and is not filed in another folder.
change the effect of the authorization list for this docu-
folder-name: Specify the name of the folder to contain ment by giving more users authority to the document,
the document being filed. A folder name can consist of removing a user's authority for the document, or
a series of folder names (FLR1/FLR2/and so forth) if the changing the user's authority.
document is being filed in a folder that is contained in
*NONE: No users have specific authority to access the
another folder. Up to 63 characters can be specified.
document.
SENSITIV Element 1: Users Affected by Authority Level
Specifies the level of sensitivity defined by the X.400 Change
standard. The four levels include no sensitivity, per-
*PUBLIC: The users who do not have specific authority
sonal, private and company confidential. Any document
to the document, who are not on the authorization list,
marked as private is still available to users who are
and whose users profile group does not have any spe-
normally authorized to it, but is unavailable to users who
cific authority to the document are given authority.
are working on your behalf (even though it may be avail-
able to them when they are not working on your behalf). user-profile-name: Specify the user profile names of one
or more users that are being granted authority.
*NONE: The document has no sensitivity restrictions.
Element 2: User Authority Levels
*PERSONAL: The document is intended for the user as
an individual. *EXCLUDE: The user cannot access the file document.
*PRIVATE: The document contains information that *USE: The user can perform basic operations on the file
should be accessed only by the owner. document, such as running a program or reading a file.
The user cannot change the file document. *USE
*CONFIDENTIAL: The document contains information
authority provides object operational authority, read
that should be handled according to company proce-
authority, and execute authority.
dures.
*CHANGE: The user can perform all operations on the
PERSONAL
object except those limited to the owner or controlled by
Specifies whether the document is being filed as a per-
object existence authority and object management
sonal document. Any document marked as private is
authority. The user can change and perform basic func-
still available to users who are normally authorized to it,

P3-374 OS/400 CL Reference - Part 2 (Full Version)


FILDOC

tions on the object. Change authority provides object library-name: Specify the name of the library to be
operational authority and all data authority. searched.
*ALL: All authority allows the user to perform all oper- database-file-name: Specify the name of the database
ations on the document except those limited to the file that contains the IDP information. The document
owner. In addition to the functions allowed with use profile database file can be a user-defined file or the
(*USE) and change (*CHANGE) authorities, the user can output file specified on the Receive Distribution
control the document's existence and specify the security (RCVDST) or Retrieve Document (RTVDOC) com-
for the document. The user can transfer ownership of mands. If an output file is specified, only the document
the document. profile record format is read from the output file and the
*AUTL: The authority of the authorization list specified prefix is removed from the data. If the user specifies
in the AUTL parameter is used for the document. AUTL this parameter, the remaining parameters after IDPMBR
is valid only if *PUBLIC is also specified. parameter are ignored except for the DOCCHRID and
CMDCHRID parameters. More information on defining
AUTL the format of database files (output files) is in the DB2
Specifies that the authority for the document named in for AS/400 Database Programming book.
the TODOC parameter comes from the authorization list.
IDPMBR
*NONE: An authorization list is not specified.
Specifies the interchange document file member name
authorization-list: Specify the name of the authorization that is filed. This parameter is used only when IDPFILE
list whose authority is used for the document. (database-file-name) is also specified.

ALWRPL *FIRST: The first member (in order of creation) in the


Specifies the setting to allow replacement of the docu- database file is filed.
ment content of the document being filed. If this param- member-name: Specify the name of the database file
eter is specified when filing a document that cannot be member being filed.
replaced, it is ignored. A document that cannot be
replaced cannot be changed back to a document that DOCTYPE
can be replaced. The current user of this command Specifies the type of document being filed. This identi-
must have *ALL authority to the document to request fier is used by the system to determine whether it can
this change. handle the data stream correctly.

*NO: The document content of the document being filed *DFT: The system creates the appropriate document
cannot be replaced. type identifier depending on where the data comes from.

*YES: The document content can be replaced. Document Description


Type
IDPFILE
2 Final form text document (FFTDCA)
Specifies where the document profile information is
3 5520 revisable form text document (RFT5520)
located. 4 Word processing EBCDIC (EBCDIC)
*NONE: The document profile is supplied by other 5 Word processing information file
parameters on this command. There is no database file (WRDPRCINFF)
6 Image-data subset document (IMAGE)
containing the document profile information. The
7 3730 text data stream (TEXT3730)
IDPMBR parameter is ignored if *NONE is specified. 8 DIA document library descriptor document
*DOCFILE: The database file specified for the docu- (DOCDESCDOC)
ment also contains the profile information. The 9 3732 display document data stream
(DATAST3732)
DOCMBR parameter is used for the IDPMBR if
10 DIA display document data stream
*DOCFILE is specified and the IDPMBR parameter is
(DOCUNITCTL)
ignored. 11 Revisable form text document (RFTDCA)
*DSTIDIDP: The IDP information associated with the 12 1403 compatible data stream with variable
distribution document is used. If the IDPMBR parameter length, unblocked records (PRT1403)
13 Digitized ADS audio (AUDIO)
is specified, this value is ignored.
14 IBM PC data file (PCFILE)
The name of the database file can be qualified by one of 15 Hard copy of document (HARDCOPY)
the following library values: 223 Data file
32753 List of documents created from search
*LIBL: All libraries in the job's library list are (DOCLIST)
searched until the first match is found. 32756 Version 2 DIA document, library document,
descriptor document
*CURLIB: The current library for the job is 32768 AS/400 revisable-form document (RFTAS400)
searched. If no library is specified as the current 32769 AS/400 final-form document (FFTAS400)
library for the job, the QGPL library is used. 32770 IBM DW4 revisable-form document (RFTDW4)
32912 ASCII data (ASCIIDATA)

Chapter 2. OS/400 Command Descriptions P3-375


FILDOC

Document Description only the first 44 characters are used in the document
Type name. If TYPE(*DSTID) is specified, the document
65262 IBM S/38 revisable document (RFTS38) description specified when the distribution is used.

If TYPE(*IDP) is specified, the document type is 15 'document-description': Specify the description of the
(printed document). document. Up to 44 characters can be specified.

If TYPE(*FILE) is specified and the file is an output file AUTHOR


created by the RTVDOC command, the document is Specifies the authors of the document.
taken from this file. If this file does not contain a docu- *NONE: No author is identified for the document.
ment type or if the value in this file for the document
type is 0, then an error message is sent. If the file is a *USRID: The user ID and address of the user whose
user-defined file, the document type is 223 (data file). document is being done is used as the author's name.
This can be the current user or the user ID and address
If TYPE(*DSTID) is specified, the document type is the specified in the USRID parameter.
same document type associated with the distribution.
'document-author': Specify the names of the authors.
*FFT: The document is final form text. This type of Up to 50 authors can be specified and each author
document is intended to be shown and printed and not name can have up to 20 characters.
edited by the receiver.
DOCCLS
*RFT: The document is revisable form text. This type
Specifies the class associated with this document, such
of document can be viewed, printed, and edited by the
as memo, form, or sheet.
receiver.
*NONE: No class is assigned to the document.
document-type-number: Specify a number from 2
through 65,535. The numbers from 2 through 32,767 'document-class': Specify the document class. Up to 16
are controlled by registering them with the IBM Docu- characters can be specified.
ment Interchange Architecture and are used for
KWD
IBM-defined document types. The numbers 32,768
Specifies the parameters that can be used to describe
through 65,535 are not registered with IBM and can be
the document.
used for non-IBM-defined document types. The
meaning of these document types must be determined *NONE: No parameters are defined for this document.
with the value of the SYSCOD parameter. 'document-parameter': Specify the parameters used to
SYSCOD describe the document. Up to 50 parameters can be
Specifies the text that can be used with the DOCTYPE specified and each parameter can have up to 60 charac-
parameter to help uniquely identify that type of document ters.
being filed. The receiver of the data stream can deter- SUBJECT
mine the document data stream and processing require- Specifies the subject of the document.
ments to edit, view, print, or change the document.
*NONE: No subject is defined for the document.
*DFT: The system supplies a default system code. If
the DOCTYPE value is between 1 and 32,767, the *DOCD: The document description is used as the
default IBM AS/4ðð CL is retrieved from message subject for the document.
CPX9026. The message of this text can be changed to 'document-subject': Specifies the subject of the docu-
an installation-defined default but cannot exceed 13 ment. Up to 50 subjects can be specified and each
characters. If the DOCTYPE is between 32,768 and subject can have up to 60 characters of text.
65,535, a system code must be specified.
DOCDATE
'system-code': Specify the text that helps uniquely iden- Specifies any date the user wants to assign to the docu-
tify the type of document being filed. Up to 13 charac- ment.
ters can be specified.
*NONE: No date is assigned to the document.
DOCD
*CURRENT: The current date is used.
Specifies a description for the document being filed.
This is the Document Interchange Architecture document date-written: Specify the value that is used as the docu-
name field. ment date. The date must be in the format specified by
the system value QDATFMT. A description of the pos-
*DFT: The system creates a document description for
sible date formats is in the CL Programming book.
the database files. The default is (library-name/file-
name/member-name) for database files. If TYPE(*IDP) FILCAB
is specified to file only a reference to a printed docu- Specifies the location where the document is stored.
ment, the default document name is Hardcopy Docu- This parameter is intended for printed documents. All
ment Reference and is retrieved from the message that is filed is the interchange document profile that
CPX9025. An installation may change this message but

P3-376 OS/400 CL Reference - Part 2 (Full Version)


FILDOC

refers to the printed document. This parameter is date-complete: Specify the date when the action is com-
required if TYPE(*IDP) and IDPFILE(*NONE) is speci- pleted. The date must be entered in the format specified
fied. by the system value QDATFMT.
*NONE: No filing cabinet reference is defined for this PROJECT
document. Specifies the project with which the document is associ-
'filing-cabinet-reference': Specify text that describes ated.
where the printed document is located. Up to 60 char- *NONE: No project field is included in the interchange
acters can be specified. document profile.
CPYLST project: Specify the text that describes the project of the
Specifies the names of the users who receive this docu- document. Up to 10 characters can be specified.
ment.
DOCCHRID
*NONE: No copy list is included for this document. Specifies the character identifier (graphic character set
'recipient-name': Specify the names of the users who and code page) for the data being filed. The character
receive the document. Up to 50 names can be specified identifier is related to the display device that was used to
and each name can have up to 60 characters. create the data being filed. More information about
character identifier processing is in the DB2 for AS/400
EXPDATE Database Programming book.
Specifies the date on which the document is no longer
*SYSVAL: The system determines the graphic char-
needed.
acter set and code page values for the command param-
*NONE: No expiration date is specified. eters from the QCHRID system values.
expiration-date: Specify an expiration date. The date *DEVD: The system determines the graphic character
must be entered in the format specified by the system set and code page values for the command parameter
value QDATFMT. from the display device description where the command
is entered. This option is valid only when specified from
REFERENCE
an interactive job. If this value is specified in an interac-
Specifies a reference associated with the document.
tive CL program or a batch job, an error message is
*NONE: No reference field is included in the inter- sent.
change document profile.
Element 1: Character Set
reference: Specify the text that describes the reference
associated with the document. Up to 60 characters can
graphic-character-set: Specify the graphic character set
values used to create the data being filed.
be used.
Element 2: Code Page
ACTDATE
Specifies the date when the requested action is due. code-page: Specify the code page value used to create
the command parameters. Valid values range from 1
*NONE: No due date is specified.
through 999.
*CURRENT: The current date is used.
DOCLANGID
action-date: Specify the value that is used as the action Specifies the language identifier being placed in this
due date. The date must be entered in the format speci- document's interchange document profile (IDP). This
fied by the system value QDATFMT. parameter is ignored if the IDPFILE parameter is speci-
fied.
STATUS
Specifies the user-defined status (In Process, Pending *JOB: The language identifier specified for the job in
Approval, or Retired). which this command is entered is used.
*NONE: No status is included in the interchange docu- language-identifier: Specify the language identifier.
ment profile. More information on valid language identifiers is in the
'status-of-document': Specify text that describes the National Language Support book.
status of the document. Up to 20 characters can be DOCCNTRYID
specified. Specifies the country identifier being placed in this docu-
ment's interchange document profile (IDP). This param-
CMPDATE
eter is ignored if the IDPFILE parameter is specified.
Specifies the date when the requested action is com-
pleted. *JOB: The country identifier specified for the job in
which this command is entered is used.
*NONE: No completion date is included.
*CURRENT: The current date is used.
country-identifier: Specify an ISO 3166 Alpha-2 code
from the country code table. More information on this

Chapter 2. OS/400 Command Descriptions P3-377


FILDOC

parameter is in Appendix A, “Expanded Parameter SNA Distribution Services book contains the
Descriptions.” character set and code page table for '930 500'.

CMDCHRID *SYSVAL: The system determines the graphic char-


Specifies the character identifier (graphic character set acter set and code page values for the command param-
and code page) for data being specified as parameter eters from the QCHRID system values.
values on this command. This character identifier *DEVD: The system determines the graphic character
(CHRID) is related to the display device used to specify set and code page values for the command parameter
the command. More information about CHRID pro- from the display device description where the command
cessing is in the Application Display Programming book. is entered. This option is valid only when specified from
Note: The CMDCHRID parameter applies to the fol- an interactive job. If this value is specified in an interac-
lowing parameters and means that the character tive CL program or a batch job, an error message is
set and code page are stored with the fields to sent.
allow the display station that accesses the docu- Element 1: Character Set
ment to correctly print or display the fields. The
fields are translated to a common character set
graphic-character-set: Specify the graphic character set
values used to create the command parameter.
and code page when the fields are written to the
search database. This value translates the fol- Element 2: Code Page
lowing parameters to character set and code
code-page: Specify the code page. Valid values range
page of '697 500'. USRID and DSTID parameter
from 1 through 9999.
values are in character set 930 and code page
500.
The following fields are translated:
Examples
USRID Example 1: Filing a Personal Document
DSTID FILDOC TYPE(\FILE) DOCFILE(MARYLIB/MARYFILE)
SYSCOD SENSITIV(\PRIVATE) IDPFILE(\DOCFILE)
DOCD
AUTHOR This command files a private document using a database file
DOCCLS that has the document content and document profile informa-
KWD tion. The default for the distribution ID extension is 01
SUBJECT (DSTID(01)).
FILCAB
Example 2: Filing a Distribution Document
CPYLST
REFERENCE FILDOC TYPE(\DSTID) DSTID('NEWYORK SMITH ð2ð1')
STATUS DSTID(ð2) DOCCLS('NEW CLASS') TODOC(DSTð2ð1)
PROJECT TOFLR(FLRDST)

This value translates the USRID parameter to This command files a distribution document in the document
character set and code page of '930 500'. The library QDOC in document DST0201 and folder FLRDST.
The document class is changed in the distribution document,
and the second distribution that was sent to the user is filed.

P3-378 OS/400 CL Reference - Part 2 (Full Version)


GENCAT

GENCAT (Merge Message Catalog) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌──
─────────────────────────┐
55──GENCAT──CLGFILE(──'catalog-file-path-name'──)──SRCFILE(───6─'source-file-path-name'─┴───
(1) ──)────
(P) ──────────────────────────────5

5──┬───────────────────────────────────────┬──)──┬───────────────────────────────────────┬──)───────────────────────────────────5
│ ┌─\SRCCCSID──────────────┐ │ │ ┌─\SRCFILE───────────────┐ │
└─CLGCCSID(──┼─\JOB───────────────────┼─┘ └─SRCCCSID(──┼─\JOB───────────────────┼─┘
└─coded-character-set-ID─┘ └─coded-character-set-ID─┘
5──┬─────────────────────────────┬──┬─────────────────────────────────────────┬──┬─────────────────────────────────┬───────────5%
│ ┌─\BLANK────────┐ │ │ ┌─\INDIR──────────────────┐ │ │ ┌─\INDIR─────────────┐ │
└─TEXT(──┴─'description'─┴──)─┘ └─DTAAUT(──┼─\RWX────────────────────┼──)─┘ └─OBJAUT(──┼─\NONE──────────────┼─┘
├─\RW─────────────────────┤ ├─\ALL───────────────┤
├─\RX─────────────────────┤ │ ┌──
─────────────┐ │
├─\WX─────────────────────┤ └──6┬─\OBJEXIST─┬┴───
(2) ─┘
├─\R──────────────────────┤ ├─\OBJMGT───┤
├─\W──────────────────────┤ ├─\OBJALTER─┤
├─\X──────────────────────┤ └─\OBJREF───┘
├─\EXCLUDE────────────────┤
├─\NONE───────────────────┤
└─authorization-list-name─┘
Notes:
1 A maximum of 300 repetitions.

P All parameters preceding this point can be specified in positional form.

2 A maximum of 4 repetitions.

GENCAT Command

For the description of the GENCAT command, see the MRGMSGCLG (Merge Message Catalog) command description.

Chapter 2. OS/400 Command Descriptions P3-379


GO

GO (Go to Menu) Command


Job: I Pgm: I REXX: I Exec

┌─\LIBL/────────┐
(P) ───────────────────────────────────────5%
55──GO──MENU(──┼───────────────┼──┬─\ALL───────────────┬──)──┬──────────────────────┬───
├─\CURLIB/──────┤ ├─menu-name──────────┤ │ ┌─\YES─┐ │
├─\USRLIBL/─────┤ └─generic\-menu-name─┘ └─RTNPNT(──┴─\NO──┴──)─┘
├─\ALL/─────────┤
├─\ALLUSR/──────┤
└─library-name/─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose MENU
Specifies the qualified name of the menu being run.
The Go to Menu (GO) command allows the user to specify
The name of the menu can be qualified by one of the
either a particular menu or a generic menu name. The user
following library values:
may optionally specify whether or not to return to the menu
or display from which the command is entered after running *LIBL: All libraries in the job's library list are
the menu specified by the GO command. searched until the first match is found.

Using the Previous and Exit Keys *CURLIB: The current library for the job is
searched. If no library is specified as the current
A menu is placed on an internal menu stack before it is run. library for the job, the QGPL library is used.
If a stack is not available for the menu, one is created. *USRLIBL: Only the libraries in the user portion of
When the Cancel key is pressed for a menu, the previous the job's library list are searched.
menu in the stack is shown. Each menu stack is ten ele-
ments (menus) deep. When the eleventh menu is placed on *ALL: All libraries in the system, including QSYS,
the menu stack, the first, or oldest, menu is removed from are searched.
the stack. This menu cannot be returned to by using the *ALLUSR: All user libraries are searched. All
Cancel key. libraries with names that do not begin with the letter
Q are searched except for the following:
Pressing the Exit key returns the user to the last display or
#CGULIB #DFULIB #RPGLIB #SEULIB
menu from which a GO command was entered with
#COBLIB #DSULIB #SDALIB
RTNPNT(*YES). (Note that *YES is the default value for the
optional RTNPNT parameter.) The display that the user is Although the following Qxxx libraries are provided
returned to is found by removing menus from the menu stack by IBM, they typically contain user data that
until a return point is found. This process may also cause a changes frequently. Therefore, these libraries are
program in the call stack to return to its calling program considered user libraries and are also searched:
unless the program is a return point. | QDSNX QPFRDATA QUSRBRM QUSRSYS
| QGPL QRCL QUSRIJS QUSRVxRxMx
Pressing either the Exit or Cancel key while viewing help for | QGPL38 QS36F QUSRINFSKR
a menu returns the user to the menu. | QMQMDATA QUSER38 QUSRNOTES
| QMQMPROC QUSRADSM QUSRRDARS
Restrictions:
Note: A different library name, of the form
1. The user must have *USE authority for the menu and its QUSRVxRxMx, can be created by the user
display and message files or program (whichever for each release that IBM supports. VxRxMx
applies) to use this command. is the version, release, and modification level
2. The user must also have *USE authority for the library of the library.
where the menu is located. library-name: Specify the name of the library to be
Note: To see the parameter and value descriptions for this searched.
command, refer to the online help text. For more
*ALL: A list of all menus in the given library are pre-
information about printing the help text, refer to
sented to allow the selection of the menu to be run.
“Printing CL Command Descriptions” in Chapter 1.
menu-name: Specify the name of the menu being run.

Required Parameter generic*-menu-name: Specify the generic name of the


menu. A generic name is a character string of one or
more characters followed by an asterisk (*); for example,

P3-380 OS/400 CL Reference - Part 2 (Full Version)


GO

ABC*. The asterisk substitutes for any valid characters. *YES: The display where the command is entered is
A generic name specifies all objects with names that shown when the Exit key is pressed.
begin with the generic prefix for which the user has
*NO: The display where the command is entered is not
authority. If an asterisk is not included with the generic
shown when the Exit key is pressed.
(prefix) name, the system assumes it to be the complete
object name. If the complete object name is specified,
and multiple libraries are searched, multiple objects can Example
be specified only if *ALL or *ALLUSR library values can GO MENU(PERSMENU)
be specified for the name. For more information on the
use of generic names, refer to “Generic Object Names” This command runs a menu called PERSMENU, located in a
in Chapter 2. library found by searching the library list (*LIBL default
value).

Optional Parameter If the Exit key is pressed while PERSMENU is being shown,
the display where the GO command was entered (*YES
RTNPNT default value on the RTNPNT parameter) is shown.
Specifies whether the display where the command is
entered is returned to when the Exit key is pressed.

Chapter 2. OS/400 Command Descriptions P3-381


GOTO

GOTO (Go To) Command


Pgm: B,I

(1) ─command-label──)────
55──GOTO──CMDLBL(─── (P) ──────────────────────────────────────────────────────────────────────────────────────5%

Notes:
1 A variable cannot be coded on this parameter.

P All parameters preceding this point can be specified in positional form.

Purpose cessed. The command with the label is then processed.


If the specified command cannot be run (for example, if
The Go To (GOTO) command is used in CL programs for it is a DCL command), control is transferred to the next
branching from one part of the program to another. The command following the command with the specified
branching is to the label on another command that is speci- label. The label must be within the same program as
fied on the GOTO command. Branching can be either the GOTO command. A CL variable name cannot be
forward or backward, but the specified label must be inside used to specify the label name.
the program.

Restriction: This command is valid only within a CL Example


program. LOOP: CHGVAR &A (&A + 1)
Note: To see the parameter and value descriptions for this IF (&A \LT 3ð) THEN(GOTO LOOP)
command, refer to the online help text. For more
The Change Variable (CHGVAR) command increases the
information about printing the help text, refer to
value of &A by 1 until &A is equal to or greater than 30. The
“Printing CL Command Descriptions” in Chapter 1.
GOTO command is processed each time that the IF
command tests the expression and the result is true; the
Required Parameters GOTO command following the THEN parameter causes the
program to branch back to the label LOOP on the CHGVAR
CMDLBL command. Refer to the descriptions of the CHGVAR
Specifies the label name of the command to which command and the IF command for additional explanations of
control is transferred when the GOTO command is pro- their functions.

P3-382 OS/400 CL Reference - Part 2 (Full Version)


GRTACCAUT

GRTACCAUT (Grant Access Code Authority) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌──
───────────────────┐
55──GRTACCAUT─── 6─user-profile-name─┴───
(2) ─ACC(──┬─\REFUSER───────────┬──)──USER(─── (1) ──)────
(P) ────────────────────────────────────────5
│ ┌──
─────────────┐ │
6 (1) ─┘
└───access-code─┴───
5──┬────────────────────────────────────────────┬──────────────────────────────────────────────────────────────────────────────5%
│ ┌─\NONE───────────────────┐ │
(3) ─┴─based-on-user-profile───
└─REFUSER(─── (4) ┴──)─┘

Notes:
1 A maximum of 300 repetitions

2 The requester must have *ALLOBJ authority to use this command.

P All parameters preceding this point can be specified in positional form.

3 REFUSER is required if ACC(*REFUSER) is used.

4 The based-on-user-profile must have authority to at least one access code.

Purpose *REFUSER: The access code authority granted is


based on a second user profile name; that name must
The Grant Access Code Authority (GRTACCAUT) command be specified on the REFUSER parameter.
gives the specified users authority to access documents and
access-code: Specify a number, ranging from 1 through
folders associated with the access codes. Access is
2047, that specifies the access code of the documents
restricted to read only (*USE authority).
and folders for which the user wants authority to be
Restrictions: granted. The access code must be defined to the
system using the ADDACC command before being spec-
1. This command is shipped with public *EXCLUDE ified in this parameter. Up to 300 access codes can be
authority. specified.
2. The access code must be defined to the system (by
USER
using the Add Access Code (ADDACC) command)
Specifies the user profile name of the users to whom
before the user can give access code authority.
access code authority is granted. The user identified
3. The user being given access code authority must be has the access code added to the list of access codes to
enrolled in the system distribution directory. which the user is authorized; this access code is used to
Note: When a new user profile is created based on an verify additional document and folder accesses from the
existing user profile, the access codes (if any) associ- document library. The user must be enrolled in the
ated with the user do not carry over to the new user. system distribution directory before being granted
The GRTACCAUT command must be used for the authority to use an access code. Specify the name of
new user profile; however, the REFUSER parameter the user profile. Up to 300 can be specified.
can be specified on this command to get all the
codes of the user who is being based on. Optional Parameters
Authority for this command is originally restricted to REFUSER
the security officer. Authority to use this command Specifies the user referred to, which is the user profile
can be granted to other users with the Grant Object on which to base the access code authority. If this
Authority (GRTOBJAUT) command. parameter is used, *REFUSER must be specified on the
Note: To see the parameter and value descriptions for this ACC parameter. The *REFUSER's access code
command, refer to the online help text. For more authority is added to the existing access code authority
information about printing the help text, refer to specified on the USER parameter. All access code
“Printing CL Command Descriptions” in Chapter 1. authority of the *REFUSER is copied except for the
access code authority the *REFUSER's group profile
may have.
Required Parameters *NONE: No user is referred to.
ACC based-on-user-profile: Specify the user-profile name on
Specifies the access code that is being authorized for which the access code authority is based. This user
use by the user identified on the USER parameter. must also be enrolled in the system distribution directory.

Chapter 2. OS/400 Command Descriptions P3-383


GRTACCAUT

Examples GRTACCAUT ACC(\REFUSER) USER(JOE) REFUSER(TOM)

Example 1: Granting Authority to Multiple Users This command grants access code authority to JOE based
on TOM's authority. For example, if JOE currently has
GRTACCAUT ACC(3 3ð 6ð) USER(SAM LARRY)
authority to access codes 1, 12, and 50, and TOM currently
This command gives authority to access codes 3, 30, and 60 has authority to access codes 8 and 9, the GRTACCAUT
to SAM and LARRY. command authorizes JOE to access codes 1, 8, 9, 12, and
50.
Example 2: Granting Authority Based on Another User

P3-384 OS/400 CL Reference - Part 2 (Full Version)


GRTOBJAUT

GRTOBJAUT (Grant Object Authority) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(1, 2) ─┬─\ALL───
55──GRTOBJAUT──OBJ(──┼───────────────┼──┬─\ALL─────────────────┬──)──OBJTYPE(───── (3) ─────┬──)───────────────────────────5
├─\CURLIB/──────┤ ├─object-name──────────┤ └─object-type─┘
├─\USRLIBL/─────┤ └─generic\-object-name─┘
├─\ALL/─────────┤
├─\ALLUSR/──────┤
└─library-name/─┘
(4) ─┬─\PUBLIC──────────────────┬──)──┬─────────────────────────────────────┬─┬───
5──┬─USER(─── (P) ──┬───────────────────────┬───
(8) ──────5%
│ │ ┌──
───────────────────┐ │ │ ┌─\CHANGE──────────────┐ │ │ │ ┌─\NO──┐ │
│ └──6─user-profile-name─┴───
(5) ─┘ (6) ─┼─\ALL─────────────────┼──)─┘ │
└─AUT(─── └─REPLACE(──┴─\YES─┴──)─┘
│ ├─\USE─────────────────┤ │
│ ├─\EXCLUDE─────────────┤ │
│ ├─\AUTL────────────────┤ │
│ │ ┌──
───────────────┐ │ │
│ 6 (7)
└───┬─\OBJALTER─┬─┴────┘ │
│ ├─\OBJEXIST─┤ │
│ ├─\OBJMGT───┤ │
│ ├─\OBJOPR───┤ │
│ ├─\OBJREF───┤ │
│ ├─\ADD──────┤ │
│ ├─\DLT──────┤ │
│ ├─\EXECUTE──┤ │
│ ├─\READ─────┤ │
│ └─\UPD──────┘ │
├─AUTL(──authorization-list-name──)─────────────────────────────────────────────────┤
│ ┌─\LIBL/────────┐ │
└─REFOBJ(──┼─\CURLIB/──────┼──object-name──)──┬───────────────────────────────────┬─┘
└─library-name/─┘ │ ┌─\OBJTYPE──────┐ │
└─REFOBJTYPE(──┴─object-type─── (1) ┴──)─┘

Notes:
1 A list of the valid OS/400 object types for this command is in Appendix A.

2 OBJTYPE(*ALL) is not valid if REFOBJTYPE(*OBJTYPE) is specified.

3 OBJTYPE(*ALL) is not valid if one of the following library names is specified: *LIBL, *USRLIBL, *ALL, *ALLUSR.

4 Positional order is USER, AUT, AUTL, REFOBJ, REFOBJTYPE. Only one of USER, AUTL, or REFOBJ can be specified.

5 A maximum of 50 repetitions

6 AUT(*AUTL) is valid only if USER(*PUBLIC) is specified. It is not valid if the object type is *USRPRF.

7 A maximum of 10 repetitions. Each can be used only once.

8 REPLACE is valid only if USER is specified. It is not valid with the AUTL or REFOBJ parameter.

P All parameters preceding this point can be specified in positional form.

Purpose If AUT(*AUTL) is specified, the PUBLIC authority for the


object comes from the PUBLIC authority of the authorization
The Grant Object Authority (GRTOBJAUT) command is used list securing the object.
by one user to grant specific authority for the object named
in this command to another user or group of users. The AUTL parameter is used to secure an object with an
authorization list. User profiles cannot be secured by an
Authority can be given to: authorization list (*AUTL).
Ÿ Named users
This command can be used by an object's owner or by a
Ÿ Users (*PUBLIC) who do not have authority specifically user with object management authority for the specified
given to them either for the object or for the authori- object. A user with object management authority can grant
zation list to other users any authority that user has, except object
Ÿ Users of the referenced object (specified in the REFOBJ management authority. Only the owner of the object, or
parameter) someone with all object special authority (*ALLOBJ), can
grant object management authority to a user.
Ÿ Users on an established authorization list
A user with *ALL authority can assign a new authorization
The AUTL parameter specifies the name of the authorization list.
list whose members are given authority for the object speci-
fied in the OBJ parameter.

Chapter 2. OS/400 Command Descriptions P3-385


GRTOBJAUT

When granting authority to users, the REPLACE parameter *CURLIB: The current library for the job is
indicates whether the authorities you specify replace the searched. If no library is specified as the current
user's existing authorities. The default value of library for the job, the QGPL library is used.
REPLACE(*NO) gives the authority that you specify, but it
*USRLIBL: Only the libraries in the user portion of
does not remove any authority that is greater than you speci-
the job's library list are searched.
fied, unless you are granting *EXCLUDE authority.
REPLACE(*YES) removes the user's current authorities, then *ALL: All libraries on the system are searched.
grants the authority that you specify. *ALLUSR: All user libraries are searched. All
libraries with names that do not begin with the letter
When granting authority with a reference object, this
Q are searched except for the following:
command gives the authority that you specify, but it does not
remove any authority that is greater than you specified, #CGULIB #DFULIB #RPGLIB #SEULIB
unless you are granting *EXCLUDE authority. #COBLIB #DSULIB #SDALIB
Although the following Qxxx libraries are provided
Restrictions: by IBM, they typically contain user data that
1. This command must get an exclusive lock on a database changes frequently. Therefore, these libraries are
file before read or object operational authority can be considered user libraries and are also searched:
given to a user. | QDSNX QPFRDATA QUSRBRM QUSRSYS
2. If a user requests authority for another specified user to | QGPL QRCL QUSRIJS QUSRVxRxMx
| QGPL38 QS36F QUSRINFSKR
a device currently in use by another authorized user,
| QMQMDATA QUSER38 QUSRNOTES
authority to the device is not given.
| QMQMPROC QUSRADSM QUSRRDARS
3. Object type *AUTL cannot be specified.
Note: A different library name, of the form
4. AUT(*AUTL) is valid only with USER(*PUBLIC). QUSRVxRxMx, can be created by the user
5. A user must either be the owner of the object or have for each release that IBM supports. VxRxMx
*ALL authority to use the AUTL parameter. is the version, release, and modification level
of the library.
6. The user must have object management authority to the
object. library-name: Specify the name of the library to be
searched.
7. If the object is a file, the user must have object opera-
tional and object management authorities. *ALL: All objects of the specified type (OBJTYPE)
found in the search have specific authorities granted. A
8. For display stations or for work station message queues
specific library name must be specified.
associated with the display station, if this command is
not entered at the device for which authorities are being object-name: Specify the name of the object for which
granted, it should be preceded by the Allocate Object specific authorities are given to one or more users.
(ALCOBJ) command and followed by the Deallocate generic*-object-name: Specify the generic name of the
Object (DLCOBJ) command. object. A generic name is a character string of one or
Note: To see the parameter and value descriptions for this more characters followed by an asterisk (*); for example,
command, refer to the online help text. For more ABC*. The asterisk substitutes for any valid characters.
information about printing the help text, refer to A generic name specifies all objects with names that
“Printing CL Command Descriptions” in Chapter 1. begin with the generic prefix for which the user has
authority. If an asterisk is not included with the generic
(prefix) name, the system assumes it to be the complete
Required Parameters object name. If the complete object name is specified,
OBJ and multiple libraries are searched, multiple objects can
Specifies the qualified name of the objects for which be granted only if *ALL or *ALLUSR library values can
specific authorities are given to one or more users or to be specified for the name. For more information on the
an authorization list. A specific object name or a generic use of generic names, refer to “Generic Object Names”
object name can be qualified by a library name. More in Chapter 2.
information on this parameter is in Appendix A, OBJTYPE
“Expanded Parameter Descriptions.” Specifies the object type of the object for which specific
The name of the object can be qualified by one of the authorities are given to the specified users or to an
following library values: authorization list. More information on this parameter is
in Appendix A, “Expanded Parameter Descriptions.”
*LIBL: All libraries in the job's library list are
searched until the first match is found. *ALL: Specific authorities for all object types (except
*AUTL) are given to the specified users or to the authori-
zation list.

P3-386 OS/400 CL Reference - Part 2 (Full Version)


GRTOBJAUT

object-type: Specify the specific object type of the object *CHANGE: The user can perform all operations on the
for which specific authorities are given to the specified object except those limited to the owner or controlled by
users. object existence authority and object management
authority. The user can change and perform basic func-
USER
tions on the object. Change authority provides object
Specifies the user names of one or more users to whom
operational authority and all data authority.
authorities for the named object are being given. If user
names are specified, the authorities are given specif- *ALL: The user can perform all operations except those
ically to those users. Authority given by this command limited to the owner or controlled by authorization list
can be revoked specifically by the Revoke Object management authority. The user can control the object's
Authority (RVKOBJAUT) command. existence, specify the security for the object, change the
object, and perform basic functions on the object. The
*PUBLIC: Users are authorized to use the object as
user also can change ownership of the object.
specified in the AUT parameter when they do not have
authority specifically given to them for the object, are not *USE: The user can perform basic operations on the
on the authorization list or one of their groups does not object, such as run a program or display the contents of
have any authority or is not on the authorization list. a file. The user is prevented from changing the object.
Users who do not have any authority, or whose groups Use authority provides object operational authority, read
are not on the authorization list, are authorized to use authority, and execute authority.
the object as specified in the AUT parameter. *EXCLUDE: The user cannot access the object.
user-profile-name: Specify the user names of one or *AUTL: The public authority of the authorization list
more users who have specific authority for the object. specified in the AUTL parameter is used for the public
Up to 50 user profile names can be specified. authority for the object.
AUTL A maximum of ten of the following values can be speci-
Specifies the name of the authorization list whose users fied:
are given authority for the object specified in the OBJ
*OBJALTER: Object alter authority provides the
parameter.
authority needed to alter the attributes of an object. If
REFOBJ the user has this authority on a database file, the user
Specifies the name of the object being queried to obtain can add and remove triggers, add and remove referen-
authorization information. Those authorizations are tial and unique constraints, and change the attributes of
given to the object specified by the OBJ parameter. the database file. If the user has this authority on an
Users authorized to the referenced object are authorized SQL package, the user can change the attributes of the
in the same manner to the object for which authority is SQL package. This authority is currently only used for
being given. If the referenced object is secured by an database files and SQL packages.
authorization list, that authorization list secures the *OBJEXIST: Object existence authority provides the
object specified in the OBJ parameter. Specify the authority to control the object's existence and ownership.
name of the object. This authority is necessary for users who want to delete
The name of the save file can be qualified by one of the the object, free storage of the object, perform save and
following library values: restore operations for the object or transfer ownership of
an object. (If a user has special save system authority
*LIBL: All libraries in the job's library list are (*SAVSYS), object existence authority is not required.)
searched until the first match is found. Object existence authority is required to create an object
*CURLIB: The current library for the job is that has been named by an authority holder.
searched. If no library is specified as the current *OBJMGT: Object management authority provides the
library for the job, the QGPL library is used. authority to specify the security for the object, move or
library-name: Specify the name of the library to be rename the object, and add members to database files.
searched. *OBJOPR: Object operational authority provides
authority to look at the description of an object and use
the object as determined by the data authorities that the
Optional Parameters user has to the object.
AUT *OBJREF: Object reference authority provides the
Specifies the authority given to users specified on the authority needed to reference an object from another
USER parameter. Users must have *AUTLMGT object such that operations on that object may be
authority to manage the authorization list. More informa- restricted by the other object. If the user has this
tion on this parameter is in Appendix A, “Expanded authority on a physical file, the user can add referential
Parameter Descriptions.” constraints in which the physical file is the parent. This
authority is currently only used for database files.

Chapter 2. OS/400 Command Descriptions P3-387


GRTOBJAUT

*ADD: Add authority provides the authority to add Example 3: Granting Authority to Users on Authori-
entries to an object (for example, job entries to a queue zation List
or records to a file). GRTOBJAUT OBJ(MYLIB/PRGM3) OBJTYPE(\PGM)
*DLT: Delete authority allows the user to remove AUTL(KLIST)
entries from an object, for example, remove messages
from a message queue or records from a file. This command gives to users the authority specified for them
on authorization list KLIST for the object named PRGM3.
*EXECUTE: Execute authority provides the authority The object is a program located in library MYLIB.
needed to run a program or locate an object in a library.
*READ: Read authority provides the authority needed to
get the contents of an entry in an object.
*UPD: Update authority provides the authority needed
to change the entries in an object.

REFOBJTYPE
Specifies the object type of the referenced object
(REFOBJ parameter).
*OBJTYPE: The object type of the referenced object is
the same type as the object being given authority
(OBJTYPE parameter).
object-type: Specify the type of the object. Any one of
the operating system object types can be specified.

REPLACE
Specifies whether the authorities replace the user's
current authorities.
*NO: The authorities are given to the user, but no
authorities are removed, unless you are granting
*EXCLUDE authority.
*YES: The user's current authorities are removed, then
the authorities are given to the user.

Examples
Example 1: Granting Authority to All Users
GRTOBJAUT OBJ(USERLIB/PROGRAM1) OBJTYPE(\PGM)
USER(\PUBLIC)

This command gives authority to use the object named


PROGRAM1 to all users of the system who do not have
authorities specifically given to them, who are not on an
authorization list, whose user groups do not have authority to
the object, or whose user groups are not on the authorization
list. The object is a program (*PGM) located in the library
named USERLIB. Because the AUT parameter is not speci-
fied, the authority given to all users is change authority. This
allows all users to run the program and to debug it.

Example 2: Granting Object Management Authority


GRTOBJAUT OBJ(ARLIB/PROGRAM2) OBJTYPE(\PGM)
USER(TMSMITH) AUT(\OBJMGT)

This command gives object management authority to user


named TMSMITH. This authority allows TMSMITH to grant
to others personally possessed authorities for the object
named PROGRAM2, which is a program located in the
library named ARLIB.

P3-388 OS/400 CL Reference - Part 2 (Full Version)


GRTUSRAUT

GRTUSRAUT (Grant User Authority) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─────────────────────────────────────────────────────────────────5%
55──GRTUSRAUT──USER(──user-name──)──REFUSER(──user-name──)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose QAUTPROF QNETSPFL


QDBSHR QNFSANON
The Grant User Authority (GRTUSRAUT) command grants QDFTOWN QRJE
authority to a user by referring to another user profile. QDOC QSNADS
Authorization lists or group profiles should be used instead of QDSNX QSPL
GRTUSRAUT command support if possible. The QGATE QSYS
QLPAUTO QTSTRQS
GRTUSRAUT command can take a long time to run, and the
QLPINSTALL QTCP
time to run a subsequent SAVSYS or SAVSECDTA QMSF
command also increases. The authority granted to the user
depends on the user profile being referred to and the user Note: To see the parameter and value descriptions for this
using the command. command, refer to the online help text. For more
information about printing the help text, refer to
If the security officer enters this command, the user specified “Printing CL Command Descriptions” in Chapter 1.
in the USER parameter is granted the same authority for
each object as granted in the user profile being referred to,
including object management authority.
Required Parameters
USER
If the user whose user profile is specified for the REFUSER Specifies the name of the user profile to which authority
parameter enters this command, the user specified for the is being granted.
USER parameter is given all authorities for each object
owned by the referenced profile, including object manage- REFUSER
ment authority. Specifies the name of the user profile being referred to
for authority.
For objects that the user profile being referred to does not
own but is authorized to use, the user of this command must
have object management authority and the authorities being Examples
granted for the object, or must own the object. Otherwise,
Example 1
no authority is granted for that object. Object management
authority is not granted unless the user of this command User SECOFR is entering this command:
owns the object being authorized.
GRTUSRAUT USER(USRB) REFUSER(USRA)
Ownership of an object or authorities held by the referred to
user cannot be changed by this command. Authorities to This command grants the user profile USRB the same
objects granted to a user profile are added to any authorities authorities that USRA has for all objects that USRA owns
that the user profile already has. (including object management authority) or has authority to.

Restriction: The following user profiles cannot be specified Example 2


for either of the parameters on this command:
User USRA is entering this command:
GRTUSRAUT USER(USRB) REFUSER(USRC)

This command grants the user profile USRB the same


authorities that USRC has for all objects that USRC has
authorities to only if USRA, entering this command, has
object management authority to the objects or is the owner of
the objects being referred to.

Chapter 2. OS/400 Command Descriptions P3-389


GRTUSRPMN

GRTUSRPMN (Grant User Permission) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──GRTUSRPMN──TOUSER(──user-profile-name──)──┬───────────────────────────────────────────┬─── (P) ─────────────────────────────────5%


│ ┌─\CURRENT─────────────────┐ │
│ │ ┌──
───────────────────┐ │ │
└─FORUSER(──┴──6─user-profile-name─┴───
(1) ─┴──)─┘

Notes:
1 A maximum of 300 repetitions

P All parameters preceding this point can be specified in positional form.

Purpose TOUSER
Specifies the name of the user profile that is permitted to
The Grant User Permission (GRTUSRPMN) command gives work on behalf of the user specified in the FORUSER
permission to a user to handle documents and folders or to parameter. Access is restricted to objects that are not
perform tasks on behalf of another user. Access is restricted personal. The user profile must exist at the time the
to documents, folders, and mail that is not personal. For command is run, and the user must be enrolled in the
example, user A gives user B the ability to work on behalf of system distribution directory before running the
user A. User B is now allowed to obtain, file, delete, retrieve, command.
list, distribute, cancel, and search a document library on
behalf of user A; however, user B is not allowed to obtain
any of user A's personal mail or get any of user A's private Optional Parameters
documents or folders from the library. FORUSER
Specifies the name of the user profile that the user spec-
The users specified must be enrolled in the system distribu-
ified in the TOUSER parameter works on behalf of. The
tion directory before using this command. To enroll a user,
user must be enrolled in the system distribution directory
use the Work with Directory Entries (WRKDIRE) command.
before running the command.
Restriction: The user must have *ALLOBJ authority to grant *CURRENT: The user profile that is currently running is
permission for a user to work on behalf of another user. used.

Additional information on giving document authority is in the user-profile-name: Specify the name of the user profile.
SNA Distribution Services book.
Note: To see the parameter and value descriptions for this Example
command, refer to the online help text. For more GRTUSRPMN TOUSER(JUDY) FORUSER(PEGGY)
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. JUDY is the administrative assistant for an executive. This
command allows JUDY to work with documents or folders for
PEGGY that are not personal.
Required Parameters

P3-390 OS/400 CL Reference - Part 2 (Full Version)


GRTWSOAUT

GRTWSOAUT (Grant Workstation Object Authority) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──GRTWSOAUT──WSOTYPE(──┬─\TPLWRKARA─┬──)──────────────────────────────────────────────────────────────────────────────────────5
├─\WRKARA────┤
├─\TPLPRTOL──┤
├─\PRTOL─────┤
├─\TPLTPRTL──┤
├─\PRTL──────┤
├─\TPLOUTQ───┤
├─\TPLOUTQL──┤
├─\OUTQL─────┤
├─\TPLJOBL───┤
├─\JOBL──────┤
├─\TPLJOBQ───┤
├─\TPLJOBLOG─┤
├─\JOBLOG────┤
├─\TPLJOBQL──┤
├─\JOBQL─────┤
├─\TPLMSGL───┤
├─\MSGL──────┤
├─\TPLMSGQ───┤
├─\TPLMSGSND─┤
├─\MSGSND────┤
├─\TPLSGNUSL─┤
├─\SGNUSL────┤
├─\TPLOBJL───┤
├─\OBJL──────┤
├─\TPLLIBSL──┤
├─\LIBSL─────┤
├─\TPLLIB────┤
├─\TPLLAUNCH─┤
├─\LAUNCH────┤
└─\PRSSET────┘
(P) ────────────────────────────────────────5%
5──┬─USER(──┬─\PUBLIC──────────────────┬──)──┬───────────────────────────────────┬─┬───
│ │ ┌──
───────────────────┐ │ │ ┌─\CHANGE──────────────┐ │ │
│ └──6─user-profile-name─┴───
(1) ─┘ └─AUT(──┼─\ALL─────────────────┼──)─┘ │
│ ├─\USE─────────────────┤ │
│ ├─\EXCLUDE─────────────┤ │
│ (2)
├─\AUTL────────────────┤ │
│ │ ┌──
───────────────┐ │ │
│ 6 (3)
└───┬─\OBJALTER─┬─┴────┘ │
│ ├─\OBJEXIST─┤ │
│ ├─\OBJMGT───┤ │
│ ├─\OBJOPR───┤ │
│ ├─\OBJREF───┤ │
│ ├─\ADD──────┤ │
│ ├─\DLT──────┤ │
│ ├─\EXECUTE──┤ │
│ ├─\READ─────┤ │
│ └─\UPD──────┘ │
├─AUTL(──authorization-list-name──)─────────────────────────────────────────────┤
└─REFWSO(──same-values-as-WSOTYPE──)────────────────────────────────────────────┘
Notes:
1 A maximum of 50 repetitions.

2 This value is valid only if USER(*PUBLIC) is specified.

3 Select one or more, 10 maximum.

P All parameters preceding this point can be specified in positional form.

Purpose Ÿ Users (*PUBLIC) who do not have authority specifically


given to them either for the object or for the authori-
The Grant Workstation Object Authority (GRTWSOAUT) zation list
command is used by one user to grant specific authority for Ÿ Groups of users who do not have any authority to the
the workstation object named in this command to another object or are not on the authorization list that secures
user or group of users. Workstation objects are used by the the object
0S/400 Graphical Operations program. Ÿ Users of the referenced workstation object (specified on
the REFWSO parameter)
Authority can be given to: Ÿ Users on an established authorization list
Ÿ Named users

Chapter 2. OS/400 Command Descriptions P3-391


GRTWSOAUT

When AUT(*AUTL) is specified, the user can specify the


authority for:
Special Value Workstation Objects
Ÿ All users who do not have authority specifically given to
*TPLWRKARA Work area template
them for an object.
*WRKARA Work area objects
Ÿ Users who are not on the authorization list that secures
the object. *TPLPRTOL Printer output list template
*PRTOL Printer output list objects
Ÿ Users whose user group does not have authority specif-
ically given to it. *TPLTPRTL Printer list template
*PRTL Printer list objects
Ÿ Users whose user group is not on the authorization list
that secures the object. *TPLOUTQ Output queue template
*TPLOUTQL Output queue list template
This command can be used by an object owner, by the secu-
*OUTQL Output queue list objects
rity officer, or by a user with object management authority for
the specified object. *TPLJOBL Job list template
*JOBL Job list objects
Restrictions:
*TPLJOBQ Job queue template
1. A user must be either the owner of the object or have *TPLJOBLOG Job log template
*ALL authority to use the AUTL parameter.
*JOBLOG Job log objects
2. The user must have object management authority to the
*TPLJOBQL Job queue list template
object to grant authority to the object.
*JOBQL Job queue list objects
3. AUT(*AUTL) can be specified only with USER(*PUBLIC).
*TPLMSGL Message list template
User profile names cannot be secured by an authori-
zation list (*AUTL). *MSGL Message list objects
*TPLMSGQ Message queue template
4. Only the owner of the object, or someone with all object
authority (*ALLOBJ), can grant object management *TPLMSGSND Message sender template
authority to a user. *MSGSND Message sender
Note: To see the parameter and value descriptions for this *TPLSGNUSL Signed-on user list template
command, refer to the online help text. For more *SGNUSL Signed-on user list objects
information about printing the help text, refer to
*TPLOBJL Object list template
“Printing CL Command Descriptions” in Chapter 1.
*OBJL Object list objects
*TPLLIBSL Library list template
Required Parameters
*LIBSL Library list objects
WSOTYPE *TPLLIB Library template
Specifies the name of the workstation object for which
*TPLLAUNCH Job submitter template
specific authorities are given to one or more users or to
an authorization list. *LAUNCH Job submitter objects
*PRSSET Personal setting objects
The special values for this parameter are described in
the following table.
Figure 2. Special Values for Workstation Objects

USER
Specifies the user profile names of one or more users to
whom authorities for the named object are being given.
If user names are specified, the authorities are given
specifically to those users. Authority given by this
command can be revoked specifically by the Revoke
Workstation Object Authority (RVKWSOAUT) command.
*PUBLIC: All users of the system, who do not have
authority specifically given to them for the object, who
are not on the authorization list, whose user group does
not have any authority, or whose user group is not on
the authorization list, are authorized to use the object as
specified on the AUT parameter.

P3-392 OS/400 CL Reference - Part 2 (Full Version)


GRTWSOAUT

user-profile-name: Specify the user profile names of one referential and unique constraints, and change the
or more users who have specific authority for the object. attributes of the database file. If the user has this
A maximum of 50 user profile names can be specified. authority on an SQL package, the user can change
the attributes of the SQL package. This authority is
AUTL
currently only used for database files and SQL
Specifies the name of the authorization list whose
packages.
members are given authority for the object specified on
the WSOTYPE parameter. *OBJEXIST: Object existence authority provides
the authority to control the object’s existence and
REFWSO ownership. This authority is necessary for users
Specifies the name of the workstation object being who want to delete the object, free storage of the
queried to obtain authorization information. Those object, perform save and restore operations for the
authorizations are given to the object specified on the object, or transfer ownership of the object. (If a
WSOTYPE parameter. Users authorized to the refer- user has special save system authority (*SAVSYS),
enced object are authorized in the same manner to the object existence authority is not required.) Object
object for which authority is being given. If the refer- existence authority is required to create an object
enced object is secured by an authorization list, that that has been named by an authority holder.
authorization list secures the object specified on the
WSOTYPE parameter. Specify the name of the object. *OBJMGT: Object management authority provides
the authority to specify the security for the object,
move or rename the object, and add members to
Optional Parameter database files.
AUT *OBJOPR: Object operational authority provides
Specifies the authority given to users specified on the authority to look at the description of an object and
USER parameter. Users must have *AUTLMGT use the object, as determined by the data authori-
authority to manage the authorization list. ties that the user has to the object.
*CHANGE: The user can perform all operations on the *OBJREF: Object reference authority provides the
object except those limited to the owner or controlled by authority needed to reference an object from
object existence authority and object management another object such that operations on that object
authority. The user can change and perform basic func- may be restricted by the other object. If the user
tions on the object. Change authority provides object has this authority on a physical file, the user can
operational authority and all data authority. add referential constraints in which the physical file
is the parent. This authority is currently only used
*ALL: The user can perform all operations except those
for database files.
limited to the owner or controlled by authorization list
management authority. The user can control the object's *ADD: Add authority provides the authority to add
existence, specify the security for the object, change the entries to an object (for example, job entries to a
object, and perform basic functions on the object. The queue or records to a file).
user also can change ownership of the workstation *DLT: Delete authority allows the user to remove
object. entries from an object, for example, remove mes-
*USE: The user can perform basic operations on the sages from a message queue or records from a file.
workstation object, such as running a program or *EXECUTE: Execute authority provides the
reading a file. The user cannot change the workstation authority needed to run a program or to locate an
object. *USE authority provides object operational object in a library.
authority, read authority, and execute authority.
*READ: Read authority provides the authority
*EXCLUDE: The user cannot access the workstation needed to get the contents of an entry in an object
object. or to run a program.
*AUTL: The public authority of the authorization list *UPD: Update authority provides the authority
specified on the AUTL parameter is used for the public needed to change the entries in an object.
authority for the object.
A maximum of ten of the following values can be
specified:
Example
*OBJALTER: Object alter authority provides the GRTWSOAUT WSOTYPE(\TPLWRKARA) AUTL(KLIST)
authority needed to alter the attributes of an object.
This command gives authority to the work are template to the
If the user has this authority on a database file, the
users with authority specified for them on the authorization
user can add and remove triggers, add and remove
list KLIST.

Chapter 2. OS/400 Command Descriptions P3-393


HLDCMNDEV

HLDCMNDEV (Hold Communications Device) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ────────────────────────────────────────────────────────────5%
55──HLDCMNDEV──DEV(──device-name──)──┬─────────────────────────┬───
│ ┌─\CNTRLD─┐ │
└─OPTION(──┴─\IMMED──┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose 5225 Printer (work station)


5251 Display station
The Hold Communications Device (HLDCMNDEV) command 5252 Display station
allows the operator to hold communication through the speci- 5256 Printer (work station)
fied device description in two ways: controlled or immediate. 5291 Display station
The controlled option allows any program using the commu- 5292 Display station
nications device to continue to do input/output operations, but PLU1 Primary logical unit, type 1 (for SNA)
no new uses of the device are started. The immediate BSC Binary synchronous device (Base and
option stops a communications device immediately, and a RJE)
permanent input/output error is sent to the program. Com- BSCT This AS/400 system as a BSC multipoint
munications are restarted with the Release Communications tributary station
Device (RLSCMNDEV) command or by varying the device off APPC Logical unit in advanced program-to-
and then on (Vary Configuration (VRYCFG) command). program communications (APPC) network

Restriction: This command is shipped with public Specify the name of the device (as specified in the
*EXCLUDE authority and the QPGMR, QSYSOPR, QSRV, device description) whose communications capability is
and QSRVBAS user profiles have private authorities to use suspended.
the command.
Note: To see the parameter and value descriptions for this Optional Parameters
command, refer to the online help text. For more
information about printing the help text, refer to OPTION
“Printing CL Command Descriptions” in Chapter 1. Specifies the manner in which communications with this
device is held.
*CNTRLD: The specified device is not capable of com-
Required Parameters munications at the next OPEN or ACQUIRE operation.
DEV *IMMED: The specified device is not capable of com-
Specifies the name of the device whose communications munications at the next READ, WRITE, OPEN, or
are held. Devices whose communications are held are: ACQUIRE operation.
DEV Value Device
3180 Display station Example
3277 Display station
HLDCMNDEV DEV(WSPRð5)
3278 Display station
3279 Display station This command holds the communications capability of the
3287 Printer (work station) device WSPR05 at the time of the next OPEN or ACQUIRE
5219 Printer (work station) operation.
5224 Printer (work station)

P3-394 OS/400 CL Reference - Part 2 (Full Version)


HLDDSTQ

HLDDSTQ (Hold Distribution Queue) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ───────────────────────────────────────────────────────5%
55──HLDDSTQ──DSTQ(──distribution-queue-name──)──PTY(──┬─\NORMAL─┬──)────
(1) ┘
└─\HIGH───
Notes:
1 This value is not valid for a SystemView distribution services (SVDS) type of distribution queue.

P All parameters preceding this point can be specified in positional form.

Purpose Required Parameters


The Hold Distribution Queue (HLDDSTQ) command prevents DSTQ
a distribution queue from being sent. Specifies the name of the distribution queue being held.
Both normal and high priority portions of the specified
Distribution queue names are translated to the graphic char- distribution queue are shown or printed. The queue
acter set and code page 930 500, using the job's coded char- specified must have been previously configured. See
acter set identifier (CCSID). the Configure Distribution Services (CFGDSTSRV)
command or the Add Distribution Queue (ADDDSTQ)
Restrictions: command.
1. This command is shipped with public *EXCLUDE
PTY
authority, and the QPGMR and QSYSOPR user profiles
Specifies whether the normal priority or high priority
have private authorities to use the command.
portion of the specified queue is held.
2. Messages that report errors about distribution queues
may display or print different characters than the user *NORMAL: Holds the normal priority queue, which is for
entered for the distribution queue name because of distributions with a service level of data low.
internal system transformations. Similarly (depending on *HIGH: Holds the high priority queue, which is for distri-
the language used for the work station), the internal butions with a service level of fast, status, or data high.
value for a distribution queue name may differ from the
characters shown on the Work with Distribution Queue
(WRKDSTQ) command. An error may be reported if the Examples
character-string value specified for the DSTQ parameter
Example 1: Holding the Normal Priority Portion of a
does not match the rules for an internal distribution
Queue
queue value or if it does not match the internal value for
any defined distribution queue (ignoring case differ- HLDDSTQ DSTQ(CHICAGO) PTY(\NORMAL)
ences).
This command holds the normal priority portion of the
Note: To see the parameter and value descriptions for this CHICAGO distribution queue.
command, refer to the online help text. For more
information about printing the help text, refer to Example 2: Holding the High Priority Portion of a Queue
“Printing CL Command Descriptions” in Chapter 1. HLDDSTQ DSTQ(ATLANTA) PTY(\HIGH)

This command holds the high priority portion of the


ATLANTA distribution queue.

Chapter 2. OS/400 Command Descriptions P3-395


HLDJOB

HLDJOB (Hold Job) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ────────────────────────────────5
55──HLDJOB──JOB(────┬─────────────────────────────┬──job-name────)──┬───────────────────────┬───
└─┬─────────────┬──user-name/─┘ │ ┌─\NO──┐ │
└─job-number/─┘ └─SPLFILE(──┴─\YES─┴──)─┘
5──┬────────────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\SELECT─┐ │
└─DUPJOBOPT(──┴─\MSG────┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose job-name
user-name/job-name
The Hold Job (HLDJOB) command makes a job ineligible for job-number/user-name/job-name
processing by the system. The job is held until it is: More information on this parameter is in Appendix A,
“Expanded Parameter Descriptions.”
Ÿ Released by the Release Job (RLSJOB) command
Ÿ Cleared by the Clear Job Queue (CLRJOBQ) command job-name: Specify the name of the job being held.
Ÿ Ended by the End Job (ENDJOB) command user-name: Specify the name of the user of the job
Ÿ Ended (while the job is active) by the End Subsystem being held.
(ENDSBS) command, the End System (ENDSYS)
command, or the Power Down System (PWRDWNSYS) job-number: Specify the number of the job being held.
command
Optional Parameters
If the job is not run before the OS/400 system is ended, the
queue can be cleared (and the job ended) when the OS/400 SPLFILE
system is started again. The specified job to be held can be Specifies whether spooled files created by the job being
on the job queue or on the output queues, or it can be active held are also held.
in a subsystem. This command also specifies whether the
*NO: The spooled files produced by the job are not
job's spooled files are held.
held.
Note: If you use this command to hold a job that has exclu-
*YES: The spooled files produced by the job are also
sive access to any resources on the system, these
held.
resources are not available to other jobs. Other jobs
which require access to those resources will either DUPJOBOPT
fail or wait indefinitely. Specifies the action taken when duplicate jobs are found
by this command.
Restriction: The job must belong to the user issuing the
command, or the user must have job control authority *SELECT: The selection display is shown when dupli-
(*JOBCTL). cate jobs are found during an interactive session. Other-
wise, a message is issued.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more *MSG: A message is issued when duplicate jobs are
information about printing the help text, refer to found.
“Printing CL Command Descriptions” in Chapter 1.
Examples
Required Parameter Example 1: Making a Job Ineligible for Processing
JOB HLDJOB JOB(PAYROLL) SPLFILE(\YES)
Specifies the qualified name of the job being held. If no
job qualifier is given, all of the jobs currently in the This command makes the job named PAYROLL ineligible for
system are searched for the job name. If more than one processing. All spooled files for this job are also held.
of the specified names are found, a qualified job name
must be specified. Example 2: Holding a Job that has a Duplicate Name
HLDJOB JOB(DEPTXYZ/PAYROLL)
A job identifier is a special value or a qualified name
with up to three elements. For example: This command holds the job named PAYROLL submitted by
a user operating under the user profile DEPTXYZ. The qual-

P3-396 OS/400 CL Reference - Part 2 (Full Version)


HLDJOB

ified form of the job name is used when jobs with duplicate
names exist in the system. Spooled files are not held.

Chapter 2. OS/400 Command Descriptions P3-397


HLDJOBQ

HLDJOBQ (Hold Job Queue) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ───────────────────────────────────────────────────────────────────5%
55──HLDJOBQ──JOBQ(──┼───────────────┼──job-queue-name──)────
├─\CURLIB/──────┤
└─library-name/─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose The name of the job queue can be qualified by one of


the following library values:
The Hold Job Queue (HLDJOBQ) command prevents the
processing of all jobs currently waiting on the job queue and *LIBL: All libraries in the job's library list are
all entries that are added to the queue after the command is searched until the first match is found.
issued. The HLDJOBQ command has no effect on jobs that *CURLIB: The current library for the job is
are running. Additional jobs can be placed on the job queue searched. If no library is specified as the current
while it is being held, but they are not processed. The jobs library for the job, the QGPL library is used.
are held until a Release Job Queue (RLSJOBQ) command is
library-name: Specify the name of the library to be
issued. When a job queue is being held, the jobs can be
searched.
cleared with the Clear Job Queue (CLRJOBQ) command or
a specific job can be canceled by the ENDJOB command. job-queue-name: Specify the name of the job queue
being held
Restriction: The QLPINSTALL job queue cannot be held.
Note: To see the parameter and value descriptions for this
Example
command, refer to the online help text. For more
information about printing the help text, refer to HLDJOBQ JOBQ(QBATCH)
“Printing CL Command Descriptions” in Chapter 1.
This command prevents the processing of the jobs currently
on the QBATCH job queue and any jobs added to the queue.
Required Parameters They are held until the queue is released or cleared. Indi-
vidual jobs can also be ended with the ENDJOB command,
JOBQ which removes the job from the job queue.
Specifies the qualified name of the job queue that has its
current and future jobs withheld from further processing.

P3-398 OS/400 CL Reference - Part 2 (Full Version)


HLDJOBSCDE

HLDJOBSCDE (Hold Job Schedule Entry) Command


Job: B,I Pgm: B,I REXX Exec

┌─\ONLY────────┐
(P) ─ENTRYNBR(──┼─\ALL─────────┼──)──────────────────────────────────────────────5%
55──HLDJOBSCDE──JOB(──┬─\ALL──────────────┬──)────
├─job-name──────────┤ └─entry-number─┘
└─generic\-job-name─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose a generic name is specified, ENTRYNBR(*ALL) must


The Hold Job Schedule Entry (HLDJOBSCDE) command also be specified.
holds an entry, entries, or generic entries in the job schedule.
Each job schedule entry contains the information needed to Optional Parameters
automatically submit a batch job one time, or at regularly
scheduled intervals. ENTRYNBR
Specifies the number of the job schedule entry you want
If you hold a job schedule entry: to hold. The message sent when an entry is success-
Ÿ The entry is held until it is released using the Release fully added contains the entry number. You can also
Job Schedule Entry (RLSJOBSCDE) or Work with Job determine the entry number by using the Work with Job
Schedule Entries (WRKJOBSCDE) command. Schedule Entries (WRKJOBSCDE) command. Press
F11 from the Work with Job Schedule Entries display to
Ÿ A job is not submitted when the entry is released, even if show the entry numbers of the selected entries.
the date and time at which it was scheduled to be sub-
mitted passed while the entry was held. *ONLY: One entry in the job schedule has the job name
specified on the JOB parameter. If *ONLY is specified
Restriction: To hold entries, you must have *JOBCTL and more than one entry has the specified job name, no
special authority; otherwise you can hold only those entries entries are held and a message is sent.
that you added. *ALL: All entries with the specified job name are held.
Note: To see the parameter and value descriptions for this entry-number: Specify the number of the job schedule
command, refer to the online help text. For more entry you want to hold.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1.
Examples
Required Parameters Example 1: Holding a Job Schedule Entry
JOB HLDJOBSCDE JOB(CLEANUP)
Specifies the name of the job schedule entry.
This command holds the job schedule entry with the job
*ALL: All of the job schedule entries for which you have name CLEANUP.
authority are held. If JOB(*ALL) is specified,
ENTRYNBR(*ALL) must also be specified. Example 2: Holding All Job Schedule Entries
job-name: Specify the name of the job schedule entry. HLDJOBSCDE JOB(\ALL) ENTRYNBR(\ALL)
generic*-job-name: Specify a generic name. A generic This command holds all entries in the job schedule.
name is a character string of one or more characters fol-
lowed by an asterisk (*); for example, ABC*. The Example 3: Holding an Individual Job Schedule Entry
asterisk substitutes for any valid characters. A generic HLDJOBSCDE JOB(PAYROLL) ENTRYNBR(\ONLY)
name specifies all objects with names that begin with the
generic prefix for which the user has authority. If an This command holds the entry PAYROLL in the job
asterisk is not included with the generic (prefix) name, schedule.
the system assumes it to be the complete object name.
If the complete object name is specified, and multiple Example 4: Holding a Generic Job Schedule Entry
libraries are searched, multiple objects can be held only HLDJOBSCDE JOB(PAY\) ENTRYNBR(\ALL)
if *ALL or *ALLUSR library values can be specified for
the name. For more information on the use of generic This command holds all entries in the job schedule that have
names, refer to “Generic Object Names” in Chapter 2. If the prefix PAY in their names.

Chapter 2. OS/400 Command Descriptions P3-399


HLDOUTQ

HLDOUTQ (Hold Output Queue) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ────────────────────────────────────────────────────────────────5%
55──HLDOUTQ──OUTQ(──┼───────────────┼──output-queue-name──)────
├─\CURLIB/──────┤
└─library-name/─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose OUTQ
Specifies the qualified name of the output queue.
The Hold Output Queue (HLDOUTQ) command prevents all
The name of the output queue can be qualified by one
currently waiting spooled files, and all spooled files that are
of the following library values:
added to the output queue after the command is issued, from
being processed by a spooling writer. The HLDOUTQ *LIBL: All libraries in the job's library list are
command has no effect on jobs that are running and adding searched until the first match is found.
spooled files to the queue or on the spooled file being
*CURLIB: The current library for the job is
produced by a spooling writer at the time the command is
searched. If no library is specified as the current
issued. When the spooling writer completes all copies of the
library for the job, the QGPL library is used.
current output file, it cannot begin the output for any other
files until the queue is released. library-name: Specify the name of the library to be
searched.
The spooled files are held until a Release Output Queue
(RLSOUTQ) command is issued. Otherwise, the output output-queue-name: Specify the name of the output
queue can be cleared with the Clear Output Queue queue.
(CLROUTQ) command or a specific file can be deleted by
the DLTSPLF command. Example
Note: To see the parameter and value descriptions for this HLDOUTQ OUTQ(QPRINT)
command, refer to the online help text. For more
information about printing the help text, refer to This command prevents the processing of the spooled files
“Printing CL Command Descriptions” in Chapter 1. on the QPRINT queue and any spooled files added to the
queue. They are held until the queue is released or cleared.
A specific job (with its spooled files) can also be ended with
Required Parameters the ENDJOB command, which removes the spooled files
from the output queue.

P3-400 OS/400 CL Reference - Part 2 (Full Version)


HLDRDR

HLDRDR (Hold Reader) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ───────────────────────────────────────────────────────────────────────────────────────────5%
55──HLDRDR──RDR(──reader-name──)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose RDR
Specifies the name of the spooling reader being held.
The Hold Reader (HLDRDR) command immediately stops
the activity of the specified spooling reader. The reader is
not ended, and its associated input device is not made avail- Example
able to the system. The reader remains inactive until a HLDRDR RDR(QDKT)
Release Reader (RLSRDR) or End Reader (ENDRDR)
command is issued. Data is not lost when the reader is held. This command causes the diskette reader QDKT to imme-
diately stop reading data. To release the reader, so that it
Note: To see the parameter and value descriptions for this can continue to read data, a Release Reader (RLSRDR)
command, refer to the online help text. For more command must be entered. If the End Reader (ENDRDR)
information about printing the help text, refer to command is used, the reader is stopped and the job that was
“Printing CL Command Descriptions” in Chapter 1. being read in is lost because no job entry was added to the
job queue.
Required Parameters

Chapter 2. OS/400 Command Descriptions P3-401


HLDSPLF

HLDSPLF (Hold Spooled File) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──HLDSPLF──FILE(──┬─\SELECT───────────┬──)────────────────────────────────────────────────────────────────────────────────────5
└─spooled-file-name─┘
5──┬────────────────────────────────────────────────────────────────────────────────────────────────┬───────────────────────────5
│ ┌─\─────────────────────────────────────────┐ ┌─\ONLY───────────────┐ │
(P) ┤
├─JOB(──┴─┬─────────────────────────────┬──job-name─┴──)──SPLNBR(──┼─\LAST───────────────┼──)────
│ └─┬─────────────┬──user-name/─┘ └─spooled-file-number─┘ │
│ └─job-number/─┘ │
│ ┌─\CURRENT──┐ │
└─SELECT(──┼─\ALL──────┼──┬───────────────────────────────────────────────────┬──)───────────────┘
└─user-name─┘ │ ┌─\ALL────────┐ │
└─┼─\OUTQ───────┼──┬──────────────────────────────┬─┘
└─device-name─┘ │ ┌─\ALL──────┐ ┌─\ALL──────┐ │
└─┼─\STD──────┼──┼───────────┼─┘
└─form-type─┘ └─user-data─┘
5──┬──────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\IMMED───┐ │
└─OPTION(──┴─\PAGEEND─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose FILE
Specifies the name of the spooled file to be held.
The Hold Spooled File (HLDSPLF) command stops the spec-
*SELECT: All spooled files that meet the selection
ified spooled file from additional processing by a spooling
requirements specified in the SELECT keyword are held.
writer. If the file is being produced on an output device, the
This value is mutually exclusive with the JOB and
writer stops processing that file and gets the next file to be
SPLNBR parameters. Specifying *SELECT causes the
processed. When the file is released and again selected for
JOB and SPLNBR parameters to be ignored.
output, it is again processed starting at the beginning. If
several copies are being produced for the file when it is held, spooled-file-name: Specify the name of the spooled file
the incomplete copy is again produced from the beginning to be held.
along with the remaining copies that follow it.

If the specified file is still receiving records from a program Optional Parameters
that is running when the file is held, the program that is JOB
running is unaware that the file is on hold. Also, if the held Specifies the name of the job that created the file being
file is part of a job that produces other spooled files, they can held. If no job qualifier is given, all of the jobs currently
be processed before the held file is released. The held file in the system are searched for the simple job name.
remains on the output queue and it appears to be the only
file produced by the job. A job identifier is a special value or a qualified name
with up to three elements. For example:
The file is held until one of the following commands is job-name
entered: the RLSSPLF (Release Spooled File), the \
DLTSPLF (Delete Spooled File), the ENDJOB (End Job) with user-name/job-name
keyword SPLFILE(*YES) specified, or the CLROUTQ (Clear job-number/user-name/job-name
Output Queue) command. If the file is released before the More information on this parameter is in Appendix A,
writer begins producing it, the file is produced in its normal “Expanded Parameter Descriptions.”
order within the group of files for the job. Production of a
job's output is not delayed because some of its files are *: The job that issued this HLDSPLF command is the
being held. job that produced the file being held.

Note: To see the parameter and value descriptions for this job-name: Specify the name of the job that created the
command, refer to the online help text. For more file being held.
information about printing the help text, refer to user-name: Specify the name of the user of the job that
“Printing CL Command Descriptions” in Chapter 1. created the file being held.
job-number: Specify the number of the job that created
Required Parameters the file being held.

P3-402 OS/400 CL Reference - Part 2 (Full Version)


HLDSPLF

SPLNBR form-type: Specify the form type of the files to be held.


Specifies the number of the spooled file to be held that
Element 4: User Data Values
was created by the specified job. More information on
this parameter is in Appendix A, “Expanded Parameter *ALL: Files with any user data tag specified are held.
Descriptions.” user-data: Specify the user data tags of files to be held.
*ONLY: One spooled file from the job has the specified
OPTION
file name. The number of the spooled file is not neces-
Specifies which option to use when holding a spooled
sary. If *ONLY is specified and more than one spooled
file. This parameter allows the user to choose when to
file has the specified file name, a message is sent.
hold a spooled file. If the spooled file being held is not
*LAST: The spooled file with the highest number and currently being processed by a spool writer, this param-
the specified file name is used. eter is not valid. If the spooled file is being processed
by a printer writer, then printing stops and a form feed is
spooled-file-number: Specify the number of the spooled
done to prepare the printer for the next spooled file to be
file that has the specified file name to be held.
printed.
SELECT
*IMMED: The spooled file is held immediately.
Specifies which group of files are selected to be held.
Files can be selected based on user, device, form type, *PAGEEND: The spooled file is held at a page
and user data. Only files that meet each of the require- boundary.
ments are selected.
Element 1: User Values Examples
*CURRENT: Only files created by the user running this Example 1: Holding a File Created by Another Job
command are held.
HLDSPLF FILE(SHIPITEMS) JOB(ðððð9/JONES/ORDER)
*ALL: Files created by all users are held.
user-name: Specify the names of files to be held that This command withholds the spooled file SHIPITEMS,
were created by the specified user. created by the job ORDER, from additional processing.

Element 2: Device Values Example 2: Holding a File at a Page Boundary


*ALL: Files queued for any device or on any object HLDSPLF FILE(QPJOBLOG) OPTION(\PAGEEND)
queue are held.
This command holds the spooled file QPJOBLOG at a page
*OUTQ: All files that are not queued for a device are boundary.
held. These files are on output queues that are not
associated with printers. Example 3: Holding a File Immediately
device-name: Specify the names of files to be held that HLDSPLF FILE(QPJOBLOG) OPTION(\IMMED)
are queued for the specified device.
This command holds the spooled file QPJOBLOG imme-
Element 3: Form Type Values
diately. Holding a spooled file by specifying this option
*ALL: Files for all form types are held. causes the CHGSPLFA command RESTART(*NEXT) to be
*STD: Only files that specify the standard form type are inaccurate if the spooled file is currently being processed by
selected. a spool writer.

Chapter 2. OS/400 Command Descriptions P3-403


HLDWTR

HLDWTR (Hold Writer) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──────────────────────────────────────────────────────────────5%
55──HLDWTR──WTR(──writer-name──)──┬──────────────────────────┬───
│ ┌─\IMMED───┐ │
└─OPTION(──┼─\CNTRLD──┼──)─┘
└─\PAGEEND─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose another I/O request to get the next block from the file
being spooled to the device. If *IMMED is specified, the
The Hold Writer (HLDWTR) command stops the specified writer stops only after it has written the last record in the
writer at the end of a record, at the end of a spooled file, or block being processed, which (for diskette output) is a
at the end of a printed page. If multiple copies of a file are complete diskette record being written on diskette.
produced, the writer can be held at the end of the copy cur-
When *IMMED is specified for printed output, the writer
rently being produced. The writer is not ended and the
stops anywhere within or at the end of a print line or at
device is not made available to the system. The writer
the end of a complete block, which may not be at the
remains inactive until a RLSWTR (Release Writer) or
end of a line. This is because some data records (which
ENDWTR (End Writer) command is issued. Data is not lost
are blocked to improve performance) may be split in two,
when the writer is held.
with the first part of a record at the end of one block and
Note: To see the parameter and value descriptions for this the last part of the record at the beginning of the next
command, refer to the online help text. For more block. If only one copy of the file is being produced or if
information about printing the help text, refer to the last copy is being produced, the entry for the file is
“Printing CL Command Descriptions” in Chapter 1. removed from the output queue when the output is com-
pleted.
Required Parameters *CNTRLD: The job is ended in a controlled manner.
This allows the program to perform cleanup (end-of-job
WTR processing).
Specifies the name of the spooling writer being held.
Specify the name of the spooling writer. *PAGEEND: The writer is held at the end of a page.
This value is valid only when the spooling writer is a
printer writer.
Optional Parameters
OPTION Example
Specifies when the spooling writer should stop producing HLDWTR WTR(PRINTER) OPTION(\CNTRLD)
output.
*IMMED: The writer stops immediately after it has This command stops the writer named PRINTER at the end
written the last record, in the current block of records, to of the current file. The writer is held until an RLSWTR
the output device. Each time the writer finishes (Release Writer) or ENDWTR (End Writer) command is
producing a block of records on a device, it makes issued.

P3-404 OS/400 CL Reference - Part 2 (Full Version)


IF

IF (If) Command
Pgm: B,I

(P) ──────────────────────────────────────────────────────────────5%
55──IF──COND(──logical-expression──)──┬──────────────────────┬───
└─THEN(──CL-command──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose The IF command tests the logical variable &TESTSW. If a


true condition exists (&TESTSW contains a value of '1'), the
The If (IF) command evaluates a logical expression and con- commands in Group A are processed, then control passes to
ditionally processes CL program commands according to the the commands in Group C. If a false condition exists
evaluation of the expression. If the logical expression is true (&TESTW contains a value of 0), the commands in group A
(a logical 1), the command (or the group of commands in a are bypassed, the commands in Group B are processed,
Do group) specified in the THEN parameter is processed, then control passes to the commands in Group C.
and the ELSE command with its associated command or Do
group is not processed. If the logical expression is false (a Restrictions:
logical 0), the command specified in the THEN parameter is 1. The IF command is valid only in CL programs.
not processed and control passes to the next command. If 2. Up to ten levels of nested IF and ELSE commands are
that command is an ELSE command, the command or Do allowed.
group specified in that command is processed. If the ELSE
command is not specified, control passes to the next
command. Required Parameters
When a DO command is specified, either in the THEN COND
parameter of the IF command or in the CMD parameter of Specifies the logical expression that is evaluated to
the ELSE command, the Do group is bypassed if the result determine a condition in the program and what is done
of the expression is not the one needed for the group being next. Refer to “Logical Expressions” in Chapter 3,
processed. That is, control passes to the command that “Expressions in CL Commands” for a description of
follows the ENDDO command associated with that DO. logical expressions. Note that variables, constants, and
the %SUBSTRING, %SWITCH, and %BINARY built-in
When the command or Do group specified by the THEN functions can be used within the expression.
parameter or the ELSE command is completed (and no
GOTO command has been processed), control passes to the
Optional Parameters
next command following the command or Do group specified
by the ELSE command. If a GOTO command is processed, THEN
control is passed to the command with the label specified by Specifies the commands (in a Do group) that are pro-
the GOTO command, and processing continues from that cessed if the result of evaluating the expression is true.
command. After the command or Do group is processed, control is
passed to the next command after the ELSE command
The following command sequence shows this flow. In this associated with this IF command. If the result is true,
example, &TESTSW is a logical variable. the ELSE command associated with the IF command is
not processed. If the command specified in this param-
IF &TESTSW DO
eter is a DO command, all commands within the Do
Group A (group of CL commands)
Ÿ group are considered to be the command specified by
Ÿ the parameter.
ENDDO If the command specified by the THEN keyword is not
coded on the same line when the keyword is coded, the
ELSE DO THEN keyword must be immediately followed (on the
Group B (group of CL commands) same line) either by the left parenthesis or by a plus sign
Ÿ
(+) or a minus sign (-) to show continuation. (A blank
Ÿ
cannot immediately follow any keyword.) The command
ENDDO
and the right parenthesis can then be coded on the next
Group C (continued CL commands) line. For example:
Ÿ IF COND(&A \EQ &B) THEN( +
Ÿ GOTO C)

Chapter 2. OS/400 Command Descriptions P3-405


IF

If any part of the command specified by the THEN IF &LOG1 THEN(IF (&A \GT 1ð) THEN(GOTO X))
parameter continues on the next line, a continuation ELSE(GOTO Y)
character (+ or -) must be specified. ELSE DO
Ÿ
If a DO command is specified, only the DO command Ÿ (group of CL commands)
(not the commands specified within the Do group) is ENDDO
within the parentheses. For example:
IF COND(&A \EQ &B) THEN(DO) This is an example of nested IF commands. If &LOG1 has a
CMD1 logical value of 1 (true) and if &A is greater than 10, a
CMD2 branch is made to label X. If &LOG1 has a logical value of 1
Ÿ and &A is not greater than 10, a branch is made to label Y.
Ÿ If &LOG1 has a logical value of 0 (false), &A is not compared
ENDDO to 10. Instead, the DO group of the second ELSE command
If no command is specified on the THEN parameter (a is processed.
null THEN) and the ELSE command immediately follows
IF &TEST THEN( +
it, the ELSE is processed if the IF expression is false DO)
and it is skipped if the expression is true. CHGVAR &A (&A + 1)
Any CL command can be specified on the THEN param- GOTO X
eter, except the following commands: ENDDO
ELSE
ELSE DO
PGM, ENDPGM CHGVAR &B (&B + 1)
ENDDO CALL EXTPGM (&B)
MONMSG ENDDO
DCL, DCLF
This example shows how the THEN parameter can be con-
The command can be another IF, unless there are tinued on the next line. If &TEST has a logical value of 1,
already ten levels of nested IF and ELSE commands. the Do group specified in the THEN parameter is processed.
Otherwise, the Do group specified by the ELSE command is
processed.
Examples
IF COND(&A \EQ &B) THEN(GOTO X) IF (&A \EQ YES)
IF (&A \EQ &B) THEN(GOTO X) DO
IF (&A \EQ &B) (GOTO X) CHGVAR &B 1
CHGVAR &C 'Z'
IF COND(&A \EQ &B) THEN(GOTO X) ENDDO

The examples above show a number of different ways the IF This example shows a Do group as the THEN parameter.
command can be specified to test a condition and branch to The two Change Variable (CHGVAR) commands are pro-
a label. In each of these examples, if &A equals &B, control cessed if, in the relational expression, &A is equal to YES.
passes to a CL command that has a label named X.
IF %SWITCH(1ðXXXX1ð) THEN(GOTO X)
IF COND(&TESTSW) THEN(CHGVAR VAR(&A) VALUE(23))
This example shows how the built-in function %SWITCH is
If &TESTSW has a logical value of 1 (true), the CHGVAR used to test the eight job switches in a job. Refer to the end
command is processed to set &A to decimal 23; if &TESTW of Chapter 3, “Expressions in CL Commands” for a complete
has a logical value of 0 (not true), the Change Variable description of %SWITCH. In this example, job switches 1, 2,
(CHGVAR) command is not processed. 7, and 8 are tested for the values indicated in the 8-character
IF ((&ALPHA \EQ &BETA) \AND \NOT &GAMMA) THEN(RETURN) mask. If switches 1 and 7 contain 1s and switches 2 and 8
contain 0s, then the program branches to the command
If the value of &ALPHA equals the value of &BETA and if having the label X. If any of the four switches do not contain
&GAMMA is a logical 0, then return to the program that the value indicated, the branch does not occur.
called this CL program.

P3-406 OS/400 CL Reference - Part 2 (Full Version)


INSFLMSVR

INSFLMSVR (Install FlowMark Server) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──INSFLMSVR──NWSD(────network-server-description-name────)──RSRCNAME(────resource-name────)───────────────────────────────────5
┌─15ðð──────────────────┐
(P) ───5
5──ADPTADR(────local-adapter-address────)──TCPPORTCFG(──port──internet-address──subnet-mask──┴─max-transmission-unit─┴──)────
5──┬─────────────────────────────────────┬──┬────────────────────────────────────────────┬──────────────────────────────────────5
│ ┌─\NONE───────────────┐ │ │ ┌─\NWSD──────────────────┐ │
└─TCPRTE(──┴─next-hop-IP-address─┴──)─┘ └─TCPHOSTNAM(──┴─TCP/IP-local-host-name─┴──)─┘
5──┬────────────────────────────────────────┬──┬───────────────────────────────────────┬──┬─────────────────────────┬───────────5
│ ┌─\SYS───────────────┐ │ │ ┌─\SYS───────────────┐ │ │ ┌─4M───┐ │
└─TCPDMNNAME(──┴─TCP/IP-domain-name─┴──)─┘ └─TCPNAMSVR(──┴─TCP/IP-name-server─┴──)─┘ └─LINESPEED(──┼─16M──┼──)─┘
└─\NWI─┘
5──┬──────────────────────────────────┬──┬───────────────────────────────────────────────────┬──────────────────────────────────5
│ ┌─\PRIMARY─────────┐ │ │ ┌─\NWSD─────────────────────────────┐ │
└─LNGVER(──┴─language-version─┴──)─┘ └─NWSSTG(──┴─network-server-storage-space-name─┴──)─┘
5──┬────────────────────────────────────────────────────┬──┬──────────────────────┬──┬─────────────────────────────┬───────────5%
│ ┌─5ðð───────────────────────────────┐ │ │ ┌─\YES─┐ │ │ ┌─\BLANK────────┐ │
└─NWSSIZE(──┴─network-server-storage-space-size─┴──)─┘ └─VRYCFG(──┴─\NO──┴──)─┘ └─TEXT(──┴─'description'─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Required Parameters


The Install FlowMark Server (INSFLMSVR) command is the NWSD
OS/400 part of the the process for installing a FlowMark Specifies the network server description name. This
server onto an Integrated PC Server (also referred to as a name will be used to create an *NWSD object of type
File Server I/O Processor or FSIOP). This command *BASE. The *NWSD object cannot already exist. The
includes parameters needed to identify the FSIOP to be name cannot end with the character at code point x'5B'.
used, TCP/IP configuration, language, and the storage drive That character is converted to a $ character in the ASCII
and its size. This is the fast path for novice users or users character set and network servers cannot have names
that do not need to tailor the FlowMark configuration. ending in a $.

RSRCNAME
This command will create a network server description
Specifies the resource name that identifies the hardware
(*NWSD) object of type *BASE, the token-ring line
that the *NWSD object represents.
description (*LIND) object, the network storage space
(*NWSSTG) object, and add the server storage link. Note: Use the Work with Hardware Resources
(WRKHDWRSC) command with *CMN specified
If the following CL commands invoked by the INSFLMSVR for the TYPE parameter to help determine the
command have an error, the INSFLMSVR command will not resource name. Specify the resource name of
run successfully: the communications adapter. The resource
Ÿ CRTNWSD name consists of the FSIOP resource name.
Ÿ CRTLINTRN
ADPTADR
Ÿ INSNWSAPP
Specifies the local system's token-ring adapter address.
Ÿ Commands called by INSNWSAPP
– CRTNWSSTG adapter-address: Specify the adapter address to use.
– ADDNWSSTGL The adapter address must be in the range of
– VRYCFG 400000000000-7FFFFFFFFFFF. See the ADPTADR
documentation in the Communications Configuration
Restrictions: book to understand this value.

This command requires special authorities of *ALLOBJ, TCPPORTCFG


*SECADM, and *IOSYSCFG. Specifies the TCP/IP configuration values that are spe-
cific to a port on the FSIOP. This information consists of
Note: To see the parameter and value descriptions for this
four parts including the identification of the FSIOP port,
command, refer to the online help text. For more
the internet address assigned to the port, and the subnet
information about printing the help text, refer to
mask of the port.
“Printing CL Command Descriptions” in Chapter 1.
Element 1: Port

Chapter 2. OS/400 Command Descriptions P3-407


INSFLMSVR

The Port number value specifies the FSIOP port number Ÿ Alphabetical characters A through Z
to be configured. Specify one of the following values: Ÿ Digits 0 through 9
Ÿ Minus sign (-)
1: FSIOP port number 1 is configured. 2: FSIOP port
number 2 is configured. Note: These characters are all invariant characters.
Element 2: Internet address *NWSD: Specifies that the host name for the FSIOP is
IP-address: Specify the IP (internet) address for the port the same as the name specified for the NWSD param-
in the form, nnn.nnn.nnn.nnn, where nnn is a decimal eter on this command.
number ranging from 0 through 255. The IP address host-name: Specify a host name to be associated with
selected must be unique across all *NWSD objects and the FSIOP.
the AS/400 TCP/IP configuration. See the TCP/IP
Fastpath Setup book for general information about TCPDMNNAME
internet addresses. Specifies the local domain name associated with the
FSIOP. A domain name can be a text string having 2 to
Element 3: Subnet mask
255 characters. Domain names consist of one or more
subnet-mask: Specifies the subnet mask for the IP labels separated by periods. Each label can contain up
address. to 63 characters. The following characters are allowed
in domain names:
Element 4: Maximum transmission unit
1500: The maximum transmission unit (MTU) of the Ÿ Alphabetical characters A through Z
interface is 1500 bytes. Ÿ Digits 0 through 9
Ÿ Minus sign (-)
maximum-transmission-unit: Specifies the maximum Ÿ Period (.). Periods are only allowed when they sep-
transmission unit (MTU) of the interface, in bytes.
arate labels of domain style name.

Note: These characters are all invariant characters.


Optional Parameters
Other domain name conventions include the following:
TCPRTE
The next hop IP address optionally identifies a route to a Ÿ The first and last character of the host name must
remote system or network from the FSIOP. Specify be an alphabetic character or a digit.
*NONE if a routing specification is not needed for the Ÿ Try to limit your domain name labels to 12 charac-
FSIOP. A route cannot be added unless the internet ters because shorter labels are easier to remember.
address specified by the next hop element is directly
reachable through a network associated with one of the Ÿ It is a common practice to use hierarchical names
FSIOP ports. The possible values are: that allow predictable extensions for change and
growth. Domain names normal reflect the deleg-
*NONE: Specify *NONE if a routing specification is not ation of authority or hierarchy used to assign them.
needed for the FSIOP .
For example, the name SYS1.MFG.ABC.COM can be
next-hop-IP-address: Specify the Internet address of the
broken down into the following:
next system on the route in the form, nnn.nnn.nnn.nnn,
where nnn is a decimal number ranging from 0 through COM All commercial networks.
255.
ABC.COM All systems in the ABC company's commer-
When *NONE is selected the TCPRTE parameter of the cial network.
CRTNWSD command will be.
MFG.ABC.COM
Ÿ Route destination = *NONE All manufacturing systems in the ABC com-
Ÿ Subnet mask = blanks pany's commercial network.
Ÿ Next hop = blanks SYS1.MFG.ABC.COM
When an IP address is specified the TCPRTE parameter A host named SYS1 in the manufacturing
of the CRTNWSD command will be. area of the company's commercial network.

Ÿ Route destination = *DFTROUTE In the above example, MFG.ABC.COM is the domain


Ÿ Subnet mask = *NONE name and SYS1 is the short form of the host name.
Ÿ Next hop = The IP address specifed in the The COM designation is one of several domain names
INSFLMSVR command. used when connecting the Internet. Some of the other
domain names are as follows:
TCPHOSTNAM
Specifies the short form of the host name to be associ- COM Commercial organizations
ated with the FSIOP. A host name can be a text string
EDU Educational institutions
ranging from 2 to 63 characters. The following charac-
ters are allowed in host names:

P3-408 OS/400 CL Reference - Part 2 (Full Version)


INSFLMSVR

GOV Government institutions NWSSIZE


MIL Military groups
Specify the size of the storage space to be created.
NET Major network support centers
500: Specifies the size of the network storage space will
ORG Organizations other than those listed above be 500 megabytes (MB).
ARPA Temporary ARPANET domain network-server-storage-space-size: Specify the network
Country code storage space size to be used, in megabytes (MB).
Countries other than USA Valid values range from 200 to 8000 MB.

*SYS: Specifies that the local domain name for the VRYCFG
FSIOP should be the same value as is configured for the Specify whether to vary on the NWSD created by this
AS/400 system. command.
*YES: The network server description (*NWSD) created
TCPNAMSVR
by this command will be varied on using the Vary Con-
Specifies the internet address of the name server
figuration (VRYCFG) command.
system that is used by the FSIOP. Typically, this is the
same value as it is for the AS/400 system. *NO: The network server description (*NWSD) created
by this command will not be varied on.
*SYS: The name server system used by the FSIOP
should be the same as for the AS/400 system. TEXT
*NONE: There is no name server to be used by the Specifies the description text to be associated with the
FSIOP. network server description (*NWSD).

name-server-address: Specify an internet address for *BLANK: No description text will be associated with the
the name server system to be used by the FSIOP. network server description.

LINESPEED
'description': Specify no more than 50 characters of text,
enclosed in apostrophes.
Specifies the line speed in bits per second (bps). The
possible values are:
4M: The line speed is four million bits per second. Example
16M: The line speed is sixteen million bits per second. INSFLMSRV NWSD(FMSVR) RSRCNAME(CCð2)
ADPTADR(4ðððððððððð1)
*NWI: The line speed used is for a network interface. TCPPORTCFG(1 '9.5.13.11' '255.255.255.128' 15ðð)
TCPRTE('9.5.3.1')
LNGVER
TEXT('FlowMark Server Network Descriptor')
Specifies the language version of the network server.
*PRIMARY: The language version for the currently This command does the following:
installed primary national language is used. Ÿ Creates a network server description (*NWSD) named
language-version: Specify the language version of the FMSRV of type *BASE and is associated with the
network server product to be used. The language must resource named CC02.
be one of the installed versions of the network server Ÿ Creates token ring line description (*LIND) named
product. Use the Work with Licensed Programs FMSVR using adapter address 400000000001.
(LICPGM) menu to determine the installed languages.
Ÿ Configures port 1 with IP address 9.5.13.11 with a
NWSSTG subnet mask of 255.255.255.128 and a maximum trans-
Specifies the name of the network server storage space mission unit (MTU) of 1500 bytes.
that will be created. The storage space cannot already
Ÿ The server uses the primary language, and the default
exist.
country code and code page associated with that lan-
*NWSD: Specifies the name of the client storage space guage.
will be the same as the NWSD name.
Ÿ The network server storage space (*NWSSTG) FMSVR
network-server-storage-space-name: Specify the is created for the network server and is linked and
network storage space name to be used. Maximum assigned drive letter K.
length of the storage space name is 10 characters.
Ÿ The network server is varied on.
Ÿ Starts SRVIFS on the FSIOP.

Chapter 2. OS/400 Command Descriptions P3-409


INSNWSAPP

INSNWSAPP (Install Network Server Application) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(1) ───drive-letter────)───
55──INSNWSAPP──NWSAPP(──┬─\NOTES────┬──)──NWS(────network-server────)──DRVLTR(─── (P)────────────────────────5
├─\FIREWALL─┤
└─\FLOWMARK─┘
5──┬──────────────────────┬──┬─────────────────────────────┬──┬──────────────────────┬──────────────────────────────────────────5
│ ┌─\NO──┐ │ │ ┌─\NWS────────┐ │ │ ┌─\YES─┐ │
└─CRTDRV(──┴─\YES─┴──)─┘ └─FILSVR(──┴─file-server─┴──)─┘ └─VRYCFG(──┴─\NO──┴──)─┘
5──┬────────────────────────────────────────────────┬──┬────────────────────────────────────────────────────┬───────────────────5
│ ┌─\GEN─────────────────────────┐ │ │ ┌─\NWSAPP─────────────────────────┐ │
(2) ─┴─network-server-storage-space─┴──)─┘ └─NWSSIZE(───
└─NWSSTG(─── (2) ─┴─storage-space-size-in-megabytes─┴──)─┘

5──┬───────────────────────────────┬──┬───────────────────────────────┬──┬─────────────────────────────────────┬────────────────5
│ ┌─\NWSAPP─┐ │ │ ┌─\BLANK────────┐ │ │ ┌─'\NOTES'──────────┐ │
(2, 3, 4) ─┼─\HPFS───┼──)─┘ └─TEXT(───
└─FORMAT(─────── (2) ─┴─'description'─┴──)─┘ └─NTSDIR(───
(5) ─┴─'Notes-directory'─┴──)─┘
└─\FAT────┘
5──┬─────────────────────────────────────────────┬─────────────────────────────────────────────────────────────────────────────5%
│ ┌─'\NOTES\DATA'──────────┐ │
(5) ─┴─'Notes-data-directory'─┴──)─┘
└─NTSDTADIR(───
Notes:
1 DRVLTR(K) required when NWSAPP(*FIREWALL) is specified.

2 This parameter is valid only when CRTDRV(*YES) is specified.

3 FORMAT(*FAT) not allowed when NWSAPP(*FIREWALL) is specified.

4 FORMAT(*FAT) not allowed when NWSAPP(*FLOWMARK) is specified.

5 This parameter is valid only when NWSAPP(*NOTES) is specified.

P All parameters preceding this point can be specified in positional form.

Purpose If the following CL commands that are invoked by the


INSNWSAPP command have an error because of any
The Install Network Server Application (INSNWSAPP) reason, the INSNWSAPP command will not run successfully:
command is the OS/400 part of the process for installing a
Ÿ CRTNWSSTG to create network server storage space
server application onto an Integrated PC Server, also known
Ÿ ADDNWSSTGL to link the network server storage space
as a File Server I/O Processor (FSIOP). This command
to the network server description (NWSD)
includes parameters needed to identify the application to be
Ÿ VRYCFG to vary on the NWSD
installed, the Integrated PC Server to be used (by way of the
network server name), and the storage drive to be used on Restrictions:
the Integrated PC Server. The command can also create the
storage space needed for the install drive, if requested. 1. This command is shipped with public *EXCLUDE
authority. When this command is shipped, authority is
This command requires that the specified network server issued only to the security officer. The security officer
exists and is of type *BASE. The network server must also can grant the use of this command to other users.
be in a varied off state. If any of these conditions are not 2. This command requires *ALLOBJ special authority.
true, the command fails and an error message is displayed.
Note: To see the parameter and value descriptions for this
Although not required by this command, a line description command, refer to the online help text. For more
needed for the network server to attach to the LAN must also information about printing the help text, refer to
exist. “Printing CL Command Descriptions” in Chapter 1.

This command can be invoked multiple times for a given


network server in order to install different applications onto Required Parameters
one Integrated PC Server. NWSAPP
Specifies the name of the application being installed.
The name of the file server that is currently configured can
be retrieved using the SBMNWSCMD command. While the *NOTES: The Lotus Notes application is being installed.
network server is varied on, submit the following command:
SERVICE /S *FIREWALL: The Firewall application is being installed.

P3-410 OS/400 CL Reference - Part 2 (Full Version)


INSNWSAPP

*FLOWMARK: The FlowMark application is being NWSSIZE


installed. Specifies the size of the network server storage space
that is created.

NWS Note: This parameter is only valid when


Specifies the name of the network server on to which CRTDRV(*YES) is specified.
the application is being installed. The network server *NWSAPP: The size of the network server storage
must already exist and be in a varied off state. space that is created is based on the application speci-
fied on the NWSAPP parameter.
DRVLTR
Specifies the drive letter associated with the network For application *NOTES, the size will be 500 megabytes
server on to which the application is being installed. (MB).
Valid values are alphabetic characters K through Z.
For application *FIREWALL, the size will be 30 mega-
bytes (MB).
Note: DRVLTR must be K when
NWSAPP(*FIREWALL) is specified.

For application *FLOWMARK, the size will be 500 mega-


bytes (MB).
Optional Parameters
CRTDRV network-server-storage-space-size: Specify (in mega-
Specifies whether the network server storage space for bytes) the network server storage space size to be used.
the drive is to be created and linked to the network The maximum value is 8000 MB when format *HPFS is
server. used, and 2048 MB when format *FAT is used.
*NO: The drive is not to be created. The specified drive For storage spaces that already exist, a minimum value
must already be assigned to the network server. will be enforced based on the application specified by
*YES: The drive is to be created. The specified drive the NWSAPP parameter. For application *NOTES, the
must not already be assigned to the network server. size will be 200 MB.

FILSVR For application *FIREWALL, the size will be 10 MB.


Specifies the name that will be used for the SRVIFS file
server that will be configured and started on the Inte-
grated PC Server. This name must be unique within For application *FLOWMARK, the size will be 120 MB.
your NetBIOS network.
*NWS: The name of the file server will be the same as
FORMAT
the name of the network server.
Specifies the format of the network server storage space
file-server: Specify the name of the file server to be that is created.
used.

VRYCFG Note: This parameter is valid only when


Specifies whether the network server configuration CRTDRV(*YES) is specified. FORMAT(*FAT) is
object should be varied on. not allowed when NWSAPP(*FIREWALL)
*YES: The configuration object should be varied on.
or NWSAPP(*FLOWMARK) are specified.
*NO: The configuration object should not be varied on.

NWSSTG
Specifies the name of the network server storage space *NWSAPP: The format of the network server storage
that will be created. The storage space cannot already space that is created is based on the application speci-
exist. fied on the NWSAPP parameter.
Note: This parameter is valid only when For application *NOTES, the format will be HPFS.
CRTDRV(*YES) is specified.
*GEN: The name of the network server storage space For application *FIREWALL, the format will be HPFS.
is generated by the system using the network server
name and appending a number to make a unique name.
network-server-storage-space: Specify the network For application *FLOWMARK, the format will be HPFS.
server storage space name to be used. Maximum
length of the storage space name is 10 characters.

Chapter 2. OS/400 Command Descriptions P3-411


INSNWSAPP

*HPFS: The format of the network server storage space Examples


that is created will be HPFS (High Performance File
System). Example 1: Installing the Lotus Notes Server Application
*FAT: The format of the network server storage space INSNWSAPP NWSAPP(\NOTES) NWS(DEPT44C) DRVLTR(X)
that is created will be FAT (File Allocation Table). CRTDRV(\YES) NWSSTG(NOTESDRV)

TEXT This command ensures that the network server named


Specifies the text description to be associated with the DEPT44C exists and is varied OFF. It also ensures that
storage space that is created. drive letter X is not assigned for network server DEPT44C
Note: This parameter is valid only when and that a storage space named NOTESDRV does not exist.
CRTDRV(*YES) is specified. This command also creates a network server storage space
named NOTESDRV of size 500 MB and format *HPFS, and
*BLANK: No text description is associated with the links it to network server DEPT44C as drive X. It configures
storage space. a SRVIFS server named DEPT44C and varies on the
'description': Specify no more than 50 characters of text, DEPT44C network server.
enclosed in apostrophes.
Example 2: Installing the Firewall Server Application
NTSDIR
INSNWSAPP NWSAPP(\FIREWALL) NWS(FIREWALL) DRVLTR(K)
Specifies the directory name for the Notes product to be CRTDRV(\YES) NWSSTG(FWDRIVE)
installed to. This directory name is used as part of the
workstation install of Notes to an Integrated PC Server. This command ensures that the network server named
Note: This parameter is only valid when FIREWALL exists and is varied OFF. It also ensures that
NWSAPP(*NOTES) is specified. drive letter K is not assigned for network server FIREWALL
and that a storage space named FWDRIVE does not exist.
'/NOTES': The directory name for installing Notes will This command also creates a network server storage space
be /NOTES. named FWDRIVE of size 30 MB and format *HPFS, and
'Notes-directory': Specify the directory name where links it to network server FIREWALL as drive K. It configures
Notes should be installed. Enclose the name in apostro- a SRVIFS server named FIREWALL and varies on the
phes. The maximum length of the Notes directory is 128 FIREWALL network server.
characters.
Example 3: Installing the FlowMark Server Application
NTSDTADIR
INSNWSAPP NWSAPP(\FLOWMARK) NWSD(FMSVR) DRVLTR(K)
Specifies the directory name where Notes data will CRTDRV(\YES) NWSSTG(FMSVRK)
reside. This directory name is used as part of the work-
station install of Notes to a file server I/O processor This command does the following:
(FSIOP).
Ÿ Ensures that NWSD FMSVR exists and is varied OFF.
Note: This parameter is only valid when
Ÿ Ensures that drive letter K is not assigned for NWSD
NWSAPP(*NOTES) is specified.
FMSVR and that a storage space named FMSVRK does
'/NOTES/DATA': The data directory name for installing not exist.
Notes will be /NOTES/DATA.
Ÿ Creates a client server storage space named FMSVRK
'Notes-data-directory': Specify the directory name where of size 120 MB and format *HPFS, and links it to NWSD
Notes data will reside. Enclose the name in apostro- FMSVR as drive K.
phes. The maximum length of the Notes data directory
Ÿ Configures a SRVIFS server with name FMSVR.
is 128 characters.
Ÿ Varies on the FMSVR NWSD.

P3-412 OS/400 CL Reference - Part 2 (Full Version)


INSPTF

INSPTF (Install Program Temporary Fix) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─┬──────────────────────────────────┬───────────5
55──INSPTF──LICPGM(──┬─\ALL─────────────────────────────────────────────┬──)────
│ ┌──
───────────────────────────────────────────┐ │ │ ┌─\SERVICE────────────┐ │
6 (1) ─┘
└───(──licensed-program──┬─release-level─┬──)─┴─── └─DEV(──┼─tape-device-name────┼──)─┘
└─\ONLY─────────┘ └─optical-device-name─┘
5──┬──────────────────────────┬──┬─────────────────────┬────────────────────────────────────────────────────────────────────────5
│ ┌─\SRVATT──┐ │ │ ┌─\NO──┐ │
└─INSTYP(──┼─\DLYIPL──┼──)─┘ └─HIPER(──┴─\YES─┴──)─┘
├─\DLYALL──┤
├─\IMMONLY─┤
└─\IMMDLY──┘
5──┬────────────────────────────────────────────────────────────────────────┬──┬─────────────────────────┬──────────────────────5
│ ┌──
───────────────────────────────────────────────────┐ │ │ ┌─\REWIND─┐ │
└─OMIT(─────6─(──licensed-program──PTF-ID──┬─release-level─┬──)─┴───
(2) ────)─┘ └─ENDOPT(──┼─\LEAVE──┼──)─┘
└─\ONLY─────────┘ └─\UNLOAD─┘
5──┬────────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\IPLA─┐ │
└─RESTART(──┼─\SYS──┼──)─┘
└─\FULL─┘
Notes:
1 A maximum of 300 repetitions.

2 A maximum of 50 repetitions.

P All parameters preceding this point can be specified in positional form.

Purpose Element 1: Licensed Program


licensed-program: Specify the product ID of the PTFs to
The Install Program Temporary Fix (INSPTF) command
be installed.
allows the user to load and apply PTFs for multiple products
with a single command. Element 2: Release Level of the Licensed Program
release-level: Specify the release level of the base
The OMIT and HIPER parameters are supplied to allow the
product option in the format VxRyMz, where Vx is the
user of the INSPTF command to be more selective. These
version number, Ry is the release number, and Mz is the
parameters apply only to the PTF loading activity. Any PTF
modification level.
already loaded on the system will be applied.
*ONLY: This value is valid only when one release of the
The INSTYP parameter controls the apply of the PTFs. product's base option is installed on the system. PTFs
Using the different special values allows immediate and for all installed options of the product are loaded and
delayed apply combinations as well as starting an IPL. applied regardless of the release-level of the option.

INSPTF does not support loading PTFs from tape for pro-
ducts that have multiple releases installed on the system. If
PTFs for such a product exist on the tape, the INSPTF will Optional Parameters
not load those PTFs and will return an error.
DEV
Note: To see the parameter and value descriptions for this Specifies the device from which the PTFs are loaded.
command, refer to the online help text. For more The device name must already be known on the system
information about printing the help text, refer to by a device description.
“Printing CL Command Descriptions” in Chapter 1.
*SERVICE: The PTFs sent from the service support
system are loaded.
Required Parameter tape-device-name: Specify the name of the tape device
LICPGM from which the PTFs are loaded.
Specifies the product ID, version, release, and modifica- optical-device-name: Specify the name of the optical
tion level of the products for which PTFs should be device that supports the CD-ROM media class from
installed. which the PTFs are installed.
*ALL: The available PTFs for all installed products are
installed. This must be the first and only value if speci-
fied. All values specified after it are ignored.

Chapter 2. OS/400 Command Descriptions P3-413


INSPTF

INSTYP *ONLY: The only release of the licensed-program


Specifies the type of install to perform. selected on the LICPGM parameter.
*SRVATT: The type of install depends on the service ENDOPT
attribute setting. Specifies the operation that is automatically performed
on the tape volume after the operation ends. If more
CAUTION: than one volume is included, this parameter applies only
to the last tape volume used; all other tape volumes are
The service attribute is shipped with *DLYIPL as the rewound and unloaded when the end of the tape is
default. reached.
Note: This parameter is only valid if a tape-device-
name is specified on the DEV parameter.
*DLYIPL: All PTFs are marked for delayed apply and
an initial program load (IPL) is done on the system. *REWIND: The tape is automatically rewound, but not
unloaded, after the operation has ended.
*DLYALL: All PTFs are marked for delayed apply and
an initial program load (IPL) is not done on the system. *LEAVE: The tape does not rewind or unload after the
operation ends. It remains at the current position on the
*IMMONLY: Only the immediate PTFs are applied and
tape drive.
an initial program load (IPL) is not done on the system.
*UNLOAD: The tape is automatically rewound and
*IMMDLY: The immediate PTFs are applied and the
unloaded after the operation ends.
delayed PTFs are marked for apply at the next initial
program load (IPL).
IPLTYPE
HIPER
Specifies the point from which the initial program load
Specifies whether only high-impact pervasive (HIPER)
(IPL) restarts when the PTF apply type (INSTYP) param-
PTFs should be loaded when installing from a media.
eter indicates an IPL will be performed.
Note: This parameter is ignored if DEV(*SERVICE) is
Note: This is valid only when INSTYP(*DLYIPL) is
specified.
specified or when INSTYP(*SRVATT) is specified
This is only valid when installing IBM and the PTF install type (PTFINSTYP) service
cumulative/preventive PTF packages. attribute is set to *DLYIPL.
*NO: All PTFs, other than those listed in the omit list, *IPLA: The value specified on the Change IPL Attri-
should be installed. butes (CHGIPLA) command is used. To determine the
*YES: Only HIPER PTFs that are not on the omit list current setting for this value, use the Display IPL Attri-
should be loaded. butes (DSPIPLA) command.
*SYS: Specifies that the system determines how much
OMIT
of the system to restart.
Specifies the product ID, version, release, modification
level, and PTF ID for PTFs that should not be loaded. The operating system is always restarted. The hardware
The current state of the PTF is not checked before being is restarted only if a PTF that requires a restart is
passed to LODPTF. If the PTF is already loaded it is applied. Other hardware functions, such as some con-
applied. figuration changes, that occur during a *FULL IPL are
not processed.
Element 1: Licensed-Program
*SYS can result in a shorter IPL time than if you specify
licensed-program: Specify the product ID for the PTFs
*FULL.
that should not be loaded.
*FULL: All portions of the system, including the hard-
Element 2: PTF-Number
ware, are restarted.
PTF-number: Specify the PTF ID for the PTFs that
should not be installed.
Element 3: Release Level Examples
release-level: Specify the release level of the base Example 1: Omitting PTFs
product option or the release level of the PTF for the
INSPTF LICPGM((\ALL)) DEV(\SERVICE) INSTYP(\IMMDLY)
PTFs that should not be loaded. The release level must | OMIT((5769999 MF12345 V4R2Mð) (5769SS1 SF12345 V4R2Mð))
be specified in VxRyMz format, where Vx is the version
number, Ry is the release number, and Mz is the modifi- This command will load all PTFs that are in *SERVICE for all
cation level. products installed on the system except MF12345 and
SF12345. It will then apply all PTFs in loaded status that can
be applied immediately and mark the rest for delayed apply.

P3-414 OS/400 CL Reference - Part 2 (Full Version)


INSPTF

Example 2: Installing HIPER only Example 3: Installing Only Immediate PTFs


| INSPTF LICPGM((5769PT1 V4R2Mð)) DEV(TAPð1) INSPTF LICPGM((\ALL)) DEV(TAPð1) INSTYP(\IMMONLY)
INSTYP(\IMMONLY) HIPER(\YES) ENDOPT(\LEAVE)

| This command will search the media for PTFs for the This command will load all PTFs for the products that are
| V4R2M0 Performance Tools product in the HIPER section. installed on the system, from the device TAP01. All PTFs in
Each PTF that can be applied immediately will be. Delayed loaded status on the system that can be applied immediately
PTFs will be loaded, but not marked for apply. will be. No delayed PTFs will be set for apply.

Chapter 2. OS/400 Command Descriptions P3-415


INZDKT

INZDKT (Initialize Diskette) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──INZDKT──DEV(──device-name──)──┬───────────────────────────────────┬──┬────────────────────────────────────┬─────────────────5
│ ┌─\NONE─────────────┐ │ │ ┌─\BLANK───────────┐ │
└─NEWVOL(──┴─volume-identifier─┴──)─┘ └─NEWOWNID(──┴─owner-identifier─┴──)─┘
(P) ──┬─────────────────────┬──┬───────────────────────┬─────────────────5%
5──┬────────────────────────┬──┬──────────────────────┬───
│ ┌─\DATA───┐ │ │ ┌─\STD─┐ │ │ ┌─\YES─┐ │ │ ┌─\EBCDIC─┐ │
(1) ─┼─1───────┼──)─┘ └─SCTSIZ(──┼─128──┼──)─┘
└─FMT(─── └─CHECK(──┴─\NO──┴──)─┘ └─CODE(──┴─\ASCII──┴──)─┘
├─2───────┤ ├─256──┤
├─2D──────┤ ├─512──┤
├─\DATA2──┤ └─1ð24─┘
└─\SAVRST─┘
Notes:
1 If FMT(*SAVRST) is specified, CODE(*ASCII) cannot be specified.

P All parameters preceding this point can be specified in positional form.

Purpose Optional Parameters


The Initialize Diskette (INZDKT) command initializes a NEWVOL
diskette for use. This command writes identification informa- Specifies the volume identifier for the diskette being ini-
tion on a diskette and sets the format. Initializing a diskette tialized.
includes the following: *NONE: No volume identifier is specified; only the
Ÿ Checking for active files that should not be cleared. system date is written in the volume identifier field of the
Ÿ Testing each track for physical defects on the recording volume label.
surface. A diskette is unusable if more than two defec- volume-identifier: Specify up to 6 characters for the
tive cylinders are found, if cylinder 0 is defective, or if volume identifier to identify the diskette being initialized;
the track identifier of a defective track cannot be read. any combination of alphabetic characters (except $, #, or
Ÿ Formatting each track to a specified sector size (128, @) or numeric characters can be used.
256, 512 or 1024 bytes) and recording density (single
density or double density). A diskette's format deter- NEWOWNID
mines what the diskette may be used for in later pro- Specifies the identification of the new diskette owner to
cessing. This is explained more fully in the FMT and write in the volume label. Any combination of alphabetic
SCTSIZ parameter. characters (except $, #, or @) or numeric characters can
Ÿ Defining a single (expired) file covering the entire be used.
diskette. The file is identified as DATA. *BLANK: Text is not specified.

IBM-supplied diskettes are initialized before they are shipped owner-identifier: Specify up to 14 uppercase alphabetic
to a customer. A diskette should be reinitialized when: or numeric characters that identify the new owner of the
diskette. Even if the value is enclosed in apostrophes,
Ÿ Its format is changed.
no lowercase letters, embedded blanks, or special char-
Ÿ The sequence of the records on the diskette is changed
acters can be used. If fewer than 14 characters are
(they can only be sequential).
specified, the field is left-justified and padded on the
Ÿ A defect has occurred in one or two tracks.
right with blanks.
Ÿ The diskette has been exposed to a strong magnetic
field. FMT
Specifies the format to use to initialize the diskette.
One INZDKT command can initialize only one diskette at a Either *DATA, *DATA2, 1, 2, or 2D can be specified if
time. the diskette will contain data files that are in the basic,
Note: When initializing diskettes with labels that are not IBM H, I, or System/36 environment exchange formats. The
standard labels, specify CHECK(*NO). basic exchange format has a set of requirements that
ensures that a diskette can be exchanged between
systems that are capable of using both the IBM diskette
Required Parameters types 1 or 2. *SAVRST (type E general data exchange)
DEV must be specified if the diskette is used in the AS/400
Specifies the name of the device in which the diskette system or System/38 save and restore operations; that
being initialized is placed. is, if their data files will contain saved objects. *SAVRST
is also a valid format for the System/36 save and restore
operations, and it is the preferred format to use.

P3-416 OS/400 CL Reference - Part 2 (Full Version)


INZDKT

*DATA: A one- or two-sided diskette is formatted with Table 16, at the end of this command description,
single-density recording. shows the valid sector sizes.
1: A one-sided diskette is formatted with single-density Format for 8-inch diskette.
recording.
Table 17, at the end of this command description,
2: A two-sided diskette is formatted with single-density shows the format for 5.25-inch diskette
recording.
The following chart shows which exchange types can be
2D: A two-sided diskette is formatted with double- used for each sector size.
density recording.
*DATA2: A two-sided diskette is formatted with double- Exchange
Type 128 256 512 1024
density recording (as if 2D is specified).
Basic X
*SAVRST: A two-sided diskette is formatted with
double-density recording. This format is required if the H X1
diskette is used in a save and restore operation. I X X X X
Notes: SAVRST X
S/36-S/R X X X X
1. Because *DATA2, *SAVRST, and 2D specify that
1 H is used only as the exchange type if the diskette is
the diskette is used for double-density recording, it
initialized with double-density recording (FMT(*DATA2)
is recommended that a type 2D diskette be used,
or FMT(2D)).
rather than a type 2. A type 2D diskette is made for
double-density recording, whereas a type 2 is made
for single-density recording and is more prone to
CHECK
media errors if used for double-density recording.
Specifies whether a check is made for active files (files
2. If FMT(*SAVRST) is specified, CODE(*ASCII) having an expiration date greater than the system date).
cannot be specified.
*YES: A check is performed on files whose labels are in
SCTSIZ cylinder 0 only. File labels in an extended file label area
Specifies the number of bytes per sector with which are not checked. If any active files are found, an oper-
each track is initialized. ator message is sent. The operator can continue initial-
ization (active files are destroyed), or end the
*STD: A standard sector size, based on the value of the
initialization of that diskette.
FMT parameter, is used. Such as the following:
*NO: Diskette initialization proceeds without a check for
SCTSIZ active files.
FMT (*STD)
*DATA 128 CODE
1 128 Specifies the character code used. The code can be
2 128 either extended binary-coded decimal interchange code
2D 256 (*EBCDIC) or the American National Standard Code for
*DATA2 256 Information Interchange (*ASCII).
*SAVRST 1024 *EBCDIC: The volume label is written in EBCDIC and is
128: Each track is initialized with 128 bytes per sector. an IBM standard label; subsequent data must also be
written in EBCDIC.
256: Each track is initialized with 256 bytes per sector.
*ASCII: The volume label is written in ASCII and is an
512: Each track is initialized with 512 bytes per sector. IBM standard label in the same format as the EBCDIC
1024: Each track is initialized with 1024 bytes per label; subsequent data must also be written in ASCII. If
sector. FMT(*SAVRST) is specified, *ASCII cannot be specified.

Table 16. Valid Sector Size


SCTSIZ *DATA 1 2 2D *DATA2 *SAVRST
*STD X X X X X X
128 X X X
256 X X X X X
512 X X X X X
1024 X X X

Chapter 2. OS/400 Command Descriptions P3-417


INZDKT

Table 17. Format for 5.25 Inch Diskette


SCTSIZ *DATA 1 2 2D *DATA2 *SAVRST
*STD X X X
256 X X
512 X X
1024 X X X

Examples Example 2: Initializing a Diskette to the Save and


Restore Format
Example 1: Initializing a Diskette INZDKT DEV(DKT2) NEWVOL(SAVE)
INZDKT DEV(DKT1) NEWVOL(ORIGIN) NEWOWNID(DEPT5ð4) NEWOWNID(DON) FMT(\SAVRST) CHECK(\NO)

This command initializes the diskette device DKT1. The This command initializes the diskette in device DKT2 to the
diskette is checked for active files (CHECK(*YES) is save and restore format. The diskette is initialized with the
assumed). The diskette is formatted for basic data exchange NEWVOL parameter of SAVE. The owner identifier field has
files (FMT(*DATA) is assumed). The volume label has DON written into it.
ORIGIN written in the volume identifier field and DEPT504
written in the owner identifier field.

P3-418 OS/400 CL Reference - Part 2 (Full Version)


INZDSTQ

INZDSTQ (Initialize Distribution Queue) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─┬───────────────────────┬───────────────────────────────────────────────────5%
55──INZDSTQ──DSTQ(──distribution-queue-name──)────
│ ┌─\NO────┐ │
└─CLEAR(──┼─\YES───┼──)─┘
└─\PURGE─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose the language used for the work station), the internal
value for a distribution queue name may differ from the
The Initialize Distribution Queue (INZDSTQ) command resets characters shown on the Work with Distribution Queue
the status of a distribution queue and the entries on the (WRKDSTQ) command. An error may be reported if the
queue. It also optionally clears all distributions on the queue. character-string value specified for the DSTQ parameter
This command applies to both the normal and high priority does not match the rules for an internal distribution
sections of the specified queue. queue value or if it does not match the internal value for
any defined distribution queue (ignoring case differ-
Attention: ences).
Initializing a distribution queue can result in the loss or dupli- Note: To see the parameter and value descriptions for this
cation of distributions in the network, depending on the status command, refer to the online help text. For more
of the distributions in transit at the time this command is run. information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1.
Initializing a distribution queue includes the following:
Ÿ If a SNADS (Systems Network Architecture (SNA) distri- Required Parameter
bution services) sender job is active for the queue, the
job is ended. This job cancelation takes effect imme- DSTQ
diately. Distribution queues being sent are interrupted. Specifies the name of the distribution queue to initialize.
Ÿ If the queue type is a SystemView distribution services The queue must be previously configured using the Con-
(SVDS) queue type and a receiver job is active for this figure Distribution Services (CFGDSTSRV) or the Add
connection, the job is ended. This job cancelation takes Distribution Queue (ADDDSTQ) command.
effect immediately. All partially received distributions are
discarded.
Optional Parameters
Ÿ If the distribution queue is to be cleared, all distributions
on the queue are deleted as specified on the CLEAR CLEAR
parameter. Specifies whether distributions on the queue are deleted.
Ÿ If the queue is not cleared, the distributions on the
Attention:
queue that do not have "Held" status are set to "Ready".
Distributions with a status of "Held" remain held. Using the *PURGE value results in the loss of distribu-
Ÿ The queue status is set to "Ready" unless the queue is tions with no trace.
in the "Held" status. *NO: Distributions on the queue are not deleted.
Ÿ If the QSNADS system is active, a SNADS sender job is
submitted for the queue following the same rules used to *YES: Distributions on the queue are deleted. Each
start the QSNADS subsystem. deleted distribution is logged and, if the distribution origi-
nator requested notification, a notification is sent to the
Distribution queue names are translated to the graphic char- originator or to the report destination specified in the dis-
acter set and code page 930 500, using the job's coded char- tribution.
acter set identifier (CCSID). Note: System Network Architecture distribution services
(SNADS) status distributions and distribution
Restrictions:
reports are used to report information about a
1. This command is shipped with public *EXCLUDE distribution back to the originator. Status report
authority, and the QPGMR and QSYSOPR user profiles distributions never result in another status report
have private authorities to use the command. distribution. If a status report distribution is
2. Messages that report errors about distribution queues deleted, no notification is sent.
may display or print different characters than the user
*PURGE: Distributions on the queue are deleted.
entered for the distribution queue name because of
Deleted distributions are not logged and no notification is
internal system transformations. Similarly (depending on

Chapter 2. OS/400 Command Descriptions P3-419


INZDSTQ

sent to the originator or to the report destination speci- Example 2: Initializing and Clearing a Distribution Queue
fied in the distribution. INZDSTQ DSTQ('ERRORQ') CLEAR(\YES)

This command clears the distribution queue ERRORQ that is


Examples being used as a repository for distributions that would have
Example 1: Initializing a Distribution Queue resulted in routing errors. Distributions that are deleted are
logged, and the originators of the distributions are notified.
INZDSTQ DSTQ('SYSTEMA APPN')
Example 3: Initializing and Purging a Distribution Queue
Connection information is about to be changed for system
'SYSTEMA APPN' by a central site administrator. This INZDSTQ DSTQ('TESTQ') CLEAR(\PURGE)
command initializes the queue to avoid error conditions that
This command clears the distribution queue TESTQ that is
can be encountered by the Change Distribution Queue
being used for testing a new batch application. Distributions
(CHGDSTQ) command. Distributions on the queue are not
are deleted but not logged, and the originators are not noti-
deleted.
fied.

P3-420 OS/400 CL Reference - Part 2 (Full Version)


INZOPT

INZOPT (Initialize Optical) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ────────────────────────────────────────────5
55──INZOPT──VOL(──volume-identifier──)──┬───────────────────────────────────────┬───
│ ┌─\VOL──────────────────┐ │
└─NEWVOL(──┴─new-volume-identifier─┴──)─┘
5──┬────────────────────────────────────────────┬──┬─────────────────────┬──┬─────────────────────────────┬─────────────────────5
│ ┌─95────────────────────┐ │ │ ┌─\YES─┐ │ │ ┌─\BLANK────────┐ │
(1) ─┴─volume-full-threshold─┴──)─┘ └─CHECK(──┴─\NO──┴──)─┘ └─TEXT(──┴─'description'─┴──)─┘
└─THRESHOLD(───
5──┬────────────────────────┬──┬──────────────────────┬────────────────────────────────────────────────────────────────────────5%
│ ┌─\PRIMARY─┐ │ │ ┌─\CALC─┐ │
└─TYPE(──┴─\BACKUP──┴──)─┘ └─CCSID(──┼─5ðð───┼──)─┘
└─85ð───┘
Notes:
1 This parameter is ignored and the threshold is set to 99 percent when TYPE(*BACKUP) is specified.

P All parameters preceding this point can be specified in positional form.

Purpose 95: The volume-full-threshold is set to 95 percent.


volume-full-threshold: Specify the volume threshold per-
The Initialize Optical (INZOPT) command initializes an optical
centage. Valid values range from 1 through 100.
volume. When an optical volume is initialized again, all
existing information is lost. CHECK
Specifies whether the system checks to see if the optical
Restriction: To use this command you must have *ALL volume is initialized.
authority to the authorization list securing the volume to be
initialized. *YES: The system checks to see if the optical volume is
initialized.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more Note: If the optical volume is initialized, the operation is
information about printing the help text, refer to ended and an error message is sent.
“Printing CL Command Descriptions” in Chapter 1. *NO: The system does not check to see if the optical
volume is initialized.
Required Parameter TEXT
Specifies the text that briefly describes the optical
VOL
volume. More information on this parameter is in
Specifies the volume identifier of the optical volume
Appendix A, “Expanded Parameter Descriptions.”
being initialized.
*BLANK: Text is not specified.

Optional Parameters 'description': Specify no more than 50 characters of text,


enclosed in apostrophes.
NEWVOL
Specifies the identifier of the optical volume after it is ini- TYPE
tialized. More information about optical volume names Specifies the type of optical volume being initialized.
can be found in the Optical Support book. Optical volumes for user applications are initialized as
primary volumes. Backup optical volumes can be written
*VOL: The new volume identifier is the same as the old to only by using the following set of optical backup com-
volume identifier. mands: CVTOPTBKU, CPYOPT, and DUPOPT.
new-volume-identifier: Specify the new volume identifier. *PRIMARY: The optical volume is used as a primary
THRESHOLD volume.
Specifies the threshold percentage of the volume. This *BACKUP: The optical volume is used as a backup
is the maximum amount of volume space that the volume.
system is allowed to use. If the volume is intended to
be used for save or restore data, set the threshold to CCSID
100 percent. Specifies the character set in which the optical volume,
directory, file names, and volume description are written.
Note: If TYPE(*BACKUP) is specified, this parameter is This parameter does not affect how user data is written.
ignored and the volume-full-threshold is set to 99 The user application must determine the character set in
percent. which the file data is written.

Chapter 2. OS/400 Command Descriptions P3-421


INZOPT

*CALC: The system default character set is used. For Example


the current release, this value is 500.
INZOPT VOL(VOLð1) THRESHOLD(99) CHECK(\NO)
500: The EBCDIC character set and code page 500 are
used. This command initializes the optical volume VOL01 with a
volume-full-threshold of 99 percent. The system does not
850: The ASCII character set and code page 850 are
check to see if the volume is initialized.
used.

P3-422 OS/400 CL Reference - Part 2 (Full Version)


INZPCS

INZPCS (Initialize Client Access) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──INZPCS──┬────────────────────────────────┬──┬─────────────────────────────────┬──┬──────────────────────────────────┬───────5
│ ┌─\DFT──────────┐ │ │ ┌─\DFT─────────────┐ │ │ ┌─\DFT─────────────┐ │
└─KBDTYPE(──┴─keyboard-type─┴──)─┘ └─ASCII(──┴─code-page-number─┴──)─┘ └─EBCDIC(──┴─code-page-number─┴──)─┘
(P) ──────────────────────────────────────────────────────────────────────────────5%
5──┬─────────────────────────────────────────┬───
│ ┌─\DFT──────────────────┐ │
└─LANGUAGE(──┴─language-feature-code─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Table 18 (Page 1 of 2). Keyboard Mapping


Language/Country Iden- ASCII
The Initialize Client Access (INZPCS) command is used to tifier Device
Group
establish an operating environment for Client Access applica-
France (Qwerty) FQB
tions. This is done by creating various control documents on France (Qwerty) Multinational FQI
the Client Access folders. These control documents include Greece 1 GNB 1
code page mapping tables, keyboard tables, and font files Hebrew NCB D
used for displaying information on the PC display. Hungary HNB
Iceland ICB
Iceland Multinational ICI
Optional Parameters International INB
International Multinational INI
KBDTYPE Iran (Farsi) IRB
Specifies the keyboard type to use. Italy ITB A, B
*DFT: The default keyboard type is used. When the Italy Multinational ITI A, B
Japan English JEB
command is first run, the default value comes from the
Japan English Multinational JEI
system value QKBDTYPE. When the command is run Japan Kanji JKB
after the first time, the default takes the value specified (for PS/55 and 5295
in the previous running of the command. display stations)
Japan Latin Extended JPB
keyboard-type: Specify the 3-character keyboard type
Japan United States Basic JUB
identifier to use. Values are listed in the Keyboard Japan Katakana KAB
Mapping table. (for 5251, 5291, 5292,
and 3180 Katakana
Table 18 (Page 1 of 2). Keyboard Mapping display stations)
Language/Country Iden- ASCII Korea KOB
tifier Device | Lao People's LAB
Group | Democratic Republic
Albania ALI Latin-2/ROECE ROB
Arabic X/Basic CLB D Latvia LVB
Austria/Germany AGB A, B Lithuania LTB
Austria/Germany Multinational AGI A, B FYR Macedonia MKB
Belgium Multinational BLI B (Former Yugoslav Republic)
Brazilian Portuguese BRB Netherlands NEB
Bulgaria BGB Netherlands Multinational NEI
Canadian French CAB A, B Norway NWB B
Canadian French Multinational CAI A, B Norway Multinational NWI B
| Catalan SPB Poland PLB
Chinese (Simplified) RCB Portugal PRB B
Chinese (Traditional) TAB Portugal Multinational PRI B
Croatia YGI Romania RMB
Cyrillic CYB Russia RUB
Czech Republic CSB Serbia (Cyrillic) SQB
Denmark DMB B Serbia (Latin) YGI
Denmark Multinational DMI B Slovakia SKB
Estonia ESB Slovenia YGI
Finland/Sweden FNB B Spain SPB B
Finland/Sweden Multinational FNI B Spain Multinational SPI B
France (Azerty) FAB A, B Spanish Speaking SSB B
France (Azerty) Multinational FAI A, B Spanish Speaking Multinational SSI B

Chapter 2. OS/400 Command Descriptions P3-423


INZPCS

Table 18 (Page 2 of 2). Keyboard Mapping *DFT: The primary language of Client Access is pro-
Language/Country Iden- ASCII cessed.
tifier Device
Group language-feature-code: Specify the language feature
Sweden SWB B code of the language to process. Values are listed
Sweden Multinational SWI B below:
Switzerland/French SFI B
Multinational Table 19. Language Feature Identifiers
Switzerland/German SGI B Language Identifier
Multinational Arabic 2954
Thai THB Belgium Dutch 2963
Turkey (Qwerty) TKB Belgium French 2966
Turkey (F) TRB Brazilian Portuguese 2980
Ukraine UAB Canadian French 2981
United Kingdom UKB A, B Croatian 2912
United Kingdom Multinational UKI A, B Czech 2975
United States/Canada USB A, B, C Danish 2926
United States/Canada USI A, B, C Dutch 2923
Multinational English 2924
Urdu PKB English U/L (DBCS) 2984
Vietnam VNB English Uppercase 2950
Languages of the former YGI English Uppercase/DBCS) 2938
Yugoslavia Farsi 2998
Note: Finnish 2925
1
French 2928
The GNB code is the current identifier for Greece. The
French-MNCS 2940
GKB code was used prior to V2R1, and continues to be
German 2929
supported, but provides fewer characters than the recom-
German-MNCS 2939
mended GNB code.
Greek 2957
Hebrew 2961
Note: For example, KBDTYPE(USB) indicates a key- Hungarian 2976
board using the United States/Canada character Icelandic 2958
set. Italian 2932
Italian-MNCS 2942
ASCII Japanese (DBCS) 2962
Specifies the ASCII code page number to use. Korean (DBCS) 2986
*DFT: The default PC code page number is used. Norwegian 2933
Polish 2978
When the command is run for the first time, the default
Portuguese 2922
value is 437 for keyboard types USB and USI and 850 Portuguese-MNCS 2996
for most others. When the command is run after the first Russian 2979
time, the default value takes the value specified at the Slovakian 2994
previous running of the command. Slovenian 2911
Spanish 2931
code-page-number: Specify the ASCII code page
Swedish 2937
number to use. Thai 2972
Traditional Chinese (DBCS) 2987
EBCDIC
Turkish 2956
Specifies the EBCDIC (or host) code page number to
use.
*DFT: The default system code page number is used. Example
When the command is first run, the default value comes INZPCS
from the code page portion of the system value
QCHRID. When the command is run after the first time, This command copies or merges all machine readable infor-
the default takes the value specified in the previous mation (MRI) into personal computer programs. The default
running of the command. keyboard type used is determined from the system value
QKBDTYPE. A default ASCII code page is selected based
code-page-number: Specify the 3-character EBCDIC (or on the KBDTYPE. This is usually 850 for keyboard types
host code) page number to use. other than USB or USI. The EBCDIC code page number is
LANGUAGE determined from the system value QCHRID.
Specifies the language feature identifier (ID) of the sec-
ondary language to be processed.

P3-424 OS/400 CL Reference - Part 2 (Full Version)


INZPFM

INZPFM (Initialize Physical File Member) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
55──INZPFM──FILE(──┼───────────────┼──physical-file-name──)──┬────────────────────────────────────────┬─────────────────────────5
├─\CURLIB/──────┤ │ ┌─\FIRST────────────────────┐ │
└─library-name/─┘ └─MBR(──┼─\LAST─────────────────────┼──)─┘
└─physical-file-member-name─┘
(P) ──┬────────────────────────────────┬────────────────────────────────────────────────────────────5%
5──┬───────────────────────┬───
│ ┌─\DFT─┐ │ │ ┌─\NXTINCR──────┐ │
└─RECORDS(──┴─\DLT─┴──)─┘ └─TOTRCDS(──┴─total-records─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose library-name: Specify the name of the library to be


searched.
The Initialize Physical File Member (INZPFM) command ini-
tializes records in a member of a physical file to the specified physical-file-name: Specify the name of the physical file.
type of record (either default or deleted records). This
command is usually used for files that are processed in Optional Parameters
arrival sequence or by relative record numbers. If the initial-
ized member is empty, records are added and initialized to MBR
the specified type; if the member is not empty, records of the Specifies the name of the member that is initialized.
specified type are added to the member. As many records *FIRST: The first member in the database file is used.
are added as is necessary to make the total record count
specified. *LAST: The last member of the specified physical file is
initialized.
Note: The INZPFM command ignores all file overrides that
are currently in effect for the job. physical-file-member-name: Specify the name of the
physical file member that is initialized.
Restrictions: (1) The member may be open for input (read
RECORDS
only) while the initialize operation takes place but cannot be
Specifies the type of records that are initialized (added)
open for update, delete, or insert. (2) To initialize the
to the specified member. The specified members are
member with default records, the user needs object opera-
initialized with default records or deleted records.
tional authority, object management authority or alter, and
add authority for the file in which the member exists and *DFT: The specified member is initialized with default
execute authority to the library. (3) To initialize the member records. If a default value was specified in the DDS
with deleted records, the user also needs delete authority for (DFT keyword) for a field, that field is initialized to the
the file. (4) An *EXCLRD lock is required on the member to specified default; otherwise, all numeric fields are initial-
initialize it. ized to zeros and all character fields are initialized to
blanks.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more *DLT: The specified member is initialized with deleted
information about printing the help text, refer to records. The records are not eligible for access, but
“Printing CL Command Descriptions” in Chapter 1. simply hold a place in the file. Deleted records can be
updated to reuse the deleted space.

Required Parameters TOTRCDS


Specifies the total number of records in the member
FILE after it is initialized. If the value specified in this param-
Specifies the qualified name of the physical file that con- eter causes the size of the file to be larger than the size
tains the member being initialized. specified when the file was created, a message is sent
The name of the physical file can be qualified by one of to the system operator's message queue (QSYSOPR).
the following library values: The operator can either continue or end the operation.

*LIBL: All libraries in the job's library list are *NXTINCR: The number of records in the member is
searched until the first match is found. increased to extend the file to the next allocation incre-
ment. If the member is empty, records are added to
*CURLIB: The current library for the job is meet the first allocation specified for the member. If
searched. If no library is specified as the current SIZE(*NOMAX) is specified when the file is created,
library for the job, the QGPL library is used. *NXTINCR is not valid.

Chapter 2. OS/400 Command Descriptions P3-425


INZPFM

total-records: Specify the total number of records, INZPFM FILE(\CURLIB/INV) TOTRCDS(12ððð)


ranging from 1 to 2147483646, by which the member is
increased. If the number of existing records in the This command initializes as many as 12,000 records in the
member already meets or is larger than this number, no first member of the physical file named INV in the job's
records are initialized; if the number is less than that current library *CURLIB. Only the number of records are
specified, enough records are initialized to equal the added that brings the total to 12,000 records in the member.
total specified. Any records that are added are initialized to the default
format. If a default value is specified in the DDS (DFT
keyword) for a field, that field is initialized to the specified
Example default; otherwise, all numeric fields are initialized to zeros
and all character fields are initialized to blanks.

P3-426 OS/400 CL Reference - Part 2 (Full Version)


INZSYS

INZSYS (Initialize System) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P)─┬─────────────────────────────────────────────────────┬──────────────────────────────────────────────────────────5%
55──INZSYS───
│ ┌─\SYSOPR───────────────────────────────┐ │
│ │ ┌─\LIBL/────────┐ │ │
└─MSGQ(──┴─┼───────────────┼──message-queue-name─┴──)─┘
├─\CURLIB/──────┤
└─library-name/─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose The name of the message queue can be qualified by


one of the following library values:
The Initialize System (INZSYS) command initializes conver-
sions done during installation procedures. This process is *LIBL: All libraries in the job's library list are
initiated during the first IPL after the software package is searched until the first match is found.
installed. *CURLIB: The current library for the job is
searched. If no library is specified as the current
More information is available in the Software Installation library for the job, the QGPL library is used.
book.
library-name: Specify the name of the library to be
Note: To see the parameter and value descriptions for this searched.
command, refer to the online help text. For more
information about printing the help text, refer to message-queue-name: Specify the name of the
“Printing CL Command Descriptions” in Chapter 1. message queue name to which messages are sent.

Optional Parameters Example


INZSYS
MSGQ
Specifies the qualified name of the message queue to This command initializes the conversions done during instal-
which messages are sent. lation procedures.
*SYSOPR: Messages from the system operator
message queue (QSYSOPR) are sent to the system
operator.

Chapter 2. OS/400 Command Descriptions P3-427


INZTAP

INZTAP (Initialize Tape) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──────────5
55──INZTAP──DEV(──device-name──)──┬───────────────────────────────────────┬──┬────────────────────────────────────┬───
│ ┌─\NONE─────────────────┐ │ │ ┌─\BLANK───────────┐ │
└─NEWVOL(──┼─\CTGID────────────────┼──)─┘ └─NEWOWNID(──┴─owner-identifier─┴──)─┘
└─new-volume-identifier─┘
5──┬────────────────────────────────┬──┬───────────────────────┬──┬────────────────────────────┬──┬───────────────────────┬─────5
│ ┌─\MOUNTED──────────┐ │ │ ┌─\YES───┐ │ │ ┌─\DEVTYPE──┐ │ │ ┌─\EBCDIC─┐ │
└─VOL(──┴─volume-identifier─┴──)─┘ └─CHECK(──┼─\NO────┼──)─┘ └─DENSITY(──┼─\CTGTYPE──┼──)─┘ └─CODE(──┴─\ASCII──┴──)─┘
└─\FIRST─┘ ├─16ðð──────┤
├─32ðð──────┤
├─625ð──────┤
├─\FMT348ð──┤
├─\FMT349ðE─┤
├─\FMT357ð──┤
├─\FMT357ðE─┤
├─\FMT359ð──┤
├─\QIC12ð───┤
├─\QIC525───┤
├─\QIC1ððð──┤
├─\QIC2GB───┤
├─\QIC3ð4ð──┤
├─\QIC5ð1ð──┤
├─\FMT2GB───┤
├─\FMT5GB───┤
└─\FMT7GB───┘
5──┬─────────────────────────┬──┬─────────────────────┬────────────────────────────────────────────────────────────────────────5%
│ ┌─\REWIND─┐ │ │ ┌─\NO──┐ │
└─ENDOPT(──┴─\UNLOAD─┴──)─┘ └─CLEAR(──┴─\YES─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose beginning of the tape. If it is initialized as an unlabeled tape,


only the two tape markers are written at the beginning of the
The Initialize Tape (INZTAP) command prepares magnetic tape.
tapes for use on the system. This command is used to write
volume labels on standard-labeled magnetic tapes so the All tapes must be initialized before use. Tapes that have
tape device support can do standard-label processing. Unla- been initialized do not need to be reinitialized unless the user
beled tapes must also be initialized by this command or by a wants to write a new volume label, change the tape type
similar process on another system before these tapes can be from a standard-labeled tape to an unlabeled tape or vice
used on the AS/400 system. Note that this command, unlike versa, or change the density of a standard labeled tape.
the Initialize Diskette (INZDKT) command, does not indicate Note: To see the parameter and value descriptions for this
whether the tape is used for data written in the basic command, refer to the online help text. For more
exchange format or in the save and restore format. That is information about printing the help text, refer to
done when the data files are actually written on the tape. “Printing CL Command Descriptions” in Chapter 1.
Three operations can be done by this command, depending
on the values specified for the CHECK and CLEAR parame- Required Parameter
ters.
DEV
1. The tape can be checked for active data files (files that Specifies the name of the device in which the volume
have not reached their expiration dates). being initialized is placed. Specify the name of the tape
2. The tape can be initialized either as a standard-labeled or media library device.
tape (if NEWVOL specifies a volume identifier) or as an
unlabeled tape. Initialization writes only on the begin-
Optional Parameters
ning of the tape, but it makes all data on the reel inac-
cessible. NEWVOL
3. If the tape is being initialized, any previous data on the Specifies the volume identifier for a tape being initialized
tape can also be deleted. as a standard-labeled tape. If no volume identifier is
specified, the tape is initialized as an unlabeled tape;
If the tape is being initialized as a standard-labeled volume, a that is, it has no volume label and no header labels for
volume label followed by two tape markers is written at the data files that are written on it later.

P3-428 OS/400 CL Reference - Part 2 (Full Version)


INZTAP

Note: If the tape device is contained in a library device, CHECK


then the volume specified should be the cartridge Specifies whether a labeled tape volume is checked for
identifier to be mounted and used. active data files (files with an end date later than the
current system date) before it is initialized. If an unla-
*NONE: The tape is initialized as an unlabeled tape.
beled volume is on the specified device for initialization,
Only tape markers are used to indicate the beginning
this parameter is ignored. If the volume must be
and end of each data file on it, and the beginning and
checked for active files, as much of the tape is read as
end of the volume itself.
necessary before initialization is done.
*CTGID: The tape is initialized as a standard labeled
*YES: All data file labels on the tape are checked. If
tape. The new logical volume identifier is the same as
active files are found, the operation is ended and an
the external identifier of the tape cartridge. Each tape
error message is sent.
within a library device must have a unique external iden-
tifier. *NO: Tape initialization continues with no checking for
active files. To initialize a new or empty volume,
new-volume-identifier: Specify up to 6 characters to
VOL(*MOUNTED) and CHECK(*NO) must be specified;
identify the new volume. The identifier must contain only
otherwise, the system attempts to read labels from the
alphanumeric characters (A through Z, $, #, @, and 0
volume on the specified device until the tape completely
through 9), and cannot have a prefix or contain blanks.
unwinds from the reel.
Each tape reel should have a unique volume identifier to
ensure optimum protection and control of the tape *FIRST: Only the first data file label on the tape is
volumes. checked. If there are no data files in the volume, or if
the first data file has ended, the volume is initialized
NEWOWNID
without checking for any other files on the reel. If the
Specifies which tape owner's identifier to write in the
first data file has not ended (it is active), the operation is
volume label of the volume being written. The owner
stopped and an error message is sent.
identification contains up to 14 characters (letters and/or
numbers in any combination), is left-justified, and If it is known that there is only one data file on the tape,
padded on the right with blanks if fewer than 14 charac- that there are no active files on the volume, or that all
ters are supplied. files have the same end date, use CHECK(*FIRST) to
do the fastest initialization of the tape. Note, however,
*BLANK: Text is not specified.
that any data files past the first one are destroyed, with
owner-identifier: Specify up to 14 characters that identify no end check made.
the owner of the tape. If fewer than 14 characters are
DENSITY
specified, the field is left-justified and padded on the
Specifies the density or format in which to write the data
right with blanks.
on the tape after it has been initialized. The density
VOL used for all data files written to a standard-labeled tape
Specifies one or more volume identifiers used by the file. is specified when the volume is initialized, and cannot be
More information on this parameter is in Appendix A, changed unless the tape is reinitialized. For a tape that
“Expanded Parameter Descriptions.” is not labeled, the DENSITY parameter specified in the
Create Tape File (CRTTAPF) or the Change Tape File
Note: If the device specified is a media library device,
(CHGTAPF) command can change the density of the
then the volume specified should be the cartridge
volume when the first data file on the tape is created.
identifier to be mounted and used.
*DEVTYPE: The data written on the tape volume is
*MOUNTED: Any labeled or unlabeled volume on the
based on the device type (the type of tape device).
specified tape device is initialized. VOL(*MOUNTED)
and CHECK(*NO) must be used to initialize a new or Tape Device Default Density
completely erased tape volume. Otherwise, the system 2440 6250
attempts to read labels from the tape volume that is on 3422 6250
the specified device and completely unwinds from the 3430 6250
reel. For a media library device, the volume to be used 3480 *FMT3480
is the next cartridge in the category mounted by the Set 3490E *FMT3490E
Tape Category (SETTAPCGY) command. 3570-BXX *FMT3570
volume-identifier: Specify the identifier of the labeled 3570-CXX *FMT3570E
volume being initialized. This parameter value can be 3590 *FMT3590
used only to reinitialize a tape that is already a labeled 6335 *QIC3040
volume. If the tape on the specified device has a dif- 6341 *QIC120
ferent volume identifier than the one specified by this 6342 *QIC525
value, or if it is an unlabeled volume, an error message 6343 *QIC1000
is sent. 6344 *QIC2GB
6346 *QIC120

Chapter 2. OS/400 Command Descriptions P3-429


INZTAP

6347 *QIC525 *QIC2GB: The format of this tape is QIC2GB, which is


6348 *QIC1000 used for 1/4 inch cartridge tapes that can hold 2.5
6349 *QIC2GB gigabytes of data.
6366 *QIC120
*QIC3040: The format of this tape is QIC3040, which is
6368 *QIC1000
used for 1/4 inch minicartridge tapes that can hold up to
6369 *QIC2GB
840 megabytes of data.
6378 *QIC525
6379 *QIC1000 *QIC5010: The format of this tape is QIC5010, which is
6380 *QIC2GB used for 1/4 inch cartridge tapes that can hold 13.5
6385 *QIC5010 gigabytes of data.
6390 *FMT7GB *FMT2GB: The format of this tape is FMT2GB, which is
7208-002 *FMT2GB used for 8 millimeter cartridge tapes that can hold 2
7208-012 *FMT5GB gigabytes of data.
7208-222 *FMT7GB
9346 *QIC120 *FMT5GB: The format of this tape is FMT5GB, which is
9347 3200 used for 8 millimeter cartridge tapes that can hold 5
9348 6250 gigabytes of data.
*FMT7GB: The format of this tape is FMT7GB, which is
*CTGTYPE: The data written on the tape volume is
used for 8 millimeter cartridge tapes that can hold 7
based on cartridge type (the type of tape cartridge). If
gigabytes of data.
the device does not support special cartridge type infor-
mation, *DEVTYPE is used. CODE
1600: The data density on the tape volume is 1,600 bits Specifies the character code used. The code can be
per inch, which is used for 1/2 inch reel tapes. either extended binary-coded decimal interchange code
(*EBCDIC) or the American National Standard Code for
3200: The data density on the tape volume is 3,200 bits Information Interchange (*ASCII).
per inch, which is used for 1/2 inch reel tapes.
*EBCDIC: The extended binary-coded decimal inter-
6250: The data density on the tape volume is 6,250 bits change code (EBCDIC) character set code is used.
per inch, which is used for 1/2 inch reel tapes.
*ASCII: The ASCII character set code is used.
*FMT3480: The format of this tape is FMT3480. The
data density on this tape volume is formatted to support ENDOPT
a 3480 device. This density is used for 1/2 inch car- Specifies whether the tape is rewound only or rewound
tridge tapes. and unloaded after the operation ends.

*FMT3490E: The format of this tape is FMT3490E. The *REWIND: The tape is automatically rewound, but not
data density on this tape volume is formatted to support unloaded, after the operation has ended.
a 3490E device. This density is used for 1/2 inch car- *UNLOAD: The tape is automatically rewound and
tridge tapes. unloaded after the operation ends.
*FMT3570: The format of this tape is FMT3570. The CLEAR
data format is written on the tape volume with a 3570 Specifies whether all previous labels and data are
device. deleted from the tape when it is initialized. If the volume
*FMT3570E: The format of this tape is FMT3570E. The must be cleared of all data, it is spaced from the location
data format is written on the tape volume with a 3570E of the initializing volume label or tape markers to the end
device. of the tape marker.
*FMT3590: The format of this tape is FMT3590. The *NO: The existing data is not deleted. Even though the
data format is written on the tape volume with a 3590 existing data is not deleted, the data on the volume is
device. This density is used for 1/2 inch cartridge tapes. not accessible after the volume has been initialized.
*QIC120: The format of this tape is QIC120, which is *YES: After the beginning of the tape has been initial-
used for 1/4 inch cartridge tapes that can hold 120 ized, the remaining data on the tape is deleted. The
megabytes of data. *YES value is needed only if there are security concerns
with old data. If *YES is specified, the initialize opera-
*QIC525: The format of this tape is QIC525, which is
tion can take a long time.
used for 1/4 inch cartridge tapes that can hold 525
megabytes of data.
*QIC1000: The format of this tape is QIC1000, which is Example
used for 1/4 inch cartridge tapes that can hold 1200 INZTAP DEV(TAPE1) NEWVOL(Tðð1ðð) CHECK(\NO)
megabytes of data. CODE(\ASCII) ENDOPT(\UNLOAD)

P3-430 OS/400 CL Reference - Part 2 (Full Version)


INZTAP

This command initializes the volume on the tape device field). Once the volume has been initialized, the tape is
named TAPE1 using the ASCII character code. Its new rewound and unloaded. Any previous data beyond the new
volume identifier is T00100, regardless of whether it contains volume label is not deleted, but is no longer accessible.
a valid volume identifier or files that have not ended (active

Chapter 2. OS/400 Command Descriptions P3-431


IPXPING

IPXPING Command
IPXPING Command

For the description of the IPXPING command, see the VFYIPXCNN (Verify IPX Connection) command description.

P3-432 OS/400 CL Reference - Part 2 (Full Version)


LNKDTADFN

LNKDTADFN (Link Data Definition) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(1, 5) ─┬─\ALL──────────────────────────────────┬──)────
55──LNKDTADFN──OPTION(──┬─\LINK───┬──)──FILE(───── (P) ─────────────────────────────5
└─\UNLINK─┘ │ ┌─\LIBL/────────┐ │
└─┼───────────────┼──database-file-name─┘
├─\CURLIB/──────┤
└─library-name/─┘
5──┬──────────────────────────────────────┬──┬─────────────────────────────────┬──┬───────────────────────────┬────────────────5%
(2, 5) ─data-dictionary-name──)─┘ └─DFN(───
└─DTADCT(───── (3) ─file-definition-name──)─┘ │ ┌─\FIRST─┐ │
(4) ─┴─date───┴──)─┘
└─CRTDATE(───
Notes:
1 FILE(*ALL) is not valid with OPTION(*LINK).

2 DTADCT is required with OPTION(*LINK), and is required with FILE(*ALL) for OPTION(*UNLINK).

3 DFN is required with OPTION(*LINK), and is not allowed with OPTION(*UNLINK).

4 CRTDATE is not allowed with OPTION(*UNLINK).

5 FILE name and DTADCT name cannot be used together for OPTION(*UNLINK).

P All parameters preceding this point can be specified in positional form.

Purpose *LIBL: All libraries in the job's library list are


searched until the first match is found.
The Link Data Definition (LNKDTADFN) command links or
*CURLIB: The current library for the job is
unlinks file definitions in a dictionary, program-described files,
searched. If no library is specified as the current
or externally-described files.
library for the job, the QGPL library is used.
Restriction: A file cannot be linked if it is already linked. library-name: Specify the name of the library to be
However, a definition can be linked to several files at the searched.
same time.
database-file-name: Specify the name of the file being
Note: If file text and the file definition are not the same, a linked or unlinked.
new version of the definition is created.
Note: To see the parameter and value descriptions for this
Optional Parameters
command, refer to the online help text. For more
information about printing the help text, refer to DTADCT
“Printing CL Command Descriptions” in Chapter 1. Specifies the name of the dictionary that contains the file
definition to link to the program-described file, or the dic-
tionary from which all program-described files are
Required Parameters unlinked.
OPTION This parameter is required for the *LINK option. It is
Specifies the action performed on the program-described also required if FILE(*ALL) is specified and the option is
file, externally-described file, or file definition. *UNLINK.
*LINK: The program-described file or the file definition
DFN
is linked.
Specifies the name of the file definition that is linked to
*UNLINK: The program-described file, the externally- the program-described file. This parameter is only
described file, or the file definition is unlinked. required with the *LINK option.
FILE CRTDATE
Specifies the qualified name of the program-described Specifies the creation date of the object.
file to link or unlink, or specifies the externally-described
Note: This parameter is valid only with the *LINK
file to unlink.
option.
*ALL: All program-described database files linked to
*FIRST: The file definition with the specified definition
definitions in the specified dictionary are unlinked. This
name and the earliest creation date is used.
value is valid only if OPTION(*UNLINK) is also specified.
This value is not valid for externally-described files. date: Specify the creation date of the file definition to
link to the program-described file. If a date is not speci-
The name of the program-described file can be qualified
fied, *FIRST is assumed.
by one of the following library values:

Chapter 2. OS/400 Command Descriptions P3-433


LNKDTADFN

Example This command links definition MYDEF in dictionary MINE, to


the program-described database file MYFILE located in
LNKDTADFN OPTION(\LINK) FILE(MYLIB/MYFILE)
library MYLIB.
DTADCT(MINE) DFN(MYDEF)

P3-434 OS/400 CL Reference - Part 2 (Full Version)


LODPTF

LODPTF (Load Program Temporary Fix) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─┬───────────────────────────────────┬──┬─────────────────────────────────┬─────────5
55──LODPTF──LICPGM(──licensed-program──)────
│ ┌─\SERVICE─────────────┐ │ │ ┌─\SEARCH─────────┐ │
└─DEV(──┼─\SAVF────────────────┼──)─┘ └─SEQNBR(──┴─sequence-number─┴──)─┘
├─diskette-device-name─┤
├─tape-device-name─────┤
└─optical-device-name──┘
5──┬─────────────────────────┬──┬─────────────────────────────────────┬──┬───────────────────────────────────────────────┬──────5
│ ┌─\REWIND─┐ │ │ ┌─\FIRST──────────┐ │ │ ┌─\LIBL/────────┐ │
(1, 2) ─┼─\SELECT─────────┼──)─┘ └─SAVF(───
└─ENDOPT(──┼─\LEAVE──┼──)─┘ └─PATHID(───── (3) ─┼───────────────┼──save-file-name──)─┘
└─\UNLOAD─┘ └─path-identifier─┘ ├─\CURLIB/──────┤
└─library-name/─┘
5──┬───────────────────────────────────┬──┬──────────────────────────┬──┬──────────────────────┬────────────────────────────────5
│ ┌─\ALL──────────────┐ │ │ ┌─\APYPERM─┐ │ │ ┌─\YES──┐ │
│ │ ┌──
────────────┐ │ │ └─SPRPTF(──┴─\NOAPY───┴──)─┘ └─COVER(──┼─\NO───┼──)─┘
6 (4)
├─SELECT(──┴───PTF-number─┴────┴──)─┤ └─\ONLY─┘
│ ┌──
────────────┐ │
6 (4) ──)───────┘
└─OMIT(────PTF-number─┴───
5──┬────────────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\ONLY─────────┐ │
└─RLS(──┴─release-level─┴──)─┘
Notes:
P All parameters preceding this point can be specified in positional form.

1 PATHID applies only when DEV is a CD-ROM device.

2 PATHID(*SELECT) is not valid in a batch environment.

3 SAVF is required if DEV(*SAVF) is specified.

4 A maximum of 50 repetitions on either the SELECT or the OMIT parameter.

Purpose DEV
Specifies the device from which the PTFs are loaded.
The Load Program Temporary Fix (LODPTF) command The device name must already be known on the system
loads program temporary fixes (PTFs) for a specified product by a device description.
from a diskette, tape, CD-ROM, or save file into the product
*SERVICE: The PTFs sent from the service support
PTF library. Each PTF contains one or more objects,
system are loaded.
including programs, that can be applied to a product by the
Apply Program Temporary Fix (APYPTF) command. *SAVF: The PTFs are loaded from a save file. If
*SAVF is specified, a save file name must be specified
Only the PTFs for a single product, such as Operating on the SAVF parameter.
System/400, can be loaded at a time. Not all of the PTFs for
diskette-device-name: Specify the name of the diskette
the specified program must be loaded, because specific
device from which the PTFs are loaded.
PTFs can be selected or omitted and loaded.
tape-device-name: Specify the name of the tape device
Restriction: This command is shipped with public from which the PTFs are loaded.
*EXCLUDE authority and the QSRV user profile has private
optical-device-name: Specify the name of the optical
authority to use the command.
device that supports the CD-ROM media class from
Note: To see the parameter and value descriptions for this which the PTFs are loaded.
command, refer to the online help text. For more
information about printing the help text, refer to SEQNBR
“Printing CL Command Descriptions” in Chapter 1. Specifies the sequence number on the tape volume
where the load operation begins to load the PTF data.
Note: This parameter is valid only if a tape device
Required Parameter name is specified on the DEV parameter.
LICPGM *SEARCH: The tape volume is searched for the first
Specifies the 7-character identifier of the product for program temporary fix (PTF) file for the specified
which the PTFs are loaded. licensed program.
sequence-number: Specify the sequence number of the
Optional Parameters PTF file being loaded. This sequence number must

Chapter 2. OS/400 Command Descriptions P3-435


LODPTF

| exist on the tape. Valid values range from 1 to *CURLIB: The current library for the job is
| 16777215. searched. If no library is specified as the current
library for the job, the QGPL library is used.
ENDOPT
Specifies the operation that is automatically performed library-name: Specify the name of the library to be
on the tape volume after the operation ends. If more searched.
than one volume is included, this parameter applies only
save-file-name: Specify the save file name from which
to the last tape volume used; all other tape volumes are
the PTFs are loaded.
rewound and unloaded when the end of the tape is
reached. SELECT
Specifies which of the PTFs for the specified product are
Note: This parameter is valid only if a tape device
loaded. The OMIT parameter cannot be specified if
name is specified on the DEV parameter.
SELECT is specified with PTF numbers.
*REWIND: The tape is automatically rewound, but not
Note: Permanently removed PTFs will be ignored when
unloaded, after the operation has ended.
SELECT(*ALL) and DEV(*SERVICE) are speci-
*LEAVE: The tape does not rewind or unload after the fied. To load removed PTFs, specify the PTF
operation ends. It remains at the current position on the number on the SELECT parameter.
tape drive.
*ALL: All the PTFs for the specified product are loaded.
*UNLOAD: The tape is automatically rewound and
unloaded after the operation ends.
PTF-number: Specify the PTF identification numbers
(up to 50) of the single PTFs being loaded.
PATHID
OMIT
Specifies the number that identifies a file on the
Specifies that all PTFs, except those specified in this
CD-ROM volume that contains the PTFs to be loaded.
parameter, are loaded. Specify the PTF numbers of the
The PTF files for each product and release that exist on
PTFs that are omitted when the rest are loaded. Up to
the CD-ROM media have a path identifier number to
50 PTF numbers can be specified. The OMIT parameter
allow the files to be processed in a specific order. Only
cannot be specified if single PTF numbers are specified
the PTFs from the specified path identifier are loaded on
on the SELECT parameter.
your system.
Note: This parameter is valid only if a CD-ROM device SPRPTF
name is specified on the DEV parameter. Specifies which operation is performed for temporarily
applied PTFs that are superseded by PTFs encountered
*FIRST: The CD-ROM volume is searched for the first by this load operation.
PTF file for the specified product and release, according
to the search dependency specified on the SELECT *APYPERM: For the specified product, any PTFs that
parameter. are temporarily applied and are superseded by PTFs
contained on the PTF media, are automatically perma-
Ÿ When a specific PTF identifier is specified on the nently applied before loading the superseding PTFs. If
SELECT parameter, the first occurrence of the the superseded PTFs have any prerequisite PTFs, they
specified PTF is loaded. are also permanently applied by this operation.
Ÿ When *ALL is specified on the SELECT parameter, *NOAPY: The load operation stops when temporarily
the existing PTF file with the lowest path identifier is applied PTFs are being superseded by PTFs contained
loaded. on the PTF medium. The temporarily applied PTFs that
are superseded must be permanently applied (APYPTF
*SELECT: A list of the PTF files that exist on the
command) or removed (RMVPTF command) before the
CD-ROM device that match the product and release is
LODPTF command can be processed again.
shown. You can select the specific file from which PTFs
are loaded. This value cannot be selected in a batch COVER
environment. Specifies whether to copy the cover letter for the PTF
path-identifier: Specify the path identifier of the existing into a physical file.
PTF file from which to load the PTF data. Note: This parameter is valid only when a tape device
name or optical device name is specified on the
SAVF
DEV parameter.
Specifies the qualified name of the save file from which
the PTFs are loaded. *YES: After the PTF is loaded, the cover letter is copied
into a physical file.
The name of the save file can be qualified by one of the
following library values: *NO: The cover letter is not copied into a physical file.

*LIBL: All libraries in the job's library list are *ONLY: The cover letter is copied into a physical file
searched until the first match is found. but the PTF is not loaded. If the SEQNBR parameter is

P3-436 OS/400 CL Reference - Part 2 (Full Version)


LODPTF

specified, it must contain the sequence number of the If the release-level specified is not the release-level of
file that contains the PTF. the base option of the product, only PTFs for the options
installed at that release-level are loaded.
RLS
Specifies the release level of the PTFs being loaded.

*ONLY: This value is only valid when one release of the Example
product's base option is installed on the system. PTFs
for all installed options of the product will be loaded Example 1: Omitting PTFs
regardless of the release-level of the option. LODPTF LICPGM(5769SS1)
OMIT(SFðððð3 SFðððð8 SFðððð14)
release-level: Specify the release level in VxRyMz
This command loads all of the PTFs from the service support
format, where Vx is the version number, Ry is the
system (*SERVICE) for the product 5769-SS1 except
release number, and Mz is the modification level. The
SF00003, SF00008, and SF000014. The Apply Program
variables x and y can be a number from 0 through 9,
Temporary Fix (APYPTF) command can then be used to
and the variable z can be a number from 0 through 9 or
apply these PTFs to the OS/400 system product.
a letter from A through Z.
Example 2: Selecting PTFs
If the release-level specified is the release-level of the LODPTF LICPGM(5769SS1) DEV(OPTð1)
base option of the product, PTFs for all installed options SELECT(SFðððð9 SFððð1ð)
of the product are loaded regardless of the release-level
of the option. This command loads the PTFs named SF00009 and
SF00010 from the CD-ROM device named OPT01. The
Apply Program Temporary Fix (APYPTF) command can then
be used to apply these PTFs to the OS/400 system product.

Chapter 2. OS/400 Command Descriptions P3-437


LODQSTDB

LODQSTDB (Load Question-and-Answer Database) Command


Job: I Pgm: I Exec

(P) ───────────────────────────────────────────5%
55──LODQSTDB──┬──────────────────────────────────┬──┬───────────────────────────┬───
│ ┌─\SELECT───────────┐ │ │ ┌─QUSRSYS──────┐ │
└─QSTDB(──┴─question-database─┴──)─┘ └─LIB(──┴─library-name─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose base. If only one Q & A database exists on the system,


it is the default.
The Load Question-and-Answer Database (LODQSTDB)
question-database: Specify the name of the Q & A data-
command allows the user to load a Question-and-Answer (Q
base to be used. If the Q & A database already exists
& A) database from an alternative medium (such as tape) to
on the system, the supplied subset of the Q & A data-
the system. More information is available in the System
base will be replaced. If the Q & A database does not
Operation book.
exist on the system, it will be created in the specified
Restrictions: library.

1. This command is shipped with public *EXCLUDE LIB


authority. Specifies the name of the library that contains the Q & A
database.
2. A user must have authority to the command and be a Q
& A coordinator for any Q & A database referred to by QUSRSYS: The library default for this command is
the command. QUSRSYS.
3. This command is interactive only. library-name: Specify the library where the Q & A data-
base is to be loaded. The library must exist on the
Note: To see the parameter and value descriptions for this
system.
command, refer to the online help text. For more
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. Example
LODQSTDB
Optional Parameters
This command shows the Load Database to System display.
QSTDB
Specify the Q & A database to be loaded to.
*SELECT: The user is asked to specify a Q & A* data-

P3-438 OS/400 CL Reference - Part 2 (Full Version)


LODRUN

LODRUN (Load and Run Media Program) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──┬───────────────────────────────────┬──┬───────────────────────────────┬──────5%
55──LODRUN──┬──────────────────────────────┬───
│ ┌─\TAP────────────┐ │ │ ┌─\FIRST──────────┐ │ │ ┌─/──────────────┐ │
└─DEV(──┼─\DKT────────────┼──)─┘ (1) ─┼─\SEARCH─────────┼──)─┘ └─DIR(───
└─SEQNBR(─── (2) ─┴─directory-name─┴──)─┘
├─\OPT────────────┤ └─sequence-number─┘
├─tape-device─────┤
├─diskette-device─┤
└─CD-ROM-device───┘
Notes:
1 This parameter is valid only when DEV(*TAP) is specified.

2 This parameter is valid only when a CD-ROM device is specified.

P All parameters preceding this point can be specified in positional form.

Purpose If the device is an optical device supporting the CD-ROM


media class, the ENDOPT and the VOL parameters are
The Load and Run Media Program (LODRUN) command not specified.
restores a user-written program object from tape, diskette, or
If the device is CD-ROM, then the value specified for the
CD-ROM into the library QTEMP. The system passes the
DIR for this command is used for the OPTFILE param-
device name to the restored program and transfers control to
eter for the Restore Object (RSTOBJ) command.
the restored program.
The SEQNBR parameter is specified according to the
Restriction: The LODRUN command requires *SAVSYS SEQNBR parameter on the LODRUN command.
authority. The QINSTAPP program that is loaded from the
The device used for the restore operation is determined
media and called may require additional authority in order to
by the LODRUN command. If *TAP, *DKT, or *OPT are
run correctly. The user supplying the QINSTAPP program
specified on the DEV parameter, the LODRUN
should inform you if any additional authorities are required.
command examines the QDEVNAMING system value to
When the LODRUN command is run: determine if the system uses AS/400 or System/36
naming conventions for devices:
1. The media is searched for the user-written program,
which must be named QINSTAPP and saved from Ÿ If QDEVNAMING is *NORMAL (AS/400 convention)
library QTEMP. – The device TAP01 is used for DEV(*TAP).
Note: The program QINSTAPP must be owned by a – The device DKT01 is used for DEV(*DKT).
user profile that resides on the target system. If – The device OPT01 is used for DEV(*OPT).
QINSTAPP is restored to a system that does not Ÿ If QDEVNAMING is *S36 (System/36 convention)
have the owning user profile, control is not trans-
– The device TC is used for DEV(*TAP) if a tape
ferred and the program is not run.
cartridge is found. Otherwise, device T1 is
2. If a QINSTAPP program already exists in the QTEMP used.
library on the user's system, it is deleted.
– The device I1 is used for DEV(*DKT).
3. The QINSTAPP program is restored to the QTEMP
– The device OPT01 is used for DEV(*OPT).
library using the RSTOBJ command. The following
System/36 naming conventions do not apply to
values are specified on the RSTOBJ command:
optical devices.
Ÿ OBJ(QINSTAPP)
Any other value specified on the DEV parameter is used
Ÿ OBJTYPE(*PGM) as is.
Ÿ SAVLIB(QTEMP) 4. Control of the system is passed to the QINSTAPP
Ÿ ENDOPT(*LEAVE) program. The QINSTAPP program can be used, for
example, to restore other applications to the user's
Ÿ MBROPT(*ALL) system and run those applications.
Ÿ ALWOBJDIF(*NONE) 5. When the user signs off, the QINSTAPP program is
Ÿ RSTLIB(QTEMP) removed from the system.
Ÿ VOL(*MOUNTED) Note: If the system security level on which the LODRUN
command is run is 40 or greater, and the QINSTAPP
program validation value is missing or incorrect, the
system attempts to translate the program again. If

Chapter 2. OS/400 Command Descriptions P3-439


LODRUN

this fails, the program is restored, but all public and command to save any other necessary applications, pro-
private authorities are revoked and ownership of the grams, or libraries to the tape or diskette. This step is
program is transferred to the QDFTOWN user profile. optional and is used to save applications that the
The LODRUN command does not transfer control to QINSTAPP program restores to the user's system when
the QINSTAPP program in this case. the LODRUN command is run.

The user supplying the QINSTAPP program is responsible If the QINSTAPP program is saved to tape, the tape is
for writing and supporting it. The QINSTAPP program is not not rewound after the QINSTAPP program is restored;
supplied by IBM. The program can be designed to accom- the application or series of applications that the
plish many different tasks. For example, the program could: QINSTAPP program restores to the user's system
should be next on the tape.
Ÿ Restore and run other programs or applications
Note: To see the parameter and value descriptions for this
Ÿ Restore a library command, refer to the online help text. For more
Ÿ Delete another program or application information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1.
Ÿ Create specific environments
Ÿ Apply fixes to existing applications
Optional Parameters
The QINSTAPP program is run only once each time the DEV
LODRUN command is entered. The LODRUN command Specifies the I/O device from which the program is
passes only one parameter (DEV), which specifies the device loaded.
from which the QINSTAPP program is restored. The
QINSTAPP program should not attempt to use the LODRUN *TAP: The program is loaded from the default tape
command again. This will have unpredictable results. device connected to the system.
*DKT: The program is loaded from the default diskette
In addition to writing the QINSTAPP program, the user sup- device connected to the system.
pling the program is responsible for providing the user with
the media containing the program. To distribute the program *OPT: The program is loaded from the default CD-ROM
on a tape, diskette, or CD-ROM, do the following: device connected to the system.

1. Prepare the tape or diskette. For tape, use the Initialize tape-device: Specify the name of the tape device from
Tape (INZTAP) command. For diskette, use the Ini- which the program is loaded onto the system.
tialize Diskette (INZDKT) command with FMT(*SAVRST) diskette-device: Specify the name of the diskette unit
specified. from which the program is loaded onto the system.
Note: For optical, the program must first be saved to CD-ROM-device: Specify the name of the CD-ROM
tape to later be transferred onto CD-ROM. See device from which the program is loaded onto the
the Central Site Distribution book for full details system.
on mastering CD-ROM.
SEQNBR
2. Use the Create Duplicate Object (CRTDUPOBJ) Specifies, only when tape is used, the sequence number
command to create the QINSTAPP program into the used for the restore operation.
QTEMP library.
*FIRST: The volume on a tape device is searched
3. Use the Save Object (SAVOBJ) command to save the starting from the first data file for a data file with an iden-
QINSTAPP program from QTEMP to the desired tape tifier that is a match for the QTEMP label. When the
device or diskette unit. The program must be the only first match is found, the object is restored.
object in the media file that contains it. Specify the fol-
lowing: *SEARCH: The volume on a tape device is searched
starting from the first data file beyond the current tape
LIB(QTEMP) position for a data file with an identifier that is a match
LABEL(*LIB) for the QTEMP label. When a match is found, the object
is restored.
CLEAR(*ALL)
| sequence-number: Specify the sequence number of the
Specifying LABEL(*LIB) ensures that the label will be
| file. Valid values range from 1 through 16777215.
QTEMP. If the QINSTAPP program is being saved to a
tape device, and if additional applications, programs, or DIR
libraries will be saved to tape, ENDOPT(*LEAVE) also Specifies, only when CD-ROM is used, the directory
must be specified. The correct value for the TGTRLS used for the restore operation. If the file named QTEMP
parameter must also be entered if the target release is is found in the specified directory, the object is restored.
not the default, *CURRENT.
/: The root directory (/) is used.
4. Use the Save Object (SAVOBJ), Save Library
(SAVLIB), or Save License Program (SAVLICPGM)

P3-440 OS/400 CL Reference - Part 2 (Full Version)


LODRUN

directory-name: Specify the directory to search for a file library QTEMP. Control is then transferred to the restored
named QTEMP. program. If the sequence number is not found, an escape
message is sent. If the file label at that sequence number is
not QTEMP, an escape message is sent.
Examples
Example 3: Restoring the Program QINSTAPP from
Example 1: Restoring a Program from Tape
CD-ROM
LODRUN DEV(TAPð1)
LODRUN DEV(\OPT) DIR(/APP1/INST)
This command restores the program object from the tape on
This command restores the program object QINSTAPP from
device TAP01 to the library QTEMP. Control is then trans-
the CD-ROM on device OPT01 to the library QTEMP. The
ferred to the restored program.
filename for the QTEMP library on the CD-ROM is
Example 2: Restoring the Program QINSTAPP from Tape /APP1/INST/QTEMP. Control is then transferred to the
restored program. If the file is not found, an escape
LODRUN DEV(TAPð1) SEQNBR(5) message is sent.
This command restores the program object QINSTAPP from
the tape at sequence number 5 on device TAP01 to the

Chapter 2. OS/400 Command Descriptions P3-441


MD

MD (Create Directory) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─┬─────────────────────────────────────────┬──────────────────────────────────────────5
55──MD──DIR(──'directory-path-name'──)────
│ ┌─\INDIR──────────────────┐ │
└─DTAAUT(──┼─\RWX────────────────────┼──)─┘
├─\RW─────────────────────┤
├─\RX─────────────────────┤
├─\WX─────────────────────┤
├─\R──────────────────────┤
├─\W──────────────────────┤
├─\X──────────────────────┤
├─\EXCLUDE────────────────┤
├─\NONE───────────────────┤
└─authorization-list-name─┘
5──┬──────────────────────────────────────┬──┬──────────────────────────────┬──────────────────────────────────────────────────5%
│ ┌─\INDIR───────────────┐ │ │ ┌─\SYSVAL─┐ │
(2) ─┼─\NONE───┼──)─┘
└─OBJAUT(──┼─\NONE────────────────┼──)─┘ └─CRTOBJAUD(───
├─\ALL─────────────────┤ ├─\USRPRF─┤
│ ┌──
───────────────┐ │ ├─\CHANGE─┤
6 (1)
└───┬─\OBJEXIST─┬─┴────┘ └─\ALL────┘
├─\OBJMGT───┤
├─\OBJALTER─┤
└─\OBJREF───┘
Notes:
P All parameters preceding this point can be specified in positional form.

1 A maximum of 4 repetitions.

2 This parameter is ignored when using this command in QDLS.

Purpose 3. The user must have *X authority to each directory in the


path.
This command is an alias for the Create Directory (CRTDIR)
4. When creating a directory in the root directory or
command and can also be issued using the following alterna-
QOpenSys file system, the user must have *WX
tive command names:
authority to the directory that contains the new directory.
Ÿ CRTDIR
5. When creating a directory, the owner ID (UID) is the
Ÿ MKDIR user creating the directory. The group ID (GID) is
obtained from the parent directory, except when the
The Create Directory (MD) command adds a new directory to directory is being created in the QSYS file system where
the system. A directory is an object that contains the names the GID is obtained from the primary user profile.
of other objects. Libraries and folders are types of directo-
ries. When a directory is created, a link is added to the Note: To see the parameter and value descriptions for this
directory prefix. The directory must have been created command, refer to the online help text. For more
before any objects can be placed into it. information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1.
For more information about integrated file system commands,
see the Integrated File System Introduction book.
Required Parameter
Restrictions: DIR
1. The following restriction applies when the directory being Specifies the path name of the directory being created.
created is a library in QSYS.LIB, or a directory within the For more information on specifying path names, refer to
root directory or QOpenSys file system: Chapter 2, “Path Names (*PNAME).”
Ÿ The *AUDIT special authority is required when spec- Note: Do not use a name that begins with the char-
ifying a value other than *SYSVAL on the acter Q. The system assumes that libraries or
CRTOBJAUD parameter. directories with those names are system libraries
or directories.
2. The following restriction applies when the directory being
created is a folder in an existing folder in QDLS:
Ÿ The *CHANGE authority is required for the existing Optional Parameters
folder.

P3-442 OS/400 CL Reference - Part 2 (Full Version)


MD

DTAAUT OBJAUT
Specifies the public data authority given to the user for Specifies the public object authority given to users for
the directory. the directory.
*INDIR: The authority for the directory being created is *INDIR: The object authority is based on the authority
determined by the directory it is being created in. The for the directory where this directory is being created. If
directory immediately preceding the new directory deter- the value *INDIR is specified for either the OBJAUT
mines the authority. A directory created in the root is parameter or the DTAAUT parameter, then *INDIR must
assigned the public authority given to objects in the root be specified for both parameters.
directory. A directory created in QDLS for a folder
*NONE: None of the other object authorities (existence,
defaults to *EXCLUDE for a first level folder. If created
management, alter or reference) are given to the users.
in the second level or greater, the authority of the pre-
If *EXCLUDE or an authorization list is specified for the
vious level is used. The QOpenSys and root file
DTAAUT parameter, *NONE must be specified. This
systems use the parent directory's DTAAUT value. If the
value cannot be used with the DTAAUT value of *NONE.
value *INDIR is specified for either the OBJAUT param-
eter or the DTAAUT parameter, then *INDIR must be *ALL: All of the other object authorities (existence,
specified for both parameters. management, alter, and reference) are given to the
users.
*RWX: The user can change the object and perform
basic functions on the object except those limited to the You can specify up to four of the following values:
owner or controlled by object existence, object manage- *OBJEXIST: The user is given object existence
ment, object alter and object reference authority. *RWX authority to the object. The user can control existence
provides object operational authority and all data authori- and ownership, delete, free storage of the object,
ties. perform save/restore operations and transfer ownership
*RW: The user can view and modify the contents of an of the object.
object. *RW authority provides object operational *OBJMGT: The user is given object management
authority and data read, add, update and delete authori- authority to the object. With this authority the user can
ties. specify security for the object, move or rename the
*RX: The user can perform basic operations on the object and add members to database files.
object, such as run a program or display the contents of *OBJALTER: The user is able to alter the attributes of
a file. The user is prevented from changing the object. the objects. On a database file, the user can add and
*RX authority provides object operational authority and remove triggers, add and remove referential and unique
read and execute authorities. constraints, and change the attributes of the database
*WX: The user can modify the contents of an object file. With this authority on an SQL package, the user
and run a program or search a library or directory. *WX can change the attributes of the SQL package. Cur-
authority provides object operational, and data add, rently, this authority is used only for database files and
update, delete, and execute authorities. SQL packages.

*R: The user can view the contents of an object. *R *OBJREF: The user is given object reference authority
authority provides object operational authority and data to objects. Used only for database files, the user can
read authority. refer to an object from another object such that oper-
ations on that object may be restricted by the other
*W: The user can modify the contents of an object. *W
object. On a physical file, the user can add a referential
authority provides object operational authority and data
constraint in which the physical file is the parent.
add, update, and delete authorities.
CRTOBJAUD
*X: The user can run a program or search a library or
Specifies the auditing value of objects created in this
directory. *X authority provides object operational
directory.
authority and data execute authority.
Note: This parameter is ignored when using this
*EXCLUDE: The user cannot access the PTFs being
command in QDLS. No error message is sent
loaded. The OBJAUT value must be *NONE, if this
and the directory is created.
special value is used.
*SYSVAL: The object auditing value for the objects in
*NONE: The user is given no data authorities to the
the directory is determined by the system auditing value
objects. This value cannot be used with OBJAUT value
(QAUDLVL).
of *NONE.
*NONE: Using or changing this object will not cause an
authorization-list-name: Specify the name of the authori-
audit entry to be sent to the security journal.
zation list used. The format of the authorization list
name remains the current ten-character format. The *USRPRF: The user profile of the user accessing this
OBJAUT value must be *NONE, if this special value is object is used to determine if an audit record will be sent
used. for this access. The OBJAUD keyword of the

Chapter 2. OS/400 Command Descriptions P3-443


MD

CHGUSRAUD command is used to turn on auditing for a Example


specific user.
*CHANGE: All change accesses to this object by all MD DIR('MYDIR')
users are logged.
This command creates the directory MYDIR and adds it to
*ALL: All change or read accesses to this object by all the current directory. The authority and auditing defaults are
users are logged. used.

P3-444 OS/400 CL Reference - Part 2 (Full Version)


MKDIR

MKDIR (Create Directory) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─┬─────────────────────────────────────────┬───────────────────────────────────────5
55──MKDIR──DIR(──'directory-path-name'──)────
│ ┌─\INDIR──────────────────┐ │
└─DTAAUT(──┼─\RWX────────────────────┼──)─┘
├─\RW─────────────────────┤
├─\RX─────────────────────┤
├─\WX─────────────────────┤
├─\R──────────────────────┤
├─\W──────────────────────┤
├─\X──────────────────────┤
├─\EXCLUDE────────────────┤
├─\NONE───────────────────┤
└─authorization-list-name─┘
5──┬──────────────────────────────────────┬──┬───────────────────────────────┬─────────────────────────────────────────────────5%
│ ┌─\INDIR───────────────┐ │ │ ┌─\SYSVAL─┐ │
(2) ──)─┘
└─OBJAUT(──┼─\NONE────────────────┼──)─┘ └─CRTOBJAUD(──┼─\NONE───┼───
├─\ALL─────────────────┤ ├─\USRPRF─┤
│ ┌──
───────────────┐ │ ├─\CHANGE─┤
6 (1)
└───┬─\OBJEXIST─┬─┴────┘ └─\ALL────┘
├─\OBJMGT───┤
├─\OBJALTER─┤
└─\OBJREF───┘
Notes:
P All parameters preceding this point can be specified in positional form.

1 A maximum of 4 repetitions.

2 This parameter is ignored when using this command in QDLS.

Purpose 4. When creating a directory in the root directory or


QOpenSys file system, the user must have *WX
This command is an alias command for the Create Directory authority to the directory that contains the new directory.
(CRTDIR) command and can also be issued using the fol-
5. When creating a directory, the owner ID (UID) is the
lowing alternative command names:
user creating the directory. The group ID (GID) is
Ÿ CRTDIR obtained from the parent directory, except when the
Ÿ MD directory is being created in the QSYS file system where
the GID is obtained from the primary user profile.
The Create Directory (MKDIR) command adds a new direc-
tory to the system. A directory is an object that contains the Note: To see the parameter and value descriptions for this
names of other objects. Libraries and folders are types of command, refer to the online help text. For more
directories. When a directory is created, a link is added to information about printing the help text, refer to
the directory prefix. The directory must have been created “Printing CL Command Descriptions” in Chapter 1.
before any objects can be placed into it.
Required Parameter
For more information about integrated file system commands,
see the Integrated File System Introduction book. DIR
Specifies the path name of the directory being created.
Restrictions: For more information on specifying path names, refer to
1. The following restriction applies when the directory being Chapter 2, “Path Names (*PNAME).”
created is a library in QSYS.LIB, or a directory within the Note: Do not use a name that begins with the char-
root directory or QOpenSys file system: acter Q. The system assumes that libraries or
Ÿ The *AUDIT special authority is required when spec- directories with those names are system libraries
ifying a value other than *SYSVAL on the or directories.
CRTOBJAUD parameter.
2. The following restriction applies when the directory being
created is a folder in an existing folder in QDLS: Optional Parameters
Ÿ The *CHANGE authority is required for the existing DTAAUT
folder. Specifies the public data authority given to the user for
the directory.
3. The user must have *X authority to each directory in the
path.

Chapter 2. OS/400 Command Descriptions P3-445


MKDIR

*INDIR: The authority for the directory being created is *INDIR: The object authority is based on the authority
determined by the directory it is being created in. The for the directory where this directory is being created. If
directory immediately preceding the new directory deter- the value *INDIR is specified for either the OBJAUT
mines the authority. A directory created in the root is parameter or the DTAAUT parameter, then *INDIR must
assigned the public authority given to objects in the root be specified for both parameters.
directory. A directory created in QDLS for a folder
*NONE: None of the other object authorities (existence,
defaults to *EXCLUDE for a first level folder. If created
management, alter or reference) are given to the users.
in the second level or greater, the authority of the pre-
If *EXCLUDE or an authorization list is specified for the
vious level is used. The QOpenSys and root file
DTAAUT parameter, *NONE must be specified. This
systems use the parent directory's DTAAUT value. If the
value cannot be used with the DTAAUT value of *NONE.
value *INDIR is specified for either the OBJAUT param-
eter or the DTAAUT parameter, then *INDIR must be *ALL: All of the other object authorities (existence,
specified for both parameters. management, alter, and reference) are given to the
users.
*RWX: The user can change the object and perform
basic functions on the object except those limited to the You can specify up to four of the following values:
owner or controlled by object existence, object manage- *OBJEXIST: The user is given object existence
ment, object alter and object reference authority. *RWX authority to the object. The user can control existence
provides object operational authority and all data authori- and ownership, delete, free storage of the object,
ties. perform save/restore operations and transfer ownership
*RW: The user can view and modify the contents of an of the object.
object. *RW authority provides object operational *OBJMGT: The user is given object management
authority and data read, add, update and delete authori- authority to the object. With this authority the user can
ties. specify security for the object, move or rename the
*RX: The user can perform basic operations on the object and add members to database files.
object, such as run a program or display the contents of *OBJALTER: The user is able to alter the attributes of
a file. The user is prevented from changing the object. the objects. On a database file, the user can add and
*RX authority provides object operational authority and remove triggers, add and remove referential and unique
read and execute authorities. constraints, and change the attributes of the database
*WX: The user can modify the contents of an object file. With this authority on an SQL package, the user
and run a program or search a library or directory. *WX can change the attributes of the SQL package. Cur-
authority provides object operational, and data add, rently, this authority is used only for database files and
update, delete, and execute authorities. SQL packages.

*R: The user can view the contents of an object. *R *OBJREF: The user is given object reference authority
authority provides object operational authority and data to objects. Used only for database files, the user can
read authority. refer to an object from another object such that oper-
ations on that object may be restricted by the other
*W: The user can modify the contents of an object. *W
object. On a physical file, the user can add a referential
authority provides object operational authority and data
constraint in which the physical file is the parent.
add, update, and delete authorities.
CRTOBJAUD
*X: The user can run a program or search a library or
Specifies the auditing value of objects created in this
directory. *X authority provides object operational
directory.
authority and data execute authority.
Note: This parameter is ignored when using this
*EXCLUDE: The user cannot access the object. The
command in QDLS. No error message is sent
OBJAUT value must be *NONE, if this special value is
and the directory is created.
used.
*SYSVAL: The object auditing value for the objects in
*NONE: The user is given no data authorities to the
the directory is determined by the system auditing value
objects. This value cannot be used with OBJAUT value
(QAUDLVL).
of *NONE.
*NONE: Using or changing this object will not cause an
authorization-list-name: Specify the name of the authori-
audit entry to be sent to the security journal.
zation list used. The format of the authorization list
name remains the current ten-character format. The *USRPRF: The user profile of the user accessing this
OBJAUT value must be *NONE, if this special value is object is used to determine if an audit record will be sent
used. for this access. The OBJAUD keyword of the
CHGUSRAUD command is used to turn on auditing for a
OBJAUT
specific user.
Specifies the public object authority given to users for
the directory.

P3-446 OS/400 CL Reference - Part 2 (Full Version)


MKDIR

*CHANGE: All change accesses to this object by all MKDIR DIR('MYDIR')


users are logged.
This command creates the directory MYDIR and adds it to
*ALL: All change or read accesses to this object by all
the current directory. The authority and auditing defaults are
users are logged.
used.

Example

Chapter 2. OS/400 Command Descriptions P3-447


MONMSG

MONMSG (Monitor Message) Command


Pgm: B,I

┌──
────────────────────┐
55──MONMSG──MSGID(─── 6─message-identifier─┴───
(1) ── (3) ──)──┬───────────────────────────────────┬──┬────────────────────────┬─── (P) ───────5%
│ ┌─\NONE───────────┐ (2) ─CL-command──)─┘
│ └─EXEC(───
(1) ─┴─comparison-data─┴──)─┘
└─CMPDTA(───
Notes:
1 A variable cannot be coded on this parameter.

2 If this MONMSG command is specified immediately after the PGM command or the last DCL command, only the GOTO

command is valid here.


3 A maximum of 50 repetitions

P All parameters preceding this point can be specified in positional form.

Purpose control returns to the program that called the program that
contains the MONMSG command.
The Monitor Message (MONMSG) command is used to
monitor escape, notify, and status messages sent to the If one or more MONMSG commands are placed at the begin-
program message queue of the program in which the ning of the program, immediately following the declare com-
command is being used. Completion and diagnostic mes- mands or the PGM command if there are no declare
sages cannot be monitored. commands, they monitor messages sent by all of the com-
mands in the program (maximum of 100). This is called a
When the MONMSG command is compiled in a control lan- program-level MONMSG command. If any message sent by
guage (CL) program, it establishes a monitor for the arrival of any command in the program meets the conditions specified
the specified messages. The command monitors the mes- in any one of the program-level MONMSG commands, the
sages for the condition specified by the comparison data corresponding action specified in the same command is
given in the command. If a message meeting the conditions taken.
arrives on the message queue, the CL command specified
on the MONMSG command is processed. The action taken by a command-level MONMSG command
overrides a program-level MONMSG command.
Up to 1000 MONMSG commands can be specified in a
program to monitor the arrival of messages for specific condi- If a command is coded for the EXEC parameter on a
tions or for a group of conditions. Specific message identi- MONMSG command that is placed at the beginning of a
fiers or generic message identifiers can be monitored. More program, only the GOTO command can be used, and it must
information on the escape, notify, and status messages, and specify the label for the command to which control is to be
their identifiers, that can be sent by the CL commands, is in passed if a monitored message occurs. If a command is not
the Programming Reference Summary book. coded for the EXEC parameter, monitored messages are
ignored.
The MONMSG command can be coded following most com-
mands in a CL program. A MONMSG command that is not Restrictions:
placed at the beginning of the program applies only to the 1. This command is valid only in CL programs.
immediately preceding command; this is called a command- 2. It can be coded after the last declare command (if
level MONMSG command. The command-level MONMSG declare commands are used), following the PGM
command monitors only messages sent by the previous command that begins the program, or it can be coded
command. If the message sent by that command meets the following any command allowed in CL programs, except
conditions specified in the MONMSG command, the action for the following: DO, ELSE, ENDDO, ENDPGM,
specified in the same MONMSG command is taken. As GOTO, IF, or RETURN. Note that if another program
many as 100 MONMSG commands, coded immediately after sends a message that is monitored by this command, a
a command, can monitor the messages sent by that return cannot be made to that program.
command.
Note: To see the parameter and value descriptions for this
When the action specified in the MONMSG command has command, refer to the online help text. For more
been performed, and that action does not end with a GOTO information about printing the help text, refer to
or RETURN command, control returns to the command in the “Printing CL Command Descriptions” in Chapter 1.
program that follows the command that sent the message. If
the action ends with a GOTO command, control branches to
Required Parameters
the command in the program specified in the GOTO
command. If the action ends with a RETURN command,

P3-448 OS/400 CL Reference - Part 2 (Full Version)


MONMSG

MSGID ters in the message data of the received message,


Specifies the message identifiers of one or more escape, starting with the first character in the message data. If
notify, or status messages that are monitored by this the comparison data matches the first part of the
command. As many as 50 specific and/or generic received message data, this command performs the
message identifiers can be specified on one command. function specified in the EXEC parameter. A CL variable
cannot be specified for the comparison data.
Note: Many CL commands issue one escape message
for many different error conditions. Details about The comparison data can be displayed by the Display
the error or failure are given in diagnostic mes- Program Variable (DSPPGMVAR) command.
sages that precede the escape message.
EXEC
Although diagnostic messages cannot be moni-
Specifies the CL command that is processed when a
tored, they can be received from the job's
monitored message sent to the program's message
external message queue after the escape
queue meets the conditions specified in this MONMSG
message has activated the user's message
command. If no command is specified and a monitored
monitor.
message arrives on the queue, the message is ignored,
The first 3 characters must be a code consisting of an and control passes to the next command in the program.
alphabetic character followed by 2 alphanumeric (alpha-
If the MONMSG command is placed at the beginning of
betic or decimal) characters; the last 4 characters can
the program, the EXEC parameter must specify the
consist of the decimal numbers 0 through 9 and the
GOTO command and the label identifying the command
characters A through F.
that receives control.
Note: Message identifiers using the MCH code
Specify the CL command, including its parameters to be
(MCHnnnn) use only the numbers 0 through 9 in
used, that is run when a message meeting the condi-
the last four characters.
tions specified in this command is received. The
If zeros are specified in either two or all four of the right- command specified is not run if the received message
most positions, such as ppmm00, a generic message does not meet the specified conditions. A CL variable
identifier is specified. For example, if CPF0000 is speci- cannot be specified in place of the CL command.
fied, all the CPF messages are monitored.
Note: If a DO command is specified on EXEC, the
Specify the message identifiers of 1 to 50 messages that entire DO group associated with the DO
are monitored when they arrive at this program's command is run if the condition is met.
message queue. The identifiers of the escape, notify,
and status messages that can be sent by the CL com-
mands are in the Programming Reference Summary Examples
book. CL variables cannot be used to specify message
identifiers. Example 1: Monitoring Messages Sent by any Command
PGM
Optional Parameters MONMSG MSGID(CPFððð1 CPF1999) EXEC(GOTO EXIT2)

CMPDTA This example shows a MONMSG command at the beginning


Specifies the comparison data used to determine of a CL program that monitors for messages CPF0001 and
whether the monitored message (having one of the CPF1999; these messages might be sent by any command
specified message identifiers) received on the program's processed later in the program. When either message is
message queue is acted on by this command. The received from any of the commands running in the program,
message data specified in the MSGDTA parameter of control branches in the program to the command identified
the Send Program Message (SNDPGMMSG) command by the label EXIT2.
is compared with this comparison data. If the first part
(up through the first 28 characters, or less) of the mes- CPF0001 states that an error was found in the command that
sage's substitution values matches the comparison data is identified in the message itself. CPF1999, which can be
specified, the action specified in the EXEC parameter of sent by many of the debugging commands (like
this command is taken. The action is also taken if no CHGPGMVAR), states that errors occurred on the command,
comparison data is specified. but it does not identify the command in the message.

*NONE: No comparison data is specified; if the Example 2: Monitoring Messages Sent by a Single
message in the program's message queue is from a Command
command that this command is monitoring, and if it has
CHGVAR VAR(&A) VALUE(&A / &B)
the specified identifier, the action specified by EXEC is
MONMSG MSGID(MCH1211) EXEC(CHGVAR VAR(&A) VALUE(1))
taken.
comparison-data: Specify a character string of no more In this example, the MONMSG command follows a Change
than 28 characters, enclosed in apostrophes if neces- Variable (CHGVAR) command and, therefore, is only moni-
sary, that is compared with the same number of charac- toring messages sent by the CHGVAR command. The MI

Chapter 2. OS/400 Command Descriptions P3-449


MONMSG

escape message MCH1211 is sent to this program's command is monitoring for this condition; when it receives
message queue when a division by zero is attempted. the message, the second CHGVAR command is processed.
Because MSGID(MCH1211) is specified, the MONMSG In this command, the variable &A is set to a value of 1.

P3-450 OS/400 CL Reference - Part 2 (Full Version)


MOUNT

MOUNT (Add Mounted File System) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ───────────────────5
55──MOUNT──TYPE(──┬─\NFS─────┬──)──MFS(──'file-system-path-name'──)──MNTOVRDIR(──'directory-path-name'──)────
├─\UDFS────┤
└─\NETWARE─┘
5──┬─────────────────────────────────┬──┬─────────────────────────────────────────────────────────────┬────────────────────────5%
│ ┌─\DFT───────────┐ │ │ ┌─\BINARY────────┐ ┌─\ASCII──────────────┐ │
(1) ─┼─\ASCII─────────┼──┼─\JOBCCSID───────────┼──)─┘
└─OPTIONS(──┴─'options-list'─┴──)─┘ └─CODEPAGE(───
├─\JOBCCSID──────┤ └─path-name-code-page─┘
└─data-code-page─┘
Notes:
P All parameters preceding this point can be specified in positional form.

1 Valid only if mounting an NFS file system.

MOUNT Command

For the description of the MOUNT command, see the ADDMFS (Add Mounted File System) command description.

Chapter 2. OS/400 Command Descriptions P3-451


MOV

MOV (Move) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(1) ─'object-path-name-'──)──┬──────────────────────────────────────┬───
55──MOV──OBJ(─── (P) ──┬───────────────────────────────┬─────────5
│ ┌─.─────────────────────┐ │ │ ┌─\OBJ──────┐ │
├─TODIR(──┴─'directory-path-name'─┴──)─┤ └─TOCODEPAGE(──┼─\CALC─────┼──)─┘
└─TOOBJ(──'object-path-name'──)────────┘ └─code_page─┘
5──┬─────────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\BINARY─┐ │
└─DTAFMT(──┴─\TEXT───┴──)─┘
Notes:
1 You can specify a pattern for this path name only if you specify the TODIR parameter.

P All parameters preceding this point can be specified in positional form.

Purpose 2. Some objects are restricted and are not moved. The
physical file systems return an error for these objects.
The Move (MOV) command moves an object from the direc-
3. The directory to which the object is being moved must
tory it is in to a different directory. If the TODIR parameter is
not already contain the name supplied in the TOOBJ
used, the object is moved to another directory and the object
parameter (or in the case where TODIR is used, the
keeps the same name. If the TOOBJ parameter is used the
name supplied in OBJ cannot exist in TODIR).
object is also renamed.
4. Only objects that are a byte stream file type move
If the original object is a read-only file (a file that has the PC between file systems.
read-only attribute flag turned on), the MOV command oper-
5. A directory cannot be moved to a subordinate directory.
ates as follows:
6. Database file members cannot be moved.
1. If the original file can be deleted (that is, the read-only
bit can be turned off for the file), the move will succeed, 7. You cannot move objects in QSYS.LIB or QDLS
retaining the read-only attribute of the file. between auxiliary storage pools (ASPs).
2. If the original file cannot be deleted, (for example, a 8. The MOV command does not copy the private authori-
CD-ROM file), the move operation will fail and a ties for objects when moving from one file system to
message will be issued indicating that the source is another file system.
read-only. Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more
| When moving a file within a file system, the Last access
information about printing the help text, refer to
| date/time, the Data change date/time and the Attribute
“Printing CL Command Descriptions” in Chapter 1.
| change date/time are preserved in the new file. If the file is
| moved outside of the original file system to the the "root" (/),
| QOpenSys, QDLS, or UDFS file systems, the Attribute Required Parameter
| change date/time is changed to the current time. In the case
| of moving to a database file member (*MBR) in the OBJ
| QSYS.LIB file system, the Data change date/time is updated Specifies the path name of the object or pattern to be
| as well. moved.
The object path name can be either a simple name or a
This command can also be issued using the following alter- name that is qualified with the name of the directory in
native command name: which the object is located. A pattern can be specified
Ÿ MOVE in the last part of the path name. An asterisk (*)
matches any number of characters and a question mark
For more information about integrated file system commands, (?) matches a single character. If the path name is qual-
see the Integrated File System Introduction book. ified or contains a pattern, it must be enclosed in apos-
trophes. For more information on specifying path
Restrictions: names, refer to Chapter 2, “Path Names (*PNAME).”
1. The user must have object management authority for the Note: An object name pattern can only be used when
object moved, delete and read authority to the directory the TODIR parameter is used.
the object is currently in, and add and read authority to
the directory to which the object is being moved.
Execute authority is required for all path prefixes.
Optional Parameters

P3-452 OS/400 CL Reference - Part 2 (Full Version)


MOV

TODIR *TEXT: The file contains data in textual form. Convert


Specifies the path name of the directory to which the data to the code page of the new object during the
object is being moved. The moved object uses the move. The data is processed as text during the move.
name specified on the OBJ parameter.
If you are moving from a database member to a stream
.: The path object moves to the current directory. file, any line-formatting characters (such as carriage
return, tab, and end-of-file) are just converted from one
'directory-name': Specify the name of the directory to
code page to another.
which the object is being moved. For more information
on specifying path names, refer to Chapter 2, “Path If you are moving from a stream file to a database
Names (*PNAME).” member, the stream file must contain end-of-line charac-
ters or the move will fail. If the stream file does contain
TOOBJ
end-of-line characters, the following actions are per-
Specifies the path name of the directory the object is
formed during the move to a database file.
being moved to and the new name of the object. For
more information on specifying path names, refer to Ÿ End-of-line characters are removed.
Chapter 2, “Path Names (*PNAME).”
Ÿ Records are padded with blanks (for a source phys-
Note: The TODIR and TOOBJ parameters are mutually ical file member) or nulls (for a data physical file
exclusive. member).

TOCODEPAGE Ÿ Tab characters are replaced by the appropriate


Specifies the data code page for the target of the move number of blanks to the next tab position.
operation. This parameter is ignored if the object speci-
fied on the OBJ parameter is not a regular file (a regular
file is a file that supports the integrated file system I/O
Example
operations open, read, and write). MOV OBJ('/CURRENT/DECEMBER-1994-MONTHLY-PAYROLL-FILE')
*OBJ: Use the data code page of the object being TODIR('/ARCHIVE')
moved. If this code page cannot be used by the file
system that the object is being moved into, the move This command moves a file named
operation will fail. DECEMBER-1994-MONTHLY-PAYROLL-FILE from a direc-
tory named CURRENT to a directory named ARCHIVE.
*CALC: Use the data code page of the object being
moved. If this code page cannot be used by the file Example 2: Moving with Conversion
system that the object is being moved into, allow the file MOV OBJ('/DATAFB')
system to determine a different code page and continue TOOBJ('/QSYS.LIB/APP1.LIB/DATA.FILE/DATAFB.MBR')
with the move. TOCODEPAGE(\CALC) DTAFMT(\TEXT)
code_page: A code page value between 1-32767. If this
code page cannot be used by the file system that the The stream file 'DATAFB' is to be moved to the database file
object is being moved into, the move operation will fail. 'DATAFB.MBR'. By specifying TOCODEPAGE(*CALC), the
file system being moved to (the QSYS.LIB file system in this
DTAFMT case) will try to create the new member in the same code
Specifies the format of the data in the file being moved. page as '/DATAFB'. If this fails (in this case, if 'DATA.FILE is
*BINARY: The file contains data in binary form (such as not in the same code page as 'DATAFB'), the file system will
an executable file). be allowed to choose an appropriate code page and com-
Do not convert data on the move. However, if the object plete the move. By specifying DTAFMT(*TEXT), the data in
being moved to has a different code page than the 'DATAFB' is handled as text and is converted into the code
source object, all extended attributes will be converted page chosen for the new file 'DATAFB.MBR'.
into the code page of the new object before being set.

Chapter 2. OS/400 Command Descriptions P3-453


MOVDOC

MOVDOC (Move Document) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──MOVDOC──FROMDOC(──┬─\SYSOBJNAM────┬──)──┬───────────────────────────────────────┬──┬────────────────────────────┬───────────5
└─document-name─┘ │ ┌─\NONE───────┐ │ │ ┌─\NONE───────┐ │
└─┬─FROMFLR(──┴─folder-name─┴──)──────┬─┘ └─TOFLR(──┴─folder-name─┴──)─┘
└─SYSOBJNAM(──system-object-name──)─┘
5──┬───────────────────────────────┬───────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\SAME─────────┐ │
└─RENAME(──┴─document-name─┴──)─┘

Purpose eter if a document name is specified on the FROMDOC


parameter. *NONE cannot be specified on the
The Move Document (MOVDOC) command moves a docu- FROMFLR parameter if document name is specified on
ment from one folder to another, removes a document from a the FROMDOC parameter.
folder, makes a document folderless, or moves a folderless
*NONE: The document to be moved is specified by its
document into a folder.
system object name.
Restrictions: folder-name: Specify the name of the folder from which
1. The user of this command must be enrolled in the the document is to be moved.
system directory and have *ALL authority to the docu- SYSOBJNAM
ment. Specifies the system object name. This parameter is
2. To move a document to or from a folder, the user must valid only when DLO(*SYSOBJNAM) or
have *CHANGE authority to the folder. DOCL(*SYSOBJNAM) is specified. A full ten characters
must be specified.
3. Documents cannot be moved between folders that
reside on different auxiliary storage pools (ASPs). TOFLR
Note: To see the parameter and value descriptions for this Specifies the name of the folder into which the document
command, refer to the online help text. For more is to be moved. A folder name must be specified on this
information about printing the help text, refer to parameter if a document name is specified on the
“Printing CL Command Descriptions” in Chapter 1. RENAME parameter. If the user specifies *NONE on
the TOFLR parameter, the document becomes a
folderless document and can only be referred to by its
Required Parameters system object name.
FROMDOC *NONE: The document becomes a folderless document
Specifies the document to be moved. If a document and can only be referred to by its system object name.
name is specified on the FROMDOC parameter, then a folder-name: Specify the name of the folder to which the
folder name must be specified on the FROMFLR param- document is to be moved.
eter. If *SYSOBJNAM is specified on the FROMDOC
parameter, then a system object name must be specified RENAME
on the SYSOBJNAM parameter. Specifies a new name for the document in the TOFLR
folder. This parameter allows the user to name a docu-
*SYSOBJNAM: A system object name is used to iden-
ment when moving a folderless document to a folder. It
tify the document being moved. This parameter must be
also allows the user to rename the document when
specified when moving a folderless document, and it
moving it from one folder to another.
may be specified instead of a document name when
moving a document from a folder. When *SYSOBJNAM If the user wants to move a document into a folder, the
is specified on the FROMDOC parameter, a user-defined name of the document in the TOFLR folder must be
variable must be specified on the SYSOBJNAM param- unique.
eter and document-name must be specified. If the new name is already assigned to a folder or a doc-
document-name: Specify the name of the document that ument in a folder specified on the TOFLR parameter, the
is moved. user must either choose a new name for the target doc-
ument or rename the folder or document that has the
same name.
Optional Parameters
If the user specifies *SYSOBJNAM on the FROMDOC
FROMFLR parameter, then a document name must be specified on
Specifies the folder from which the document is to be the RENAME parameter.
moved. A folder name must be specified on this param-

P3-454 OS/400 CL Reference - Part 2 (Full Version)


MOVDOC

*SAME: The value does not change. This command moves DOC1 from FLR1 to FLR2 and keeps
the name DOC1.
document-name: Specify the new name of the docu-
ment in the TOFLR folder.
Example 3: Moving and Renaming a Document
MOVDOC FROMDOC(DOC1) FROMFLR(FLR1) TOFLR(FLR2)
Examples RENAME(DOC2)

Example 1: Adding a Folderless Document This command moves DOC1 from FLR1 to FLR2 and
MOVDOC FROMDOC(\SYSOBJNAM) FROMFLR(\NONE) TOFLR(FLR1) renames it DOC2.
RENAME(DOC1) SYSOBJNAM(CNTR192366)
Example 4: Moving a Document and Making It
This command, whose system object name is CNTR192366, Folderless
adds a folderless document to FLR1 and names it DOC1. MOVDOC FROMDOC(DOC1) FROMFLR(FLR1) TOFLR(\NONE)

Example 2: Moving a Document and Keeping its Name This command moves DOC1 from FLR1 and changes it to a
MOVDOC FROMDOC(DOC1) FROMFLR(FLR1) TOFLR(FLR2) folderless document.
RENAME(\SAME)

Chapter 2. OS/400 Command Descriptions P3-455


MOVE

MOVE (Move) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(1) ─'object-path-name-'──)──┬──────────────────────────────────────┬───
55──MOVE──OBJ(─── (P) ──┬───────────────────────────────┬────────5
│ ┌─.─────────────────────┐ │ │ ┌─\OBJ──────┐ │
├─TODIR(──┴─'directory-path-name'─┴──)─┤ └─TOCODEPAGE(──┼─\CALC─────┼──)─┘
└─TOOBJ(──'object-path-name'──)────────┘ └─code_page─┘
5──┬─────────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\BINARY─┐ │
└─DTAFMT(──┴─\TEXT───┴──)─┘
Notes:
1 You can specify a pattern for this path name only if you specify the TODIR parameter.

P All parameters preceding this point can be specified in positional form.

Purpose 2. Some objects are restricted and are not moved. The
physical file systems return an error for these objects.
This command is an alias for the Move (MOV) command and
3. The directory to which the object is being moved must
can also be issued using the following alternative command
not already contain the name supplied in the TOOBJ
name:
parameter (or in the case where TODIR is used, the
Ÿ MOV name supplied in OBJ cannot exist in TODIR).

The Move (MOVE) command moves an object from the 4. Only objects that are a byte stream file type move
directory it is in to a different directory. If the TODIR param- between file systems.
eter is used, the object is moved to another directory and the 5. A directory cannot be moved to a subordinate directory.
object keeps the same name. If the TOOBJ parameter is
6. Database file members cannot be moved.
used the object is also renamed.
7. You cannot move objects in QSYS.LIB or QDLS
If the original object is a read-only file (a file that has the PC between auxiliary storage pools (ASPs).
read-only attribute flag turned on), the MOV command oper-
8. The MOVE command does not copy the private authori-
ates as follows:
ties for objects when moving from one file system to
1. If the original file can be deleted (that is, the read-only another file system.
bit can be turned off for the file), the move will succeed,
Note: To see the parameter and value descriptions for this
retaining the read-only attribute of the file.
command, refer to the online help text. For more
2. If the original file cannot be deleted, (for example, a information about printing the help text, refer to
CD-ROM file), the move operation will fail and a “Printing CL Command Descriptions” in Chapter 1.
message will be issued indicating that the source is
read-only.
Required Parameter
| When moving a file within a file system, the Last access
OBJ
| date/time, the Data change date/time and the Attribute
Specifies the path name of the object or pattern to be
| change date/time are preserved in the new file. If the file is
moved.
| moved outside of the original file system to the the "root" (/),
| QOpenSys, QDLS, or UDFS file systems, the Attribute The object path name can be either a simple name or a
| change date/time is changed to the current time. In the case name that is qualified with the name of the directory in
| of moving to a database file member (*MBR) in the which the object is located. A pattern can be specified
| QSYS.LIB file system, the Data change date/time is updated in the last part of the path name. An asterisk (*)
| as well. matches any number of characters and a question mark
(?) matches a single character. If the path name is qual-
For more information about integrated file system commands, ified or contains a pattern, it must be enclosed in apos-
see the Integrated File System Introduction book. trophes. For more information on specifying path
names, refer to Chapter 2, “Path Names (*PNAME).”
Restrictions:
Note: An object name pattern can only be used when
1. The user must have object management authority for the the TODIR parameter is used.
object moved, delete and read authority to the directory
the object is currently in, and add and read authority to
the directory to which the object is being moved.
Optional Parameters
Execute authority is required for all path prefixes.

P3-456 OS/400 CL Reference - Part 2 (Full Version)


MOVE

TODIR *TEXT: The file contains data in textual form. Convert


Specifies the path name of the directory to which the data to the code page of the new object during the
object is being moved. The moved object uses the move. The data is processed as text during the move.
name specified on the OBJ parameter.
If you are moving from a database member to a stream
.: The path object moves to the current directory. file, any line-formatting characters (such as carriage
return, tab, and end-of-file) are just converted from one
'directory-name': Specify the name of the directory to
code page to another.
which the object is being moved. For more information
on specifying path names, refer to Chapter 2, “Path If you are moving from a stream file to a database
Names (*PNAME).” member, the stream file must contain end-of-line charac-
ters or the move will fail. If the stream file does contain
TOOBJ
end-of-line characters, the following actions are per-
Specifies the path name of the directory the object is
formed during the move to a database file.
being moved to and the new name of the object. For
more information on specifying path names, refer to Ÿ End-of-line characters are removed.
Chapter 2, “Path Names (*PNAME).”
Ÿ Records are padded with blanks (for a source phys-
Note: The TODIR and TOOBJ parameters are mutually ical file member) or nulls (for a data physical file
exclusive. member).

TOCODEPAGE Ÿ Tab characters are replaced by the appropriate


Specifies the data code page for the target of the move number of blanks to the next tab position.
operation. This parameter is ignored if the object speci-
fied on the OBJ parameter is not a regular file (a regular
file is a file that supports the integrated file system I/O
Examples
operations open, read, and write). Example 1: Moving a File
*OBJ: Use the data code page of the object being MOVE OBJ('/CURRENT/DECEMBER-1994-MONTHLY-PAYROLL-FILE')
moved. If this code page cannot be used by the file TODIR('/ARCHIVE')
system that the object is being moved into, the move
operation will fail. This command moves a file named
*CALC: Use the data code page of the object being DECEMBER-1994-MONTHLY-PAYROLL-FILE from a direc-
moved. If this code page cannot be used by the file tory named CURRENT to a directory named ARCHIVE.
system that the object is being moved into, allow the file
Example 2: Moving with Conversion
system to determine a different code page and continue
with the move. MOVE OBJ('/DATAFB')
TOOBJ('/QSYS.LIB/APP1.LIB/DATA.FILE/DATAFB.MBR')
code_page: A code page value between 1-32767. If this TOCODEPAGE(\CALC) DTAFMT(\TEXT)
code page cannot be used by the file system that the
object is being moved into, the move operation will fail. The stream file 'DATAFB' is to be moved to the database file
'DATAFB.MBR'. By specifying TOCODEPAGE(*CALC), the
DTAFMT file system being moved to (the QSYS.LIB file system in this
Specifies the format of the data in the file being moved. case) will try to create the new member in the same code
*BINARY: The file contains data in binary form (such as page as '/DATAFB'. If this fails (in this case, if 'DATA.FILE is
an executable file). not in the same code page as 'DATAFB'), the file system will
Do not convert data on the move. However, if the object be allowed to choose an appropriate code page and com-
being moved to has a different code page than the plete the move. By specifying DTAFMT(*TEXT), the data in
source object, all extended attributes will be converted 'DATAFB' is handled as text and is converted into the code
into the code page of the new object before being set. page chosen for the new file 'DATAFB.MBR'.

Chapter 2. OS/400 Command Descriptions P3-457


MOVOBJ

MOVOBJ (Move Object) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(1) ─object-type──)──TOLIB(──┬─\CURLIB──────┬──)────
55──MOVOBJ──OBJ(──┼───────────────┼──object-name──)──OBJTYPE(─── (P) ───────────────5%
├─\CURLIB/──────┤ └─library-name─┘
└─library-name/─┘
Notes:
1 A list of the valid OS/400 object types for this command is in Appendix A.

P All parameters preceding this point can be specified in positional form.

Purpose OBJ
Specifies the qualified name of the object being moved
The Move Object (MOVOBJ) command removes an object to another library. (If no library qualifier is given, *LIBL
from its currently assigned library and places it in a different is used to find the object.) The object name should be
library. The type of the object moved is specified in the qualified to ensure that the correct object is moved.
OBJTYPE parameter.
The name of the object can be qualified by one of the
When this command is used to move an object, the save and following library values:
restore information is removed from the object description. *LIBL: All libraries in the job's library list are
searched until the first match is found.
Restrictions:
*CURLIB: The current library for the job is
1. The user who submits this command must have object
searched. If no library is specified as the current
management authority for the object moved, delete and
library for the job, the QGPL library is used.
execute authority to the library the object is currently in,
and add and read authority to the library to which the library-name: Specify the name of the library to be
object is being moved. searched.
2. Libraries, user profiles, edit descriptions, line
object-name: Specify the name of the object that is
descriptions, control unit descriptions, device
moved.
descriptions, journals, and journal receivers cannot be
moved. OBJTYPE
3. The following objects cannot be moved: the system Specifies the type of the object moved to another library.
operator message queue QSYSOPR, all work station More information on this parameter is in Appendix A,
user message queues, and the system log QHST. “Expanded Parameter Descriptions.”
4. The library to which the object is being moved must not
Note: Journal and journal receiver objects are moved
already contain an object of the same name and type as
only from library QRCL to the library where they
the object being moved.
were originally allocated. An attempt to move
5. The user space (*USRSPC), user index (*USRIDX), and
objects of these types from or to any other library
user queue (*USRQ) user domain objects can only be
generates an error message.
moved into libraries that are permitted in the system
value QALWUSRDMN (allow user objects in library). TOLIB
However, if the user object was created in the system Specifies the name of the library to which the object is
domain, it is not restricted. moved. Library QTEMP cannot be specified.
6. Objects cannot be moved to the to library if the object
and the to library are in different auxiliary storage pools *CURLIB: The object is moved to the current
(ASPs). An error message is issued when the object library. If no library is specified as the current
cannot be moved. You can move save files that are in a library for the job, the QGPL library is used.
user ASP to libraries that are in the system ASP. library-name: Specify the name of the library to
Note: To see the parameter and value descriptions for this which the object is moved.
command, refer to the online help text. For more
information about printing the help text, refer to
Examples
“Printing CL Command Descriptions” in Chapter 1.
Example 1: Moving an Object from the General Purpose
Required Parameters Library
MOVOBJ OBJ(QGPL/X) OBJTYPE(\PGM) TOLIB(MY)

P3-458 OS/400 CL Reference - Part 2 (Full Version)


MOVOBJ

The general purpose library is searched for the program MOVOBJ OBJ(\LIBL/Y) OBJTYPE(\FILE) TOLIB(Z)
(*PGM) object X. Before X is moved to MY library, the user
profile of the user submitting the command is checked for (1) or
object operational and management authority for the object,
MOVOBJ Y \FILE Z
(2) add and execute authority for MY library, and (3) delete
and read authority for the library from which the object X is The library list (*LIBL) is used to locate the file named Y. If
moved. After this command is run, object X is no longer in more than one object with the same name exists in the
the QGPL library. libraries making up the library list, the first object found via
the library list for which the user has object operational
Example 2: Moving an Object from a Library in the
authority is moved to library Z.
Library List

Chapter 2. OS/400 Command Descriptions P3-459


MRGMSGCLG

MRGMSGCLG (Merge Message Catalog) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌──
─────────────────────────┐
55──MRGMSGCLG──CLGFILE(──'catalog-file-path-name'──)──SRCFILE(───6─'source-file-path-name'─┴───
(1) ──)────
(P) ───────────────────────────5

5──┬───────────────────────────────────────┬──)──┬───────────────────────────────────────┬──)───────────────────────────────────5
│ ┌─\SRCCCSID──────────────┐ │ │ ┌─\SRCFILE───────────────┐ │
└─CLGCCSID(──┼─\JOB───────────────────┼─┘ └─SRCCCSID(──┼─\JOB───────────────────┼─┘
└─coded-character-set-ID─┘ └─coded-character-set-ID─┘
5──┬─────────────────────────────┬──┬─────────────────────────────────────────┬──┬─────────────────────────────────┬───────────5%
│ ┌─\BLANK────────┐ │ │ ┌─\INDIR──────────────────┐ │ │ ┌─\INDIR─────────────┐ │
└─TEXT(──┴─'description'─┴──)─┘ └─DTAAUT(──┼─\RWX────────────────────┼──)─┘ └─OBJAUT(──┼─\NONE──────────────┼─┘
├─\RW─────────────────────┤ ├─\ALL───────────────┤
├─\RX─────────────────────┤ │ ┌──
─────────────┐ │
├─\WX─────────────────────┤ └──6┬─\OBJEXIST─┬┴───
(2) ─┘
├─\R──────────────────────┤ ├─\OBJMGT───┤
├─\W──────────────────────┤ ├─\OBJALTER─┤
├─\X──────────────────────┤ └─\OBJREF───┘
├─\EXCLUDE────────────────┤
├─\NONE───────────────────┤
└─authorization-list-name─┘
Notes:
1 A maximum of 300 repetitions.

P All parameters preceding this point can be specified in positional form.

2 A maximum of 4 repetitions.

Purpose CLGFILE
Specifies the path name of the message catalog to be
The Merge Message Catalog (MRGMSGCLG) command changed or created. All directories in a stream file path
merges message text from one or more source files name must exist. If no stream file exists with the speci-
(SRCFILE parameter) with message text in the specified fied path name, a message catalog with the specified file
message catalog (CLGFILE parameter). If the catalog speci- name is created. If the path name is in the QSYS file
fied does not already exist, it will be created using values system, the file must exist. If a file member in the QSYS
specified for the CLGCCSID, DTAAUT, and OBJAUT param- file system does not exist, it is created. Source physical
eters. If the catalog already exists, the CCSID, DTAAUT, and files with multiple data fields are not supported.
OBJAUT attributes of the existing message catalog will be
used. SRCFILE
Specifies the path name of the source file that contains
You can specify up to 300 message text source files. the message text to be merged into the message
Message text source files are processed in the sequence catalog. If the file is from the QSYS file system, then it
specified. Each successive source file modifies the catalog. must be a database source physical file.
If a message number in the source file already exists in the Note: If the source file is not a record file, then each
message catalog, the new message text defined in the line in the source file must have been terminated
source file replaces the old message text in the message with a newline or linefeed character when the
catalog file. If a message number in the source file does not source file was created.
already exist in the message catalog, the message informa-
tion is added to the message catalog. CLGCCSID
Specifies the coded character set ID (CCSID) in which to
This command can also be issued using the following alter- store the message text in the message catalog. If the
native command name: message catalog is a stream file, the CCSID value
Ÿ GENCAT entered is used to set the stream file's attributes. Use
Work with Object Links (WRKLNK command) to display
Note: To see the parameter and value descriptions for this the CCSID of a message catalog. Use Display file
command, refer to the online help text. For more Description (DSPFD command) to determine the CCSID
information about printing the help text, refer to of a message catalog in the QSYS file system.
“Printing CL Command Descriptions” in Chapter 1.
*SRCCCSID: Special value indicating that the CCSID
will be determined from the value specified for the
Required Parameters source file CCSID (SRCCSID parameter).

P3-460 OS/400 CL Reference - Part 2 (Full Version)


MRGMSGCLG

*JOB: Special value indicating the job CCSID is used *R: *R authority allows the user to view the contents of
for the catalog information. If the job CCSID is 65535, an object. *R authority provides object operational
the job default CCSID is used. authority and data read authority.
coded-character-set-ID: Specify the CCSID used for the *W: *W authority allows the user to modify the contents
catalog information. The values 0, 65534, and 65535 of an object. *W authority provides object operational
are not valid. authority and data add, update, and delete authorities.
*X: *X authority allows the user to run a program or
Optional Parameters search a library or directory. *X authority provides object
operational authority and data execute authority.
SRCCCSID
Specifies the coded character set ID (CCSID) of the *EXCLUDE: Exclude authority prevents the user from
source file. If the source file is a stream file, the CCSID accessing the object. The OBJAUT value must be
equivalent of the code page will be used. *NONE if this special value is used.

*SRCFILE: Special value indicating that the CCSID will *NONE: The users will not be given any of the data
be determined from the CCSID of the first source file authorities to the objects. This value cannot be used
(SRCFILE parameter). If the source file is a stream file, with OBJAUT value of *NONE.
then the CCSID equivalent of the stream file code page authorization-list-name: Specify the name of the authori-
attribute will be used. zation list used.
*JOB: Special value indicating the job CCSID is used OBJAUT
for the CCSID of the source file. If the job CCSID is Specifies the authorities given users to the object.
65535, the job default CCSID is used.
*INDIR: The object authority is based on the authority
coded-character-set-ID: Specify the CCSID of the for the directory where this object is being created. If
source file. The values 0, 65534, and 65535 are not *INDIR is used for DTAAUT, it is also required for
valid. OBJAUT.
DTAAUT *NONE: None of the other object authorities (existence,
Specifies the public authority given users for the data in management, alter, or reference) will be given to the
the object created. users. If *EXCLUDE or an authorization list name is
*INDIR: The authority for the object being created is specified for the DTAAUT parameter, this value must be
determined by the directory it is being created in. If specified.
*INDIR is used for DTAAUT, it is also required for *ALL: All of the other object authorities (existence,
OBJAUT. management, alter, and reference) will be given to the
*RWX: The users are given *RWX authority to the users.
objects. *RWX authority allows the user to perform all Or specify up to four (4) of the following values:
operations on the object except those limited to the
*OBJEXIST: The users will be given object existence
owner or controlled by object existence, object manage-
authority to the object.
ment, object alter, and object reference authority. The
user can change the object and perform basic functions *OBJMGT: The users will be given object management
on the object. *RWX authority provides object opera- authority to the object.
tional authority and all the data authorities. *OBJALTER: The users will be given object alter
*RX: *RX authority allows the user to perform basic authority to the object.
operations on the object, such as run a program or *OBJREF: The users will be given object reference
display the contents of a file. The user is prevented authority to the object.
from changing the object. *RX authority provides object
operational authority and read and execute authorities. TEXT
Specifies the text that briefly describes the message
*RW: *RW authority allows the user to view the con-
catalog. More information on this parameter is in
tents of an object and modify the contents of an object.
Appendix A, “Expanded Parameter Descriptions.”
*RW authority provides object operational authority and
data read, add, update, and delete authorities. Note: Assigning text to objects is dependent on the
support provided by the file system or object type used
*WX: *WX authority allows the user to modify the con-
for the message catalog.
tents of an object and run a program or search a library
or directory. *WX authority provides object operational *BLANK: Text is not specified.
authority and data add, update, delete, and execute 'description': Specify no more than 50 characters of text,
authorities. enclosed in apostrophes.

Chapter 2. OS/400 Command Descriptions P3-461


MRGMSGCLG

Example This command merges the message text from member


USMSG of source physical file MSGSRC in library MYLIB in
MRGMSGCLG CLGFILE('/USDIR/USMSG.CAT') CLGCCSID(\SRCCSID) the QSYS file system with message catalog USMSG.CAT in
SRCFILE('/QSYS.LIB/MYLIB.LIB/MSGSRC.FILE/USMSG.MBR') directory USDIR. If the message catalog does not already
DTAAUT(\R) TEXT('Message catalog for USA') exist, it will be created with the CCSID of the source file and
data authority of *R. The text parameter describes this as a
message catalog for the USA.

P3-462 OS/400 CL Reference - Part 2 (Full Version)


MRGMSGF

MRGMSGF (Merge Message File) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐ ┌─\LIBL/────────┐
(P) ───────────5
55──MRGMSGF──FROMMSGF(──┼───────────────┼──message-file-name──)──TOMSGF(──┼───────────────┼──message-file-name──)────
├─\CURLIB/──────┤ ├─\CURLIB/──────┤
└─library-name/─┘ └─library-name/─┘
5──┬───────────────────────────────────────────────────────┬──┬───────────────────────────────────────────┬────────────────────5%
│ ┌─\NONE────────────────────────────────┐ │ │ ┌─\ALL──────────────────────┐ │
│ │ ┌─\LIBL/────────┐ │ │ │ │ ┌──────────────────────┐ │ │
6 (1)
└─RPLMSGF(──┴─┼───────────────┼──message-file-name─┴──)─┘ ├─SELECT(──┴───message-identifier─┴────┴──)─┤
├─\CURLIB/──────┤ │ ┌─\NONE─────────────────────┐ │
└─library-name/─┘ │ │ ┌──
────────────────────┐ │ │
6 (1)
└─OMIT(──┴───message-identifier─┴────┴──)───┘
Notes:
1 A maximum of 50 repetitions

P All parameters preceding this point can be specified in positional form.

Purpose *LIBL: All libraries in the job's library list are


searched until the first match is found.
The Merge Message File (MRGMSGF) command allows the
*CURLIB: The current library for the job is
user to merge messages from one message file with those in
searched. If no library is specified as the current
another message file. Another message file may be speci-
library for the job, the QGPL library is used.
fied to hold the messages that are replaced during the
merging process. None of the message files specified are library-name: Specify the name of the library to be
deleted by this command (MRGMSGF). searched.

Before the command is processed, messages can be in the message-file-name: Specify the name of the message
from-message file (FROMMSGF), in the to-message file file to use.
(TOMSGF), or in both files, but not in the replaced-message TOMSGF
file (RPLMSGF). The three possibilities result in the fol- Specifies the qualified name of the message file into
lowing when the MRGMSGF command is processed: which the messages from the FROMMSGF are being
Ÿ When the messages are only in the FROMMSGF, they merged.
are added to the TOMSGF The name of the to-message file can be qualified by one
Ÿ When the messages are only in the TOMSGF, they of the following library values:
remain in the TOMSGF
Ÿ When the messages are in both the FROMMSGF and *LIBL: All libraries in the job's library list are
the TOMSGF, the messages in the TOMSGF are first searched until the first match is found.
saved into the RPLMSGF (if a replace-message file is *CURLIB: The current library for the job is
specified); then the messages in the TOMSGF are searched. If no library is specified as the current
replaced by the messages in the FROMMSGF library for the job, the QGPL library is used.
Restriction: The user must have *USE authority to the library-name: Specify the name of the library to be
from-message file (FROMMSGF); use, add, and delete searched.
authorities to the to-message file (TOMSGF); and use and
message-file-name: Specify the name of the message
add authorities to the replace-message file (RPLMSGF).
file to use.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more
information about printing the help text, refer to Optional Parameters
“Printing CL Command Descriptions” in Chapter 1. RPLMSGF
Specifies the qualified name of the message file that will
Required Parameters receive replaced messages (before the messages are
replaced) from the to-message file (TOMSGF parameter)
FROMMSGF when the to-message and from-message files are
Specifies the qualified name of the message file from merged with the merge message file (MRGMSGF)
which the messages are being merged. command.
The name of the from-message file can be qualified by
one of the following library values:

Chapter 2. OS/400 Command Descriptions P3-463


MRGMSGF

*NONE: A message file is not used to receive replaced Table 20. Contents of the Files Before the Merge
messages. Message File A Message File B
The name of the message-file can be qualified by one of ABC1234 ’text A4’ ABC1233 ’text B3’
the following library values: ABC1236 ’text A6’ ABC1234 ’text B4’
ABC1237 ’text A7’ ABC1235 ’text B5’
*LIBL: All libraries in the job's library list are ABC1238 ’text A8’ ABC1236 ’text B6’
searched until the first match is found.
*CURLIB: The current library for the job is Below are the two message files after the MRGMSGF
searched. If no library is specified as the current command is processed. Notice that messages ABC1234
library for the job, the QGPL library is used. and ABC1236 are in both files. When the merge occurs, the
library-name: Specify the name of the library to be message text from file A (text A4 and A6 respectively)
searched. replaces the message text in file B (text B4 and B6 respec-
tively).
message-file-name: Specify the name of the message
file to use. Table 21. Contents of the Files After the Merge
Message File A Message File B
SELECT
Specifies a list of the IDs of messages to be merged into ABC1234 ’text A4’ ABC1233 ’text B3’
the to-message file (TOMSGF parameter) from the from- ABC1236 ’text A6’ ABC1234 ’text A4’
ABC1237 ’text A7’ ABC1235 ’text B5’
message file (FROMMSGF parameter). All other mes-
ABC1238 ’text A8’ ABC1236 ’text A6’
sages in the from-message file are not merged. ABC1237 ’text A7’
Note: This parameter cannot be specified if the OMIT ABC1238 ’text A8’
parameter is specified.
Example 2: Merging Two Files with Replace File Option
*ALL: All messages in the from-file are merged into the
to-file. In the example below, messages that are replaced in the
message-identifier: Specify up to 50 IDs of the mes- to-file are saved to a separate file before being replaced.
sages to be merged. MRGMSGF FROMMSGF(A) TOMSGF(B) RPLMSGF(C)
OMIT Table 22. Contents of the Files Before the Merge
Specifies a list of the IDs of messages that are not
merged into the to-message file (TOMSGF parameter) Message File A Message File B Message File C
from the from-message file (FROMMSGF parameter). ABC1234 ’text A4’ ABC1233 ’text B3’
All other message IDs in the from-message file are ABC1236 ’text A6’ ABC1234 ’text B4’
merged. ABC1237 ’text A7’ ABC1235 ’text B5’
ABC1238 ’text A8’ ABC1236 ’text B6’
Note: This parameter cannot be specified if the
SELECT parameter is specified.
Below are the two message files after the MRGMSGF
*NONE: All messages in the from-file are merged into command is processed. Notice that messages ABC1234
the to-file. and ABC1236 are in both files. When the merge occurs, the
message-identifier: Specify up to 50 IDs of messages text from these two messages is first moved to file C (text B4
that are not being merged. and B6 respectively). Then, message text from file A (text
A4 and A6 respectively) replaces the message text in file B
(text B4 and B6 respectively).
Examples
Table 23. Contents of the Files After the Merge

The examples below show how the merge files look before Message File A Message File B Message File C
and after the MRGMSGF command is run. ABC1234 ’text A4’ ABC1233 ’text B3’ ABC1234 ’text B4’
ABC1236 ’text A6’ ABC1234 ’text A4’ ABC1236 ’text B6’
Example 1: Merging Two Files ABC1237 ’text A7’ ABC1235 ’text B5’
ABC1238 ’text A8’ ABC1236 ’text A6’
In the following example, two files are merged. ABC1237 ’text A7’
MRGMSGF FROMMSGF(A) TOMSGF(B) ABC1238 ’text A8’

P3-464 OS/400 CL Reference - Part 2 (Full Version)


MRGTCPHT

MRGTCPHT (Merge TCP/IP Host Table)


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ──┬─────────────────────────┬─────────────────5
55──MRGTCPHT──FROMFILE(──┼───────────────┼──)──┬──────────────────────────────┬───
├─\CURLIB/──────┤ │ ┌─\FIRST──────┐ │ │ ┌─\AS4ðð─┐ │
├─library-name/─┤ └─FROMMBR(──┼─\LAST───────┼──)─┘ └─FILEFMT(──┼─\AIX───┼──)─┘
└─from-file─────┘ └─from-member─┘ └─\NIC───┘
5──┬───────────────────────┬───────────────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\NO──┐ │
└─REPLACE(──┴─\YES─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose library qualifier is specified, the library list (*LIBL) is used


to locate the file.
The Merge TCP/IP Host Table (MRGTCPHT) command is
The name of the physical file member can be qualified
used to merge host names, internet addresses, and text
by one of the following library values:
comment entries from a physical file member into the local
host table. A replace option is also provided that allows the *LIBL: All libraries in the job's library list are
entire local host table to be replaced by the host table entries searched until the first match is found.
in a user specified physical file member.
*CURLIB: The current library for the job is
A file format option is provided that allows either *AS400, searched. If no library is specified as the current
*AIX, or *NIC file format to be merged with the local host library for the job, the QGPL library is used.
table. The local host table is located in member library-name: Specify the name of the library to be
QUSRSYS/QATOCHOST.HOSTS and is created as a phys- searched.
ical file.
from-file: Specify the name of the physical file.
A maximum of 4 host names per IP address is allowed when
host tables are merged. For example: If the local host table
Optional Parameters
already has 3 host names and the physical file member to be
merged has 2 additional host names, only the first host name FROMMBR
in the physical file is merged into the final host table. Host Specifies the name of the physical file member to be
names that exist both in the local host table and the physical used in the merge operation.
file member being merged are not duplicated.
*FIRST: The first member of the physical file is used to
Attention: merge with the host table.
*LAST: The last member of the physical file is used to
The original copy of the local host table is not saved by the merge with the host table.
Merge TCP/IP Host Table (MRGTCPHT) command. To save
the original host table, create a copy of the file from-member: Specify the name of the physical file
QUSRSYS/QATOCHOST.HOSTS using the Copy File member.
(CPYF) command. Do this before issuing the MRGTCPHT FILEFMT
command. Specifies whether the physical file member to be merged
with the local host table is *AS400, *AIX, or *NIC format.
Restriction: You must have *IOSYSCFG special authority
to use this command. *AS400: The physical file member to be merged with
the local host table is *AS400 format.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more Note: *AS400 can only be used if the physical file
information about printing the help text, refer to member specified is a host table from an AS/400
“Printing CL Command Descriptions” in Chapter 1. system running Version 3, Release 1, Modifica-
tion 0 (V3R1M0) or later of OS/400. If you
import a host table from an AS/400 system
Required Parameter running any version of OS/400 prior to V3R1M0,
FROMFILE specify *AIX as the FILEFMT.
Specifies the name of the physical file that contains the *AIX: The physical file member to be merged with the
member being used for the merge operation. If no local host table is *AIX format.

Chapter 2. OS/400 Command Descriptions P3-465


MRGTCPHT

*NIC: The physical file member to be merged with the MRGTCPHT FROMFILE(AS4ððFILE) REPLACE(\YES)
local host table is *NIC format.
This command replaces the contents of
REPLACE QUSRSYS/QATOCHOST.HOSTS with the contents of the
Specifies whether the physical file member is to be first member of physical file AS400FILE. The first member of
merged with or replaces the local host table. physical file AS400FILE is in AS/400 host table format.
*NO: The physical file member is merged with the local
Example 2: Merging Local Host Table
host table.
MRGTCPHT FROMFILE(HOSTLIB/NICFILE)
*YES: The physical file member replaces the local host FROMMBR(NEWHOSTS) FILEFMT(\NIC)
table.
This command merges the current contents of the local host
table with the contents of the NEWHOSTS member of phys-
Examples ical file NICFILE in library HOSTLIB. The physical file is in
*NIC format. The records are converted from *NIC format to
Example 1: Replacing Local Host Table *AS400 format by this command.

P3-466 OS/400 CL Reference - Part 2 (Full Version)


NETSTAT

NETSTAT Command
NETSTAT Command

For a description of the NETSTAT command, see the WRKTCPSTS (Work with TCP/IP Network Status) command
description.

Chapter 2. OS/400 Command Descriptions P3-467


OPNDBF

OPNDBF (Open Database File)


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
55──OPNDBF──FILE(──┼───────────────┼──file-name──)──OPTION(──┬─\INP─┬──)──┬──────────────────────────┬──────────────────────────5
├─\CURLIB/──────┤ ├─\OUT─┤ │ ┌─\FIRST──────┐ │
└─library-name/─┘ └─\ALL─┘ └─MBR(──┼─\LAST───────┼──)─┘
└─member-name─┘
(P) ──┬──────────────────────────┬──┬────────────────────────────────────────┬─────────5
5──┬─────────────────────────────────────┬───
│ ┌─\FILE────────────────┐ │ │ ┌─\FILE────┐ │ │ ┌─\NO───────────────────┐ │
└─OPNID(──┴─open-identifier-name─┴──)─┘ └─ACCPTH(──┴─\ARRIVAL─┴──)─┘ └─SEQONLY(──┼─\YES──────────────────┼──)─┘
└─┬───────────────────┬─┘
└─number-of-records─┘
5──┬──────────────────────┬──┬──────────────────────────────┬──┬─────────────────────────┬──┬─────────────────────────┬────────5%
│ ┌─\NO──┐ │ │ ┌─\ACTGRPDFN─┐ │ │ ┌─\NORMAL─┐ │ │ ┌─\NO──┐ │
└─COMMIT(──┴─\YES─┴──)─┘ └─OPNSCOPE(──┼─\ACTGRP────┼──)─┘ └─TYPE(───(1) ─┴─\PERM───┴──)─┘ └─DUPKEYCHK(──┴─\YES─┴──)─┘
└─\JOB───────┘
Notes:
1 This parameter is not valid when the OPNSCOPE parameter is specified.

P All parameters preceding this point can be specified in positional form.

2. Subsequent shared open operations must adhere to the


same open options (such as SEQONLY) that are speci-
Purpose fied when the OPNDBF command occurs.
Note: To see the parameter and value descriptions for this
The Open Database File (OPNDBF) command opens a data-
command, refer to the online help text. For more
base file member. Processing of records is done later by
information about printing the help text, refer to
application programs that do shared open operations. If the
“Printing CL Command Descriptions” in Chapter 1.
file is opened by the OPNDBF command, this open operation
is not used by the Receive File (RCVF) command. The
RCVF command performs its own open operation. More Required Parameters
information on database files is in the DB2 for AS/400 Data-
base Programming book. FILE
Specifies the qualified name of the file that contains the
Note: The share attribute of the open operation is deter- member being opened. Overrides currently in effect are
mined by the current attributes of the file and any processed.
overrides currently in effect. A shared open operation
means that subsequent open operations for which The name of the file can be qualified by one of the fol-
SHARE(*YES) is specified share this open data path lowing library values:
(ODP), while subsequent open operations for which *LIBL: All libraries in the job's library list are
SHARE(*NO) is specified create their own ODP. If searched until the first match is found.
an override specifying a SHARE attribute is in effect
when this command is sent, this attribute takes pre- *CURLIB: The current library for the job is
cedence over what is currently specified for the file; searched. If no library is specified as the current
any other attribute specified on an Override Database library for the job, the QGPL library is used.
File (OVRDBF) command also takes precedence over library-name: Specify the name of the library to be
what is specified on this command. searched.

Restrictions: file-name: Specify the name of the file that contains the
member being opened.
1. The user must have object operational authority to the
database file, and add, update, delete, or read authority, OPTION
or some combination of this authority on the physical Specifies the options used to open a file. The options
files containing the data to be accessed. If the data is chosen on the first full open operation of a file are not
accessed by opening the physical file, the user must changed on subsequent shared options.
have object operational authority to the physical file. If
*INP: The file is opened for input operations only.
the data is accessed by opening a logical file over the
physical file, object operational authority to the logical file *OUT: The file is opened for output operations only.
is required; object operational authority to the physical *ALL: The file is opened for all options (input, output,
file is not required. update, and delete).

P3-468 OS/400 CL Reference - Part 2 (Full Version)


OPNDBF

Optional Parameters specifies OPTION (*ALL) or COMMIT(*YES), the data-


base changes the open operation to SEQONLY(*NO).
MBR
Specifies the member that is opened in the database COMMIT
file. Specifies whether the SQL statements are run under
commitment control.
*FIRST: The first member in the database file is used.
Before a database file is opened under commitment
*LAST: The last member of the specified physical file is control, the user must ensure that all files in the commit-
opened. ment transaction are journaled. If only the after images
member-name: Specify the name of the member that is are being journaled, the system implicitly begins jour-
opened. naling both the before and the after images for the dura-
tion of the changes being made to files opened under
OPNID this commitment definition.
Specifies the identifier used for naming this open opera-
tion so it can be referred to when the member is closed *NO: This file is not placed under commitment control.
or when the Position Database File (POSDBF) command *YES: This file is placed under commitment control.
is used. This identifier must be specified on the Close
File (CLOF) command, and cannot be used on another OPNSCOPE
OPNDBF command until the file is closed, or an escape Specifies the extent of influence (scope) of the open
message is sent and the open operation fails. operation.

*FILE: The file name is used for the open operation *ACTGRPDFN: The scope of the open operation is
identifier. determined by the activation group of the program that
called the OPNDBF command processing program. If
open-identifier-name: Specify the name of this open the activation group is the default activation group, the
operation. scope is the call level of the caller. If the activation
ACCPTH group is a non-default activation group, the scope is the
Specifies the access path to use for this open operation. activation group of the caller.

*FILE: The file access path is used. If the file is keyed, *ACTGRP: The scope of the open data path (ODP) is
the keyed access path is used; otherwise, the arrival the activation group. Only those shared opens from the
sequence path is used. same activation group can share this ODP. This ODP is
not reclaimed until the activation group is deactivated, or
*ARRIVAL: The arrival sequence access path is used. until the Close File (CLOF) command closes the acti-
If the file is keyed, the keyed access path is ignored. vation group.
More information on arrival sequence processing is in
the DB2 for AS/400 Database Programming book. *JOB: The scope of the open is the job in which the
open occurs.
SEQONLY
Specifies, for database files whose records are normally TYPE
processed in sequential order, whether sequential-only Specifies the recursion level at which the reclaim
processing is used on the file. This parameter also resources function (RCLRSC) is effective.
specifies the number of records transferred as a group *NORMAL: The reclaim resources function is allowed to
to or from the database file if sequential-only processing close the file if the program ends without doing a close
is used. If an override specifying SEQONLY is in effect, operation.
it takes precedence over what is specified on this
*PERM: The file remains open until it is closed by using
parameter. More information on sequential-only pro-
the Close File (CLOF) command, or until the job ends.
cessing is in the SEQONLY parameter description on
The open data path (ODP) remains in existence even if
the Override with Database File (OVRDBF) command,
RCLRSC is used.
and in the DB2 for AS/400 Database Programming book.
*NO: The database file does not use sequential-only DUPKEYCHK
processing. Specifies whether duplicate key feedback should be
returned on I/O operations. Duplicate key feedback
*YES: The database file uses sequential-only pro- should only be requested for those files that are pro-
cessing. cessed by COBOL programs since this is the only high-
number-of-records: The file uses sequential-only pro- level language that uses the feedback. Duplicate key
cessing. This parameter value indicates the number of feedback should be requested only when it will be used
records the database blocks up in its internal buffer by the COBOL application, since providing it can cause
before accessing the data in the member. Specifying a performance degradation. More information on dupli-
this number is not required. If this value is not specified, cate key feedback is in the DB2 for AS/400 Database
the database chooses a default value. If this command Programming book.

Chapter 2. OS/400 Command Descriptions P3-469


OPNDBF

*NO: Duplicate key feedback is not returned on I/O OPNDBF FILE(MASTER/PAYROLL) OPTIONS(\INP)
operations.
This command opens the first member in the file PAYROLL
*YES: Duplicate key feedback is returned on I/O oper-
for input processing. The open identifier associated with this
ations.
open operation has the file name as its identifier. If the file is
specified as SHARE(*YES), subsequent open operations of
Example the file PAYROLL (such as in an application program)
perform more efficiently and use the same ODP.

P3-470 OS/400 CL Reference - Part 2 (Full Version)


OPNQRYF

OPNQRYF (Open Query File) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌──
────────────────────────────────────────────────────────────────────────┐
│ ┌─\LIBL/────────┐ ┌─\FIRST─┐ ┌─\ONLY──────────────┐ │
55──OPNQRYF──FILE───── 6
(1, 2) ─(────(──┼───────────────┼──file-name──┼─\LAST──┼──┴─record-format-name─┴──)─┴───
(3) ──)──────────────────────5
├─\CURLIB/──────┤ └─member─┘
└─library-name/─┘
(P) ──┬───────────────────────────────────────────────────────────────────────────────────┬─────5
5──┬────────────────────────────┬───
│ ┌─\INP─┐ │ │ ┌─\FILE─────────────────────────────────────────────────────────┐ │
└─OPTION──(──┬─┼─\OUT─┼─┬──)─┘ │ │ ┌─\LIBL/────────┐ ┌─\ONLY──────────────┐ │ │
│ ├─\UPD─┤ │ (1)
└─FORMAT────(──┴─┼───────────────┼──database-file-name──┴─record-format-name─┴─┴──)─┘
│ └─\DLT─┘ │ ├─\CURLIB/──────┤
└─\ALL─────┘ └─library-name/─┘
5──┬─────────────────────────────────────┬──────────────────────────────────────────────────────────────────────────────────────5
│ ┌─\ALL──────────────┐ │
└─QRYSLT──(──┴─'query-selection'─┴──)─┘
5──┬──────────────────────────────────────────────────────────────────────────────────────────┬─────────────────────────────────5
│ ┌─\NONE────────────────────────────────────────────────────────────────┐ │
(4) ─(──┼─\FILE────────────────────────────────────────────────────────────────┼──)─┘
└─KEYFLD───
│ ┌──
───────────────────────────────────────────────────────────────┐ │
└──6─(──qualified-key-field-name──┬───────────────────────────┬──)─┴───
(5) ─┘
│ ┌─\ASCEND──┐ │
└─┴─\DESCEND─┴──┬─────────┬─┘
└─\ABSVAL─┘
5──┬─────────────────────────────────────────────┬──────────────────────────────────────────────────────────────────────────────5
│ ┌─\NONE────────────────┐ │
(6) ─(──┼─\ALL─────────────────┼──)─┘
└─UNIQUEKEY───
└─number-of-key-fields─┘
5──┬──────────────────────────────────────────────────────────────────────────────────────────────────┬─────────────────────────5
│ ┌─\NONE────────────────────────────────────────────────────────────────────────┐ │
│ │ ┌──
───────────────────────────────────────────────────────────────────────┐ │ │
└─JFLD───── 6
(7, 8) ─(──┴───(──qualified-from-field-name──┬──────────────────────────────────┬──)─┴───
(9) ─┴──)─┘
│ ┌─\EQ─┐ │
└─qualified-to-field-name──┼─────┼─┘
├─\GT─┤
├─\LT─┤
├─\NE─┤
├─\GE─┤
└─\LE─┘
5──┬───────────────────────────────┬──┬───────────────────────────┬──┬────────────────────────────────────────────────┬─────────5
│ ┌─\NO──────┐ │ │ ┌─\ANY──┐ │ │ ┌─\NONE────────────────────────┐ │
(8) ─(──┼─\YES─────┼──)─┘ └─JORDER───
└─JDFTVAL─── (8) ─(──┴─\FILE─┴──)─┘ │ │ ┌──
───────────────────────┐ │ │
└─\ONLYDFT─┘ 6 (9)
└─GRPFLD──(──┴───qualified-group-field─┴────┴──)─┘
5──┬─────────────────────────────────────┬──────────────────────────────────────────────────────────────────────────────────────5
│ ┌─\ALL──────────────┐ │
└─GRPSLT──(──┴─'group-selection'─┴──)─┘
5──┬───────────────────────────────────────────────────────────────────────────────────────────┬────────────────────────────────5
│ ┌─\NONE───────────────────────────────────────────────────────────────────┐ │
│ │ ┌──
──────────────────────────────────────────────────────────────────┐ │ │
└─MAPFLD──(──┴──6─mapped-field-name──'mapped-field-definition'──┤ MAPFLD Details ├─┴───
(9) ─┴──)─┘

5──┬───────────────────────────┬──┬───────────────────────────────────────┬─────────────────────────────────────────────────────5
│ ┌─\NO──┐ │ │ ┌─\FILE────────────────┐ │
└─IGNDECERR──(──┴─\YES─┴──)─┘ └─OPNID──(──┴─open-identifier-name─┴──)─┘
5──┬────────────────────────────────────────────────┬──┬───────────────────────────┬──┬─────────────────────────────────┬───────5
│ ┌─\YES─┐ │ │ ┌─\NO──┐ │ │ ┌─\ACTGRPDFN─┐ │
(10) ─(──┴─\YES─┴──)─┘ └─OPNSCOPE(────
└─SEQONLY──(──┬─┴──────┴──number-of-records─┬──)─┘ └─COMMIT──── (11) ─┼─\ACTGRP────┼──)─┘
└─\NO─────────────────────────┘ └─\JOB───────┘
5──┬───────────────────────────┬──┬────────────────────────────────┬────────────────────────────────────────────────────────────5
│ ┌─\NO──┐ │ │ ┌─\YES──────┐ │
└─DUPKEYCHK──(──┴─\YES─┴──)─┘ └─ALWCPYDTA──(──┼─\NO───────┼──)─┘
└─\OPTIMIZE─┘
5──┬─────────────────────────────────────────────────────────┬──┬────────────────────────┬──────────────────────────────────────5
│ ┌─\ALLIO──────────────────────────────┐ │ │ ┌─\NO──┐ │
└─OPTIMIZE──(──┴─┬─\FIRSTIO─┬────number-of-records───┴──)─┘ └─OPTALLAP(──┴─\YES─┴──)─┘
└─\MINWAIT─┘

Chapter 2. OS/400 Command Descriptions P3-471


OPNQRYF

5──┬───────────────────────────────────────────────┬──┬────────────────────────────┬──┬─────────────────────────────┬──────────5%
│ ┌─\JOB──────────────────────────┐ │ │ ┌─\NORMAL─┐ │ │ ┌─\JOB────────┐ │
(12) ─(──┴─\PERM───┴──)─┘ └─LANGID(──┴─language-ID─┴──)─┘
└─SRTSEQ(──┼─\HEX──────────────────────────┼──)─┘ └─TYPE────
├─\LANGIDUNQ────────────────────┤
├─\LANGIDSHR────────────────────┤
│ ┌─\LIBL/────────┐ │
└─┼─\CURLIB/──────┼──table-name─┘
└─library-name/─┘
MAPFLD Details:
├──┬───────────────────────────────────────────────────────────────────────────────────────────────────┬────────────────────────┤
│ ┌─\CALC─────┐ │
└─field-type──┼───────────┼──┬────────────────────────────────────────────────────────────────────┬─┘
├─\GRAPHIC──┤ └─field-length──┬──────────────────────────────────────────────────┬─┘
└─\VGRAPHIC─┘ └─field-decimals──┬──────────────────────────────┬─┘
│ ┌─\CALC───────┐ │
└─field-CCSID──┼─────────────┼─┘
├─\HEX────────┤
└─CCSID-value─┘
Notes:
1 When more than one FILE (file, library, member, record format) is specified, FORMAT(*FILE) cannot be specified.

2 When more than one FILE is specified, JFLD(*NONE) is allowed only when the default is specified for JDFTVAL and

JORDER.
3 A maximum of 32 repetitions

4 KEYFLD(*FILE) is not allowed whenever a value other than the default is specified on the GRPFLD or GRPSLT parameters.

5 A maximum of 50 repetitions

6 UNIQUEKEY(*NONE) is required whenever KEYFLD(*NONE) is specified.

P All parameters preceding this point can be specified in positional form.

7 When more than one FILE (file, library, member, record format) is specified, FORMAT(*FILE) cannot be used.

8 When more than one FILE is specified, JFLD(*NONE) is allowed only when the default is specified for JDFTVAL and

JORDER.
9 A maximum of 50 repetitions

10 COMMIT(*NO) is required whenever a value other than the default is specified on the GRPFLD or GRPSLT parameters.

11 This parameter is not valid when the TYPE parameter is specified.

12 This parameter is not valid when the OPNSCOPE parameter is specified.

Purpose Ÿ Arrange result records by the value of one or more key


fields.
The Open Query File (OPNQRYF) command opens a file
that contains a set of database records that satisfies a data- More Command Functions: Following the parameter
base query request. Once opened, the file looks like a data- descriptions and the command examples (on pages P3-482
base file opened by using the Open Database File through P3-484) is the "Additional Considerations" section.
(OPNDBF) command, and the records in the file are Included in it are subsections on:
accessed by high-level language programs that share the Ÿ Field Names - on page P3-485
open data path (ODP). The path is closed, and all query Ÿ Expressions - on page P3-485
resources are deallocated, by using the Close File (CLOF) Ÿ Built-In Functions - on page P3-487
command. Ÿ Restricted Built-In Functions - on page P3-497
This command is used to do any combination of the following Restrictions:
database functions:
1. The user can use overrides to change the file, library,
Ÿ Join records from more than one file, member, and and member names specified on the FILE parameter.
record format. The join operation that is performed may Overrides are ignored for the file and library specified on
be equal or non-equal in nature. the FORMAT parameter, unless FORMAT(*FILE) is
Ÿ Calculate new field values by using numeric and char- specified. Parameter values specified on an override
acter operations on field values and constants. command, other than TOFILE, MBR, LVLCHK,
Ÿ Group records by like values of one or more fields, and WAITRCD, SEQONLY, or INHWRT and SHARE, are
calculate aggregate functions, such as minimum field ignored by the OPNQRYF command.
value and average field value, for each group. 2. The OPNQRYF command does not share an existing
Ÿ Select a subset of the available records. Selection can open data path (ODP) in the job or activation group. If
be done both before and after grouping the records. an existing SHARE(*YES) ODP in the job or activation
group has the same file, library, and member name as

P3-472 OS/400 CL Reference - Part 2 (Full Version)


OPNQRYF

the open query file open data path (ODP), the query file *LIBL: All libraries in the job's library list are
does not open and an escape message is sent. searched until the first match is found.
3. Each subsequent shared open operation must use the
*CURLIB: The current library for the job is
same open options (such as SEQONLY) that are in
searched. If no library is specified as the current
effect when the OPNQRYF command is run.
library for the job, the QGPL library is used.
4. Some system functions (such as the Display Physical
File Member (DSPPFM) and Copy File (CPYF) com- library-name: Specify the name of the library to be
mands) do not share an existing open data path. The searched.
OPNQRYF command cannot be used with those func-
file-name: Specify the files, members, and record
tions.
formats that are processed.
5. The file opened with the OPNQRYF command cannot be
used in programs written in BASIC because BASIC does Element 1: Member Values
not share an existing open data path. *FIRST: The oldest member created is used.
6. Users of this command must have the following authori-
*LAST: The newest member created is used.
ties:
Ÿ Execute authority for any library that is needed to member: Specify the file member name.
locate the files specified on the FILE and FORMAT
Element 2: Record Format Values
parameters
Ÿ Object operational authority and one or more of the *ONLY: Only the record format in the file is used. If no
following data authorities for any physical file or record format name is specified, *ONLY is the default. If
logical file specified on the FILE parameter: the file has more than one record format, a record
– Read authority if the file is opened for input format name is specified.
(using option *INP) record-format-name: Specify the name of the record
– Add authority if the file is opened for output format that is used. The record format must exist in the
(using option *OUT) database file specified in the first part of the FILE
– Update authority if the file is opened for parameter.
updates (using option *UPD)
When more than one file, file member, and record format
– Delete authority if the file is opened for
is specified, the query joins field values to create a
deletions (using option *DLT)
single set of records. Any file specified in the list may
– Read, add, update, and delete authority if the
be a physical, join logical, or SQL view. More informa-
file is opened for all I/O operations (using option
tion on SQL views is in the DB2 for AS/400 SQL Refer-
*ALL)
Ÿ Object operational authority for any file specified on
ence book. The maximum number of physical file
members that can be joined by a single query is 32.
the FORMAT parameter
This limit includes the based-on physical file members
Ÿ Use authority for any translate tables specified on
for any join logical file member or SQL view member
the MAPFLD parameter (using option *USE)
specified on the FILE parameter. The limit also includes
Notes: each separate occurrence of the same physical file
member when it is specified more than once in the list,
1. The Copy from Query File (CPYFRMQRYF) command
either directly by name or by being referred to through a
can be used to copy data from a data path opened with
logical file member.
the OPNQRYF command.
2. More information about the OPNQRYF command is in
the DB2 for AS/400 Database Programming book.
Optional Parameters
OPTION
Specifies the open option used for the query file. The
Required Parameter
options chosen on the first full open operation of a file
FILE are not changed on subsequent shared open operations.
Specifies one or more files, members, and record The user can specify either OPTION(*ALL) or up to four
formats that are processed by the open query file of the following values in any order:
command. All files specified must be physical files,
*INP: Open the file for input. OPTION(*INP) is the only
logical database files, or Distributed Data Management
value allowed if join processing or group processing is
(DDM) files. If DDM files are used, all files they refer to
requested, if UNIQUEKEY processing is specified, or if
must be on the same target system, and the target
all the fields in the open query file record format (speci-
system must be an IBM AS/400 system or IBM
fied on the FORMAT parameter) are for input-only use.
System/38.
*OUT: Open the file for output. In some high-level lan-
The name of the file can be qualified by one of the fol-
guages, output to certain files (such as files defined as
lowing library values:
'direct access' in the high-level language program) is
done by using a combination of input and updates.

Chapter 2. OS/400 Command Descriptions P3-473


OPNQRYF

OPTION(*UPD) or OPTION(*ALL) is specified to use an Element 2: Record Format Values


open query file with such a program.
*ONLY: The only record format in the file is used. If no
*UPD: Open the file for update operations. If an input record format name is specified, *ONLY is the default. If
operation comes before an update, *INP on the OPTION the file has more than one record format, specification of
parameter must be specified when OPTION(*UPD) is a record format name is required.
specified.
record-format-name: Specify the name of the record
*DLT: Open the file for delete operations. If each format that is used. The record format must exist in the
delete operation is preceded by an input operation, *INP database file specified in the first part of the FORMAT
on the OPTION parameter must be specified when parameter.
OPTION(*DLT) is specified.
QRYSLT
Other Single Values Specifies the selection values used (before grouping) to
*ALL: Opens the file for all operations (*INP, *OUT, determine which records are available by using the open
*UPD, and *DLT). query file.
*ALL: All records in the physical or logical files,
FORMAT
members, and record formats specified on the FILE
Specifies the record format used for records made avail-
parameter (after join processing, if required) are
able by using the OPNQRYF command. The simple
selected.
field names in the open query file record format must
represent fields that are either defined on the MAPFLD 'query-selection': Specify an expression of up to 5000
parameter or are unique across all files, members, and characters (enclosed in apostrophes) that describes the
record formats specified on the FILE parameter. The values used to determine which records are selected.
value for any field that has the same name as a field Any logical expression formed from relations can be
specified on the MAPFLD parameter is determined by specified (such as *EQ and *NE) of field and constant
the mapped-field definition on the MAPFLD parameter. values or functions of field and constant values. At least
The value for any field not defined on the MAPFLD one field name is specified in each relation. However, a
parameter is determined by a mapping of the field with field cannot be specified that depends on an aggregate
the same name in one of the based-on files, file function either directly in its definition or indirectly by
members, and record formats specified on the FILE referring to a mapped field. Refer to the “Expressions”
parameter. Only the name, type, length, decimal posi- section of “Additional Considerations” on page P3-485 of
tions, keyboard shift, and usage attributes of each field this command description for a complete list of the oper-
specified in the record format that is identified on the ators used for this parameter.
FORMAT parameter are used for processing the
For example, to select all records for which the value of
OPNQRYF command. All other attributes are ignored.
field CUSNBR is less than 7000 and the value of field
The attributes do not have to be the same. If they differ,
BALDUE is greater than 90% of the value of field
the fields are mapped in a way similar to those
CRLIMIT, specify the following:
described for the Change Variable (CHGVAR)
command. QRYSLT('CUSNBR<7ððð \AND
BALDUE>CRLIMIT\ð.9')
*FILE: The record format of the first or only entry on the
FILE parameter is used. FORMAT(*FILE) is not allowed Each field name may be qualified with either a file name
when more than one file, member, and record format are or number that indicates which element in the list of files,
specified on the FILE parameter (therefore requiring a members, and record formats specified on the FILE
join query). parameter contains the field. The special value
*MAPFLD may be used to qualify the field name if the
Element 1: File Name field is defined on the MAPFLD parameter.
The name of the file can be qualified by one of the fol-
KEYFLD
lowing library values:
Specifies the name of one or more key fields used to
*LIBL: All libraries in the job's library list are arrange the query records, or specifies that the access
searched until the first match is found. path sequence of the first or only file, file member, and
record format specified on the FILE parameter is used to
*CURLIB: The current library for the job is
arrange the query records. If key field names are speci-
searched. If no library is specified as the current
fied, the user must also indicate whether the part of the
library for the job, the QGPL library is used.
key associated with each key field is ascending or
library-name: Specify the name of the library to be descending, and whether the records are arranged by
searched. the absolute value of a numeric key field. If the qualified
key field specified is a double-byte character field, the
database-file-name: Specify the name of a physical or
data is arranged in a single-byte sequence.
logical database file, or a Distributed Data Management
(DDM) file that contains the record format that is used.

P3-474 OS/400 CL Reference - Part 2 (Full Version)


OPNQRYF

All key fields for an open query file must appear in the *ASCEND: The part of the key defined by the specified
query records processed through the file. The fields key field is ordered by ascending key values.
named in the record format identified on the FORMAT
*DESCEND: The part of the key defined by the speci-
parameter must include all key fields for the open query
fied key field is ordered by descending key values.
file, even if KEYFLD(*FILE) is specified to use the
existing access path of a keyed file. Element 3: Order by Absolute Value

*NONE: Key fields are not used to arrange the query *ABSVAL: The part of the key defined by the specified
records; therefore, any arrangement is acceptable. It is key field is arranged by the absolute value of the key
possible for the system to display query records in dif- field. *ABSVAL is specified together with either
ferent arrangements if the same query is run twice, *ASCEND or *DESCEND, but it is ignored if the key field
based on such factors as the current number of records is not numeric. If *ABSVAL is not specified, the records
in the file members being queried. KEYFLD(*NONE) are arranged by the signed value of a numeric key field.
allows the system more flexibility than other KEYFLD
UNIQUEKEY
values to improve the performance record processing
Specifies whether the query is restricted to records with
through the open query file.
unique key values, and specifies how many of the key
*FILE: The query records have the same arrangement fields must be unique. If *ALL or number-of-key-fields is
as the first file, file member, and record format specified specified, null values are considered to be equal.
on the FILE parameter. KEYFLD(*FILE) is specified
*NONE: None of the key fields specified on the
even if the first file in the list has only an arrival
KEYFLD parameter must be unique. All query records
sequence access path, in which case the query record
are available through the open query file, regardless of
arrangement matches the arrival sequence of the first
key value.
file, file member, and record format specified on the
FILE parameter. *ALL: All key fields specified on the KEYFLD parameter
must be unique. If there are multiple query records with
When KEYFLD(*FILE) is specified and a sort sequence
the same values for all of the key fields, only the first
other than *HEX has been specified on the SRTSEQ
such record is available through the open query file.
parameter, you may receive your records in an order
that does not reflect the true file order. If this is a key number-of-key-fields: Specify the number of key fields
file, the query's sort sequence is applied to the key fields that must be unique. This value must be no larger than
of the file and an informational message is sent. If the the number of key fields determined by the KEYFLD
file has a sort sequence table or an alternative collating parameter. If there are multiple query records with the
sequence table, it is ignored for the ordering. This same value for the specified number of consecutive key
allows users to indicate which fields to apply a sort fields, only the first such record is available through the
sequence to without having to list all the field names. If open query file.
a sort sequence is not specified for the query, the query
JFLD
is ordered as in releases previous to V2R3M0.
Specifies whether the query joins records from multiple
Element 1: Qualified Key Field Values file members, and specifies how to join field values from
the files, members, and record formats specified on the
qualified-key-field-name: Specify one or more field
FILE parameter in constructing the query records.
names (up to 50 field names can be entered) used to
define a keyed access path to arrange the query The first file, member, and record format specified on the
records. Each field name is qualified with either a file FILE parameter is called the join primary, and all other
name or number that indicates which element in the list elements specified on the FILE parameter are called join
of files, members, and record formats specified on the secondaries. The JFLD parameter specifies a list con-
FILE parameter contains the field. The special value taining pairs of field names, where the first field in each
*MAPFLD is also used to qualify the field name if the pair provides a value that is used to select records in a
field is defined on the MAPFLD parameter. join secondary that has the same value in the second
field name of the pair.
Each field name on the KEYFLD parameter must be a
field name that is defined in the query records specified The join from-field and to-field may be simple or mapped
on the FORMAT parameter. For example, if the value fields (specified on the MAPFLD parameter), but a field
*MAPFLD is specified on the KEYFLD parameter, the that depends on an aggregate function (either directly in
name of the mapped field must be defined in the query its definition or indirectly by referring to a mapped field)
records specified on the FORMAT parameter. The sum cannot be used.
of the lengths of all key fields cannot be more than
The join from-field and to-field are not required to have
10,000 bytes. In addition, if the sum of the lengths of
identical field attributes, but numeric fields cannot be
the key fields is greater than 2000 bytes, *INP must be
mixed with character or double-byte character set
specified on the OPTION parameter.
(DBCS) fields, and character fields cannot be mixed with
Element 2: Key Field Order DBCS-only field types. If the fields do not have identical
attributes, the system converts them to identical attri-

Chapter 2. OS/400 Command Descriptions P3-475


OPNQRYF

butes for join processing. This change uses a packed *MAPFLD is used to qualify the field name if the field is
decimal format if both fields are fixed-point numeric defined on the MAPFLD parameter.
fields, or floating-point format if either field is of the
A join to-field is either a simple field or a mapped field
floating-point type. The change for fixed-point numeric
defined on the MAPFLD parameter. If JDFTVAL(*YES)
fields aligns the decimal points and pads with zeros.
or JDFTVAL(*ONLYDFT) is specified, it must depend
Numeric-type change truncates fractional digits if more
only on fields contained in a single join secondary. If the
than 31 total digits are required for fixed-point numbers,
join secondary is a join logical file, only fields contained
or drops some of the least significant digits if more than
in the primary physical file member for the join logical file
15 total digits are required for floating-point numbers.
are components of the join to-field. The sum of the
Character and DBCS-open fields are changed by
lengths of all to-fields for each join secondary (after
padding the shorter field with blanks. DBCS-either fields
change, if the from-field and to-field attributes are not
are padded with blanks if the field contains SBCS data
identical) cannot be more than 2000 bytes unless
or padded with double-byte blanks if the field contains
JDFTVAL(*NO) is specified. Up to 50 join field pairs are
DBCS data. DBCS-only fields are padded with double-
specified.
byte blanks.
Element 3: Join Operators
If more than one file is specified on the FILE parameter,
and if the JDFTVAL(*NO) value and JORDER(*ANY) join-operator: Specifies the type of join operation that is
value are specified, the system takes information from performed for the specified from-field and to-field. If
the JFLD and QRYSLT parameters and derives the final JDFTVAL(*NO) and JORDER(*ANY) are specified, or if
join specifications. If a file is specified on the FILE more than one join field pair is specified, a different join
parameter and the file is not referred to by the QRYSLT operator may be specified for each pair. If
or JFLD parameters, all records for that file are logically JDFTVAL(*YES), JDFTVAL(*ONLYDFT), or
joined to all other records created from the other files JORDER(*FILE) is specified, then only one join operator
specified on the FILE parameter. may be specified, regardless of the join pairs.

If either JDFTVAL(*YES), JDFTVAL(*ONLYDFT), or *EQ: An equal join operation is performed.


JORDER(*FILE) is specified, the join fields must be *GT: A greater than join operation is performed.
specified on the JFLD parameter.
*LT: A less than join operation is performed.
*NONE: No join operation is specified. If more than
*NE: A not equal join operation is performed.
one file is specified on the FILE parameter, and
JDFTVAL(*NO) and JORDER(*ANY) is specified, the *GE: A greater than or equal join operation is per-
system automatically finds the join fields from the formed.
QRYSLT parameter.
*LE: A less than or equal join operation is performed.
Element 1: From-Field Name
JDFTVAL
qualified-from-field-name: Specify a field name to Specifies whether the query file includes join records
provide the value used to select records in a join sec- that use default values for any of the fields. The default
ondary file, file member, and record format. The field values are from a join secondary file that contains a
name is qualified with either a file name or number that record that does not match the corresponding record in
indicates which element in the list of files, file members, the primary file. The matching attempted is the join cri-
and record formats (specified on the FILE parameter) teria as specified on the JFLD parameter.
contains the field. The special value *MAPFLD can also
be used to qualify the field name if the field is defined on Join processing attempts to collect field values from the
the MAPFLD parameter. join primary and join secondaries. It does so by
matching join from-field values to records in a join sec-
A join from-field is either a simple field or a mapped field ondary that produce the appropriate values in the join
defined on the MAPFLD parameter. If JDFTVAL(*YES) to-field. If there are no records in a join secondary to
or JDFTVAL(*ONLYDFT) is specified, it must depend produce the to-field values required for the pairs of join
only on fields contained in the join primary or in join sec- fields associated with the join secondary, this parameter
ondaries specified on the FILE parameter ahead of the specifies whether query records should be constructed
join secondary associated with the to-field of the pair. by using default values for all fields obtained from the
Element 2: To-Field Name join secondary.

qualified-to-field-name: Specify a field name used to If the FILE parameter includes any join logical or SQL
select records from a join secondary file, file member, views, all join files must be compatible with the
and record format in constructing the query records. JDFTVAL value. If the data description specification
The field name is qualified with either a file name or (DDS) used to create a queried join logical file does not
number that indicates which element in the list of files, contain the JDFTVAL keyword, JDFTVAL(*NO) must be
file members, and record formats specified on the FILE specified. If any join logical file specified on the FILE
parameter contains the field. The special value parameter has the JDFTVAL keyword, then all join
logical files for this open query file must be created by

P3-476 OS/400 CL Reference - Part 2 (Full Version)


OPNQRYF

using the JDFTVAL keyword, and JDFTVAL(*YES) must records (after join processing, if required) selected by
be used. If any files are SQL views, then the QRYSLT parameter. The group is defined by the
JDFTVAL(*NO) is required. collection of records that has the same set of values for
the fields specified in the record format identified on the
If the JDFTVAL parameter is not compatible with the
FORMAT parameter. If no field names are specified and
attributes of the join logical files or SQL views being pro-
group processing is required, the whole file is considered
cessed, the join view files specified on the FILE param-
to be one group. Each query record that is created is
eter can be replaced with their based-on physical file
either made available through the open query file or is
members. The correct, additional from-field and to-field
discarded, depending on the selection values specified
pairs can be provided on the JFLD parameter to join
on the GRPSLT parameter. All null values within a
records from the physical file members in any way.
grouping column are considered equal. To ensure an
If more than one file is specified on the FILE parameter, ascending sequence, the KEYFLD parameter must also
and if either JDFTVAL(*YES) or JDFTVAL(*ONLYDFT) be specified.
is specified, the system uses the join fields as specified
*NONE: Fields are not used to form groups. If the
on the JFLD parameter as the final join specifications.
grouping function is required (because selection values
*NO: Default values are not used to construct join query are specified on the GRPSLT parameter, or an aggre-
records. gate function is used by a field specified on the MAPFLD
*YES: Creates all records for the join operation, parameter), records selected by the values specified on
including those produced both with and without default the QRYSLT parameter are handled as a single group.
values. If *YES is specified, no SQL views are allowed. qualified-group-field: Specify one or more field names
*ONLYDFT: Creates only the records produced by (up to 50) to group the query results. Each field name
using default values in constructing the join operation. may be qualified with either a file name or number to
This option is used to include only exception records in indicate which element in the list of files, members, and
the records available through the open query file. If record formats specified on the FILE parameter contains
*ONLYDFT is specified, no join logical files or SQL the field. The special value *MAPFLD may also be used
views can be specified on the FILE parameter. to qualify the field name if the field is defined on the
MAPFLD parameter.
JORDER
A grouping field defined on the MAPFLD parameter
Specifies, for a join query, whether the join order must
cannot refer to an aggregate function in its definition
match the order specified on the FILE parameter. If the
(either directly, or indirectly through the use of another
join order is varied, the query records are created in a
field specified on the MAPFLD parameter). The sum of
different arrangement. If the value specified for the
the lengths of all grouping fields cannot exceed 2000
JDFTVAL parameter is *YES or *ONLYDFT, the
bytes.
JORDER parameter is ignored. The order specified on
the FILE parameter is always preserved, because GRPSLT
changing the join order can change which records are Specifies the selection values used after grouping to
returned when JDFTVAL processing is required. determine which records are available through the open
If more than one file is specified in the FILE parameter query file.
and JORDER(*FILE) is specified, the system uses the *ALL: All records defined by the grouping function
join fields as specified on the JFLD parameter as the described in the GRPFLD parameter description are
final join specifications. selected.
*ANY: Any join file order is allowed, and any such 'group-selection': Specify an expression (up to 2000
arrangement may be used by the system to create the characters enclosed in apostrophes) that describes the
result records. It is possible for a query to return result values used to determine which records are selected.
records in a different arrangement if the same query is Any logical expression formed from relations (such as
run twice, consecutively (based on factors such as the *EQ and *NE) of field and constant values or functions
current number of records in the files being queried). of field and constant values are specified. Only grouping
JORDER(*ANY) allows the system more flexibility to fields (specified on the GRPFLD parameter), constants,
improve the performance of processing records through aggregate functions (such as %AVG and %STDDEV),
the open query file than any other JORDER parameter and mapped fields (specified on the MAPFLD param-
value. eter) that are composed of grouping fields and aggre-
*FILE: The order of the file, file member, and record gate functions can be referred to in any relation. At
format elements specified on the FILE parameter are least one field must be specified in each relation. Refer
preserved in the join operation. to the “Expressions” section of “Additional Consider-
ations” on page P3-485 of this command description for
GRPFLD a complete list of the operators used for this parameter.
Specifies the field name or names used to group query
For example, to select all records for which the value of
results. One query record is created for each group of
grouping field OVRDUE is greater than or equal to 10,

Chapter 2. OS/400 Command Descriptions P3-477


OPNQRYF

and the average value of field CREDIT in each group is field-type: Specify the field type for this mapped field, or
less than 100, specify the following: specify *CALC to allow the system to calculate appro-
GRPSLT('OVRDUE>=1ð \AND %AVG(CREDIT)<1ðð') priate attributes (including field type) for the mapped
field. *CALC is the default if no field type value is speci-
Each field name may be qualified with either a file name fied.
or number that indicates which element in the list of files,
file members, and record formats specified on the FILE When *CALC is used, the field attributes are determined
parameter contains the field. The special value, in one of two ways. The attributes either match the field
*MAPFLD, may also be used to qualify the field name if definition in the record format identified on the FORMAT
the field is defined on the MAPFLD parameter. parameter, or (if the field is not in the record format on
the FORMAT parameter) the attributes are calculated
MAPFLD based on the expression specified in the mapped-field
Specifies the definition of query fields that are either definition for this field. If the mapped field is used in the
mapped to, or derived from, other fields. MAPFLD is record format identified on the FORMAT parameter,
generally not needed if the field names specified on either use *CALC or specify attributes (field type, field
other OPNQRYF command parameters are simple field length, and field decimals) identical to those of the field
names that exist in only one of the file, file member, and in the record format specified on the FORMAT param-
record format elements specified on the FILE parameter. eter.
*NONE: Mapped fields are not needed. All field names The field type must be valid for the final result of the
specified on other parameters exist in some record expression specified on the mapped-field definition.
format specified on the FILE parameter. Character and numeric types are only mixed if the
Element 1: Mapped Field numeric type is in zoned decimal format and the field
length and the length of the expression result are the
mapped-field-name: Specify the simple field name used same.
on any other OPNQRYF command parameter that must
refer to this mapped field. A qualified name is not The following are the only DBCS mappings allowed on
allowed for the first part of the MAPFLD parameter list the MAPFLD parameter:
item. All specified mapped-field-name values must be Ÿ From character to DBCS-open type
unique. Refer to the “Expressions” section of “Additional Ÿ From character to DBCS-either type
Considerations” on page P3-485 of this command Ÿ From character to DBCS-graphic type
description for a complete list of the operators used for Ÿ From character to UCS2 graphic type
this parameter. Ÿ From HEX to DBCS-open type
Element 2: Field Definition Expression Ÿ From HEX to DBCS-either type
Ÿ From HEX to DBCS-only type
'mapped-field-definition': Specify an expression (up to
Ÿ From HEX to DBCS-graphic type
256 characters enclosed in apostrophes) that defines the
Ÿ From HEX to UCS2-graphic type
mapped field in terms of other fields that either exist in
Ÿ From DBCS-either to DBCS-open type
only one of the file, file member, and record format ele-
Ÿ From DBCS-either to HEX type
ments specified on the FILE parameter, or are defined
Ÿ From DBCS-either to DBCS-graphic type
by some other mapped field definition appearing earlier
Ÿ From DBCS-either to DBCS-either type
in the MAPFLD list. Either numeric operations or string
Ÿ From DBCS-open to DBCS-open type
operations are allowed, depending on the data type of
Ÿ From DBCS-open to character type
the fields used in the definition. Refer to the
Ÿ From DBCS-open to DBCS-graphic type
“Expressions” section of “Additional Considerations” on
Ÿ From DBCS-open to HEX type
page P3-485 of this command description for a complete
Ÿ From DBCS-open to UCS2 graphic type
list of the operators used for this parameter.
Ÿ From DBCS-only to DBCS-only type
For example, to define a mapped field named WHSPAR Ÿ From DBCS-only to DBCS-open type
as the concatenation of the field WHRSE with the first Ÿ From DBCS-only to DBCS-either type
10 characters of field PART, specify the following: Ÿ From DBCS-only to DBCS-graphic type
MAPFLD((WHSPAR 'WHRSE \CAT %SST(PART 1 1ð)')) Ÿ From DBCS-only to HEX type
Ÿ From DBCS-graphic to DBCS-only type
Each field name is qualified with either a file name or a Ÿ From DBCS-graphic to DBCS-open type
number that indicates which element in the list of files, Ÿ From DBCS-graphic to DBCS-either type
file members, and record formats specified on the FILE Ÿ From DBCS-graphic to DBCS-graphic type
parameter contains the field. The special value Ÿ From DBCS-graphic to UCS2-graphic type
*MAPFLD is also used to qualify the field name if the Ÿ From UCS2-graphic to HEX type
field is defined in an earlier list item on the MAPFLD Ÿ From UCS2-graphic to DBCS-open type
parameter. Ÿ From UCS2-graphic to character type
Element 3: Mapped Field Type Ÿ From UCS2-graphic to DBCS-graphic type
Ÿ From UCS2-graphic to UCS2-graphic type

P3-478 OS/400 CL Reference - Part 2 (Full Version)


OPNQRYF

The Query Field Structure table (see Table 24) shows IGNDECERR
the allowable field type and external field length values. Specifies whether the system ignores decimal data
It also shows the default field length and decimal posi- errors during query file processing.
tions and the internal field length (in bytes) for each type *NO: The system does not ignore decimal data errors.
of field.
*YES: The system ignores decimal data errors. When
Element 4: Length
errors in decimal data are encountered, the invalid sign
field-length: Specify the field length in number of digits and/or digits are automatically changed to valid values.
for a numeric field, number of bytes for a character or
OPNID
DBCS field, or number of characters for a graphic field.
Specifies the identifier used to name the query file so it
A field length must be an even value for DBCS-only and
is referred to by the Close File (CLOF) command when it
DBCS-either field types. The range of valid lengths for
is closed or by the Position Database File (POSDBF)
each field type is shown in the Query Field Structure
command when it is opened. The identifier must differ
table. A field length value is specified if *CALC is used
from the OPNID associated with any other file which was
for the field type.
previously opened by using the OPNDBF command or
Element 5: Decimal Positions OPNQRYF command, and which is not yet closed.
field-decimals: Specify the number of decimal positions *FILE: The name of the first or only file specified on the
for a numeric field, expressed as a number of decimal FILE parameter is used for the open query file identifier.
digits, that is no larger than the total number of digits
specified for the field length. If no value is given, the
open-identifier-name: Specify the name to associate
with this open query file.
default value is assumed to be zero. A field decimal's
value must not be specified for a binary or character SEQONLY
field, or if *CALC is specified for the field type. Specifies whether sequential-only processing is used for
Element 6: CCSID Value the query file, and also specifies the number of records
that can be processed as a group when read or write
field-CCSID: Specify the CCSID (character code set operations are performed on the open query file. The
identifier) being assigned to the mapped field being
open query file open data path (ODP) uses a different
created. This parameter is valid only for fixed- or
SEQONLY value than the one specified on this param-
variable-length character, DBCS, or hexadecimal fields,
eter. It depends on other parameter values specified on
or for *CALC fields that result in one of these types. If
the OPNQRYF command. A message is sent if the
no value is specified, the CCSID is determined based on
SEQONLY value is changed. More information about
the CCSIDs of the fields and/or literal values specified
sequential-only processing is in the SEQONLY param-
on the MAPFLD definition.
eter description on the OVRDBF (Override Database
Literal values in the MAPFLD definition are tagged with File) command, and in the DB2 for AS/400 Database
the job default CCSID. However, if the MAPFLD defi- Programming book.
nition consists of only a literal value and the user speci-
Element 1: Sequential-Only Processing is Used
fies a field CCSID value, the literal will be tagged with
that CCSID. This allows the user to tag a literal with a *YES: The open query file uses sequential-only pro-
CCSID other than the job default CCSID. cessing. Number of records can be specified with this
value.
Note: Normally, *HEX and *VHEX fields do not have an
associated CCSID. Because of this, the data in Element 2: Number of Records That can be Pro-
the field is treated the same regardless of the cessed
default CCSID of the system that the data is number-of-records: Specify the number of records that
being used on. However, if the user specifies a are processed as a group when read or write operations
CCSID for a *HEX or *VHEX field, the CCSID are performed with the open query file. If no number-of-
overrides the hexadecimal attribute of the field records value is specified, the system calculates the
(causing the field to be treated as number of records processed as a group.
*CHAR/*VCHAR), and the data in the field may
Other Single Values
be treated differently if it is moved to a system
that has a different default CCSID. *NO: The file does not use sequential-only processing.
For more information on CCSIDs, see the National Lan- COMMIT
guage Support book. Specifies whether the SQL statements are run under
An example of the MAPFLD parameter, showing the use commitment control.
of field-type, field-length, field-decimals, and field-CCSID, Before a database file is opened under commitment
is as follows: control, the user must ensure that all files in the commit-
MAPFLD((UNTPRICE 'TOTPRICE / UNTCOUNT' \DEC 7 2) ment transaction are journaled. If only the after images
(SHORTSTR '%SST(LONGSTR 1 5)' \CHAR 5 \N 93ð)) are being journaled, the system implicitly begins jour-

Chapter 2. OS/400 Command Descriptions P3-479


OPNQRYF

naling both the before and the after images for the dura- FILE parameter. A copy of the data is used only when it
tion of the changes being made to files opened under is needed to perform the requested query functions.
this commitment definition.
*NO: The system does not use a copy of data from the
*NO: The open query file is not placed under commit- files, file members, and record formats specified on the
ment control. FILE parameter. If it is necessary to use a copy of the
data to perform the requested query functions, the query
*YES: The open query file is placed under commitment
file is not opened and an error message is sent.
control.
*OPTIMIZE: The system uses a sort routine to order the
OPNSCOPE
output from the files, file members, and record formats
Specifies the extent of influence (scope) of the open
specified on the FILE parameter. A sort routine is used
operation.
only if the KEYFLD parameter is specified, and if using a
*ACTGRPDFN: The scope of the open operation is sort routine would improve query performance without
determined by the activation group of the program that conflicting with other OPNQRYF options.
called the OPNQRYF command processing program. If
A sort will improve the performance of a query that
the activation group is the default activation group, the
returns most or all of the records in the file or files speci-
scope is the call level of the system program performing
fied on the FILE parameter.
the open operation. If the activation group is a non-
default activation group, the scope is that activation Using a sort can increase the time required for the
group. OPNQRYF command to process. This occurs because
the sort is performed and all records to be returned
*ACTGRP: The scope of the open data path (ODP) is
through the query are processed while the OPNQRYF
the activation group. Only those shared opens from the
command is active. However, because the records are
same activation group can share this ODP. This ODP is
already processed, the reading of the records (by using
not reclaimed until the activation group is deactivated, or
either a program or the CPYFRMQRYF command) is
until the Close File (CLOF) command closes the file.
very fast. Therefore, the overall time to process the
*JOB: The scope of the open operation is the job in query is reduced.
which the open operation occurs.
Specifying the KEYFLD parameter for the OPNQRYF
DUPKEYCHK command does not ensure that the query will use an
Specifies whether duplicate key feedback is returned on index if ALWCPYDTA(*OPTIMIZE) is specified. If a sort
input/output (I/O) operations. Duplicate key feedback routine is used, the file is not opened with indexed
should be requested only for files that are processed by access. If the program reading the records from the
COBOL programs since this is the only high-level lan- OPNQRYF command requires indexed access (random
guage (HLL) that utilizes the feedback. Duplicate key processing rather than sequential processing),
feedback should only be requested when it is used by ALWCPYDTA(*YES) or ALWCPYDTA(*NO) should be
the COBOL application since providing it can cause a specified.
performance degradation. More information on duplicate When a sort is used, the query file's position is not
key feedback is in the DB2 for AS/400 Database Pro- changed when a ROLLBACK command is issued.
gramming book. Therefore, when a query is opened that has parameters,
*NO: Duplicate key feedback is not returned on I/O ROLLBACK commands that follow do not reset the
operations. queried file's position to where it was at the start of the
unit of recovery.
*YES: Duplicate key feedback is returned on I/O oper-
ations. Note: Do not specify ALWCPYDTA(*OPTIMIZE) if you
require that a ROLLBACK command reposition
ALWCPYDTA the query file, or if you require that the queried
Specifies whether the system is allowed to copy data file be opened with indexed access.
from the files, file members, and record formats specified
on the FILE parameter. If so, the system is allowed to The following items are required before a sort is valid for
open the query file to the copy. The system tries to the OPNQRYF command:
avoid using a copy of the data because a copy does not Ÿ ALWCPYDTA(*OPTIMIZE) must be specified.
reflect changes made to the database after the informa-
tion is copied. However, certain requests (such as when Ÿ The OPTION parameter, if specified, must be *INP.
key fields contained in multiple based-on files for a join Ÿ A value other than *FILE or *NONE must be speci-
are specified) require that the data be copied before the fied on the KEYFLD parameter.
specified query functions are performed.
Ÿ The UNIQUEKEY parameter must not be specified,
*YES: The system may use a copy of data from the or must specify *NONE.
files, file members, and record formats specified on the
Ÿ The SEQONLY parameter, if specified, must be
*YES.

P3-480 OS/400 CL Reference - Part 2 (Full Version)


OPNQRYF

Ÿ If COMMIT(*YES) is specified, the level of record *NO: Allow the query optimizer to operate normally.
locking (LCKLVL parameter on the STRCMTCTL When determining how to implement a query, the opti-
command) must not be *ALL. mizer considers access paths until an internal timeout
value has been exceeded. If there are a large number
Ÿ The DUPKEYCHK parameter must not be specified,
of access paths over the files being queried, the opti-
or must specify *NO.
mizer may time out before it has considered all the avail-
Ÿ The total buffer length of all fields in the file speci- able access paths.
fied on the FORMAT parameter (or FILE parameter,
*YES: Force the query optimizer to ignore the internal
if the FORMAT parameter is not specified) must not
timeout value and consider all the available access
exceed 32700 bytes.
paths over all the files in the query.
The query optimizer determines whether a sort is used.
Note: If there are a large number of access paths over
This decision is based on the number of records
the files it may take a long time to optimize the
expected from the query and the options specified on
query.
the OPNQRYF statement. The following items influence
the optimizer's choice of a sort: SRTSEQ
Specifies the sort sequence to be used for sorting and
Ÿ The OPTIMIZE parameter should specify *ALLIO or
grouping selections specified on the QRYSLT or
*MINWAIT. If *FIRSTIO is specified, the number of
GRPSLT parameters, joins specified on the JFLD
records specified should be close to or equal to the
parameter, ordering specified on the KEYFLD param-
number of result records expected from the query.
eter, grouping specified on the GRPFLD parameter,
Ÿ The number of records in a file specified on the %MIN or %MAX built in functions, or unique key values
FILE parameter should contain a minimum of 200 specified on the UNIQUEKEY parameter.
records.
*JOB: The SRTSEQ value for the job is retrieved for
Ÿ The query result should contain a minimum of 200 the job.
records.
*HEX: A sort sequence table is not used. The
OPTIMIZE hexadecimal values of the characters are used to deter-
Specifies the most efficient way the system can perform mine the sort sequence.
the selection and join processing necessary to satisfy *LANGIDUNQ: A unique-weight sort table is used.
the other parameter specifications on the OPNQRYF
*LANGIDSHR: A shared-weight sort table is used.
command.
The name of the sort sequence table can be qualified by
If the KEYFLD or GRPFLD parameters require that an
one of the following library values:
access path be built (when no existing access path is
shared), the access path is built completely, regardless *LIBL: All libraries in the job's library list are
of the OPTIMIZE entry. Optimization primarily affects searched until the first match is found.
system operation when selection processing is per-
*CURLIB: The current library for the job is
formed.
searched. If no library is specified as the current
*ALLIO: The system attempts to reduce the total library for the job, the QGPL library is used.
input/output time required to process the whole query,
assuming that all query records are read from the file.
library-name: Specify the name of the library to be
searched.
Element 1: Time Reduction Options
table-name: Specify the name of the sort sequence
*FIRSTIO: The system attempts to reduce the
table to be used with this query.
input/output time required to open the query file and to
retrieve the first buffer of records from the file. LANGID
Specifies the language identifier to be used when
*MINWAIT: The system attempts to reduce the time
SRTSEQ(*LANGIDUNQ) or SRTSEQ(*LANGIDSHR) is
required to open the query file by minimizing delays
specified.
when records are read from the file.
*JOB: The LANGID value for the job is retrieved for the
Element 2: Number of Records to Retrieve
job.
number-of-records: Specify the number of query records
to use in the optimize operation. This value is ignored
language-ID: Specify the language identifier to be used
by the job.
when the value *MINWAIT is specified.
TYPE
OPTALLAP
Specifies the recursion level at which the Reclaim
Specifies whether the query optimizer should consider all
Resources (RCLRSC) command closes the file.
the access paths that exist over the files being queried
when determining how to implement the query. Note: This parameter is ignored unless the default
value is specified on the OPNSCOPE parameter

Chapter 2. OS/400 Command Descriptions P3-481


OPNQRYF

and the request is from the default activation *PERM: The file remains open until the Close File
group. (CLOF) command closes it, or until the routing step or
default activation group ends. The query file remains
*NORMAL: The RCLRSC command closes the file if
open even if the RCLRSC command is run.
the program call that ran the OPNQRYF command is
ended without closing the file.

Table 24. Query Field Structure


External Default Length Internal Field
Type Field Type Field Length and Decimals Length in Bytes
Binary *BIN2 1-5 5 02 2
Binary *BIN4 1-10 10 02 4
Floating-point *FLT4 1-9 7 61 4
Floating-point *FLT8 1-17 15 141 8
Packed decimal *DEC 1-31 15 51 1-16
Zoned decimal *ZONED 1-31 15 51 1-31
Character *CHAR 1-32766 32 1-32766
Variable length character *VCHAR 0-32740 32 0-32740
Hex *HEX 1-32766 32 1-32766
Variable length hex *VHEX 0-32740 32 0-32740
DBCS-only *ONLY 4-327663 32 4-32766
DBCS-either *EITHER 4-327663 32 4-32766
DBCS-open *OPEN 4-32766 32 4-32766
DBCS-graphic *GRAPHIC 1-163835 32 2-32766
Variable length DBCS-only *VONLY 0-32740 32 0-32740
Variable length DBCS-either *VEITHER 0-32740 32 0-32740
Variable length DBCS-open *VOPEN 0-32740 32 0-32740
Variable length DBCS-graphic *VGRAPHIC 0-163705 32 0-32740
Date *DATE 5-104 8 4
Time *TIME 4-84 7 3
Timestamp *TIMESTP 14; 16-264 26 10
1 If the number of decimal digits is specified, but the decimal precision value is omitted for an *FLT4, *FLT8, *DEC, or *ZONED field, the
precision defaults to zero decimal digits.
2 A nonzero value is not allowed for the decimal precision of a binary number.
3 The field length must be an even-numbered value.
4 These fields can be longer if they are padded on the right with blanks.
5 These field lengths are in a number of graphic characters.

Examples This command uses the %XLATE built-in function to translate


the field USRNAME to uppercase, and to instruct the *CT
Example 1: Selecting Specific Records operator to select only records that contain the value
Note: Additional examples of selecting records using the GEORGE in the field USRNAME. QSYSTRNTBL is an
OPNQRYF command can be found in the DB2 for IBM-supplied system translation table that converts lower-
AS/400 Database Programming book. case alphabetics (a through z) to uppercase (A through Z).
The translation is done to ensure that the search value is
OPNQRYF FILE(ordfile) OPTION(\all) recognized even if its characters appear in mixed case. The
QRYSLT('orddate=%range("84ð1ð1" "841231") records available through the open query file have the same
& ordamt>1ðð')
record format as those in file TELEFILE.
KEYFLD((ordamt \descend))
Example 3: Using the %XLATE Built-In Function
This command uses the QRYSLT parameter to select only
records in the first member of file ORDFILE that have an OPNQRYF FILE(telefile)
order date in 1984 and an order amount greater than 100. QRYSLT('usrname \ct ''GEORGE''')
Because the FORMAT parameter is omitted, the open query MAPFLD((usrname
file has the same record format as file ORDFILE. The open '%xlate(telefile/usrname qsystrntbl)'))
query file allows all file operations (input, output, update, and
delete). The KEYFLD specification is used to force the In the previous example, the value of field USRNAME, which
records to be arranged by descending value of order amount. is returned to the high-level language (HLL) program that
reads records from the open query file, is not translated to
Example 2: Using the %XLATE Built-In Function uppercase.
OPNQRYF FILE(telefile)
QRYSLT('%xlate(usrname qsystrntbl) \ct "GEORGE"')

P3-482 OS/400 CL Reference - Part 2 (Full Version)


OPNQRYF

This example shows a way to make the uppercase version of OPNQRYF FILE(partpf partpf)
field USRNAME available to the HLL program. This is done FORMAT(partjoin)
by defining a mapped field (MAPFLD parameter) for the JFLD((1/pnbr 2/pnbr \GE))
translated value of field USRNAME. The field has the same MAPFLD((pnm1 '1/pname') (pnm2 '2/pname')
field name as the field name in the open query file record (pnbr '1/pnbr'))
format being used. The translated version of the field is
This example illustrates how a file is joined to itself, as well
used for selection (QRYSLT parameter) and is used in the
as how to use the MAPFLD parameter to rename fields in
open query file record format.
the based-on files. A greater than or join is performed using
Example 4: Using the %SST Built-In Function field PNBR as both the join from-field and the join to-field.

OPNQRYF FILE((histlib/ordfile hist1)) The format of file PARTJOIN is assumed to contain fields
OPTION(\inp \upd \dlt) named PNBR, PNM1, and PNM2. The field name PNBR is
FORMAT(ordinfo orddtls) valid in the query output record format because that field is
QRYSLT('month=7') defined on the MAPFLD parameter. If the record format in
MAPFLD((year '%sst(orddate 1 2)' \zoned 2) file PARTJOIN contains a field named PNAME, an error
(month '%sst(orddate 3 2)' \zoned 2) occurs because the field exists in both files specified on the
(day '%sst(orddate 5 2)' \zoned 2)) FILE parameter, and is not the name of a field defined on the
MAPFLD parameter. The mapped field definitions are field
This command uses the %SST built-in function to create a
names, so the attributes of fields PNM1 and PNM2 match
substring of the year, month, and day parts of character field
the attributes of field PNAME, and the attributes of field
ORDDATE in file ORDFILE. The command also maps a
PNBR in the open query file records match field PNBR in file
character string to a zoned field, which is valid as long as the
PARTPF. Further, when a file is joined to itself, it is always
zoned field has the same length as the character string. If
necessary to specify a file number name for any field that is
the file ORDINFO has a record format, ORDDTLS, con-
defined in the based-on file.
taining at least the field's YEAR, MONTH, and DAY records,
these fields have input-only usage in the open query file Example 7: Renaming Fields in Based-On Files
record format because they are defined by using a built-in
function (%SST) and are mappings that mix character and The same query can also be specified as follows:
numeric (zoned decimal format) types. The file is opened for OPNQRYF FILE(partpf partpf)
input, update, and delete operations, but none of the field's FORMAT(partjoin)
YEAR, MONTH, and DAY records are updated using the QRYSLT('1/pnbr \GE 2/pnbr')
open query file open data path (ODP). The open query file MAPFLD((pnm1 '1/pname') (pnm2 '2/pname')
uses only records in the HIST1 member of file ORDFILE in (pnbr '1/pnbr'))
library HISTLIB, and the records retrieved through the file
have the same format as record format ORDDTLS in file Because more than one file is specified on the FILE param-
ORDINFO. Only records pertaining to the month of July are eter, and the default value is specified for the JDFTVAL and
processed through the open query file (QRYSLT parameter). JORDER parameters, the system takes the join specifica-
tions from the values specified on the QRYSLT parameter.
Example 5: Returning the First Record of Each Set
Example 8: Selecting Master Records With No Detail
OPNQRYF FILE((routelf \first locusr))
Records
QRYSLT('%sst(toloc 1 4) \eq "ROCH"')
KEYFLD(fromusr fromloc tousr toloc) OPNQRYF FILE(cusmas ordfil)
UNIQUEKEY(\all) FORMAT(cusmas)
JFLD((cusnbr ordfil/cusnbr))
This command uses the KEYFLD and UNIQUEKEY parame- JDFTVAL(\onlydft)
ters to return only the first record of each set of records in MAPFLD((cusnbr 'cusmas/cusnbr'))
record format LOCUSR in the first member of file ROUTELF
that have the same values for the fields FROMUSR, This command uses a join query to select only master
FROMLOC, TOUSR, and TOLOC. The query result is records that have no associated detail records. The master
further restricted by selecting only records that have the file (CUSMAS) is joined (equal join) to the detail file
value ROCH in the first four characters of field TOLOC. The (ORDFIL) by the customer number field that appears in both
records available through the open query file contain all of record formats. The customer number field name is the
the fields in record format LOCUSR of file ROUTELF. If the same in both record formats (CUSNBR). Because CUSNBR
file ROUTELF contains information about messages routed is the name of a field defined on the MAPFLD parameter,
by an application, this example identifies all unique sender everywhere the simple field name CUSNBR is used, the
and receiver pairs in which the receiving location name mapped field version of the CUSNBR field in file CUSMAS is
begins with ROCH. used (including the open query file record format, which
matches the customer master file record format). The
Example 6: Joining a File to Itself JDFTVAL parameter indicates that only records that are
produced by using default values are available through the

Chapter 2. OS/400 Command Descriptions P3-483


OPNQRYF

open query file. Every master record that has associated system to attempt to improve processing for the open query
detail records (with the same value of the customer number file to minimize the time needed to retrieve the first buffer of
field) is excluded, and every master record that has no asso- ten records. This combination of parameter values is a good
ciated detail records creates a result record. choice if the file is used with a high-level language interactive
inquiry program that shares the open query file open data
Example 9: Identifying Detail Records With No Associ- path (ODP) and shows ten records on each display screen.
ated Master Record The open data path (ODP) for the open query file is 'perma-
OPNQRYF FILE(ordfil cusmas) nent' (TYPE parameter), which means that it remains open
FORMAT(ordfil) either until the file is closed by using the Close File (CLOF)
JFLD((cusnbr cusmas/cusnbr)) command or until the routing step ends.
JDFTVAL(\onlydft)
MAPFLD((cusnbr 'ordfil/cusnbr')) Example 12: Tagging a Literal with a Specific CCSID
OPNQRYF FILE(itmmast)
This change of the previous example (using the same files)
QRYSLT('itmtype=pfield')
shows how to identify all detail records with no associated MAPFLD((pfield 'P' \CHAR 1 \N 93ð))
master record (in this case, all orders with an unregistered
customer number): This command selects from the first member of file
ITMMAST only the records that have a value of field
Example 10: Calculating Basic Statistics ITMTYPE equal to the letter 'P' in character set 930. The
OPNQRYF FILE(scores) mapped field is created so that the literal 'P' can be tagged
FORMAT(clsstats) with a specific CCSID.
GRPFLD(clsid)
GRPSLT('clsavg<7ð & clsmax-clsmin>3ð') If a literal is not tagged with a specific CCSID, it is assigned
MAPFLD((clscnt '%count') the CCSID of the job running the query. Because of this, if
(clsavg '%avg(usrscore)') an OPNQRYF statement is part of a CL program that is
(clsmin '%min(usrscore)') shared among systems with differing CCSIDs (in different
(clsmax '%max(usrscore)')) countries, perhaps), a query that uses a literal in the
selection specifications may not return the same results on
This command uses the grouping function to calculate basic
all systems, even though the data in the files is the same.
statistics for each group of records in file SCORES that have
This happens because the internal representation of the
the same value in the field CLSID. Assuming file CLSSTATS
literal may be different when the CL program is run in a job
has a record format containing field CLSID and all fields
with a different CCSID. This representation then may not
specified on the MAPFLD parameter, each record available
match the same records in the file. Note that the internal
through the open query file contains the value of the
representation of the data in the file does not change based
grouping field (CLSID) as well as the number of records
on the CCSID of the current job.
included in the group and the average, minimum, and
maximum values of field USRSCORE in the group. Tagging the literal with a specific CCSID avoids this problem.
Selection occurs after grouping, so that records are created A literal tagged with a specific CCSID keeps the same
for groups only when the average value of USRSCORE in internal representation on all systems. The CCSID that is
the group is less than 70 and the difference between the used to tag the literal should be the same as the CCSID
maximum and minimum scores in the group is greater than assigned to the field against which the literal is being com-
30. pared.
Example 11: Selecting Records With a Specific Value Example 13: Using a Nonjoin Query
OPNQRYF FILE(itmmast) OPNQRYF FILE((EMPLOYEE)) KEYFLD((NAME))
QRYSLT('itmcode=%range(32 5ð) & itmtype="P"') ALWCPYDTA(\OPTIMIZE)
ALWCPYDTA(\no)
OPTIMIZE(\firstio) This command returns all of the records in the EMPLOYEE
SEQONLY(\yes 1ð) file.
TYPE(\perm)
Example 14: Using a Join Query
This command selects from the first member of file
ITMMAST only the records that have a value of field OPNQRYF FILE((EMPLOYEE) (MANAGEMENT))
ITMCODE in the range from 32 through 50 and also have a FORMAT(EMPLOYEE) KEYFLD((NAME))
JFLD((1/EMPID 2/MEMPID)) ALWCPYDTA(\OPTIMIZE)
value of field ITMTYPE equal to the letter P. The
ALWCPYDTA parameter specifies that the open query file This command returns all of the records required by the join
must never use a copy of the records in file ITMMAST. The criteria.
OPTIMIZE and SEQONLY parameter values cause the

P3-484 OS/400 CL Reference - Part 2 (Full Version)


OPNQRYF

Additional Considerations same file and record format is specified more than once
in the list on the FILE parameter.
The file, library, and file member names used by the open For example, AMOUNT is valid if the field named
data path (ODP) are the same as the first file and file AMOUNT is defined on the MAPFLD parameter. It is
member names specified on the FILE parameter, unless an also valid if AMOUNT is not defined on the MAPFLD
override forces the use of a different file or file member parameter, as long as there is only one field named
name. The record format name of the open query file is the AMOUNT in any record format specified on the FILE
same as that specified on the FORMAT parameter. parameter.
The OPNQRYF command always opens a file with an open file-name/field-name
data path (ODP) that is shared, as if SHARE(*YES) is speci- Specify a field name that is qualified with the simple
fied for the file. If the file, library, or file member name speci- name of the file specified on the FILE parameter whose
fied in the HLL program differs from the name of the open record format contains the field, but only if the simple file
query file, an override command must be used to specify the name is unique among all file names specified on the
correct file, library, and member names to allow the high- FILE parameter. This form is not allowed if the same
level language program to share the open query file ODP. If simple file name is specified more than once in the list
the first, or the only, member queried has an attribute of specified for the FILE parameter, even if different library,
SHARE(*NO), SHARE(*YES) must be specified in an over- member, or record format names are used.
ride to enable an HLL program to share the query file ODP.
For example, WHS01/PARTNBR is valid if there is a
If the OPNQRYF is scoped to the job, any subsequent field named PARTNBR in the record format for file
OPNQRYF can share the ODP whether scoped to an acti- WHS01, and file name WHS01 is only specified once on
vation group or the job. If the OPNQRYF is scoped to an the FILE parameter.
activation group, any subsequent OPNQRYF can share the file-nbr/field-name
ODP if it is also scoped to the same activation group. Specify a simple field name that is qualified with the
number of the element in the FILE parameter list for the
The open query file ODP also has a LVLCHK attribute that
record format that contains the field. The file-nbr qual-
matches the first, or only, member used for the query.
ifier must be specified without leading zeros. This form
Shared opens of an open query file are level checked unless
is only required if the same simple file name is specified
the first queried member has an attribute of LVLCHK(*NO) or
more than once in the list specified on the FILE param-
LVLCHK(*NO) is specified either in the program that opens
eter.
the file or in an override which occurs before the shared
open. The level number for the open query file record format For example, 2/BALDUE is valid if the second file record
is the same as the record format identified on the FORMAT format in the list specified on the FILE parameter con-
parameter. tains a field named BALDUE.

An expanded discussion of field names, expressions, and *MAPFLD/field-name


built-in functions, and restricted built-in functions used with Specify a simple field name that is qualified with the
parameters on the OPNQRYF command follows: special value *MAPFLD if the field is defined on the
MAPFLD parameter. When the field is defined, this form
Field Names has the same meaning as specifying the simple field
name with no qualifier. If the field is not defined on the
The field name used as the first part of an element in the list MAPFLD parameter, *MAPFLD cannot be specified.
specified on the MAPFLD parameter must be a simple name,
For example, *MAPFLD/AVGBAL is valid if the AVGBAL
and the field names in the record format identified on the
field is specified as the first part of one of the mapped
FORMAT parameter are always treated as simple names.
field list elements specified on the MAPFLD parameter.
Any other field name specified on an OPNQRYF command
parameter (QRYSLT, KEYFLD, JFLD, GRPFLD, GRPSLT, or Expressions
the field-definition expression part of the MAPFLD parameter)
is a qualified field name, specified as follows: Expressions specified on the QRYSLT, GRPSLT, and
MAPFLD parameters are similar to expressions specified on
field-name
other CL command parameters. Logical, relational, numeric,
Specify a simple field name that identifies a field that is
and string operations are performed by using combinations of
defined on the MAPFLD parameter, or with a field name
field values and constants. Symbolic and named operators
that is unique among all field names from all record
are supported, as well as many built-in functions, and paren-
formats included in the list specified on the FILE param-
theses are used to control the order of evaluation.
eter. This form is not allowed if there is no MAPFLD
parameter definition for the specified field name and the There are also differences in the expressions specified on
FILE parameter includes more than one record format OPNQRYF parameters and on other CL command parame-
that contains a field with the specified name, even if the ters. The following list summarizes the ways that

Chapter 2. OS/400 Command Descriptions P3-485


OPNQRYF

expressions on the QRYSLT, GRPSLT, and MAPFLD param- Except for operators ¬ and *NOT, the operators for priorities
eters differ from normal CL expressions: 1 through 4 are numeric operators, which require numeric
operands. The operators for priority 5 are string operators,
Ÿ The expression string must be enclosed in apostrophes
which require operands to be either character or DBCS
if it contains embedded blanks or special characters
strings. Priority 6 operators are called relational operators,
Ÿ The following differences affect numeric and string
which require at least one operand that is a field name or a
literals:
numeric or string expression (not a constant). The operators
– Character string constants are quoted by using
for priorities 7 and 8, plus the ¬ and *NOT operators (priority
apostrophes or double quotes
1), are logical operators. The operands in a logical
– The leading and trailing zeros of a numeric constant
expression are relations (constructed by using a relational
are significant parts of its attributes
operator with appropriate operands) and other logical
– Floating-point constants (including the special
expressions.
values *INF and *NEGINF) are used in expressions
Ÿ The following differences contrast CL variables with
The operands in a string expression, including string oper-
database fields:
ands for a built-in function, are a combination of character
– No prefixed ampersand (&) is used in database field
fields and DBCS fields and constants. If both operands of
names
such an expression are DBCS-only fields or constants, the
– Qualified field names are supported
final result from evaluation of the expression is a DBCS-only
– No 'logical' field type exists for database fields
field value. If the operands are a combination of DBCS or
– Many additional data types are supported for data-
character fields or constants, the result is a DBCS-open field
base fields
value. When DBCS fields are concatenated, the extraneous
Ÿ The following CL operators are not supported on the
shift-in and shift-out characters between the fields are
OPNQRYF command:
removed.
– *BCAT or ∨>
– *TCAT or ∨< The result produced by a + or − sign prefixed operator has
Ÿ The following additional operators are supported beyond the same attributes as the operand, unless the operand of a
CL support: − sign prefixed operator is a *BIN2, in which case the result
– // for remainder is a *BIN4. The result of an ** operator (exponentiation) is a
– ** for exponentiation double-precision floating-point number (*FLT8). For other
– *CT for 'contains' (character scan) numeric operators that require two operands, if either
– *XOR or && for 'logical exclusive or' operand is a floating-point number, the result is a double-
Ÿ The following differences affect built-in function support: precision floating point number (*FLT8). If both operands are
– The %SWITCH built-in function is not supported fixed-point numbers, the system uses the information in the
– Many additional built-in functions are supported following table to determine the number of total and fractional
– Nested built-in functions and expressions for built-in digits required to produce a packed decimal (*DEC) result. If
function arguments (such as '%LOG(%SIN(x))') gen- both operands are zero-precision binary fields and/or integer
erally are allowed constants, the result is a *BIN4, unless the operator is a "/".
– To support expressions as built-in function argu- In that case, the result is the same as for a fixed-point result.
ments, any argument that is a signed numeric value If the total number of digits required exceeds 31, the number
or an expression (for example, '%MIN(3 (-2) x of fraction digits is reduced enough to enable calculation of
(y+4))') must be enclosed in parentheses the result with a total of 31 digits. If some fraction digits are
The following table shows the priority of all operators that are dropped and the attributes of the end result of the computa-
used for expressions on the QRYSLT, GRPSLT, or MAPFLD tion (the attributes specified on the MAPFLD parameter for
parameters. Only operators listed for priorities 1 through 5, the field) require greater precision than that of the interme-
excluding the *NOT and ¬ operators, are allowed in an diate result, a warning message is sent to indicate that some
expression specified on the MAPFLD parameter: precision was lost in evaluating the expression.

Priority Operators Result


Result (Fractional
1 +, − (when used for signed numeric values), *NOT, ¬ Operation (Total Digits) Digits)
2 ** + MAX(d1−f1,d2−f2)+MAX(f1,f2)+1 MAX(f1,f2)
3 *, / ,// (a / must have a space before the / and/or after − MAX(d1−f1,d2−f2)+MAX(f1,f2)+1 MAX(f1,f2)
the /) * d1+d2 f1+f2
4 +, − (when used between two operands) Legend:
d1 Total digits in operand 1
5 *CAT, ∨∨ f1 Fractional digits in operand 1
6 *GT, *LT, *EQ, *GE, *LE, *NE, *NG, *NL, *CT, >, <, =, d2 Total digits in operand 2
>=, <=, ¬=, ¬>, ¬< f2 Fractional digits in operand 2

7 *AND, &
8 *OR, *XOR, ∨, &&

P3-486 OS/400 CL Reference - Part 2 (Full Version)


OPNQRYF

Result The *CT operator performs a scan of the character field or


Result (Fractional string expression (except for expressions made up of a
Operation (Total Digits) Digits) single character string literal) that must be specified as the
/ 31 31−(d1−f1+f2) left side of the relation, in order to determine if it contains the
// MIN(d1−f1,d2−f2)+MAX(f1,f2) MAX(f1,f2) character string, field, or expression value specified as the
Legend: right side of the relation. The second operand (the search
d1 Total digits in operand 1 value) must be no longer than the first operand (the base
f1 Fractional digits in operand 1 string).
d2 Total digits in operand 2
f2 Fractional digits in operand 2
If the string is found, the relation is satisfied and the result is
a logical value of 'true'; otherwise, the result is a logical 'false'
value. The following example illustrates this process:
When a numeric or string expression is specified on the
MAPFLD parameter, the attributes of the final result are used Field BASEFLD contains the value 'THIS IS A TEST'.
in one of two ways. They are either used directly for the field
value (if field-type *CALC is specified and the field is not con- Field TESTFLD contains the value 'TE'.
tained in the prototype record format identified on the
Expression Result
FORMAT parameter), or the final result is changed to match
the attributes specified on the MAPFLD parameter or con- 'BASEFLD *CT ''IS A''' True
tained in the field definition in the record format identified by 'BASEFLD *CT TESTFLD' True
the FORMAT parameter. 'BASEFLD *CT ''X''' False

Both operands of a relational operator can be constants. 'BASEFLD *CT TESTFLD ∨∨ ''Z''' False
The fields, constants, or expressions specified as operands 'BASEFLD ∨∨ ''ABC'' *CT ''TAB''' True
on the left and right side of a relational operator must be of
the same type, either numeric or string. Any combination of Built-in Functions
character and DBCS field operands are allowed except that a
character field cannot be related to a DBCS-only field. The built-in functions listed below are supported for the
expression used to define a derived field on the MAPFLD
There are two types of DBCS constants: DBCS-only and parameter or a complex selection operand specified on the
DBCS-open. A DBCS-only constant has only DBCS data QRYSLT or GRPSLT parameters.
between its apostrophes. This data must be enclosed in
SO/SI characters. A DBCS-open constant has a mixture of A numeric argument is a numeric field, a numeric constant or
DBCS and alphameric data. An SO character (HEX 0E) indi- a numeric expression. A string argument is a character field,
cates the start of a group of DBCS characters and an SI a character string literal, or a string expression. Unless oth-
character (HEX 0F) follows the last double-byte character of erwise noted, all built-in functions allow expressions,
the group. including other built-in functions, to be used as arguments.

If a numeric or string expression appears as a complex For a field that appears in the record format identified by the
selection operand on the QRYSLT or GRPSLT parameters, FORMAT parameter, and that is also defined by an
attributes of the final result of the expression used for the expression on the MAPFLD parameter, the expression result
selection operand are changed to match the other relational is calculated by using the attributes described below. Then
operand. the resultant value is mapped to match the attributes of the
field.
It is not necessary for operands of a relational operator to
have identical attributes, but numeric operands cannot be %ABSVAL (numeric-argument)
mixed with character operands. If the operands do not have %ABSVAL accepts a numeric argument and returns
identical attributes, the system changes them to identical the absolute value of the argument. The returned
attributes (except for the *CT operator, where the character value has the same attributes as the argument,
string operands may be of different lengths), before per- unless the argument is a *BIN2, in which case the
forming the operation. This change uses packed decimal returned value is a *BIN4.
format if both operands are fixed-point numeric operands, or The following argument types are treated as
floating-point format if either operand is a floating-point numeric values: date duration, time duration, and
number. The changes for fixed-point numeric operands align timestamp duration. Arguments of these types can
their decimal points and pad them with zeros. Numeric type be specified either as fields or literal values. The
changes may truncate fractional digits if more than 31 total returned value is a packed decimal number (*DEC)
digits are required for fixed-point numbers, or may drop some with 8 digits and 0 precision (date duration), 6 digits
of the least significant digits if more than 15 total digits are and 0 precision (time duration), or 20 digits and 6
required for floating-point numbers. Character operands are precision (timestamp duration).
changed by padding the shorter operand with blanks.

Chapter 2. OS/400 Command Descriptions P3-487


OPNQRYF

%ACOS (numeric-argument) %ATANH (numeric-argument)


%ACOS accepts a numeric argument and returns %ATANH accepts a numeric argument and returns
the arc cosine of the argument, in radians. %ACOS the hyperbolic arc tangent of the argument, in
and %COS are inverse operations. radians. %ATANH and %TANH are inverse oper-
The following argument types are treated as ations.
numeric values: date duration, time duration, and The following argument types are treated as
timestamp duration. Arguments of these types can numeric values: date duration, time duration, and
be specified either as fields or literal values. The timestamp duration. Arguments of these types can
returned value is a double-precision floating-point be specified either as fields or literal values. The
number (*FLT8). returned value is a double-precision floating-point
%AND (string-argument ...) number (*FLT8).
%AND accepts two or more character or %AVG (numeric-argument)
hexadecimal string arguments and returns a string %AVG accepts a numeric argument and returns the
that is the bit-wise 'AND' (logical and) of the argu- average value of its argument for the group of
ments. This function takes the first argument string, records defined on the GRPFLD parameter. The
ANDs it with the next string, and continues to AND argument must be a field name or an expression
each successive argument with the previous result. (not a literal).
If an argument is encountered that is shorter than
The following argument types are treated as
the previous result, it is padded on the right with
numeric values: date duration, time duration, and
blanks. The returned value is a string of type *HEX
timestamp duration. If no records are selected, the
with the same length as the longest argument. If
result is the null value. Otherwise,
any of the arguments are variable-length, the
maximum length is used as the length of the argu- Ÿ If the argument is fixed-point, the result is a
ment. packed decimal number (*DEC) with 31 total
digits and the same number of integer digits as
%ANTILOG (numeric-argument)
the argument.
%ANTILOG accepts a numeric argument and
returns the antilogarithm (base 10) of the argument. Ÿ If the argument is floating-point, the result is a
%ANTILOG and %LOG are inverse operations. double-precision floating-point number (*FLT8).

The following argument types are treated as Ÿ If the argument is date duration, time duration,
numeric values: date duration, time duration, and or timestamp duration, the returned value is a
timestamp duration. Arguments of these types can packed decimal number (*DEC) with 31 digits
be specified either as fields or literal values. The and 0 precision (date duration), 31 digits and 0
returned value is a double-precision floating-point precision (time duration), or 31 digits and 6 pre-
number (*FLT8). cision (timestamp duration).

%ASIN (numeric-argument) %AVG is an aggregate function that is used for a


%ASIN accepts a numeric argument and returns the nongrouping field in a query that uses the grouping
arc sine of the argument, in radians. %ASIN and function.
%SIN are inverse operations. %CHAR (date/time-argument date/time-format)
The following argument types are treated as %CHAR accepts a date/time argument and
numeric values: date duration, time duration, and date/time format and returns the character represen-
timestamp duration. Arguments of these types can tation of the argument using the specified format.
be specified either as fields or literal values. The The date/time argument can be a date, time, or
returned value is a double-precision floating-point timestamp field. The returned value is of type
number (*FLT8). *CHAR and is tagged with the CCSID of the current
job.
%ATAN (numeric-argument)
%ATAN accepts a numeric argument and returns The date/time format is optional. If specified, it must
the arc tangent of the argument, in radians. be one of the following:
%ATAN and %TAN are inverse operations. EUR European format
The following argument types are treated as ISO International Standards Organization format
numeric values: date duration, time duration, and JIS Japanese Industrial Standard format
timestamp duration. Arguments of these types can USA United States format
be specified either as fields or literal values. The If the format is not specified, the job default format
returned value is a double-precision floating-point is used.
number (*FLT8).

P3-488 OS/400 CL Reference - Part 2 (Full Version)


OPNQRYF

Example: obtains the current server name (or RDB name) of


OPNQRYF the COORDINATOR node. The returned value is of
FILE(library/file) type variable-length character (*VCHAR) with a
GRPFLD(charfld) maximum length of 18.
GRPSLT('charfld = %CHAR(timefld "USA")')
%CURTIME
%COS (numeric-argument) %CURTIME does not support any arguments. It
%COS accepts a numeric argument and returns the obtains the current time based on a reading of the
cosine of the argument. The argument must be time-of-day clock. The returned value is of type
specified in radians. %COS and %ACOS are *TIME. The format and separator are derived from
inverse operations. the job attributes.
The following argument types are treated as %CURTIMESTP
numeric values: date duration, time duration, and %CURTIMESTP does not support any arguments.
timestamp duration. Arguments of these types can It obtains the current timestamp based on a reading
be specified either as fields or literal values. The of the time-of-day clock. The returned value is of
returned value is a double-precision floating-point type *TIMESTP. The format and separator will be
number (*FLT8). derived from the job attributes.
%COSH (numeric-argument) %CURTIMEZONE
%COSH accepts a numeric argument and returns %CURTIMEZONE does not support any arguments.
the hyperbolic cosine of the argument. The argu- It obtains the current time zone. The returned value
ment must be specified in radians. is a packed decimal number (*DEC) with 6 digits
The following argument types are treated as and 0 precision.
numeric values: date duration, time duration, and %DATE (date/time-argument)
timestamp duration. Arguments of these types can %DATE accepts a date/time argument and returns a
be specified either as fields or literal values. The date. The date/time argument can be a date or
returned value is a double-precision floating-point timestamp field, a character or hexadecimal field
number (*FLT8). containing the external form of a date, a date literal,
%COT (numeric-argument) or a numeric field or literal value in the range 1 -
%COT accepts a numeric argument and returns the 3,652,059. The returned value is of type *DATE.
cotangent of the argument. The argument must be Example:
specified in radians. OPNQRYF
The following argument types are treated as FILE(library/file)
QRYSLT(('%DATE(tstampfld) =
numeric values: date duration, time duration, and
"1989-1ð-23"'))
timestamp duration. Arguments of these types can
be specified either as fields or literal values. The %DAY (date/time-argument)
returned value is a double-precision floating-point %DAY accepts a date/time argument and returns
number (*FLT8). the day part of the value. The date/time argument
can be a date or timestamp field, a date duration or
%COUNT
timestamp duration (field or literal), or a numeric
%COUNT does not support any arguments. It
field or literal. The returned value is of type *BIN4.
returns the count of the number of records con-
tained in the group of records defined on the A numeric field argument must be defined as
GRPFLD parameter. The returned value is a 4-byte packed decimal (*DEC) with 8 digits and 0 precision
binary number (*BIN4) with 10 total decimal digits for date duration or packed decimal (*DEC) with 20
and no fraction digits. %COUNT is an aggregate digits and 6 precision for timestamp duration. A
function that applies only to a query that uses the numeric constant argument must have 8 digits fol-
grouping function. lowed by a decimal point, or 14 digits followed by a
decimal point and 6 digits.
%CURDATE
%CURDATE does not support any arguments. It %DAYS (date/time-argument)
obtains the current date based on a reading of the %DAYS accepts a date/time argument and returns
time-of-day clock. The returned value is of type an integer representation of the date. The date/time
*DATE. The format and separator are derived from argument can be a date or timestamp field, a char-
the job attributes. acter or hexadecimal field containing the external
form of a date, or a date literal. The returned value
%CURSERVER
is of type *BIN4.
%CURSERVER does not support any arguments. If
only non-distributed files are specified then it obtains %DIGITS (numeric-argument)
the current server name (or RDB name) of the local %DIGITS accepts a numeric argument and returns
system. If distributed files are specified then it a character representation of its numeric value, not

Chapter 2. OS/400 Command Descriptions P3-489


OPNQRYF

including the sign or a decimal point. The result is eter, and is allowed as part of an arithmetic (addi-
tagged with the CCSID of the current job. For tion or subtraction) expression with a date or
example, %DIGITS (-1.5) returns the character timestamp field on the QRYSLT, GRPSLT, or
string 15. The numeric argument must not be a MAPFLD parameters.
floating point number.
%DURSEC (integer-argument)
%DURDAY (integer-argument) %DURSEC accepts an integer argument and
%DURDAY accepts an integer argument and returns a labeled duration of seconds. The integer
returns a labeled duration of days. The integer argument for this function can be a numeric
argument for this function can be a numeric expression, a field, or a literal.
expression, a field, or a literal.
This built-in function is allowed to stand by itself in
This built-in function is allowed to stand by itself in the mapped-field-definition on the MAPFLD param-
the mapped-field-definition of the MAPFLD param- eter, and is allowed as part of an arithmetic (addi-
eter, and is allowed as part of an arithmetic (addi- tion or subtraction) expression with a time or
tion or subtraction) expression with a date or timestamp field on the QRYSLT, GRPSLT, or
timestamp field on the QRYSLT, GRPSLT, or MAPFLD parameters.
MAPFLD parameters.
%DURYEAR (integer-argument)
%DURHOUR (integer-argument) %DURYEAR accepts an integer argument and
%DURHOUR accepts an integer argument and returns a labeled duration of years. The integer
returns a labeled duration of hours. The integer argument for this function can be a numeric
argument for this function can be a numeric expression, a field, or a literal.
expression, a field, or a literal.
This built-in function is allowed to stand by itself in
This built-in function is allowed to stand by itself in the mapped-field-definition value on the MAPFLD
the mapped-field-definition on the MAPFLD param- parameter, and is allowed as part of an arithmetic
eter, and is allowed as part of an arithmetic (addi- (addition or subtraction) expression with a date or
tion or subtraction) expression with a time or timestamp field on the QRYSLT, GRPSLT, or
timestamp field on the QRYSLT, GRPSLT, or MAPFLD parameters.
MAPFLD parameters. Example:
%DURMICSEC (integer-argument) OPNQRYF
%DURMICSEC accepts an integer argument and FILE((library/file))
returns a labeled duration of microseconds. The QRYSLT('startfld > %CURDATE + oneyear \AND
integer argument for this function can be a numeric endfld < %CURDATE + %DURYEAR(2)')
MAPFLD((oneyear '%DURYEAR(1)'))
expression, a field, or a literal.
%EXP (numeric-argument)
This built-in function is allowed to stand by itself in
%EXP accepts a numeric argument and returns a
the mapped-field-definition on the MAPFLD param-
value that is the base of the natural logarithm (e)
eter, and is allowed as part of an arithmetic (addi-
raised to a power specified by the argument. %EXP
tion or subtraction) expression with a timestamp
and %LN are inverse operations.
field on the QRYSLT, GRPSLT, or MAPFLD param-
eters. The following argument types are treated as
numeric values: date duration, time duration, and
%DURMINUTE (integer-argument)
timestamp duration. Arguments of these types may
%DURMINUTE accepts an integer argument and
be specified either as fields or literal values. The
returns a labeled duration of minutes. The integer
returned value is a double-precision floating-point
argument for this function can be a numeric
number (*FLT8).
expression, a field, or a literal.
%HASH (expression-argument)
This built-in function is allowed to stand by itself in
%HASH accepts a valid expression and returns a
the mapped-field-definition on the MAPFLD param-
4-byte binary number (*BIN4) with 10 total decimal
eter, and is allowed as part of an arithmetic (addi-
digits and no fraction digits. The returned value will
tion or subtraction) expression with a time or
be the partition number of the record selected.
timestamp field on the QRYSLT, GRPSLT, or
MAPFLD parameters. A valid expression cannot include aggregate func-
tions such as %COUNT, %AVG, %MIN, %MAX,
%DURMONTH (integer-argument)
%SUM, and %STDDEV as operands to %HASH.
%DURMONTH accepts an integer argument and
returns a labeled duration of months. The integer Use the %HASH function to determine what the par-
argument for this function can be a numeric titions would be if the partitioning key was com-
expression, a field, or a literal. posed of EMPNO and LASTNAME. The following
example returns the partition number for every row
This built-in function is allowed to stand by itself in
in EMPLOYEE.
the mapped-field-definition on the MAPFLD param-

P3-490 OS/400 CL Reference - Part 2 (Full Version)


OPNQRYF

Example: Argument Type Result Length in Bytes


OPNQRYF -------------------- ----------------------
FILE((CORPDATA/EMPLOYEE)) Character 1-32766
FORMAT(FNAME) Hex 1-32766
MAPFLD((HASH '%HASH((1/EMPNO) (1/LN))')) DBCS-only 4-32766
DBCS-either 4-32766
%HEX (hexadecimal-argument)
DBCS-open 4-32766
%HEX accepts an argument and returns the DBCS-graphic 1-16383
hexadecimal equivalent of the argument's value. Variable Character ð-3274ð
The hexadecimal argument can be of any type. The Variable Hex ð-3274ð
returned value is of type *CHAR, and is tagged with Variable DBCS-only ð-3274ð
the CCSID of the current job. Variable DBCS-either ð-3274ð
%HOUR (date/time-argument) Variable DBCS-open ð-3274ð
Variable DBCS-graphic ð-1637ð
%HOUR accepts a date/time argument and returns
Date 4
the hour part of the value. The date/time argument
Time 3
can be a time or timestamp field, a time duration or Timestamp 1ð
timestamp duration (either field or literal), or a Binary \BIN4 2
numeric field or literal. The returned value is of type Binary \BIN8 4
*BIN4. Floating point \FLT4 4
A numeric field argument must be defined as Floating point \FLT8 8
packed decimal (*DEC) with 6 digits and 0 precision Packed decimal (p,s) INTEGER(p/2)+1, (1-16)
Zoned decimal (p,s) p (1-31)
for time duration or packed decimal (*DEC) with 20
--------------------------------------------
digits and 6 precision for timestamp duration. A p=precision, s=scale
numeric constant argument must have 6 digits fol-
lowed by a decimal point, or 14 digits followed by a String notes:
decimal point and 6 digits. The %LEN function returns the length of the
Example: value as it is stored in the data space.
OPNQRYF Ÿ For fixed-length fields, the length is
FILE(library/file)
always the same as the declared size of
QRYSLT(('%HOUR(timefld2) = 12'))
the field, not the length of the actual
%LEN (length-argument) data in the field.
%LEN accepts one argument and returns the
Ÿ For variable-length fields, the length is
number of bytes used to represent the value unless
the length of the actual data in the field,
the value is a graphic field type. If the value is a
including trailing blanks.
graphic field type, the number of graphic characters
is returned. The length argument can be of any For example, assume FIXED10 is a
type. The returned value is of type *BIN4. *CHAR(10) field, and VAR10 is a
Example: *VCHAR(10) field. The following example
OPNQRYF shows results of the %LEN function:
FILE(library/file) %LEN Statement Field Data Result
QRYSLT('%LEN(varlenfld) <= 3ð') -------------- ------------ ------
%LEN(fixed1ð) '123456789ð' 1ð
%LEN(fixed1ð) '12345' 1ð
%LEN(var1ð) '123456789ð' 1ð
%LEN(var1ð) '12345' 5
%LEN(var1ð) '12345 ' 7
%LEN(var1ð) '' ð
%LN (numeric-argument)
%LN accepts a numeric argument and returns the
natural logarithm of the argument. %LN and %EXP
are inverse operations.
The following argument types are treated as
numeric values: date duration, time duration, and
timestamp duration. Arguments of these types may
be specified either as fields or literal values. The
returned value is a double-precision floating-point
number (*FLT8).

Chapter 2. OS/400 Command Descriptions P3-491


OPNQRYF

%LOG (numeric-argument) %MICSEC (date/time-argument)


%LOG accepts a numeric argument and returns the %MICSEC accepts a date/time argument and
common logarithm (base 10) of the argument. returns the microsecond part of the value. The
%LOG and %ANTILOG are inverse operations. date/time argument can be a timestamp (field or
literal), a timestamp duration (field or literal), a char-
The following argument types are treated as
acter field that contains the external form of a
numeric values: date duration, time duration, and
timestamp, or a numeric field or literal. The
timestamp duration. Arguments of these types may
returned value is of type *BIN4.
be specified either as fields or literal values. The
returned value is a double-precision floating-point A numeric field argument must be defined as
number (*FLT8). packed decimal (*DEC) with 20 digits and 6 preci-
sion for timestamp duration. A numeric constant
%MAX (numeric-or-string-or-date/time-argument ...)
argument must be 14 digits followed by a decimal
%MAX accepts one or more character-string,
point and 6 digits.
DBCS-string, numeric, or date/time arguments, and
returns the largest value from the list. Date/time %MIN (numeric-or-string-or-date/time-argument ...)
arguments are arguments of type *DATE, *TIME, or %MIN accepts one or more character-string,
*TIMESTP, or arguments that are date, time, or DBCS-string, numeric, or date/time arguments, and
timestamp durations. String arguments must be no returns the smallest value from the list. Date/time
longer than 256 bytes. arguments are arguments of type *DATE, *TIME, or
*TIMESTP, or arguments that are date, time, or
If only one argument is specified, this function
timestamp durations. String arguments must be no
returns the maximum value of its argument for the
longer than 256 bytes.
group of records defined on the GRPFLD param-
eter, and the returned value has the same attributes If only one argument is specified, this function
as the argument. If no records are selected, the returns the minimum value of its argument for the
result is the null value. If the single argument is a group of records defined on the GRPFLD param-
date duration, time duration, or timestamp duration, eter, and the returned value has the same attributes
then the returned value is a packed decimal number as the argument. If no records are selected, the
(*DEC) with 8 digits and 0 precision (date duration), result is the null value. If the single argument is a
6 digits and 0 precision (time duration), or 20 digits date duration, time duration, or timestamp duration,
and 6 precision (timestamp duration). When a then the returned value is a packed decimal number
single argument is used, it must be a field name or (*DEC) with 8 digits and 0 precision (date duration),
an expression (not a literal). %MAX with only one 6 digits and 0 precision (time duration), or 20 digits
argument is an aggregate function that is used for a and 6 precision (timestamp duration). When a
nongrouping field in a query that uses the grouping single argument is used, it must be a field name or
function. an expression (not a literal). %MIN with only one
argument is an aggregate function that is used for a
If multiple arguments are specified, %MAX returns
nongrouping field in a query that uses the grouping
the maximum value of all the arguments. All argu-
function.
ments must be either character-string, DBCS-string,
numeric, or date/time values. This function calcu- If multiple arguments are specified, %MIN returns
lates the maximum value of the first two arguments, the minimum value of all the arguments. All argu-
and then continues to determine the maximum value ments must be either character-string, DBCS-string,
of the previous result and the next successive argu- numeric, or date/time values. This function calcu-
ment. The final result is determined according to lates the minimum value of the first two arguments,
the following value conversion rules. and then continues to determine the minimum value
of the previous result and the next successive argu-
If an argument has different attributes than the pre-
ment. The final result is determined by the value
vious result, the two values are converted to iden-
change rules described below.
tical attributes and the operation continues. This
conversion uses packed decimal if both values are If an argument has different attributes than the pre-
fixed-point numeric values, or floating-point if either vious one, the two values are changed to identical
value is floating-point. The conversion for fixed- attributes and the operation continues. This change
point numeric values aligns the decimal points and uses packed decimal numbers if both values are
pads the values with zeros. Numeric type changes fixed-point numeric values, or floating-point numbers
may truncate fractional digits if more than 31 total if either value is a floating-point number. The
digits are required for fixed-point numbers, or drop change for fixed-point numeric values aligns the
some of the least significant digits if more than 15 decimal points and pads with zeros. Numeric type
total digits are required for floating-point numbers. change may truncate fractional digits if more than
Character values are changed by padding the 31 total digits are required for fixed-point numbers,
shorter field with blanks. or may drop some of the least significant digits if
more than 15 total digits are required for floating-

P3-492 OS/400 CL Reference - Part 2 (Full Version)


OPNQRYF

point numbers. Character values are changed by Example:


padding the shorter field with blanks. OPNQRYF
FILE((CORPDATA/EMPLOYEE) (CORPDATA/DEPARTMENT))
%MINUTE (date/time-argument) FORMAT(FNAME)
%MINUTE accepts a date/time argument and JFLD((EMPLOYEE/DEPTNO DEPARTMENT/DEPTNO \EQ))
returns the minute part of the value. The date/time MAPFLD((EMPNO 'EMPLOYEE/EMPNO')
argument can be a time or timestamp field, a time (NODENAME1 '%NODENAME(1)')
duration or timestamp duration (either field or literal), (NODENAME1 '%NODENAME(2)'))
or a numeric field or literal. The returned value is of
Join the EMPLOYEE and DEPARTMENT tables,
type *BIN4.
select all records of the result where the records of
A numeric field argument must be defined as the two tables are on the same node.
packed decimal (*DEC) with 6 digits and 0 precision
Example:
for time duration or packed decimal (*DEC) with 20 OPNQRYF
digits and 6 precision for timestamp duration. A FILE((CORPDATA/EMPLOYEE) (CORPDATA/DEPARTMENT))
numeric constant argument must have 6 digits fol- FORMAT(FNAME)
lowed by a decimal point, or 14 digits followed by a JFLD((1/NODENAME1 2/NODENAME2 \EQ))
decimal point and 6 digits. MAPFLD((NODENAME1 '%NODENAME(1)')
(NODENAME2 '%NODENAME(2)'))
%MONTH (date/time-argument)
%MONTH accepts a date/time argument and %NODENUMBER (integer-argument)
returns the month part of the value. The date/time %NODENUMBER accepts an integer-argument
argument can be a date or timestamp field, a date which is used to identify a file that has been speci-
duration or timestamp duration (field or literal), or a fied on the FILE parameter. The argument must be
numeric field or literal. The returned value is of type greater than zero and less than or equal to the
*BIN4. number of files specified on the file parameter. The
%NODENUMBER function returns a 4-byte binary
A numeric field argument must be defined as
number (*BIN4) with 10 total decimal digits and no
packed decimal (*DEC) with 8 digits and 0 precision
fraction digits. The returned value will be the node
for date duration or packed decimal (*DEC) with 20
number of the record selected.
digits and 6 precision for timestamp duration. A
numeric constant argument must have 8 digits fol- If the argument identifies a non-distributed file, the
lowed by a decimal point, or 14 digits followed by a value zero is returned.
decimal point and 6 digits. For OPNQRYF the node number from the sec-
%NODENAME (integer-argument) ondary file where the outer or exception join is per-
%NODENAME accepts an integer-argument which formed will be returned.
is used to identify a file that has been specified on If CORPDATA.EMPLOYEE was a distributed file,
the FILE parameter. The argument must be greater then the node number for each record and the
than 0 and less than or equal to the number of files employee name would be returned.
specified on the file parameter. The %NODENAME
function returns the RDB name for the record Example:
retrieved. The returned value is of type *VCHAR of OPNQRYF
FILE((CORPDATA/EMPLOYEE))
length 18.
FORMAT(FNAME)
Find the node name for every record of the MAPFLD((NODENAME '%NODENUMBER(1)')
EMPLOYEE table. (LNAME '1/LASTNAME'))
Example: %NONNULL (argument ...)
OPNQRYF %NONNULL accepts a list of two or more argu-
FILE((CORPDATA/EMPLOYEE)) ments and returns the first non-null value from the
FORMAT(FNAME) list. The items in the argument list can be fields or
MAPFLD((NODENAME '%NODENAME(1)')) literal values of any type. The type of the returned
Join the EMPLOYEE and DEPARTMENT tables, value is that of the item selected from the list.
select the employee number (EMPNO) and deter- Example:
mine the node from which each record involved in OPNQRYF
the join originated. FILE(library/file)
QRYSLT('%NONNULL(fld1 fld2 ð) > ð')
The above example selects records from the file
where either field FLD1 or field FLD2 contains a
non-null value that is greater than zero. If both
FLD1 and FLD2 were null, the %NONNULL function
specified in this example would return '0' because of

Chapter 2. OS/400 Command Descriptions P3-493


OPNQRYF

the constant '0' passed as the third argument. If Example:


any field is DBCS-graphic, all fields must be OPNQRYF
DBCS-graphic. FILE((CORPDATA/EMPLOYEE) (CORPDATA/DEPARTMENT))
FORMAT(FNAME)
%NOT (string-argument) JFLD((1/PART1 2/PART2 \EQ))
%NOT accepts a character or hexadecimal string MAPFLD((PART1 '%PARTITION(1)')
argument and returns a string that is the bit-wise (PART2 '%PARTITION(2)'))
'NOT' (logical not) of the argument. The returned
%SECOND (date/time-argument)
value is a string of type *HEX with the same length
%SECOND accepts a date/time argument and
as the argument.
returns the seconds part of the value. The
%OR (string-argument ...) date/time argument can be a time or timestamp
%OR accepts two or more character-string argu- field, a time duration or timestamp duration (either
ments and returns a string that is the bit-wise 'OR' field or literal), or a numeric field or literal. The
(logical inclusive or) of the arguments. This function returned value is of type *BIN4.
takes the first argument string, ORs it with the next
A numeric field argument must be defined as
string, and then continues to OR each successive
packed decimal (*DEC) with 6 digits and 0 precision
argument with the previous result. If an argument is
for time duration or packed decimal (*DEC) with 20
encountered that is shorter than the previous result,
digits and 6 precision for timestamp duration. A
it is padded with blanks. The final result is a string
numeric constant argument must have 6 digits fol-
with the same length as the longest argument. If
lowed by a decimal point, or 14 digits followed by a
any of the arguments are variable-length, the
decimal point and 6 digits.
maximum length is used as the length of the argu-
ment. %SIN (numeric-argument)
%SIN accepts a numeric argument and returns the
%PARTITION (integer-argument)
sine of the argument. The argument must be speci-
%PARTITION accepts an integer-argument which is
fied in radians. %SIN and %ASIN are inverse oper-
used to identify a file that has been specified on the
ations.
FILE parameter. The argument must be greater
than 0 and less than or equal to the number of files The following argument types are treated as
specified on the file parameter. The partition func- numeric values: date duration, time duration, and
tion returns a 4-byte binary number (*BIN4) with 10 timestamp duration. Arguments of these types can
total decimal digits and no fraction digits. The be specified either as fields or literal values. The
returned value will be the partition number of the returned value is a double-precision floating-point
record. number (*FLT8).
If the argument identifies a non-distributed file then %SINH (numeric-argument)
a value of zero will be returned. %SINH accepts a numeric argument and returns the
hyperbolic sine of the argument. The argument
Find the PARTITION number for every row of the
must be specified in radians.
EMPLOYEE table. This could be used to determine
if there is data skew. The following argument types are treated as
Example: numeric values: date duration, time duration, and
OPNQRYF FILE((CORPDATA/EMPLOYEE)) timestamp duration. Arguments of these types can
FORMAT(FNAME) be specified either as fields or literal values. The
MAPFLD((PART1 '%PARTITION(1)')) returned value is a double-precision floating-point
number (*FLT8).
Select the employee number (EMPNO) from the
EMPLOYEE table for all records where the partition %SQRT (numeric-argument)
number is equal to 100. %SQRT accepts a numeric argument and returns
the square root of the argument.
Example:
OPNQRYF The following argument types are treated as
FILE((EMPLOYEE)) numeric values: date duration, time duration, and
QRYSLT('%PARTITION(1) \EQ 1ðð') timestamp duration. Arguments of these types can
Join the EMPLOYEE and DEPARTMENT tables, be specified either as fields or literal values. The
select all records of the result where the records of returned value is a double-precision floating-point
the two tables have the same partition number number (*FLT8).
%SST (string-argument start-position-expression
<length-expression>)
%SST and %SUBSTRING accept a character,
hexadecimal, DBCS, or graphic string, a starting
position expression, and an optional length

P3-494 OS/400 CL Reference - Part 2 (Full Version)


OPNQRYF

expression as arguments. They return a substring Example:


of the string argument that is of the same type and OPNQRYF
CCSID as the string argument and has length equal FILE(library/file)
to the value specified by the length-expression. QRYSLT('field1 =
%SST(field2 (numfld1+3)
Single-byte substringing is done when these func- (numfld1+numfld2))')
tions (%SST and %SUBSTRING) are used for
DBCS data. The shift-out and shift-in characters %STDDEV (numeric-argument)
may be lost, which produces unusual results. The %STDDEV accepts a numeric argument and returns
result of the DBCS substring operation is the the standard deviation of its argument for the group
DBCS-open type. of records defined by the GRPFLD parameter. The
argument must be a field name or an expression
The string argument can be a fixed- or variable- (not a literal). If no records are selected, the result
length character, hexadecimal, DBCS, or graphic is the null value. Otherwise, the returned value is a
field or an expression which evaluates to a fixed- or double-precision floating-point number (*FLT8).
variable-length character, hexadecimal, DBCS, or %STDDEV is an aggregate function that is used for
graphic string. a nongrouping field in a query that uses the
The values derived from expressions for the second grouping function.
and third arguments must be valid integers. The %STRIP(string-argument <strip-character> <strip-
second argument must have a value between 1 and function>)
the length attribute (or maximum length of a %STRIP accepts a character-, DBCS-, or graphic-
variable-length field) of the first argument, and the string argument, an optional strip character, and an
third argument must have a value between 1 and optional strip function as arguments. It returns a
the length attribute (or maximum length of a result string with the strip character removed from
variable-length field) of the first argument. the string argument as specified by the strip func-
If an argument is DBCS-graphic, the second and tion.
third arguments must also be specified as The string argument can be a literal, a fixed or
DBCS-graphic characters, not bytes. variable-length character, hexadecimal, DBCS, or
If an expression is given for the second or third graphic field, or an expression which evaluates to a
arguments, the expression must be enclosed in fixed- or variable-length character, hexadecimal,
parentheses. DBCS, or graphic string.
If the expressions evaluate to variable-length The strip character must be a single character,
results, no validation of the range of these enclosed in apostrophes, with a data type compat-
expressions is guaranteed and errors may occur ible to the source string. The default is a single
during input/output processing. SBCS space for character data, DBCS-open, and
DBCS-either, a single DBCS space for DBCS-only
The maximum value allowed for the third argument
data, and a single graphic space for graphic data.
(length) is 32766 except for DBCS-graphic, which is
16383. However, if the third operand is represented The strip function can be one of three functions:
by an expression, this causes the result to be *LEAD Remove leading strip character(s)
variable-length. Thus, the value of the expression *TRAIL Remove trailing strip character(s)
cannot exceed 32740 except for DBCS-graphic, *BOTH Remove both leading and trailing strip
which cannot exceed 16370. character(s)
The user can omit the third argument. If the third The default strip function is *BOTH.
argument is not specified and the first argument is:
The return value is a variable-length string with the
Ÿ fixed-length, the default value for the third argu- same type, CCSID, and maximum length as the
ment is LENGTH(argument_1) - string argument. If the source string or strip char-
value_for_argument_2 + 1 acter is null, the result is null.
Ÿ variable-length, the default value for the third Example:
argument is the maximum of 0 and OPNQRYF
LENGTH(argument_1) - value_for_argument_2 FILE(library/file)
+1 QRYSLT('%STRIP(fld '.' \TRAIL) = 'Mr')
Ÿ variable-length with a length less than the value %SUBSTRING (string-field-name start-position length)
for argument_2, the default value for the third %SUBSTRING performs the same operation as
argument is zero and the result is the empty %SST. See the %SST description for more infor-
string. mation.

Chapter 2. OS/400 Command Descriptions P3-495


OPNQRYF

%SUM (numeric-argument) %TIMESTP (date/time-argument date/time-argument)


%SUM accepts a numeric argument and returns the %TIMESTP accepts one or two date/time arguments
sum of all the values for its argument in the group of and returns a timestamp.
records defined on the GRPFLD parameter and
Ÿ If only one date/time argument is specified, it
must be enclosed in parentheses. The argument
must be a timestamp (field or literal), or a char-
must be a field name or an expression (not a literal).
acter or hexadecimal field containing the
The following argument types are treated as external form of a timestamp.
numeric values: date duration, time duration, and
Ÿ If both arguments are specified,
timestamp duration. If no records are selected, the
result is the null value. Otherwise, 1. The first date/time argument must be a
date (field or literal), or a character or
Ÿ If the argument is floating-point number, the
hexadecimal field containing the external
returned value is a double-precision floating-
form of a date.
point number (*FLT8).
2. The second date/time argument must be a
Ÿ If the argument is a binary number with zero-
time (field or literal), or a character or
precision, the returned value is *BIN4.
hexadecimal field containing the external
Ÿ If the argument is a binary number with nonzero form of a time.
precision or a fixed-point number, the returned
The returned value is of type *TIMESTP.
value is a packed decimal number (*DEC) with
31 total digits and as many fractional digits as %USER
the argument. %USER does not support any arguments. It returns
the user profile name of the job in which the query
Ÿ If the argument is of type date duration, time
is running. The returned value is of type variable-
duration, or timestamp duration, the returned
length character (*VCHAR) with a maximum length
value is a double-precision floating-point
of 18.
number (*FLT8).
Example:
%SUM is an aggregate function that is used for a OPNQRYF
nongrouping field in a query that uses the grouping FILE(library/file)
function. QRYSLT('field = %USER')
%TAN (numeric-argument) %VAR (numeric-argument)
%TAN accepts a numeric argument and returns the %VAR accepts a numeric argument and returns the
tangent of the argument. The argument must be variance of its argument for the group of records
specified in radians. %TAN and %ATAN are defined by the GRPFLD parameter. The argument
inverse operations. must be a field name or an expression (not a literal).
The following argument types are treated as The following argument types are treated as
numeric values: date duration, time duration, and numeric values: date duration, time duration, and
timestamp duration. Arguments of these types can timestamp duration. If no records are selected, the
be specified either as fields or literal values. The result is the null value. Otherwise, the returned
return value is a double-precision floating-point value is a double-precision floating-point number
number (*FLT8). (*FLT8). %VAR is an aggregate function that is
%TANH (numeric-argument) used for a nongrouping field in a query that uses the
%TAN accepts a numeric argument and returns the grouping function.
hyperbolic tangent of the argument. The argument %XLATE (string-argument qualified-table)
must be specified in radians. %TANH and %XLATE accepts a character-string argument and
%ATANH are inverse operations. the name of a table object (*TBL), and returns a
The following argument types are treated as string that is the value of the first argument trans-
numeric values: date duration, time duration, and lated by using the contents of the table. The
timestamp duration. Arguments of these types can returned value is a string with the same length and
be specified either as fields or literal values. The CCSID as the first argument.
returned value is a double-precision floating-point The second argument must be a simple or qualified
number (*FLT8). table object name. If no library name is specified,
%TIME (date/time-argument) *LIBL is used to find the table.
%TIME accepts a date/time argument and returns a %XOR (string-argument...)
time. The date/time argument can be a time or %XOR accepts two or more character-string argu-
timestamp field, a character or hexadecimal field ments and returns a string that is the bit-wise 'XOR'
containing the external form of a time, or a time (logical exclusive or) of the arguments. This func-
literal. The returned value is of type *TIME. tion takes the first argument string, XORs it with the

P3-496 OS/400 CL Reference - Part 2 (Full Version)


OPNQRYF

next string, and then continues to XOR each suc- %VALUES (allowed-value...)
cessive argument with the previous result. If an %VALUES is used to identify a list of allowed values
argument is encountered that is longer than the pre- for a field or expression. %VALUES must be speci-
vious result, the previous result is padded with fied as the right side of a relation whose operator is
blanks before the XOR operation. If any of the equal. The allowed-value arguments must be char-
arguments is variable-length, the maximum length is acter string or numeric literals, to match the type of
used as the length of the argument. The final result the field or expression specified as the left side of
is a string of type *HEX with the same length as the the relation. For example, to select only records
longest argument. where the second character of field CHARFLD has
a value that is one of the values 'A', 'E', 'I', 'O', or
%YEAR
'U', specify the following:
%YEAR accepts a date/time argument and returns
the year part of the value. The date/time argument '%SST(charfld 2 1) =
can be a date or timestamp field, a date duration or %VALUES(''A'' ''E'' ''I'' ''O'' ''U'')'
timestamp duration (field or literal), or a numeric %WLDCRD (''pattern-string'' ''wild-characters''])
field or literal. The returned value is of type *BIN4. %WLDCRD is used to specify a pattern that per-
A numeric field argument must be defined as forms a wildcard scan of the character or
packed decimal (*DEC) with 8 digits and 0 precision hexadecimal field or string expression (except for
for date duration or packed decimal (*DEC) with 20 expressions made up of a single character-string
digits and 6 precision for timestamp duration. A literal) that must be specified as the left side of the
numeric constant argument must have 8 digits fol- relation. %WLDCRD must be specified as the right
lowed by a decimal point, or 14 digits followed by a side of a relation whose operator is equal. The
decimal point and 6 digits. pattern-string argument must be a character-string,
DBCS, or graphic literal, to match the left side of the
Restricted Built-in Functions relation. The wild-characters argument is an
optional parameter that specifies what 'wildcard'
The following built-in function is supported only as the characters are used in the pattern-string.
second operand of the 'equal' or 'not-equal' relational opera-
tors specified on the QRYSLT or GRPSLT parameter. If specified for character data only (no DBCS data),
the wild-characters argument must be a character-
%NULL string literal of exactly two characters. The first
%NULL accepts no arguments. It is used to select character is the value that matches any single char-
or omit records based on whether or not a field in acter in the search string. The second character is
the record contains a null value. the value that matches a substring of any zero or
Example: more characters. The two characters must not be
OPNQRYF the same, but there is no requirement that either
FILE(library/file) character appear in the pattern-string. If the wild-
QRYSLT('charfld = %NULL') characters argument is omitted, the default is for an
This query would select all the records where underline ('_') to match any single character and an
'charfld' contains the null value. asterisk ('*') to match a substring of any zero or
more characters.
The following three built-in functions are supported only as If the wild-characters argument is specified for
the second operand of the 'equal' relational operator speci- DBCS data only (no character data), the argument
fied on the QRYSLT or GRPSLT parameter. must be a double-byte character-string literal of
%RANGE (low-value high-value) exactly two double-byte characters. The first
%RANGE is used to identify the lower and upper double-byte character is the value that will match
boundaries for the value of a field or expression. any one double-byte character in the search string.
%RANGE must be specified as the right side of a The second double-byte character is the value that
relation whose operator is equal. The low-value and will match a substring of any zero or more charac-
high-value argument must be field names, character ters. The two double-byte characters must not be
strings, or numeric literals, to match the type of field the same, but there is no requirement that either
or expression specified as left side of the relation. character appear in the pattern string. If the wild-
For example, to select only records where the characters argument is omitted, the default is for a
numeric field NBRFLD has a value ranging from 10 DBCS underline to match any one double-byte char-
through 20, specify: acter and a DBCS asterisk to match a substring of
'nbrfld = %RANGE(1ð 2ð)' any zero or more double-byte characters.

If the low-value argument is greater than the high- If the wild-characters argument is specified for both
value argument, the relation produces a logical character and DBCS data, in addition to the pre-
value of 'false'. vious rules, the argument must first contain a single-
byte character-string literal (two single-byte

Chapter 2. OS/400 Command Descriptions P3-497


OPNQRYF

characters), then a double-byte character string (two Note: The asterisks at the start and end of the
double-byte characters). pattern-string are required to allow the 'T'
and 'E' to appear somewhere other than the
In this case, the first character matches any single-
first and last positions in the field:
byte character in the character string, the second
character matches a substring of any number of To select only records where the character field
single-byte or double-byte characters. The first CHARFLD starts with the string 'ABC', followed by
double-byte character matches any double-byte one or more other characters and then followed by
character in the character string. The second the string 'XYZ' (but not necessarily at the end of
double-byte character matches a substring of any the field), specify the following:
number of single-byte or double-byte characters. 'charfld = %WLDCRD(''ABC_\XYZ\'')'
The following example selects only records where To select only records where the second character
the character field CHARFLD contains a 'T', followed of field CHARFLD is an asterisk ('*'), the last char-
by any two characters and an 'E', appearing any- acter is an underline ('_'), and the letter 'M' appears
where in the field. somewhere in between, specify the following:
'charfld = %WLDCRD(''\T__E\'')' 'charfld = %WLDCRD(''#\.M._'' ''#.'')'

P3-498 OS/400 CL Reference - Part 2 (Full Version)


OVRDBF

OVRDBF (Override with Database File) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──OVRDBF──FILE(──overridden-file-name──)──┬───────────────────────────────────────────────────────┬───────────────────────────5
│ ┌─\FILE─────────────────────────────────┐ │
│ │ ┌─\LIBL/────────┐ │ │
└─TOFILE(──┴─┼───────────────┼──database-file-name─┴──)─┘
├─\CURLIB/──────┤
└─library-name/─┘
(P) ──┬───────────────────────────────────────────────────────────────────────────────┬───────────5
5──┬──────────────────────────┬───
└─MBR(──┬─\FIRST──────┬──)─┘ └─POSITION(──┬─\NONE───────────────────────────────────────────────────────┬──)─┘
├─\LAST───────┤ ├─\START──────────────────────────────────────────────────────┤
├─\ALL────────┤ ├─\END────────────────────────────────────────────────────────┤
└─member-name─┘ ├─\RRN──relative-record-number────────────────────────────────┤
└─┬─\KEYB──┬──number-of-fields──record-format-name──key-value─┘
├─\KEYBE─┤
├─\KEY───┤
├─\KEYAE─┤
└─\KEYA──┘
5──┬─────────────────────────────────────────────────────────────┬──────────────────────────────────────────────────────────────5
│ ┌──
───────────────────────────────────────┐ │
└─RCDFMTLCK(───6─(──record-format-name──┬─\SHRRD──┬──)─┴───
(1) ──)─┘
├─\SHRNUP─┤
├─\SHRUPD─┤
├─\EXCLRD─┤
└─\EXCL───┘
5──┬───────────────────────────────────────────────────────────┬──┬─────────────────────────────────────────────┬───────────────5
└─FRCRATIO(──┬─\NONE───────────────────────────────────┬──)─┘ │ ┌─\LIBL/────────┐ │
└─number-of-write-operations-before-force─┘ └─FMTSLR(──┼───────────────┼──program-name──)─┘
├─\CURLIB/──────┤
└─library-name/─┘
5──┬─────────────────────────────────────┬──┬────────────────────────────────────┬──┬────────────────────────────────┬──────────5
└─WAITFILE(──┬─\IMMED────────────┬──)─┘ └─WAITRCD(──┬─\IMMED────────────┬──)─┘ └─NBRRCDS(──number-of-records──)─┘
├─\CLS──────────────┤ ├─\NOMAX────────────┤
└─number-of-seconds─┘ └─number-of-seconds─┘
5──┬───────────────────────────────────┬──┬─────────────────┬──┬──────────────────────┬──┬──────────────────────┬───────────────5
└─EOFDLY(──┬─\NONE─────────────┬──)─┘ └─LVLCHK(──\NO──)─┘ └─EXPCHK(──┬─\YES─┬──)─┘ └─INHWRT(──┬─\YES─┬──)─┘
└─number-of-seconds─┘ └─\NO──┘ └─\NO──┘
5──┬──────────────────────┬──┬──────────────────────────────┬──┬─────────────────────┬──┬──────────────────────────────┬────────5
│ ┌─\NO──┐ │ │ ┌─\ACTGRPDFN─┐ │ └─SHARE(──┬─\NO──┬──)─┘ └─OPNSCOPE(──┬─\ACTGRPDFN─┬──)─┘
└─SECURE(──┴─\YES─┴──)─┘ └─OVRSCOPE(──┼─\CALLLVL───┼──)─┘ └─\YES─┘ └─\JOB───────┘
└─\JOB───────┘
5──┬────────────────────────────────────────┬──┬────────────────────────────┬──────────────────────────────────────────────────5%
└─SEQONLY(──┬─\NO───────────────────┬──)─┘ └─DSTDTA(──┬─\BUFFERED──┬──)─┘
├─\YES──────────────────┤ ├─\PROTECTED─┤
└─┬───────────────────┬─┘ └─\CURRENT───┘
└─number-of-records─┘
Notes:
P All parameters preceding this point can be specified in positional form.

1 A maximum of 32 repetitions

Purpose physical files, logical files, and distributed data management


(DDM) files.
The Override with Database File (OVRDBF) command is
used to: To override (replace) a file named in the program, specify the
name of that file in the FILE parameter, and specify the
Ÿ Override (replace) the file named in the program
name of the file that overrides it (the file to be processed by
Ÿ Override certain parameters of a file that are used by the the program) in the TOFILE parameter. The other parame-
program ters of this command can be used to override parameter
Ÿ Override the file named in the program and override values contained in the file description of the overriding file.
certain parameters of the file processed
To override only certain parameters of the file named in the
Parameters overridden by this command are specified in the program, instead of replacing the entire file, specify the name
file description, in the program, or in other previously issued of the file in the FILE parameter and specify the *FILE value
file override commands. The OVRDBF command applies to for the TOFILE parameter. Then use the other parameters
of this command to override specific parameters of the file.

Chapter 2. OS/400 Command Descriptions P3-499


OVRDBF

Parameters that are not specified do not affect parameters *LAST: The last member of the specified physical file is
specified in the file description, in the program, or in other used.
previously issued file override commands.
*ALL: All members in the file are processed sequen-
Note: The override cannot be used for all commands. A list tially. All members are opened with the same override
of the commands that cannot be overridden, along parameters as the first member. While overrides issued
with more information on overriding files is in the prior to the open operation of the first member are pro-
Data Management book. cessed, overrides or delete overrides issued following
the open operation of the first member are not pro-
Note: To see the parameter and value descriptions for this
cessed. EOFDLY, FMTSLR, INHWRT, or the POSI-
command, refer to the online help text. For more
TION parameter cannot be specified if MBR(*ALL) has
information about printing the help text, refer to
been specified on a previously issued OVRDBF
“Printing CL Command Descriptions” in Chapter 1.
command that is still in effect for this file. An escape
message is sent if any of the mutually exclusive parame-
Required Parameter ters are specified.
FILE member-name: Specify the member name that over-
Specifies the name of the file being used by the program rides (at file open time) the member name specified in
to which this override command is applied. If the using program, or in other called OVRDBF com-
TOFILE(*FILE) is specified, a display device file must be mands. If the member name is not specified, and a
specified. Otherwise, any device file or database file TOFILE parameter other than *FILE has been specified,
can be specified. the first member in the file is used.

POSITION
Optional Parameters Specifies the starting position for retrieving records from
the database file. The first record to get can be at the
TOFILE beginning (*START) or at the end (*END) of the file, the
Specifies the qualified name of the database file that is nth record in the file (*RRN), or the record indicated by a
used instead of the file specified in the FILE parameter key field value and one of the key-search values (*KEY,
or, if *FILE is specified, specifies that certain attributes *KEYA, *KEYAE, *KEYB, or *KEYBE). This parameter
are overridden by parameters specified in this command. overrides the value specified in the program, or in other
The parameters specified on this OVRDBF command called OVRDBF commands.
override the same parameters specified in the database
file, in the program, or in other previously issued Note: This parameter cannot be specified if MBR(*ALL)
OVRDBF commands. was specified in a previously issued OVRDBF
command that is still in effect for this file.
*FILE: The database file named in the FILE parameter
has some of its parameters overridden by values speci- *NONE: No special positioning is required. The first I/O
fied in this command. operation indicates the record that is retrieved.

The name of the database file can be qualified by one of *START: The starting position is the first record in the
the following library values: file. If a read-previous is specified in the program, an
end-of-file condition occurs.
*LIBL: All libraries in the job's library list are
*END: The starting position is the last record in the file.
searched until the first match is found.
When the next record is retrieved, an end-of-file condi-
*CURLIB: The current library for the job is tion is reached. If a read previous is requested, the last
searched. If no library is specified as the current record of the file is retrieved.
library for the job, the QGPL library is used.
Element 1: Relative Record Number
library-name: Specify the name of the library to be
*RRN relative-record-number: Specify the number of the
searched.
relative record (its position from the beginning of the
database-file-name: Specify the name of the database file), preceded by the value *RRN, that is retrieved first.
file that is used instead of the file specified in the FILE For example, POSITION(*RRN 480) specifies that record
parameter. number 480 is retrieved next. If a read-previous is
requested, the 479th record in the file is retrieved.
MBR
Specifies the members used within the database file. Element 2: Key-Search Values
This parameter is not valid for DDM files that reference The first record that is retrieved is identified by the speci-
remote systems other than the System/38 or the AS/400 fied key-operation, number-of-fields, record-format-name,
system. and key-value. If a record that matches these values
*FIRST: The first member in the database file is used. does not exist, an error message is sent.
Specify one of the following key-search types:

P3-500 OS/400 CL Reference - Part 2 (Full Version)


OVRDBF

*KEYB (key-before): A record that precedes the record If a key is specified that contains more than one field,
identified by the remaining search values (number-of- the key must be coded to match the definition of the key
fields, record-format-name, and key-value) is the first in the file. If the definition is for a key other than a char-
record retrieved. acter or signed decimal key, the key must be coded in
hexadecimal form.
*KEYBE (key-before or equal): The record identified by
the search values is the first record retrieved. If no For example, suppose the key definition has the fol-
record matches those values, the record is selected that lowing key fields:
matches the largest previous value.
Ÿ Character field (6A)
*KEY (key-equal): The record identified by the search
Ÿ Packed numeric field (5P 2)
values is the first record retrieved. If a read-previous is
specified in the program, the preceding record is Ÿ Signed numeric field (2S 0)
retrieved.
A character string the length of the entire key (6+3+2 in
*KEYAE (key-after or equal): The record identified by this example) can be specified on the POSITION param-
the search values is the first record retrieved. If no eter. POSITION(*KEY 3 YOURFMT
records matches those values, the record is selected X'E6D9C5D5C3C812345FF9F9') specifies that the
with the next highest value. system searches for the record in format YOURFMT, a
*KEYA (key-after): A record that follows the record key containing three fields is used in the search, and the
identified by the remaining search values (number-of- record contains the hexadecimal value
fields, record-format-name, and key-value) is the first E6D9C5D5C3C812345FF9F9. The hexadecimal value
record retrieved. corresponds to the following desired key values:

Specify the remaining search values as follows: Ÿ Hexadecimal value E6D9C5D5C3C8 corresponds to
the character field key value WRENCH.
Element 3: Number of Fields
number-of-fields: Specify the number of key fields to Ÿ Hexadecimal value 12345F corresponds to the
use in the search. The number of fields specified in this packed numeric field value +123.45.
parameter does not have to be the same as the actual Ÿ Hexadecimal value F9F9 corresponds to the signed
number of fields in each key for the file. For example, if numeric field value 99.
POSITION(*KEY 1 FMT1 A) is specified, the first record
in the file format FMT1 that has a first key field value of The Distributed Data Management book has more infor-
mation on the effects of using the POSITION parameter
A is retrieved. If a number of fields of zero are speci-
with DDM files.
fied, the search is based on all key fields. If zero is
used, the key value contains the maximum key size. RCDFMTLCK
Element 4: Name of Record Format Specifies the lock state of the named record format while
it is used by the program. The lock state indicates how
record-format-name: Specify the name of the record the data associated with each format is locked. The fol-
format in the database file that contains the key value
lowing chart shows the lock states that are specified for
specified. If no record format name is specified (*N), all
each record format and the operations allowed to other
record formats are searched for the first record that
programs when the lock is in effect:
matches the other search values.
Lock Definition Other Program Operations
Element 5: Key Value State
key-value: Specify the first record retrieved. This value *SHRRD Shared read Read and update allowed
is specified as a quoted character string for character or *SHRNUP Shared read, no Read allowed, update not allowed
positive zoned decimal formats, or is specified in update
hexadecimal form at (x'value'). You can specify up to *SHRUPD Shared update Read and update allowed
2000 characters in the character string. *EXCLRD Exclusive allow read Read allowed, update not allowed
For example, POSITION(*KEY 1 FMT2 X'123F') speci- *EXCL Exclusive no read Neither read nor update allowed
fies that the system searches for a record from the
record format FMT2, that a single key field is used in the An explanation of each lock state is in the CL Program-
search (even though the key value may have more key ming book.
fields), and that the record contains the hexadecimal
For each record format, specify the record format name
value 123F (the hexadecimal equivalent of packed
followed by one lock state value. This parameter over-
decimal value 123).
rides the record format locks specified in the program, in
POSITION(*KEYB 0 *N X'123F') specifies that a record other called OVRDBF commands, and the default locks
of any format is retrieved next (its key value must established when the member was created. If the lock
precede the record identified by key value X'123F'). state specified for the file in an Allocate Object
(ALCOBJ) command is more restrictive than the lock

Chapter 2. OS/400 Command Descriptions P3-501


OVRDBF

state specified in this parameter, this parameter is cated when the file is opened. If those resources are
ignored. Therefore, this parameter can only impose a not allocated within the specified wait time, an error
more restrictive lock state on a record format than that message is sent to the program.
specified for the file.
This parameter overrides the wait time specified in the
FRCRATIO database file, in the program, or in other previously
Specifies the number of insert, delete, or update oper- issued OVRDBF commands. More information on this
ations that can occur on records before they are forced parameter is in Appendix A, “Expanded Parameter
into auxiliary (permanent) storage. More information on Descriptions.”
this parameter is in Appendix A, “Expanded Parameter *IMMED: The program does not wait; when the file is
Descriptions.” More information on journal management opened, an immediate allocation of the file resources is
is in the Backup and Recovery book. required.
This parameter overrides the force-write ratio specified in *CLS: The job default wait time is used as the wait time
the database file, in the program, or in other previously for the file resources being allocated.
issued OVRDBF commands.
number-of-seconds: Specify the number of seconds that
*NONE: There is no force write ratio; the system deter- the program waits for the file resources to be allocated.
mines when the records are written to auxiliary storage. Valid values range from 1 through 32767 seconds.
number-of-write-operations-before-force: Specify the WAITRCD
number of operations. If a physical file associated with
Specifies the number of seconds that a program waits
this database file is journaled, specify a larger force-write
for a record to be updated or deleted, or for a record
ratio.
read in the commitment control environment with
FMTSLR LCKLVL(*ALL) specified. More information on record
Specifies the qualified name of a record format selection locking is in the DB2 for AS/400 Database Programming
program that is called when a logical file member con- book. If the record is not allocated in the specified wait
tains more than one logical record format. The user- time, an error message is sent to the program.
written selector program is called when a record is Note: This parameter overrides the record wait time
inserted into the database file and a record format name specified in the database file, specified in the
is not specified in the high-level language program. program, or in other previously issued OVRDBF
More information about the use of format selector pro- commands. The minimum delay for DDM files is
grams is in the DB2 for AS/400 Database Programming 60 seconds. This value may need to be longer
book. This parameter overrides the value specified in than the delay specified for local database files.
the database file and in other previously issued
*IMMED: The program does not wait; when a record is
OVRDBF commands.
locked, an immediate allocation of the record is required.
A program specified as the format selector program
*NOMAX: There is no disconnect limit.
cannot be created with USRPRF(*OWNER) specified in
the Create CL Program (CRTCLPGM) command. number-of-seconds: Specify the number of seconds that
the program waits for the record lock. Valid values
Note: This parameter cannot be specified if MBR(*ALL)
range from 1 through 32767 seconds.
was specified in a previously issued OVRDBF
command that is still in effect for this file. NBRRCDS
The name of the program can be qualified by one of the Specifies the number of records moved as a unit from
following library values: auxiliary storage to main storage. (The amount of data
actually moved is equal to the number of records multi-
*LIBL: All libraries in the job's library list are plied by the physical record length, not the logical record
searched until the first match is found. length.) Valid values range from 1 through 32767
*CURLIB: The current library for the job is records. The NBRRCDS parameter is valid for sequen-
searched. If no library is specified as the current tial or random processing and is specified only when the
library for the job, the QGPL library is used. data records are physically located in auxiliary storage in
the sequence in which they are processed. This param-
library-name: Specify the name of the library to be eter overrides the number of records value specified in
searched.
the program, or in other previously issued OVRDBF
program-name: Specify the name of a record format commands.
selection program called when a logical file member con-
EOFDLY
tains more than one logical record format.
Specifies the number of seconds to delay when the end-
WAITFILE of-file is reached before trying to retrieve additional
Specifies the number of seconds that the program waits records. This delay allows other jobs to add records to
for the file resources and session resources to be allo- the file, and have the new records processed without
having to restart the job. When the delay time ends, the

P3-502 OS/400 CL Reference - Part 2 (Full Version)


OVRDBF

job is made active, and the database determines *NO: The level identifiers are not checked when the file
whether new records were added. If no new records is opened.
were added, the job waits for another time delay without
EXPCHK
informing the application program. When a number of
Specifies whether the expiration date of the named
seconds is specified, no end-of-file condition occurs on
member is checked. This date check is valid only on a
the given database file until an End Job (ENDJOB)
physical file member. This parameter overrides the
command or forced end of data (FEOD) occurs.
value specified in the program, or in other called
Note: This parameter cannot be specified if MBR(*ALL) OVRDBF commands.
was specified on a previously issued OVRDBF
*YES: The expiration date of the physical file member is
command that is still in effect for this file.
checked. If the current date is later than the expiration
There are several ways to end a job that is waiting for date, an error message is sent to the job, where it is
records due to an EOFDLY. They are: monitored. An escape message is sent to the program.
Ÿ Write a record to the specified file which is recog- *NO: The expiration date is not checked.
nized by the application program as a last record.
INHWRT
The application program may then do a force end of
Specifies whether the processed records are written,
data (FEOD) to start the end-of-file processing or
deleted, or changed in the database file. This parameter
close the file.
tests a program without storing the processed records
Ÿ End the job using the controlled value (ENDJOB back in the database. This parameter overrides the
OPTION(*CNTRLD)) with a delay time greater than INHWRT parameter in other previously issued OVRDBF
the time specified on the EOFDLY time. The commands.
DELAY parameter time specified must allow for the
Note: This parameter cannot be specified if MBR(*ALL)
EOFDLY time to run out, plus time to process any
was specified on a previously issued OVRDBF
new records that may have been added to the file,
command that is still in effect for this file.
and any end-of-file processing that is done in the
user's application. The end-of-file is set by data- *YES: Processed records are prevented from being
base, and a normal end-of-file condition occurs after written into the database; they are written only to an
new records are retrieved. output device.
Ÿ End the job immediately (ENDJOB *NO: All new and changed processed records are
OPTION(*IMMED)). written into the database, unless the program is in debug
mode with UPDPROD(*NO) specified, and the file is in a
Ÿ If the job is interactive, start a system request and
production library. In that case, an escape message is
end the previous request.
sent to the program.
*NONE: Normal end-of-file processing is done.
SECURE
number-of-seconds: Specify the number of seconds that Specifies whether this file is safe from the effects of pre-
the program waits between each attempt to get a record viously called file override commands. If SECURE is not
when an end-of-file condition occurs. No end-of-file con- specified, processing occurs as if SECURE(*NO) is
dition is signaled until end of data is forced, or the job is specified.
ended with the *CNTRLD option. Valid values range
*NO: This file is not protected from the effects of other
from 1 through 99999 seconds.
file overrides; its values can be overridden by the effects
LVLCHK of previously called file override commands.
Specifies whether the record format level identifiers in
*YES: This file is protected from the effects of any file
the program are checked against those in the device file
override commands previously called.
when the file is opened. If so, the record format identi-
fiers in the program must match those in the device file. OVRSCOPE
Because the same record format name can exist in more Specifies the extent of influence (scope) of the override.
than one file, each record format is given an internal
*ACTGRPDFN: The scope of the override is determined
system identifier when it is created.
by the activation group of the program that calls this
Note: This parameter overrides the value specified in command. When the activation group is the default acti-
the database file, in the program, or in other pre- vation group, the scope equals the call level of the
viously issued OVRDBF commands issued in this calling program. When the activation group is not the
or the following call level. Level checking cannot default activation group, the scope equals the activation
be done unless the program contains the record group of the calling program.
format identifiers. This command cannot over-
*CALLLVL: The scope of the override is determined by
ride level checking from *NO to *YES.
the current call level. All open operations done at a call
level that is the same as or higher than the current call
level are influenced by this override.

Chapter 2. OS/400 Command Descriptions P3-503


OVRDBF

*JOB: The scope of the override is the job in which the output files, sequential-only processing is valid for phys-
override occurs. ical file members and for logical file members that are
based on one physical file member only.
SHARE
Specifies whether the open data path (ODP) for the If SEQONLY(*YES) is specified, and any of the following
database file member is shared with other programs in conditions are true, the SEQONLY parameter is ignored
the routing step. When an ODP is shared, the programs and a message is issued.
accessing the file share facilities such as the file status
Ÿ The program opened the member for output only
and the buffer.
and SEQONLY(*YES) is specified with the default
More information on shared database files is in the DB2 number of records, and the member opened is
for AS/400 Database Programming book. either a logical member, a unique keyed physical
member, or other access paths are built over the
*NO: The ODP created by the program with this attri-
physical member.
bute is not shared with other programs in the routing
step. Every time a program opens the file with this attri- Ÿ The program opened the member for other than
bute, a new ODP to the file is created and activated. input or output.
Note: This includes several opens in the same Ÿ The member opened by the program for output is
program. based on many other members.
*YES: The ODP created with this attribute is shared Ÿ The record length plus the feedback area sum
with each program in the routing step that also specifies exceeded 32,767 bytes.
SHARE(*YES) when it opens the file.
Note: Unpredictable results occur when this parameter
Note: When SHARE(*YES) is specified and control is is used for alternate index files for DDM on a
passed to a program, a read operation in that system other than an AS/400 system.
program retrieves the next input record. A write
*NO: The database file is not restricted to sequential-
operation produces the next output record.
only processing.
OPNSCOPE
*YES: The database file uses sequential-only pro-
Specifies the extent of influence (scope) of the open
cessing. A default value for the number of records
operation.
transferred as a group is determined by the system
*ACTGRPDFN: The scope of the open operation is based on how the file is used, the type of access path
determined by the activation group of the program that involved, and the file's record length:
called the OVRDBF command processing program. If
the activation group is the default activation group, the Ÿ The default is approximately the number of records
scope is the call level of the caller. If the activation that fit in an internal buffer of 4K for:
group is a non-default activation group, the scope is the – All database files opened for input only
activation group of the caller.
– Physical files opened for output that are only
*JOB: The scope of the open operation is the job in processed in either arrival sequence or in non-
which the open operation occurs. unique keyed sequence and that have no
logical file members based on them
SEQONLY
Specifies, for database files whose records are pro- Ÿ The default is 1 record for:
cessed in sequential order only, whether sequential-only – All logical files opened for output only
processing is used on the file. This parameter also
specifies the number of records transferred as a group – Physical files opened for output only that either
to or from the database, if sequential-only processing is have unique keyed sequence access paths or
have at least one dependent logical file with a
used. If a number is not specified, a default number is
keyed sequence access path that does not
determined by the system. This parameter is used to
share the access path of the keyed physical file
improve the performance of programs that process data-
member
base files in a sequential manner. This parameter over-
rides the value specified in the program or in other number-of-records: Specify *YES followed by a value
previously issued OVRDBF commands. (ranging from 1 through 32767) for the number of
For files opened for input only in a program, the speci- records transferred between the database and the
fied number of records is transferred as a group from the internal buffer. The user must ensure that the buffer
database to an internal data management buffer. size specified is always available to the program in the
storage pool in which the program is running. The file
For files opened for output only in a program, a group of
uses sequential-only processing.
records is transferred to the database whenever the
internal data management buffer receives the specified While records are in the internal data management
number of processed records from the program. For buffer, other jobs can make changes to the same

P3-504 OS/400 CL Reference - Part 2 (Full Version)


OVRDBF

records in the database, and the program performing OVRDBF FILE(ORDERSIN) SHARE(\YES)
sequential-only input processing does not see the
updates. To ensure that no other updating is done to This command overrides the share specification for the file
records while they are in the buffer, the Allocate Object ORDERSIN. Because of this override, any subsequent
(ALCOBJ) command can be used in the program to opens of this file within the routing step share the ODP for
specify either an *EXCLRD or an *EXCL lock on the file. the file.

If a program performs sequential-only output processing Example 3: Overriding a File, Member and Lock State
and does not handle output errors (such as duplicate
OVRDBF FILE(INPUT) TOFILE(PAYROLL) MBR(MBR1)
keys and conversion mapping errors) that may occur
RCDFMTLCK((EMPDATA \EXCL))
when the records in the buffer are written to the data-
base, records in the buffer after the first record in error This command overrides the file, the member, and the lock
are not written. state of the record format EMPDATA. The override will
If the file is opened for output and the value specified in cause the following to occur when the file INPUT is opened:
this parameter is not the same as the force write ratio Ÿ The file PAYROLL will be processed instead of the file
specified for the file, the value used by the system is the INPUT.
smaller of the two; a message stating which value is
changed is sent to the user. Ÿ The member MBR1 will be processed instead of the pre-
viously specified member.
When processing SEQONLY(*YES) for writing records
into a database file, feedback information for each Ÿ The lock *EXCL will be placed on record format
record (such as relative record number) is not always EMPDATA instead of the existing lock. (*EXCL prevents
changed. If such feedback information is important, another program from using the record format while the
specify SEQONLY(*NO) or SEQONLY(*YES 1). override is in effect.)

More information on sequence-only database files is in


the DB2 for AS/400 Database Programming book. Additional Considerations
DSTDTA The following characteristics apply to the processing of DDM
Specifies the data retrieval method used for a distributed files on the OVRDBF command.
file. This parameter has no effect if used against a non-
Ÿ All parameters are processed normally when the target
distributed file. Other parameters, such as SEQONLY,
system is an AS/400 system.
still affect how the data is retrieved from each system,
and this parameter controls how all the data is managed Ÿ When the target system is not an AS/400 system:
when accessing a distributed file. This parameter over- – The following parameters are still valid:
rides the distributed file data retrieval method selected
by the system, or specified in other previously issued EXPCHK POSITION SEQONLY WAITFILE
OVRDBF commands. INHWRT RCDFMTLCK SHARE WAITRCD
LVLCHK SECURE TOFILE
*BUFFERED: In order to achieve the best performance,
data from the remote system and the local system may – The FMTSLR parameter, if specified, causes an
be kept in a buffer until retrieved by the user. error when the file opened is a DDM file.
*PROTECTED: Data can be buffered, but the file is – The FRCRATIO and NBRRCDS parameters, if
locked to prevent updates by other jobs. This will give specified, are ignored.
the same performance as *BUFFERED, but guarantees
– The RCDFMTLCK parameter, if specified, is valid
current data. While one job is using this option, other
only if both of the following are true of the remote
jobs will not be able to update the data in the file.
file used: (1) Only one type of lock state is
*CURRENT: Data is not buffered. This option results in requested for the remote file, and (2) the record
fully live data, with maximum concurrency, but without format name in the remote file must be the same as
optimal performance. the name of the distributed data management file.
– The TOFILE parameter is always processed on the
Examples source system. When a DDM file name is specified
on this parameter, the program uses the associated
Example 1: Overriding An Existing Member remote file instead of the local database file speci-
OVRDBF FILE(ORDERSIN) MBR(MONDAY) fied in the program.
– The WAITFILE and WAITRCD parameters have no
This command overrides the existing member with member
effect on remote file processing.
MONDAY. With the override in effect, the member MONDAY
will be processed when the file ORDERSIN is opened. The Distributed Data Management book has examples of
how file overrides are applied in DDM.
Example 2: Overriding a Share Specification

Chapter 2. OS/400 Command Descriptions P3-505


OVRDKTF

OVRDKTF (Override with Diskette File) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──OVRDKTF──FILE(──overridden-file-name──)──┬──────────────────────────────────────────────────────────────┬───────────────────5
│ ┌─\FILE────────────────────────────────────────┐ │
│ │ ┌─\LIBL/────────┐ │ │
└─TOFILE(──┴─┼───────────────┼──diskette-device-file-name─┴──)─┘
├─\CURLIB/──────┤
└─library-name/─┘
(P) ──┬───────────────────────────────────────┬──┬────────────────────────────┬───────────────────────5
5──┬──────────────────────┬───
└─DEV(──device-name──)─┘ └─VOL(──┬─\NONE────────────────────┬──)─┘ └─LABEL(──data-file-label──)─┘
│ ┌──
───────────────────┐ │
└──6─volume-identifier─┴───
(1) ─┘

5──┬──────────────────────────┬──┬───────────────────────┬──┬────────────────────────────────┬──────────────────────────────────5
└─EXCHTYPE(──┬─\STD───┬──)─┘ └─CODE(──┬─\EBCDIC─┬──)─┘ └─CRTDATE(──┬─\NONE─────────┬──)─┘
├─\BASIC─┤ └─\ASCII──┘ └─creation-date─┘
├─\H─────┤
└─\I─────┘
5──┬──────────────────────────────────┬──┬─────────────────────┬──┬────────────────────────────────────────────────┬────────────5
└─EXPDATE(──┬─\NONE───────────┬──)─┘ └─SPOOL(──┬─\NO──┬──)─┘ │ ┌─\LIBL/────────┐ │
├─\PERM───────────┤ └─\YES─┘ └─OUTQ(──┼───────────────┼──output-queue-name──)─┘
└─expiration-date─┘ ├─\CURLIB/──────┤
└─library-name/─┘
5──┬──────────────────────────────────┬──┬────────────────────────────┬──┬────────────────────┬──┬────────────────────┬─────────5
└─MAXRCDS(──┬─\NOMAX──────────┬──)─┘ └─SCHEDULE(──┬─\JOBEND──┬──)─┘ └─HOLD(──┬─\NO──┬──)─┘ └─SAVE(──┬─\NO──┬──)─┘
└─maximum-records─┘ ├─\FILEEND─┤ └─\YES─┘ └─\YES─┘
└─\IMMED───┘
5──┬─────────────────────────────────┬──┬───────────────────────────┬──┬──────────────────────┬─────────────────────────────────5
└─OUTPTY(──┬─\JOB────────────┬──)─┘ └─USRDTA(──┬─\BLANK────┬──)─┘ └─IGCDTA(──┬─\NO──┬──)─┘
└─output-priority─┘ └─user-data─┘ └─\YES─┘
5──┬─────────────────────────────────────┬──┬──────────────────────┬──┬──────────────────────────────┬──────────────────────────5
└─WAITFILE(──┬─\IMMED────────────┬──)─┘ │ ┌─\NO──┐ │ │ ┌─\ACTGRPDFN─┐ │
├─\CLS──────────────┤ └─SECURE(──┴─\YES─┴──)─┘ └─OVRSCOPE(──┼─\CALLLVL───┼──)─┘
└─number-of-seconds─┘ └─\JOB───────┘
5──┬─────────────────────┬──┬──────────────────────────────┬───────────────────────────────────────────────────────────────────5%
└─SHARE(──┬─\NO──┬──)─┘ └─OPNSCOPE(──┬─\ACTGRPDFN─┬──)─┘
└─\YES─┘ └─\JOB───────┘
Notes:
P All parameters preceding this point can be specified in positional form.

1 A maximum of 50 repetitions

Purpose are not specified do not affect parameters specified in the file
description, in the program, or in other called file override
The Override with Diskette File (OVRDKTF) command is commands.
used to (1) override (replace) the file named in the program,
(2) override certain parameters of a file that is used by the More information on overriding files is in the Data Manage-
program, or (3) override the file named in the program and ment book, the Application Display Programming book, and
override certain parameters of the file processed. the Printer Device Programming book.
Note: To see the parameter and value descriptions for this
Parameters overridden by this command are specified in the
command, refer to the online help text. For more
file description, in the program, or in other called file override
information about printing the help text, refer to
commands. If a file named in the program is overridden, the
“Printing CL Command Descriptions” in Chapter 1.
name of that file is specified in the FILE parameter and the
name of the overriding file (the file processed) is specified in
the TOFILE parameter. The OVRDKTF command also spec- Required Parameter
ifies parameters to override values contained in the file
description of the overriding file. If the file named in the FILE
program is not replaced but certain parameters of the file are Specifies the name of the file being used by the program
overridden, the name of the file is specified in the FILE to which this override command is applied. If
parameter and *FILE is specified in the TOFILE parameter. TOFILE(*FILE) is specified, a display device file must be
The parameters overridden are then specified by the other specified. Otherwise, any device file or database file
parameters of the OVRDKTF command. Parameters that can be specified.

P3-506 OS/400 CL Reference - Part 2 (Full Version)


OVRDKTF

Optional Parameters *NONE: The diskette volume identifiers are not speci-
fied for this file in this command. They can be specified
TOFILE later before the device file is opened, either in a Over-
Specifies the qualified name of the diskette file that is ride with Diskette File (OVRDKTF) command or a
used instead of the file specified in the FILE parameter Change Diskette File (CHGDKTF) command, or in the
or, if *FILE is specified, specifies that certain attributes high-level language program. Otherwise, no volume
are overridden by parameters specified in this command. identifier checking is done.
The parameters specified in this OVRDKTF command
volume-identifier: Specify the identifiers of one or more
override the same parameters specified in the diskette
volumes in the order in which they are put on the device
device file in the program, or in other called OVRDKTF
and used. Each volume identifier contains a maximum
commands.
of 6 alphanumeric characters. A blank is used as a sep-
*FILE: The diskette device file named in the FILE arator character when listing multiple identifiers.
parameter has some of its parameters overridden by
values specified in this command. LABEL
Specifies the data file label of the data file on diskette
The name of the diskette file can be qualified by one of that is used with this diskette device file. For input files
the following library values: (diskette input to system), this label specifies the identi-
*LIBL: All libraries in the job's library list are fier of the file that exists on the diskette. For output files
searched until the first match is found. (system output to diskette), the label specifies the identi-
fier of the file that is created on the diskette. More infor-
*CURLIB: The current library for the job is mation on this parameter is in Appendix A, “Expanded
searched. If no library is specified as the current Parameter Descriptions.”
library for the job, the QGPL library is used.
This parameter overrides the label specified in the
library-name: Specify the name of the library to be diskette device file, in the program, or in other called
searched. OVRDKTF commands.
diskette-device-file-name: Specify the name of the data-file-label: Specify up to 8 characters for the identi-
diskette device file that is used instead of the overridden fier of the data file used with this diskette device file.
file.
EXCHTYPE
DEV Specifies, for diskette output files only, the exchange
Specifies the name of the diskette device used with this type used by the device file when the system is writing
diskette device file to perform input/output data oper- diskette data. More information on this parameter is in
ations. The device name of the IBM-supplied diskette Appendix A, “Expanded Parameter Descriptions.”
device description is QDKT. This parameter is ignored if
This parameter overrides the value specified in the
SPOOL(*YES) is specified for the file when it is opened.
device file, in the program, or in other called OVRDKTF
This parameter overrides the value specified in the commands.
device file, in the program, or in other called OVRDKTF
*STD: The basic exchange format is used for a type 1
commands.
or a type 2 diskette. The H exchange type is used for a
device-name: Specify the name of the device that is type 2D diskette.
used with this diskette device file. The device name
*BASIC: The basic exchange type is used.
must already exist on the system as a device description
before this device file is created. *H: The H exchange type is used.

VOL *I: The I exchange type is used.


Specifies one or more volume identifiers used by the file. CODE
The volumes must be installed in the same order as the Specifies the character code used. The code can be
identifiers are specified here (and as they are specified either extended binary-coded decimal interchange code
on the DEV parameter). If the file is opened for read (*EBCDIC) or the American National Standard Code for
backward, then the volume identifiers in the list are pro- Information Interchange (*ASCII).
cessed from last to first (while the devices in the device
list are used in first-to-last order). If a list of volume This parameter overrides the value specified in the
identifiers is provided for the file, operator messages device file, in the program, or in other called OVRDKTF
indicate the name of the required volume. More infor- commands.
mation on this parameter is in Appendix A, “Expanded *EBCDIC: The extended binary-coded decimal inter-
Parameter Descriptions.” change code (EBCDIC) character set code is used.
This parameter overrides the volume identifiers specified *ASCII: The ASCII character set code is used.
in the diskette device file, in the program, or in other
called OVRDKTF commands.

Chapter 2. OS/400 Command Descriptions P3-507


OVRDKTF

CRTDATE processed; otherwise, the next unnamed inline spooled


Specifies the date when the diskette data file was file is processed. More information on named and
created on the diskette. unnamed inline files is in the Tape and Diskette Device
Note: The creation date parameter is valid only for
Programming book. If this is an output file, the data is
spooled for processing by a diskette or print writer.
diskette input data files. If the creation date
written on the diskette containing the data file OUTQ
does not match the date specified for the device Specifies the qualified name of the output queue used
file when it is opened, an error message is sent for spooled printer files that specify OUTQ(*JOB). This
to the user program. change does not affect files already created in active
This parameter overrides the values specified on the jobs or files in completed jobs in which the files were
device file, in the program, or on other called OVRDKTF spooled.
commands. This parameter overrides the output queue name speci-
*NONE: The creation date is not specified. It is not fied in the device file, or in other called OVRDKTF com-
checked unless it is supplied before the device file is mands.
opened, either in a OVRTAPF command or CHGTAPF The name of the output queue can be qualified by one
command, or in the high-level language program. of the following library values:
creation-date: Specify the creation date of the data file *LIBL: All libraries in the job's library list are
used by this device file. The date must be specified in
searched until the first match is found.
the format defined by the job attributes DATFMT and, if
separators are used, DATSEP. However, the specified *CURLIB: The current library for the job is
date is put in the diskette label in the format yymmdd. searched. If no library is specified as the current
library for the job, the QGPL library is used.
EXPDATE
Specifies the expiration date. The files cannot be over-
library-name: Specify the name of the library to be
searched.
written until the expiration date. The expiration date
must be later than or equal to the current date. output-queue-name: Specify the name of the output
Note: The expiration date overrides the value specified queue to which the output data is spooled. The
in the device file, in the program, or in other IBM-supplied output queue that is used by the diskette
called OVRDKTF commands. file is the QDKT output queue, stored in the QGPL
library.
*NONE: No expiration date for the data file is specified;
the file is protected for 1 day. Its protection ends the MAXRCDS
day after it is created. Specifies, for spooled files only, the maximum number of
records in the spooled file for spooled jobs using this
*PERM: The data file is permanently protected. An
diskette device file.
expiration date of 999999 is assigned.
This parameter overrides the value specified in the
expiration-date: Specify the expiration date of the data
diskette device file, or in other called OVRDKTF com-
file. The date must be specified in the format defined by
mands.
the job attributes DATFMT and, if separators are used,
DATSEP. However, the specified date is put in the *NOMAX: The system maximum is used.
diskette label as yymmdd.
maximum-records: Specify the maximum number of
SPOOL diskette records that are in the spooled file. Valid values
Specifies whether the input or output data for the range from 1 through 500000.
diskette device file is spooled.
SCHEDULE
This parameter overrides the spool value specified in the Specifies, for spooled output only, when the spooled file
device file, or in other called OVRDKTF commands. is available to a writer.
*NO: The data is not spooled. If this file is opened for This parameter overrides the scheduling value specified
input, the data is read directly from the diskette. If this is in the device file, or in other called OVRDKTF com-
an output file, the data is written directly to the diskette mands.
as it is processed by the program.
*JOBEND: The spooled file is made available to the
Note: If SPOOL(*NO) is specified, the following param- writer only after the entire job is completed.
eters in this command are ignored: OUTQ,
*FILEEND: The spooled file is made available to the
MAXRCDS, SCHEDULE, HOLD, SAVE,
writer as soon as the file is closed in the program.
OUTPTY, and USRDTA.
*IMMED: The spooled file is made available to the
*YES: The data is spooled. If this file is opened for
writer as soon as the file is opened in the program.
input, an inline data file having the specified name is

P3-508 OS/400 CL Reference - Part 2 (Full Version)


OVRDKTF

HOLD this parameter is in Appendix A, “Expanded Parameter


Specifies, for spooled output only, whether the spooled Descriptions.”
file is held. The spooled file can be released by using
Note: An immediate allocation of the device by the
the Release Spooled File (RLSSPLF) command.
device resource is required when an acquire
Note: This parameter overrides the hold value specified operation is performed to the file.
in the diskette device file, or in other called
This parameter overrides the wait time specified in the
OVRDKTF commands.
device file, in the program, or in other called OVRDKTF
*NO: The spooled printer file is not held by the output commands.
queue. The spooled output is available to a writer based
*IMMED: The program does not wait; when the file is
on the SCHEDULE parameter value.
opened, an immediate allocation of the file resources is
*YES: The spooled file is held until released by the required.
Release Spool File (RLSSPLF) command.
*CLS: The job default wait time is used as the wait time
SAVE for the file resources being allocated.
Specifies, for spooled output only, whether the spooled number-of-seconds: Specify the number of seconds that
file is saved (left on the output queue) after the output the program waits for the file resources to be allocated
has been produced. to the diskette file when the file is opened, or the wait
Note: This parameter overrides the save value speci- time for the device allocated when an acquire operation
fied in the diskette device file, or in other called is performed to the file. Valid values range from 1
OVRDKTF commands. through 32767 seconds.

*NO: The spooled file data is not saved on the output SECURE
queue after it has been produced. Specifies whether this file is safe from the effects of pre-
viously called file override commands. If SECURE is not
*YES: The spooled file data is saved on the output
specified, processing occurs as if SECURE(*NO) is
queue until the file is deleted.
specified.
OUTPTY *NO: This file is not protected from the effects of other
Specifies the output priority for spooled output files that file overrides; its values can be overridden by the effects
are produced by this job. The highest priority is 1 and of previously called file override commands.
the lowest priority is 9. More information on this param-
eter is in Appendix A, “Expanded Parameter *YES: This file is protected from the effects of any file
Descriptions.” override commands previously called.

*JOB: The output priority associated with the job that OVRSCOPE
created the spooled file is used. Specifies the extent of influence (scope) of the override.
output-priority: Specify the output priority. Valid values *ACTGRPDFN: The scope of the override is determined
range from 1 (high priority) through 9 (low priority). by the activation group of the program that calls this
command. When the activation group is the default acti-
USRDTA
vation group, the scope equals the call level of the
Specifies, for spooled output only, the user-specified
calling program. When the activation group is not the
data that identifies the file.
default activation group, the scope equals the activation
*BLANK: Ten blanks are used as the user data. group of the calling program.
user-data: Specify up to 10 characters of text. *CALLLVL: The scope of the override is determined by
the current call level. All open operations done at a call
IGCDTA
level that is the same as or higher than the current call
Specifies whether the file processes double-byte char-
level are influenced by this override.
acter set (DBCS) data.
*JOB: The scope of the override is the job in which the
*NO: The file does not process DBCS data.
override occurs.
*YES: The file processes DBCS data.
SHARE
WAITFILE Specifies whether the open data path (ODP) for the
Specifies the number of seconds that the program waits diskette file is shared with other programs in the routing
for the file resources and session resources to be allo- step. When an ODP is shared, the programs accessing
cated when the file is opened, or for the device or the file share facilities such as the file status and the
session resources to be allocated when an acquire oper- buffer.
ation is performed to the file. If those resources are not
More information on shared database files is in the DB2
allocated within the specified wait time, an error
for AS/400 Database Programming book.
message is sent to the program. More information on

Chapter 2. OS/400 Command Descriptions P3-509


OVRDKTF

This parameter also overrides the value specified in group is a non-default activation group, the scope is the
other called OVRDKTF commands. activation group of the caller.
*NO: The ODP created by the program with this attri- *JOB: The scope of the open operation is the job in
bute is not shared with other programs in the routing which the open operation occurs.
step. Every time a program opens the file with this attri-
bute, a new ODP to the file is created and activated.
Examples
*YES: The ODP created with this attribute is shared
with each program in the routing step that also specifies Example 1: Changing Spooling Specifications
SHARE(*YES) when it opens the file. OVRDKTF FILE(OUT) VOL(DPT7ð6) LABEL(STATUSR)
Note: When SHARE(*YES) is specified and control is SPOOL(\YES)
passed to a program, a read operation in that
This command changes the spooling specification for the
program retrieves the next input record. A write
output file named OUT. When a program produces output
operation produces the next output record.
data for the OUT file, the data is spooled for processing by a
OPNSCOPE spooling writer. The writer processes the data by writing it in
Specifies the extent of influence (scope) of the open a data file called STATUSR that is on a diskette whose
operation. volume identifier is DPT706.
*ACTGRPDFN: The scope of the open operation is Example 2: Specifying DBCS Processing
determined by the activation group of the program that
called the OVRDKTF command processing program. If OVRDKTF FILE(IGCLIB/IGCDCT) IGCDTA(\YES)
the activation group is the default activation group, the
This command overrides the diskette file IGCDCT, which is
scope is the call level of the caller. If the activation
stored in the library IGCLIB, so that the file contains double-
byte character set data.

P3-510 OS/400 CL Reference - Part 2 (Full Version)


OVRDSPF

OVRDSPF (Override with Display File) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──OVRDSPF──FILE(──overridden-file-name──)──┬─────────────────────────────────────────────────────────────┬────────────────────5
│ ┌─\FILE───────────────────────────────────────┐ │
│ │ ┌─\LIBL/────────┐ │ │
└─TOFILE(──┴─┼───────────────┼──display-device-file-name─┴──)─┘
├─\CURLIB/──────┤
└─library-name/─┘
(P) ──┬─────────────────────────────────────────────────┬──┬───────────────────────┬───────5
5──┬─────────────────────────────────┬───
| └─DEV(──┬─\REQUESTER─────────┬──)─┘ └─CHRID(──┬─\DEVD────────────────────────────┬──)─┘ └─DECFMT(──┬─\FILE─┬──)─┘
| │ ┌──
─────────────┐ │ ├─\SYSVAL──────────────────────────┤ └─\JOB──┘
6 (1)
└───device-name─┴────┘ ├─\JOBCCSID────────────────────────┤
└─graphic-character-set──code-page─┘
5──┬──────────────────────┬──┬─────────────────────────┬──┬─────────────────────────────────────┬───────────────────────────────5
└─IGCDTA(──┬─\NO──┬──)─┘ └─IGCEXNCHR(──┬─\YES─┬──)─┘ └─WAITFILE(──┬─\IMMED────────────┬──)─┘
└─\YES─┘ └─\NO──┘ ├─\CLS──────────────┤
└─number-of-seconds─┘
5──┬────────────────────────────────────┬──┬─────────────────┬──┬──────────────────────┬──┬──────────────────────────────┬──────5
└─WAITRCD(──┬─\NOMAX────────────┬──)─┘ └─LVLCHK(──\NO──)─┘ │ ┌─\NO──┐ │ │ ┌─\ACTGRPDFN─┐ │
├─\IMMED────────────┤ └─SECURE(──┴─\YES─┴──)─┘ └─OVRSCOPE(──┼─\CALLLVL───┼──)─┘
└─number-of-seconds─┘ └─\JOB───────┘
5──┬──────────────────────────────────────────────────┬──┬─────────────────────┬──┬──────────────────────────────┬─────────────5%
└─DTAQ(──┬─\NONE──────────────────────────────┬──)─┘ └─SHARE(──┬─\NO──┬──)─┘ └─OPNSCOPE(──┬─\ACTGRPDFN─┬──)─┘
│ ┌─\LIBL/────────┐ │ └─\YES─┘ └─\JOB───────┘
└─┼───────────────┼──data-queue-name─┘
├─\CURLIB/──────┤
└─library-name/─┘
Notes:
1 A maximum of 50 repetitions

P All parameters preceding this point can be specified in positional form.

Purpose information about printing the help text, refer to


“Printing CL Command Descriptions” in Chapter 1.
The Override with Display File (OVRDSPF) command is
used to (1) override (replace) the file named in the program,
(2) override certain parameters of a file used by the program, Required Parameter
or (3) override the file named in the program and override FILE
certain parameters of the file processed. Parameters over- Specifies the name of the file being used by the program
ridden by this command are specified in the file description, to which this override command is applied. If
in the program, or in other called file override commands. TOFILE(*FILE) is specified, a display device file must be
specified. Otherwise, any device file or database file
If a file named in the program is overridden, the name of that
can be specified.
file is specified in the FILE parameter and the name of the
overriding file (the file being processed) is specified in the
TOFILE parameter. The OVRDSPF command also specifies Optional Parameters
parameters to override values contained in the file
description of the overriding file. If the file named in the TOFILE
program is not replaced but certain parameters of the file are Specifies the qualified name of the display file used
overridden, the name of the file is specified in the FILE instead of the file specified in the FILE parameter or, if
parameter and *FILE is specified in the TOFILE parameter. *FILE is specified, specifies that certain attributes are
The parameters overridden are then specified by the other overridden by parameters specified in this command.
parameters of the OVRDSPF command. Parameters that The parameters specified on this OVRDSPF command
are not specified do not affect parameters specified in the file override the same parameters specified in the display
description, in the program, or in other called file override device file, in the program, or in other called OVRDSPF
commands. commands.
*FILE: The display device file named in the FILE
More information on override files is in the Application parameter has some of its parameters overridden by the
Display Programming book. values specified in this command.
Note: To see the parameter and value descriptions for this The name of the file can be qualified by one of the fol-
command, refer to the online help text. For more lowing library values:

Chapter 2. OS/400 Command Descriptions P3-511


OVRDSPF

*LIBL: All libraries in the job's library list are *JOBCCSID: The character data is changed from the
searched until the first match is found. device CHRID to the CCSID (coded character set identi-
fier) of the job on display file input, and from the CCSID
*CURLIB: The current library for the job is
of the job to the device CHRID on display file output.
searched. If no library is specified as the current
library for the job, the QGPL library is used. Note: This value is not allowed if the file was created
on a system at an earlier release level than
library-name: Specify the name of the library to be
V2R3M0.
searched.
Element 1: Character Set
display-device-file-name: Specify the name of the
display device file used instead of the overridden file. graphic-character-set: Specify the graphic character set
values that match the attributes of the display device.
DEV Valid values range from 1 through 32767.
Specifies the names of one or more display devices
Element 2: Code Page
used with this display device file to pass data records
between the users of the display devices and their jobs. code-page: Specify the code page set values that
The device name specified in the display device file sup- match the attributes of the display device. Valid values
plied by IBM is *REQUESTER. range from 1 through 32767.
This parameter overrides the device names specified in | DECFMT
the device file, in the program, or in other called | Specifies which decimal format value is used when
OVRDSPF commands. | editing numeric fields with the EDTCDE DDS keyword.
*REQUESTER: The device from which the program is | The decimal format value determines the use of commas
called is assigned to the file when the file is opened. | and periods for the decimal position and three digit posi-
| tional separators on edited fields.
device-name: Specify the names of one or more display
devices used with this device file to pass data records | *FILE: Use the decimal format value stored with the file
between the users of the devices and the system. Each | when the file was created.
device name must already be known on the system by a | *JOB: Use the decimal format value from the DECFMT
device description before this device file is created. | job attribute when the file is opened.
*REQUESTER can be specified as one of the names.
Up to 50 names can be specified in this command, but IGCDTA
the total number cannot exceed the number specified on Specifies, for program-described original files, whether
the MAXDEV parameter. the file processes double-byte character set (DBCS)
data. For externally described printer files, this param-
CHRID eter specifies DBCS attributes of the file.
Specifies the character identifier (graphic character set
*NO: The file does not process DBCS data.
and code page) that a work station display device sup-
ports. When a display file that was created with the *YES: The file processes DBCS data.
CHRID DDS keyword is used with the device, the
IGCEXNCHR
system converts data sent to and received from the
Specifies whether the system processes double-byte
device to ensure that the correct characters are shown
character set (DBCS) extension characters.
and that the correct hexadecimal byte values are
returned to the application program. More information *YES: The system processes DBCS extension charac-
about display file CHRID processing and the translation ters.
tables that are used to convert data sent to and received
*NO: The system does not process DBCS extension
from the display are in the Application Display Program-
characters; it displays extension characters as the unde-
ming book. fined character.
*DEVD: The CHRID value specified in the device
WAITFILE
description of the work station on which the application
Specifies the number of seconds that the program waits
is running is used. If no CHRID value is specified, the
for the file resources and session resources to be allo-
QCHRID system value (for the system on which the
cated when the file is opened, or for the device or
application is running) is used. No translation is neces-
session resources to be allocated when an acquire oper-
sary because the file has the same character identifier
ation is performed to the file. If those resources are not
as the work station. For a list of valid values, see the
allocated within the specified wait time, an error
CHRID parameter of the Create Device Description
message is sent to the program. More information on
Display (CRTDEVDSP) command description.
this parameter is in Appendix A, “Expanded Parameter
*SYSVAL: The system determines the graphic char- Descriptions.”
acter set and code page values for the command param-
eters from the QCHRID system values.

P3-512 OS/400 CL Reference - Part 2 (Full Version)


OVRDSPF

Note: An immediate allocation of the device by the LVLCHK


device resource is required when an acquire Specifies whether the record format level identifiers in
operation is performed to the file. the program are checked against those in the device file
when the file is opened. If so, the record format identi-
This parameter overrides the wait time specified in the
fiers in the program must match those in the device file.
device file, in the program, or in other called OVRDSPF
Because the same record format name can exist in more
commands.
than one file, each record format is given an internal
*IMMED: The program does not wait; when the file is system identifier when it is created.
opened, an immediate allocation of the file resources is
Note: This parameter overrides the value specified in
required.
the device file, in the program, or in other called
*CLS: The job default wait time is used as the wait time OVRDSPF commands. Level checking cannot
for the file resources being allocated. be done unless the program contains the record
number-of-seconds: Specify the number of seconds that format identifiers. This command cannot over-
the program waits for the file resources to be allocated ride level checking from *NO to *YES.
to the display device file when the file is opened, or the *NO: The level identifiers are not checked when the file
wait time for the device allocated when an acquire oper- is opened.
ation is performed to the file. Valid values range from 1
through 32767 seconds. SECURE
Specifies whether this file is safe from the effects of pre-
WAITRCD viously called file override commands. If SECURE is not
Specifies the number of seconds the program waits for specified, processing occurs as if SECURE(*NO) is
the completion of a read-from-invited-device operation to specified.
a multiple device file in a high-level language program.
Refer to the appropriate high-level language reference *NO: This file is not protected from the effects of other
file overrides; its values can be overridden by the effects
manual to determine when a file is treated as a multiple
of previously called file override commands.
device file. The program performing the read operation
waits for input from all invited devices currently *YES: This file is protected from the effects of any file
accessing the file. If a record is not returned from an override commands previously called.
invited device in the specified amount of time, a notify
OVRSCOPE
message is sent to the program. This parameter has no
Specifies the extent of influence (scope) of the override.
effect on an input operation directed to a specific device.
*ACTGRPDFN: The scope of the override is determined
Note: This parameter is also used to specify the time
by the activation group of the program that calls this
(seconds) that a CL program waits to complete a
command. When the activation group is the default acti-
WAIT command. If a record is not returned from
vation group, the scope equals the call level of the
any of the devices that should return a record, an
calling program. When the activation group is not the
escape message is sent to the CL program.
default activation group, the scope equals the activation
More information on the WAITRCD parameter is
group of the calling program.
in the Receive File (RCVF), Send File (SNDF),
Send/Receive File (SNDRCVF), and WAIT (Wait) *CALLLVL: The scope of the override is determined by
command descriptions. the current call level. All open operations done at a call
level that is the same as or higher than the current call
This parameter overrides the wait record value specified
level are influenced by this override.
in the device file, in the program, or in other called
OVRDSPF commands. *JOB: The scope of the override is the job in which the
override occurs.
*NOMAX: There is no limit on the time the system waits
for the completion of the operation. DTAQ
*IMMED: The program does not wait for the read-from- Specifies the name of the data queue that receives an
invited-device operation for the completion of the file. A entry from the system when a data-available event is
record must be available from an invited program device signaled from an invited display device. The data queue
when the read-from-invited-program-device operation is need not exist when the display file is created since the
performed. If a record is not already available when the name specified on this parameter is not evaluated until
read-from-invited-program-device operation is performed, the file is used. More information on the data queue
a notify message is sent to the program. function is in the CL Programming book.

number-of-seconds: Specify the number of seconds that *NONE: A data queue does not receive an entry from
the program waits for the completion of the read-from- the system.
invited-device operation. Valid values range from 1 The name of the data queue can be qualified by one of
through 32767. the following library values:

Chapter 2. OS/400 Command Descriptions P3-513


OVRDSPF

*LIBL: All libraries in the job's library list are *YES: The ODP created with this attribute is shared
searched until the first match is found. with each program in the routing step that also specifies
SHARE(*YES) when it opens the file.
*CURLIB: The current library for the job is
searched. If no library is specified as the current Note: When SHARE(*YES) is specified and control is
library for the job, the QGPL library is used. passed to a program, a read operation in that
program retrieves the next input record. A write
library-name: Specify the name of the library to be
operation produces the next output record.
searched.
OPNSCOPE
data-queue-name: Specify the name of the data queue
Specifies the extent of influence (scope) of the open
that is to receive an entry from the system when the
operation.
data-available event is signaled.
*ACTGRPDFN: The scope of the open operation is
SHARE
determined by the activation group of the program that
Specifies whether the open data path (ODP) for the
called the OVRDSPF command processing program. If
display file is shared with other programs in the routing
the activation group is the default activation group, the
step. When an ODP is shared, the programs accessing
scope is the call level of the caller. If the activation
the file share facilities such as the file status and the
group is a non-default activation group, the scope is the
buffer.
activation group of the caller.
More information on shared database files is in the DB2
*JOB: The scope of the open operation is the job in
for AS/400 Database Programming book. which the open operation occurs.
This parameter overrides the value specified in the
device file, in the program, or in other called OVRDSPF
commands.
Example
OVRDSPF FILE(DISPLAY75) WAITFILE(3ð)
*NO: The ODP created by the program with this attri-
bute is not shared with other programs in the routing This command overrides the file wait time value specified in
step. Every time a program opens the file with this attri- the DISPLAY75 device file description, in the program, or in
bute, a new ODP to the file is created and activated. other called OVRDSPF commands. The program in which
this command occurs waits up to 30 seconds (if necessary)
to allocate the required file resources to the file named
DISPLAY75.

P3-514 OS/400 CL Reference - Part 2 (Full Version)


OVRICFDEVE

OVRICFDEVE (Override with Intersystem Communications Function Program Device


Entry) Command
Job: B,I Pgm: B,I REXX: B,I Exec

55──OVRICFDEVE──PGMDEV(──program-device-name──)──┬──────────────────────────────────────────┬───────────────────────────────────5
└─RMTLOCNAME(──┬─\REQUESTER───────────┬──)─┘
└─remote-location-name─┘
(P) ──┬──────────────────────────┬──┬─────────────────────────────────────────┬──────────────────5
5──┬───────────────────────────┬───
│ ┌─\ALL─────┐ │ └─DEV(──┬─\LOC────────┬──)─┘ └─LCLLOCNAME(──┬─\LOC────────────────┬──)─┘
└─CMNTYPE(──┼─\APPC────┼──)─┘ └─device-name─┘ ├─\NETATR─────────────┤
├─\ASYNC───┤ └─local-location-name─┘
├─\BSCEL───┤
├─\FINANCE─┤
├─\INTRA───┤
├─\RETAIL──┤
└─\SNUF────┘
5──┬─────────────────────────┬──┬─────────────────────────────────────┬──┬─────────────────────────┬────────────────────────────5
└─MODE(──┬─\NETATR───┬──)─┘ └─RMTNETID(──┬─\LOC──────────────┬──)─┘ └─FMTSLT(──┬─\PGM────┬──)─┘
├─BLANK─────┤ ├─\NETATR───────────┤ ├─\RECID──┤
└─mode-name─┘ ├─\NONE─────────────┤ └─\RMTFMT─┘
└─remote-network-ID─┘
5──┬───────────────────────────────┬──┬─────────────────────┬──┬───────────────────────┬──┬───────────────────────────────┬─────5
└─APPID(──┬─\DEVD──────────┬──)─┘ └─BATCH(──┬─\NO──┬──)─┘ └─HOST(──┬─\DEVD───┬──)─┘ └─ENDSSNHOST(──┬─\RSHUTD───┬──)─┘
├─\USER──────────┤ └─\YES─┘ ├─\CICS───┤ └─\TERMSELF─┘
└─application-ID─┘ ├─\IMS────┤
└─\IMSRTR─┘
5──┬────────────────────────────┬──┬───────────────────────┬──┬────────────────────────┬──┬──────────────────────┬──────────────5
│ ┌─\DEVD──┐ │ └─INZSELF(──┬─\NO──┬──)─┘ └─HDRPROC(──┬─\SYS──┬──)─┘ └─MSGPTC(──┬─\YES─┬──)─┘
└─SPCHOSTAPP(──┼─\NONE──┼──)─┘ └─\YES─┘ └─\USER─┘ └─\NO──┘
└─\FLASH─┘
5──┬─────────────────────────────────────────┬──┬──────────────────────────┬────────────────────────────────────────────────────5
└─EMLDEV(──┬─\NONE───────────────────┬──)─┘ └─CNVTYPE(──┬─\SYS────┬──)─┘
│ ┌─\UNFORMAT─┐ │ ├─\USER───┤
└─┬─3278─┬──┼───────────┼─┘ └─\SRCPGM─┘
├─3284─┤ ├─\FIELD────┤
├─3286─┤ ├─\NOFIELD──┤
├─3287─┤ └─\EXTFIELD─┘
├─3288─┤
└─3289─┘
5──┬─────────────────────────────────────────────────────┬──┬───────────────────────────────┬───────────────────────────────────5
└─BLOCK(──┬─\DEVD────────────────────────────────┬──)─┘ └─RCDLEN(──┬─\DEVD─────────┬──)─┘
├─\NONE────────────────────────────────┤ └─record-length─┘
├─\ITB─────────────────────────────────┤
├─\IRS─────────────────────────────────┤
├─\NOSEP───────────────────────────────┤
├─\USER────────────────────────────────┤
│ ┌─X'1E'──────────────────────┐ │
└─\SEP──┼────────────────────────────┼─┘
└─record-separator-character─┘
5──┬──────────────────────────────┬──┬───────────────────────┬──┬───────────────────────┬──┬──────────────────────┬─────────────5
└─BLKLEN(──┬─\DEVD────────┬──)─┘ └─TRNSPY(──┬─\DEVD─┬──)─┘ └─DTACPR(──┬─\DEVD─┬──)─┘ └─TRUNC(──┬─\DEVD─┬──)─┘
└─block-length─┘ ├─\NO───┤ ├─\NO───┤ ├─\NO───┤
└─\YES──┘ └─\YES──┘ └─\YES──┘
5──┬─────────────────────────────┬──┬──────────────────────────┬──┬─────────────────────────┬──┬───────────────────────┬────────5
└─OVRFLWDTA(──┬─\DISCARD─┬──)─┘ └─GRPSEP(──┬─\DEVD────┬──)─┘ └─RMTBSCEL(──┬─\DEVD─┬──)─┘ └─INLCNN(──┬─\CTLD─┬──)─┘
└─\RETAIN──┘ ├─\EOT─────┤ ├─\NO───┤ ├─\DIAL─┤
├─\DEV374ð─┤ └─\YES──┘ └─\ANS──┘
└─\OFCSYS──┘
5──┬──────────────────────┬──┬──────────────────────────────┬──────────────────────────────────────────────────────────────────5%
│ ┌─\NO──┐ │ │ ┌─\ACTGRPDFN─┐ │
└─SECURE(──┴─\YES─┴──)─┘ └─OVRSCOPE(──┼─\CALLLVL───┼──)─┘
└─\JOB───────┘
Note:
P All parameters preceding this point can be specified in positional form.

Chapter 2. OS/400 Command Descriptions P3-515


OVRICFDEVE

Purpose *REQUESTER: The name used to refer to the commu-


nications device through which the program is started is
The Override with Intersystem Communications Function used. The session that is assigned when the program
Program Device Entry (OVRICFDEVE) command can be device is acquired is the same session in which the
used to temporarily add the program device entry and the program start request is received. If the program is not
remote location name to the ICF file or to override a program started as a result of a program start request, the
device entry with the specified remote location name and acquire operation of the program device fails. The target
attributes for an ICF file. program uses *REQUESTER as the remote location
name in the intersystem communications function (ICF)
More information on how overrides processing is performed file to connect to the session that the source program
is in the Data Management book, the Application Display used to send the program start request.
Programming book, and the Printer Device Programming
The *REQUESTER value can be specified on only one
book.
program device entry and is valid only for a target com-
Note: To see the parameter and value descriptions for this munication job. If *REQUESTER is specified in any other
command, refer to the online help text. For more type of job, a message is sent.
information about printing the help text, refer to
remote-location-name: Specify the full name of a remote
“Printing CL Command Descriptions” in Chapter 1.
location. The remote location does not need to exist
when this command is run, but it must exist (be config-
Required Parameter ured on the system or in the advanced peer-to-peer net-
working (APPN) support for this remote location) at the
PGMDEV time the program acquires the program device. A given
Specifies the program device name for an ICF file whose remote location may be added many times by using dif-
attributes are being overridden. The total number of ferent program device names. When a program is
devices that may be added to an ICF file is determined running, however, only one program device name asso-
by the MAXPGMDEV parameter on the Create ICF File ciated with each asynchronous or binary synchronous
(CRTICFF) command or the Change ICF File communications equivalence link (BSCEL) or system
(CHGICFF) command. network architecture upline facility (SNUF) remote
Specify the name of the ICF program device entry with location may read or change the file at any one time.
which the program communicates. This name is used in For each remote advanced program-to-program commu-
device-specific input/output operations to identify the nications (APPC), INTRA, or SNUF location, more than
program device and the session attributes. The program one associated program device name may be acquired
device name must be unique, although the same remote to the file at one time. Each SNUF remote location may
location name may be specified more than once. This have many devices. The system determines which
allows more than one session to be at the same remote device to use unless a device is specified on the DEV
location, and/or to have different attribute values for parameter.
each session at the same remote location. This
CMNTYPE
program device name must be unique throughout the
Specifies which communications types are used. This
entries for the ICF file. If an override command is
parameter is used only for prompting purposes; it is
entered a second time for the same program device,
ignored when the command is run. The value specified
then both (according to the override process rules)
for this parameter determines the subset of other param-
define the same program device entry.
eters that are displayed (prompted) for the user.
*ALL: The parameters for all of the communications
Optional Parameters types appear in the prompt.
Note: Refer to the APPC Programming book for information *APPC: The advanced program-to-program communica-
on how the system uses the RMTLOCNAME, DEV, tions (APPC) parameters appear in the prompt.
LCLLOCNAME, and RMTNETID parameters to select
an APPC device description. *ASYNC: The asynchronous (ASYNC) parameters
appear in the prompt.
RMTLOCNAME
*BSCEL: The binary synchronous communications
Specifies the remote location name of the system with
equivalence link (BSCEL) parameters appear in the
which this object communicates.
prompt.
Note: A remote location must be specified by using the
*FINANCE: The finance parameters appear in the
Add Intersystem Communications Function
prompt.
Program Device Entry (ADDICFDEVE) command
or an applied program device override. If a *INTRA: The intrasystem (INTRA) parameters appear in
remote location is not specified, an escape the prompt.
message is sent when the program device is *RETAIL: The retail parameters appear in the prompt.
acquired.

P3-516 OS/400 CL Reference - Part 2 (Full Version)


OVRICFDEVE

*SNUF: The SNA upline facility (SNUF) parameters location, and remote network ID, an escape message is
appear in the prompt. sent when the program device entry is acquired.

DEV RMTNETID
Specifies the communications device used in the remote Specifies the remote network ID used with the remote
location. This parameter should be specified only for location. This parameter applies to the APPC commu-
APPC, INTRA, and SNUF communications types. If the nications type only and is ignored for all other commu-
Add Intersystem Communications Function Program nications types. If the ADDICFDEVE command is not
Device Entry (ADDICFDEVE) command is not run for run for the specified program device and this parameter
the specified program device and this parameter is not is not overridden, RMTNETID(*LOC) is used.
overridden, DEV(*LOC) is used.
*LOC: The remote network identifier (ID) associated
*LOC: The device associated with the remote location with the remote location is used. If several remote
is used. If several devices are associated with the network IDs are associated with the remote location, the
remote location, the system determines which device is system determines which remote network ID is used.
used.
*NETATR: The RMTNETID value specified in the
device-name: Specify the name of a communications system network attributes is used.
device associated with the remote location. If the device
*NONE: No remote network identifier (ID) is used.
name is not valid for the remote location, a message is
sent when the program device entry is acquired. More remote-network-ID: Specify a remote network ID for the
information on device names is in the APPC Program- APPC communications device.
ming book. FMTSLT
LCLLOCNAME Specifies the record format selection used for input oper-
Specifies the local location name. ations. If the ADDICFDEVE command is not run for the
specified program device and this parameter is not over-
Note: This parameter applies to the APPC communica-
ridden, FMTSLT(*PGM) is used.
tions type only and is ignored for all other com-
munications types. If the ADDICFDEVE *PGM: The program determines which record formats
command is not run for the specified program are selected. If an input (read) operation with a record
device or is not overridden, this parameter format name is specified, that format is selected. If an
defaults to *LOC. input operation without a record format is specified, the
default format (the first record format in the file) is
*LOC: The device associated with the remote location
selected. This also means that if there are any record
is used. If several devices are associated with the
identification (RECID) parameters specified in the data
remote location, the system determines which device is
description specifications (DDS) for the file, or if any
used.
remote formats are received, they are not taken into
*NETATR: The LCLLOCNAME value specified in the consideration when the record is selected.
system network attributes is used.
*RECID: The record identification (RECID) keywords
local-location-name: Specify the name of the user's specified in the DDS for the file are used to do record
location. If the local location name is not valid for the selection. If there are no RECID keywords in the file, an
remote location or remote location and device, an error message is sent, the acquire operation of the
escape message is sent when the program device entry program device ends, and the device is not acquired.
is acquired.
*RMTFMT: The remote format names received from the
MODE sending system are used to do record selection. If the
Specifies the mode name used. This parameter applies device is not an APPC or intrasystem device and
only to the APPC communications type and is ignored *RMTFMT is specified, a run time error occurs at the
for all other communications types. If the ADDICFDEVE time the program device entry is acquired.
command is not run for the specified program device
APPID
and this parameter is not overridden, MODE(*NETATR)
Specifies (in characters) the VTAM identifier of the Cus-
is used.
tomer Information Control System for Virtual Storage
*NETATR: The mode name specified in the network (CICS/VS) or Information Management System/Virtual
attributes is used. Storage (IMS/VS) host subsystem sent with the sign-on
message. This parameter applies to the SNUF commu-
*BLANK: The mode name consisting of 8 blank charac-
nications type only and is ignored for all other devices.
ters is used.
If the ADDICFDEVE command is not run for the speci-
mode-name: Specify a mode name for the APPC com- fied program device and this parameter is not over-
munications device. If the specified mode is not valid for ridden, APPID(*DEVD) is used.
any combination of remote location, device, local
*DEVD: The application identifier specified in the device
description is sent with the sign-on message.

Chapter 2. OS/400 Command Descriptions P3-517


OVRICFDEVE

*USER: The application program can send messages or INZSELF


a logon to the host. This is valid only when using the Specifies whether a formatted INIT-SELF is built in place
3270 program interface. of the unformatted sign-on normally sent by SNUF to the
host.
application-ID: Specify the application identifier that is
sent with the sign-on message. *NO: The unformatted default sign-on provided by
SNUF is used.
BATCH
Specifies, for CICS/VS and IMS/VS, whether this *YES: The formatted INIT-SELF provided by SNUF is
session is used for batch jobs. This parameter applies used.
to the SNUF, Retail, and INTRA communications types
HDRPROC
only and is ignored for all other devices. If the
Specifies, for both CICS/VS and IMS/VS, whether
ADDICFDEVE command is not run for the specified
received function management headers are passed to
program device and this parameter is not overridden,
the application program. This parameter applies to the
BATCH(*NO) is used.
SNUF communications type only and is ignored for all
*NO: Batch jobs do not occur. other communications types. If the ADDICFDEVE
command is not run for the specified program device
*YES: Batch jobs occur and SNUF is not to assemble
and this parameter is not overridden, HDRPROC(*SYS)
physical records into logical records. If BATCH(*YES) is
is used.
specified, MSGPTC(*NO) must also be specified.
*SYS: SNA upline facility (SNUF) removes function
HOST
management headers before passing data to the
Specifies the host or remote subsystem with which this
program.
session communicates. This parameter applies to the
SNUF communications type only and is ignored for all *USER: Function management headers are passed with
other devices. If the ADDICFDEVE command is not run the data to the program.
for the specified program device and this parameter is
MSGPTC
not overridden, HOST(*DEVD) is used.
Specifies, for both CICS/VS and IMS/VS, whether
*DEVD: The host system specified in the device message protection is used for this session. This
description is used. parameter applies to the SNUF communications type
only and is ignored for all other communications types.
*CICS: The session communicates with CICS/VS.
If the ADDICFDEVE command is not run for the speci-
*IMS: The session communicates with IMS/VS. fied program device, MSGPTC(*YES) is used.
*IMSRTR: The session communicates with IMS/VS *YES: Message protection is used. SNUF saves mes-
using the ready-to-receive option. sages until they are responded to and tries resynchroni-
zation if errors occur. *YES is only valid when
ENDSSNHOST
BATCH(*NO) is also specified.
Specifies how SNUF ends the session with the host.
*NO: Message protection is not used.
Note: This parameter applies to SNUF communications
type only and is ignored for all other devices. EMLDEV
*RSHUTD: SNUF sends a request-shut-down command Specifies that the program device entry is used to send
to the host. and receive data streams to and from specific types of
3270 display or printer devices being emulated. This
*TERMSELF: SNUF sends a terminate-self command
parameter consists of an emulation device type and an
to the host. It may be necessary to specify this value if
emulation device data format. The emulation device
the value *RSHUTD fails to end a session with a
data format specifies the format of the type 3270 data
non-IBM host.
stream being sent or received. A 20- or 32-byte
SPCHOSTAPP common header that contains type 3270 command and
Specifies whether SNUF customizes support for special data flow information is located at the start of the I/O
host applications outside the CICS or IMS application buffer that is sending or receiving the type 3270 data
layer. stream. This parameter applies to the SNUF commu-
nications type only. This parameter can be specified as
*DEVD: The special host application specified in the
a list of two values (elements) or as a single value
device description is used.
(*NONE).
*NONE: SNUF does not customize support for special
*NONE: This program device entry is not used for
host applications.
sending and receiving 3270 data streams.
*FLASH: SNUF customizes support for the Federal Link
Element 1: Type of Device
Access for Secondary Half-sessions (*FLASH) protocol
application. 3278: The data stream is for a 3279, 3278 or 3277
display device.

P3-518 OS/400 CL Reference - Part 2 (Full Version)


OVRICFDEVE

3284: The data stream is for a 3284 Printer. Ÿ No blocking/deblocking: The record format
described in the DDS is the format for both the
3286: The data stream is for a 3286 Printer.
record and the block.
3287: The data stream is for a 3287 Printer.
Ÿ User blocking and deblocking: Give the BSC con-
3288: The data stream is for a 3288 Printer. trols needed to describe the record format of the
3289: The data stream is for a 3289 Printer. system.

Element 2: Format of Data Stream Ÿ System blocking with record separator characters:
Specify the record separator character used by the
*UNFORMAT: An unformatted 3270 data stream is sent
system to determine record boundaries in the block.
or received. The user application program must trans-
late the data stream into a display or printer image. Ÿ System blocking of fixed-length records: The
system uses fixed-length records, and blocks and
*FIELD: A formatted 3270 data stream is sent or
deblocks records accordingly.
received. The formatted 3270 data stream contains a
display or printer image followed by field definitions. The If a parameter value other than *NONE or *USER is
field definitions indicate the location and characteristics specified, records are blocked as required by the system
of each field. for output and are deblocked on input.
*NOFIELD: A formatted 3270 data stream that has no Element 1: Blocking Option
field definitions but contains a display or printer image is
*DEVD: The block option in the device description is
sent or received.
used.
Note: If *FIELD or *NOFIELD is specified,
*NONE: Blocking or deblocking is not done by the
BATCH(*NO) must also be specified.
system.
*EXTFIELD: A formatted 3270 data stream contains
*ITB: The records are blocked or deblocked, based on
extended field attribute information. The extended field
the location of an Intermediate Text Block (ITB) control
attribute information is in the field definitions which follow
character. For input files, a record is delimited by
the display image. The field definitions indicate the
locating the next intermediate text block character. An
location and characteristics of each field. This value can
end-of-text or end-of-transmission block character is
only be specified if 3278 is also specified for the type of
used as an intermediate text block character to delimit a
device on the EMLDEV parameter.
block. For output files, an ITB character is added after
CNVTYPE the record. If it is the last character of the block, the ITB
Specifies the conversation type for which the application is replaced by an end-of-text or end-of-transmission
program is designed. This parameter is valid only for block character.
the APPC communications type and is ignored for all *IRS: The records are blocked or deblocked based on
other communications types. If the ADDICFDEVE the location of an Interrecord Separator (IRS) character.
command is not run for the specified program device For input files, a record is delimited by locating the next
and this parameter is not overridden, CNVTYPE(*SYS) IRS character. For output files, an IRS character is
is used. added after the record.
More information on the APPC communications type is *NOSEP: No record separator character is contained in
in the APPC Programming book. the block that is sent to or received from the device.
*SYS: The advanced program-to-program communica- The system blocks and deblocks the records using a
tions (APPC) mapped conversation support is used. fixed-length record, as specified in the DDS format spec-
ifications.
*USER: The advanced program-to-program communica-
tions (APPC) basic conversation support is used. *USER: The program provides all the control characters
(including record separator characters, binary synchro-
*SRCPGM: The target program accepts the conversa-
nous communications (BSC) framing characters, and
tion type specified by the source program.
transparency characters) necessary to send records.
BLOCK More information about the device and binary synchro-
Specifies whether the system or the user controls the nous communications equivalence link (BSCEL) support
combination of records into blocks when they are sent. characteristics is in the BSC Equivalence Link Program-
This parameter is for the BSCEL communications type ming book.
only and is ignored for all other communications types. *SEP: Records are blocked or deblocked, based on the
If the ADDICFDEVE command is not run for the speci- location of a user-specified record separator character.
fied program device and this parameter is not over- For input files, a record is delimited by locating the next
ridden, BLOCK(*DEVD) is used. record separator character. For output files, a record
With this parameter, specify one of the following condi- separator character is added after the record.
tions of record blocking: Element 2: Record Separator

Chapter 2. OS/400 Command Descriptions P3-519


OVRICFDEVE

X'1E': The record separator X'1E' is used. block-length: Specify the maximum block length (in
bytes) of records sent. The value must be at least the
record-separator-character: Specify a unique 1-byte
size of the largest record sent. Valid values range from
record separator character. The record separator char-
1 through 32767 for SNA upline facility (SNUF). For
acter may be specified as 2 hexadecimal characters, as
binary synchronous communications equivalence link
in BLOCK(*SEP X'FD'), or as a single character, as in
(BSCEL) communications, the maximum block length is
BLOCK(*SEP @). If a record separator character is not
8192.
specified, the record separator character X'1E' is used.
The following is a list of BSC control characters that TRNSPY
should not be used as record separator characters: Specifies whether text is sent in transparent text mode.
Transparent text mode sends all 256 extended binary-
EBCDIC ASCII BSC Control coded decimal interchange code (EBCDIC) character
codes; use this feature when sending packed or binary
X'01' X'01' SOH (start-of-header)
data fields. This parameter is for the BSCEL commu-
X'02' X'02' STX (start-of-text) nications type only and is ignored for all other commu-
X'03' X'03' ETX (end-of-text) nications types. If the ADDICFDEVE command is not
X'10' X'10' DLE (data-link escape) run for the specified program device and this parameter
is not overridden, TRNSPY(*DEVD) is used.
X'1D' X'1D' IGS (interchange group separator)
*DEVD: The text transparency option specified in the
X'1F' X'1F' ITB (intermediate text block)
device description is used.
X'26' X'17' ETB (end-of-transmission block)
*NO: Text transparency is not used.
X'2D' X'05' ENQ (enquiry)
X'32' X'16' SYN (synchronization)
*YES: Text transparency is used, which sends all 256
EBCDIC character codes. *YES is valid only when
X'37' X'04' EOT (end-of-transmission)
BLOCK(*NONE), BLOCK(*NOSEP), or BLOCK(*USER)
X'3D' X'15' NAK (negative acknowledgment) is specified.
Note: Transparency of received data is determined by
RCDLEN the data stream; therefore, this parameter is not
Specifies the maximum record length (in bytes) for data relevant for received data. If TRNSPY(*YES) is
sent and received. This parameter applies to the SNUF specified with BLOCK(*USER), BSCEL ignores
and the BSCEL communications types only and is the transparency indicator during write oper-
ignored for all other communications types. If the ations. Correct controls must be given with the
ADDICFDEVE command is not run for the specified data to get transparent transmission of data. For
program device and this parameter is not overridden, example, first specify the DLE and STX control
RCDLEN(*DEVD) is used. characters; the system gives the remaining
*DEVD: The record length specified in the device control characters for transparent transmission of
description is used. If a record is longer than the speci- data.
fied record length, a run time error occurs at the time the
DTACPR
record is sent or received.
Specifies whether data compression is performed.
record-length: Specify the maximum record length (in
Note: This parameter is for the BSCEL communications
bytes) to use with this device file. The value must be at
type only and is ignored for all other communica-
least the size of the largest record sent. If a record is
tions types. If the ADDICFDEVE command is
longer than the specified record length, a run time error
not run for the specified program device and this
occurs when the record is sent or received. Valid values
parameter is not overridden, DTACPR(*DEVD) is
range from 1 through 32767 bytes for SNUF commu-
used.
nications. For BSCEL communications, the maximum
record length is 8192 bytes. *DEVD: The data compression option specified in the
device description is used.
BLKLEN
Specifies the maximum block length (in bytes) for data *NO: No data compression or decompression occurs.
sent. This parameter applies to the BSCEL and the *YES: Data is compressed for output and decom-
SNUF communications types and is ignored for all other pressed for input. DTACPR(*YES) cannot be specified if
communications types. If the ADDICFDEVE command TRNSPY(*YES) is specified.
is not run for the specified program device and this
parameter is not overridden, this parameter defaults to TRUNC
*DEVD. Specifies whether trailing blanks are removed from any
output records. TRUNC(*YES) cannot be specified if
*DEVD: The block length specified in the device BLOCK(*NOSEP) or BLOCK(*ITB) is specified. If
description is used. TRUNC(*YES) is specified when DTACPR(*YES) or
BLOCK(*USER) is specified, truncation is ignored. This

P3-520 OS/400 CL Reference - Part 2 (Full Version)


OVRICFDEVE

parameter is for BSCEL communications types only and INLCNN


is ignored for all other communications types. If the Specifies the method used to make a connection on the
ADDICFDEVE command is not run for the specified line for the session being acquired. This parameter
program device and this parameter is not overridden, applies to the binary synchronous communications
TRUNC(*DEVD) is used. equivalence link (BSCEL) communications types only.
*DEVD: The trailing blanks specified in the device *CTLD: The initial connection option specified in the
description are used. controller description is used.
*NO: Trailing blanks are not removed from output *DIAL: The local system starts the call.
records.
*ANS: The remote system starts the call and the local
*YES: Trailing blanks are removed from output records. system answers the call.

OVRFLWDTA SECURE
Specifies whether overflow data is discarded or retained. Specifies whether this file is safe from the effects of pre-
*DISCARD: Overflow data is not kept. viously called file override commands. If SECURE is not
specified, processing occurs as if SECURE(*NO) is
*RETAIN: Overflow data is kept. specified.
GRPSEP *NO: This file is not protected from the effects of other
Specifies a separator for groups of data (for example, file overrides; its values can be overridden by the effects
data sets and documents). This parameter is for the of previously called file override commands.
BSCEL communications type only and is ignored for all
*YES: This file is protected from the effects of any file
other communications types. If the ADDICFDEVE
override commands previously called.
command is not run for the specified program device
and this parameter is not overridden, GRPSEP(*DEVD) OVRSCOPE
is used. Specifies the extent of influence (scope) of the override.
*DEVD: The group separator option specified in the *ACTGRPDFN: The scope of the override is determined
device description is used. by the activation group of the program that calls this
command. When the activation group is the default acti-
*EOT: The end-of-transmission (EOT) BSC control
vation group, the scope equals the call level of the
character is used as a data group separator.
calling program. When the activation group is not the
*DEV3740: A null record (STXETX) is used as a data default activation group, the scope equals the activation
group separator. group of the calling program.
*OFCSYS: A block sent with the end-of-text (ETX) BSC *CALLLVL: The scope of the override is determined by
control character is used as a data group separator. the current call level. All open operations done at a call
level that is the same as or higher than the current call
RMTBSCEL
level are influenced by this override.
Specifies whether the type of BSCEL session is with a
BSCEL system. This parameter applies to the BSCEL *JOB: The scope of the override is the job in which the
communications type only and is ignored for all other override occurs.
communications types. If the ADDICFDEVE command
is not run for the specified program device and this
parameter is not overridden, RMTBSCEL(*DEVD) is
Examples
used. Example 1: Overriding the Device Entry with the Record
*DEVD: The RMTBSCEL option specified in the device Format Selection Attributes
description is used. OVRICFDEVE PGMDEV(BSCEL2) RMTLOCNAME(BSCNYC)
*NO: A RMTBSCEL attribute of *NO indicates that the FMTSLT(\RECID)
remote system cannot recognize BSCEL commands or
This command overrides the program device named BSCEL2
messages. In most cases, *NO is used when communi-
with a corresponding remote location named BSCNYC for
cating with remote systems such as a 3741 Data Entry
any ICF file associated with the job. The program device is
Station, an Office System 6, a 5230 Data Collection
overridden with the attributes of FMTSLT(*RECID).
System, or a System/38.
*YES: The remote system recognizes the BSCEL trans- Example 2: Overriding the Device Entry with the Record
action starting commands, transaction ending com- Format Selection and the Conversation Type Attributes
mands, and online messages. In most cases, *YES OVRICFDEVE PGMDEV(APPC1) RMTLOCNAME(\REQUESTER)
indicates that the remote system is another AS/400 FMTSLT(\RMTFMT) CNVTYPE(\SYS)
system, System/38, System/36, or a System/34 with
BSCEL support. This command overrides the program device entry named
APPC1 with a remote location name of *REQUESTER. The

Chapter 2. OS/400 Command Descriptions P3-521


OVRICFDEVE

program device entry is overridden with the Example 4: Specifying the Communications Device
FMTSLT(*RMTFMT) and CNVTYPE(*SYS) attributes. OVRICFDEVE PGMDEV(APPC) RMTLOCNAME(APPCMPLS)
DEV(MPLSLINE2)
Example 3: Overriding an Entry for Associated ICF Files
OVRICFDEVE PGMDEV(JOE) RMTLOCNAME(LUðMPLS) This command overrides the program device entry named
APPC with a remote location named APPCMPLS using
This command overrides the program device entry named device MPLSLINE2.
JOE with a remote location named LU0MPLS for any ICF file
associated with the job.

P3-522 OS/400 CL Reference - Part 2 (Full Version)


OVRICFF

OVRICFF (Override with Intersystem Communications Function File) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──OVRICFF──FILE(──overridden-file-name──)──┬──────────────────────────────────────────────┬───────────────────────────────────5
│ ┌─\FILE────────────────────────┐ │
│ │ ┌─\LIBL/────────┐ │ │
└─TOFILE(──┴─┼───────────────┼──file-name─┴──)─┘
├─\CURLIB/──────┤
└─library-name/─┘
(P) ──┬──────────────────────────────────┬──────────────────────────────────────────5
5──┬────────────────────────────────────────┬───
└─ACQPGMDEV(──┬─\NONE───────────────┬──)─┘ └─MAXRCDLEN(──┬─\CALC─────────┬──)─┘
└─program-device-name─┘ └─record-length─┘
5──┬─────────────────────────────────────┬──┬────────────────────────────────────┬──┬─────────────────┬─────────────────────────5
└─WAITFILE(──┬─\IMMED────────────┬──)─┘ └─WAITRCD(──┬─\NOMAX────────────┬──)─┘ └─LVLCHK(──\NO──)─┘
├─\CLS──────────────┤ ├─\IMMED────────────┤
└─number-of-seconds─┘ └─number-of-seconds─┘
5──┬──────────────────────┬──┬──────────────────────────────┬──┬──────────────────────────────────────────────────┬─────────────5
│ ┌─\NO──┐ │ │ ┌─\ACTGRPDFN─┐ │ └─DTAQ(──┬─\NONE──────────────────────────────┬──)─┘
└─SECURE(──┴─\YES─┴──)─┘ └─OVRSCOPE(──┼─\CALLLVL───┼──)─┘ │ ┌─\LIBL/────────┐ │
└─\JOB───────┘ └─┼───────────────┼──data-queue-name─┘
├─\CURLIB/──────┤
└─library-name/─┘
5──┬─────────────────────┬──┬──────────────────────────────┬───────────────────────────────────────────────────────────────────5%
└─SHARE(──┬─\NO──┬──)─┘ └─OPNSCOPE(──┬─\ACTGRPDFN─┬──)─┘
└─\YES─┘ └─\JOB───────┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Required Parameter


The Override with Intersystem Communications Function File FILE
(OVRICFF) command overrides the file named in the Specifies the name of the file being used by the program
program and overrides certain parameters of the file being to which this override command is applied. If
processed. Parameters overridden by this command can be TOFILE(*FILE) is specified, a database file must be
specified in the file description, in the program, or in other file specified. Otherwise, any device file or database file
override commands that are run later. can be specified.

If a file named in the program is being overridden, the name


of that file is specified in the FILE parameter and the name
Optional Parameters
of the overriding file (the file being processed) is specified in TOFILE
the TOFILE parameter. Specifies the qualified name of the ICF file (up to 10
characters in length) that is used instead of the file spec-
This command can also specify parameters to override ified in the FILE parameter or, if *FILE is specified, spec-
values contained in the file description of the overriding file. ifies that certain attributes are overridden by parameters
If the file named in the program is not being replaced but specified in this command. The parameters specified in
certain parameters of the file are being overridden, the name this command override the other values specified in the
of the file is specified in the FILE parameter and *FILE is ICF file or in the program.
specified in the TOFILE parameter. The parameters being
overridden are then specified by the other parameters of the *FILE: Some of the parameters of the ICF file named in
OVRICFF command. Parameters that are not specified do the FILE parameter are overridden by values specified in
not affect parameters specified in the file description, in the this parameter.
program, or in other override commands run later. The name of the ICF file description can be qualified by
one of the following library values:
More information on how overrides processing is performed
is in the Data Management book, the Application Display *LIBL: All libraries in the job's library list are
Programming book, and the Printer Device Programming searched until the first match is found.
book. *CURLIB: The current library for the job is
Note: To see the parameter and value descriptions for this searched. If no library is specified as the current
command, refer to the online help text. For more library for the job, the QGPL library is used.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1.

Chapter 2. OS/400 Command Descriptions P3-523


OVRICFF

library-name: Specify the name of the library to be *CLS: The job default wait time is used as the wait time
searched. for the file resources being allocated.

file-name: Specify the qualified name of the physical file number-of-seconds: Specify the number of seconds that
or device file that receives the copied records. If no the program waits for the file resources to be allocated
library qualifier is specified, *LIBL is used to locate the to the ICF file when the file is opened, or the wait time
file. However, if CRTFILE(*YES) is specified and the for the device allocated when an acquire operation is
specified file cannot be found, the file name must be performed to the file. Valid values range from 1 through
qualified with a library name. When the physical to-file 32767 seconds.
is created, it is placed in the specified library.
WAITRCD
ACQPGMDEV Specifies the number of seconds the program waits for
Specifies which program device is acquired to the file the completion of a read-from-invited-device operation to
when the file is opened. This parameter overrides the a multiple device file in a high-level language program.
value in the ICF file, in the program, or in the other Refer to the appropriate high-level language reference
OVRICFF commands run later. manual to determine when a file is treated as a multiple
device file. The program performing the read operation
*NONE: The file is opened without any devices
waits for input from all invited devices currently
acquired. All devices used with this file must be explic-
accessing the file. If a record is not returned from an
itly acquired before input/output is directed to them.
invited device in the specified amount of time, a notify
program-device-name: Specify the name of the program message is sent to the program. This parameter has no
device that is acquired when the file is opened. The effect on an input operation directed to a specific device.
name should be specified on the Add Intersystem Com-
Note: This parameter is also used to specify the time
munications Function Program Device Entry
(seconds) that a CL program waits to complete a
(ADDICFDEVE) command or the Override Intersystem
WAIT command. If a record is not returned from
Communications Function Program Device Entry
any of the devices that should return a record, an
(OVRICFDEVE) command as a program-device-name
escape message is sent to the CL program.
before the file is opened.
More information on the WAITRCD parameter is
MAXRCDLEN in the Receive File (RCVF), Send File (SNDF),
Specifies the maximum record length used when the file Send/Receive File (SNDRCVF), and WAIT (Wait)
is opened. This parameter overrides the value in the command descriptions.
ICF file, in the program, or in the other OVRICFF com- This parameter overrides the wait record value specified
mands run later. in the device file, in the program, or in other override
*CALC: The value calculated in the file is used when commands started later.
the file is opened. *NOMAX: There is no limit on the time the system waits
record-length: Specify the maximum record length (in for the completion of the operation.
bytes) used when the file is opened. Valid values range *IMMED: The program does not wait for the read-from-
from 1 through 32767. invited-device operation for the completion of the file. A
WAITFILE record must be available from an invited program device
Specifies the number of seconds that the program waits when the read-from-invited-program-device operation is
for the file resources and session resources to be allo- performed. If a record is not already available when the
read-from-invited-program-device operation is performed,
cated when the file is opened, or for the device or
session resources to be allocated when an acquire oper- a notify message is sent to the program.
ation is performed to the file. If those resources are not number-of-seconds: Specify the number of seconds that
allocated within the specified wait time, an error the program waits for the completion of the read-from-
message is sent to the program. More information on invited-device operation. Valid values range from 1
this parameter is in Appendix A, “Expanded Parameter through 32767.
Descriptions.”
LVLCHK
Note: An immediate allocation of the device by the Specifies whether the record format level identifiers in
device resource is required when an acquire the program are checked against those in the device file
operation is performed to the file. when the file is opened. If so, the record format identi-
This parameter overrides the wait time specified in the fiers in the program must match those in the device file.
device file, in the program, or in other OVRICFF com- Because the same record format name can exist in more
mands run later. than one file, each record format is given an internal
system identifier when it is created.
*IMMED: The program does not wait; when the file is
opened, an immediate allocation of the file resources is Note: This parameter overrides the value specified in
required. the device file, in the program, or in other over-
ride commands run later. Level checking cannot

P3-524 OS/400 CL Reference - Part 2 (Full Version)


OVRICFF

be done unless the program contains the record *CURLIB: The current library for the job is
format identifiers. This command cannot over- searched. If no library is specified as the current
ride level checking from *NO to *YES. library for the job, the QGPL library is used.
*NO: The level identifiers of the record formats are not library-name: Specify the name of the library to be
checked when the file is opened. searched.

SECURE data-queue-name: Specify the name of the data queue


Specifies whether this file is safe from the effects of pre- that is to receive an entry from the system when the
viously called file override commands. If SECURE is not data-available event is signaled.
specified, processing occurs as if SECURE(*NO) is
SHARE
specified.
Specifies whether the open data path (ODP) for the ICF
*NO: This file is not protected from the effects of other file is shared with other programs in the routing step.
file overrides; its values can be overridden by the effects When an ODP is shared, the programs accessing the
of previously called file override commands. file share facilities such as the file status and the buffer.
*YES: This file is protected from the effects of any file More information on shared database files is in the DB2
override commands previously called. for AS/400 Database Programming book.
OVRSCOPE *NO: The ODP created by the program with this attri-
Specifies the extent of influence (scope) of the override. bute is not shared with other programs in the routing
step. Every time a program opens the file with this attri-
*ACTGRPDFN: The scope of the override is determined
bute, a new ODP to the file is created and activated.
by the activation group of the program that calls this
command. When the activation group is the default acti- *YES: The ODP created with this attribute is shared
vation group, the scope equals the call level of the with each program in the routing step that also specifies
calling program. When the activation group is not the SHARE(*YES) when it opens the file.
default activation group, the scope equals the activation
Note: When SHARE(*YES) is specified and control is
group of the calling program.
passed to a program, a read operation in that
*CALLLVL: The scope of the override is determined by program retrieves the next input record. A write
the current call level. All open operations done at a call operation produces the next output record.
level that is the same as or higher than the current call
OPNSCOPE
level are influenced by this override.
Specifies the extent of influence (scope) of the open
*JOB: The scope of the override is the job in which the operation.
override occurs.
*ACTGRPDFN: The scope of the open operation is
DTAQ determined by the activation group of the program that
Specifies the name of the data queue that receives an called the OVRICFF command processing program. If
entry from the system when a data-available event is the activation group is the default activation group, the
signaled from an invited display device. The data queue scope is the call level of the caller. If the activation
need not exist when the display file is created since the group is a non-default activation group, the scope is the
name specified on this parameter is not evaluated until activation group of the caller.
the file is used. More information on the data queue
*JOB: The scope of the open operation is the job in
function is in the CL Programming book.
which the open operation occurs.
*NONE: A data queue does not receive an entry from
the system.
Example
The name of the data queue can be qualified by one of
OVRICFF FILE(ICFHIST) TOFILE(PRSNNL/ICFCURT)
the following library values:

*LIBL: All libraries in the job's library list are This command overrides the file named ICFHIST to the ICF
searched until the first match is found. file named ICFCURT in library PRSNNL.

Chapter 2. OS/400 Command Descriptions P3-525


OVRMSGF

OVRMSGF (Override with Message File) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ───────────────────────5
55──OVRMSGF──MSGF(──overridden-message-file-name──)──TOMSGF(──┼───────────────┼──message-file-name──)────
├─\CURLIB/──────┤
└─library-name/─┘
5──┬──────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\NO──┐ │
└─SECURE(──┴─\YES─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose The name of the message file can be qualified by one of


the following library values:
The Override with Message File (OVRMSGF) command
overrides a message file used in a program. The overriding *LIBL: All libraries in the job's library list are
message file (specified in the TOMSGF parameter) is used searched until the first match is found.
whenever a message is sent or retrieved and the overridden *CURLIB: The current library for the job is
message file is specified. searched. If no library is specified as the current
library for the job, the QGPL library is used.
The overriding message file need not contain all the mes-
sages that the overridden file contains. When a message is library-name: Specify the name of the library to be
received or retrieved and the message identifier cannot be searched.
found in the overriding message file, the overridden message message-file-name: Specify the name of the message
file is searched for the identifier. Overriding message files file to use.
can be overridden, resulting in a chain of overrides. This
chain of overrides provides a list of message files that are
searched when a message is received or retrieved. Up to 30 Optional Parameter
message file overrides can be specified in a program.
SECURE
More information on overriding files is in the Data Manage- Specifies whether this file is safe from the effects of pre-
ment book, the Application Display Programming book, and viously called file override commands. If SECURE is not
the Printer Device Programming book. specified, processing occurs as if SECURE(*NO) is
specified.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more *NO: This file is not protected from the effects of other
information about printing the help text, refer to file overrides; its values can be overridden by the effects
“Printing CL Command Descriptions” in Chapter 1. of previously called file override commands.
*YES: This file is protected from the effects of any file
override commands previously called.
Required Parameters
MSGF
Example
Specifies the name of the message file being used by
the program to which this override command is applied. OVRMSGF MSGF(WSUSRMSG) TOMSGF(ORDENTMSGD)

TOMSGF This override command causes the defaults for messages


Specifies the qualified name of the message file that is stored in ORDENTMSGD to be used instead of defaults
used instead of the message file specified in the MSGF stored in WSUSRMSG (which contains messages designed
parameter or, if the names are the same, specifies that for work station users). As a result of this command, the
the SECURE parameter specified in the command is messages received by the order entry users are tailored to
used for the message file. their own environment.

P3-526 OS/400 CL Reference - Part 2 (Full Version)


OVRPRTF

| OVRPRTF (Override with Printer File) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──OVRPRTF──FILE(──┬─\PRTF──────────────┬──)──┬─────────────────────────────────────────────────────────────┬──────────────────5
└─file-override-name─┘ │ ┌─\FILE───────────────────────────────────────┐ │
│ │ ┌─\LIBL/────────┐ │ │
└─TOFILE(──┴─┼───────────────┼──printer-device-file-name─┴──)─┘
├─\CURLIB/──────┤
└─library-name/─┘
(P) ──┬─────────────────────────────┬─────────────────────────────────────────────────────────────5
5──┬──────────────────────────┬───
└─DEV(──┬─\SYSVAL─────┬──)─┘ └─DEVTYPE(──┬─\SCS───────┬──)─┘
├─\JOB────────┤ ├─\IPDS──────┤
└─device-name─┘ ├─\USERASCII─┤
├─\AFPDS─────┤
├─\AFPDSLINE─┤
└─\LINE──────┘
5──┬────────────────────────────────────────────────────────┬──┬──────────────────┬──┬───────────────────┬──────────────────────5
└─PAGESIZE(──page-length──┬─────────────────────────┬──)─┘ └─LPI(──┬─3───┬──)─┘ └─CPI(──┬─5────┬──)─┘
│ ┌─\ROWCOL─┐ │ ├─4───┤ ├─1ð───┤
└─page-width──┼─────────┼─┘ ├─6───┤ ├─12───┤
└─\UOM────┘ ├─7.5─┤ ├─13.3─┤
├─8───┤ ├─15───┤
├─9───┤ ├─16.7─┤
└─12──┘ ├─18───┤
└─2ð───┘
5──┬──────────────────────────────────────────────────────┬──┬─────────────────────────────────────────────────────┬────────────5
└─FRONTMGN(──┬─\DEVD──────────────────────────────┬──)─┘ └─BACKMGN(──┬─\FRONTMGN──────────────────────────┬──)─┘
└─┬─ð───────────┬──┬─ð─────────────┬─┘ ├─\DEVD──────────────────────────────┤
└─offset-down─┘ └─offset-across─┘ └─┬─ð───────────┬──┬─ð─────────────┬─┘
└─offset-down─┘ └─offset-across─┘
5──┬──────────────────────────────────┬──┬────────────────────┬──┬─────────────────────────────────────────────────────┬────────5
└─OVRFLW(──overflow-line-number──)─┘ └─FOLD(──┬─\YES─┬──)─┘ │ ┌─' '─────────────────────┐ │
└─\NO──┘ └─RPLUNPRT(──┬─\YES──┼─────────────────────────┼─┬──)─┘
│ └─'replacement-character'─┘ │
└─\NO───────────────────────────────┘
5──┬─────────────────────┬──┬──────────────────────────────┬──┬───────────────────────────┬─────────────────────────────────────5
└─ALIGN(──┬─\NO──┬──)─┘ └─DRAWER──┬─\E1───────────┬──)─┘ └─OUTBIN──┬─\DEVD──────┬──)─┘
└─\YES─┘ ├─\FORMDF───────┤ └─output-bin─┘
└─source-drawer─┘
5──┬──────────────────────────────────────────┬──┬────────────────────────────┬──┬─────────────────────────────┬────────────────5
└─FONT(──┬─\CPI───────────────────────┬──)─┘ └─FORMFEED(──┬─\DEVD────┬──)─┘ └─PRTQLTY(──┬─\STD───────┬──)─┘
├─\DEVD──────────────────────┤ ├─\AUTOCUT─┤ ├─\DRAFT─────┤
│ ┌─\NONE──────┐ │ ├─\CONT────┤ ├─\DEVD──────┤
└─identifier──┼────────────┼─┘ ├─\CONT2───┤ ├─\NLQ───────┤
└─point-size─┘ └─\CUT─────┘ └─\FASTDRAFT─┘
5──┬───────────────────────────┬──┬───────────────────────────────────────────────┬──┬────────────────────────────┬─────────────5
(1) ┘ └─FIDELITY──┬─\CONTENT──┬──)─┘
└─CTLCHAR(──┬─\NONE────┬──)─┘ └─CHLVAL(──┬─\NORMAL─────────────────────┬──)───
├─\FCFC────┤ └─channel-number──line-number─┘ └─\ABSOLUTE─┘
└─\MACHINE─┘
5──┬─────────────────────────────────────────────────┬──┬───────────────────────┬───────────────────────────────────────────────5
| └─CHRID(──┬─\DEVD────────────────────────────┬──)─┘ └─DECFMT(──┬─\FILE─┬──)─┘
| ├─\SYSVAL──────────────────────────┤ └─\JOB──┘
├─\JOBCCSID────────────────────────┤
└─graphic-character-set──code-page─┘
5──┬───────────────────────────────────────────────────────────────────────────────────────────────────┬────────────────────────5
└─FNTCHRSET(──┬─\FONT──────────────────────────────────────────────────────────────────────────┬──)─┘
| │ ┌─\LIBL/────────┐ ┌─\LIBL/────────┐ ┌─\NONE──────┐ │
| └─┼─\CURLIB/──────┼──character-set──┼─\CURLIB/──────┼──code-page──┴─point-size─┴─┘
└─library-name/─┘ └─library-name/─┘
5──┬────────────────────────────────────────────────────────────────────┬───────────────────────────────────────────────────────5
└─CDEFNT(──┬─\FNTCHRSET─────────────────────────────────────────┬──)─┘
| │ ┌─\LIBL/────────┐ ┌─\NONE──────┐ │
| └─┼─\CURLIB/──────┼──coded-font-name──┴─point-size─┴─┘
└─library-name/─┘
5──┬─────────────────────────────────────────────────────────┬──┬─────────────────────────────────────────────────────────┬─────5
│ ┌─\NONE───────────────────────────────────┐ │ │ ┌─\NONE───────────────────────────────────┐ │
│ │ ┌─\LIBL/────────┐ │ │ └─FORMDF(──┼─\DEVD───────────────────────────────────┼──)─┘
└─PAGDFN(──┴─┼───────────────┼──page-definition-name─┴──)─┘ │ ┌─\LIBL/────────┐ │
├─\CURLIB/──────┤ └─┼───────────────┼──form-definition-name─┘
└─library-name/─┘ ├─\CURLIB/──────┤
└─library-name/─┘

Chapter 2. OS/400 Command Descriptions P3-527


OVRPRTF

5──┬──────────────────────────────────────────┬──┬─────────────────────────┬──┬───────────────────────┬─────────────────────────5
│ ┌─\NONE──────────────────┐ │ │ ┌─\NO──┐ │ └─PAGRTT(──┬─\AUTO─┬──)─┘
│ │ ┌──
─────────────────┐ │ │ └─TBLREFCHR(──┴─\YES─┴──)─┘ ├─\DEVD─┤
6 (3) ─┴──)─┘
└─AFPCHARS(──┴───coded-font-name─┴─── ├─\COR──┤
├─ð─────┤
├─9ð────┤
├─18ð───┤
└─27ð───┘
5──┬────────────────────┬──┬───────────────────────┬──┬──────────────────────────────┬──┬──────────────────────┬────────────────5
└─MULTIUP(──┬─1─┬──)─┘ └─REDUCE(──┬─\TEXT─┬──)─┘ └─PRTTXT(──┬─\JOB─────────┬──)─┘ └─JUSTIFY(──┬─ð───┬──)─┘
├─2─┤ └─\NONE─┘ ├─\BLANK───────┤ ├─5ð──┤
├─3─┤ └─'print-text'─┘ └─1ðð─┘
└─4─┘
5──┬─────────────────────────┬──┬────────────────────┬──────────────────────────────────────────────────────────────────────────5
└─DUPLEX(──┬─\NO─────┬──)─┘ └─UOM(──┬─\INCH─┬──)─┘
├─\YES────┤ └─\CM───┘
├─\TUMBLE─┤
└─\FORMDF─┘
5──┬──────────────────────────────────────────────────────────────────────────────────────┬─────────────────────────────────────5
│ ┌─\NONE──────────────────────────────────────────────────────────────┐ │
│ │ ┌─\LIBL/────────┐ │ │
└─FRONTOVL(──┴─┼───────────────┼──overlay──┬────────────────────────────────────┬─┴──)─┘
├─\CURLIB/──────┤ │ ┌─ð───────────┐ ┌─ð─────────────┐ │
└─library-name/─┘ └─┴─offset-down─┴──┼───────────────┼─┘
└─offset-across─┘
5──┬─────────────────────────────────────────────────────────────────────────────────────┬──┬──────────────────────┬────────────5
│ ┌─\FRONTOVL──────────────────────────────────────────────────────────┐ │ └─DFRWRT(──┬─\YES─┬──)─┘
└─BACKOVL(──┼─\NONE──────────────────────────────────────────────────────────────┼──)─┘ └─\NO──┘
│ ┌─\LIBL/────────┐ │
└─┼───────────────┼──overlay──┬────────────────────────────────────┬─┘
├─\CURLIB/──────┤ │ ┌─ð───────────┐ ┌─ð─────────────┐ │
└─library-name/─┘ └─┴─offset-down─┴──┼───────────────┼─┘
└─offset-across─┘
5──┬─────────────────────┬──┬────────────────────────────────────────────────────┬──┬─────────────────────────────┬─────────────5
└─SPOOL(──┬─\YES─┬──)─┘ └─OUTQ(──┬─\DEV─────────────────────────────────┬──)─┘ └─FORMTYPE(──┬─\STD──────┬──)─┘
└─\NO──┘ ├─\JOB─────────────────────────────────┤ └─form-type─┘
│ ┌─\LIBL/────────┐ │
└─┼───────────────┼──output-queue-name─┘
├─\CURLIB/──────┤
└─library-name/─┘
5──┬────────────────────────────────┬──┬───────────────────────────────────────────────────┬────────────────────────────────────5
(2) ┘ └─PAGERANGE(──┬─\ENDPAGE──────┬──┬─────────────┬──)─┘
└─COPIES(──number-of-copies──)───
└─starting-page─┘ ├─\END────────┤
└─ending-page─┘
5──┬──────────────────────────────────┬──┬────────────────────────────────────────┬──┬────────────────────────────┬─────────────5
└─MAXRCDS(──┬─\NOMAX──────────┬──)─┘ └─FILESEP(──number-of-file-separators──)─┘ └─SCHEDULE(──┬─\JOBEND──┬──)─┘
└─maximum-records─┘ ├─\FILEEND─┤
└─\IMMED───┘
5──┬────────────────────┬──┬────────────────────┬──┬─────────────────────────────────┬──┬───────────────────────────┬───────────5
└─HOLD(──┬─\NO──┬──)─┘ └─SAVE(──┬─\NO──┬──)─┘ └─OUTPTY(──┬─\JOB────────────┬──)─┘ └─USRDTA(──┬─\SOURCE───┬──)─┘
└─\YES─┘ └─\YES─┘ └─output-priority─┘ └─user-data─┘
5──┬──────────────────────────────┬──┬──────────────────────────────────┬──┬──────────────────────────────────────┬─────────────5
└─SPLFOWN(──┬─\CURUSRPRF─┬── )─┘ └─USRDFNOPT(──┬─\NONE─────────┬──)─┘ └─USRDFNDTA(──┬─\NONE─────────────┬──)─┘
├─\JOB───────┤ │ ┌──
────────┐ │ └─user-defined-data─┘
├─\CURGRPPRF─┤ └──6─option─┴───
(3) ─┘
└─\JOBGRPPRF─┘
5──┬────────────────────────────────────────────────────────────────┬──┬─────────────────────────────────────┬──────────────────5
└─USRDFNOBJ(──┬─\NONE───────────────────────────────────────┬──)─┘ └─SPLFNAME(──┬─\FILE─────────────┬──)─┘
│ ┌─\LIBL/────────┐ │ └─spooled-file-name─┘
└─┼───────────────┼──object-name──┬─\DTAARA─┬─┘
├─\CURLIB/──────┤ ├─\DTAQ───┤
└─library-name/─┘ ├─\FILE───┤
├─\PSFCFG─┤
├─\USRIDX─┤
├─\USRQ───┤
└─\USRSPC─┘
5──┬─────────────────────────────────────┬──┬─────────────────┬──┬──────────────────────┬──┬──────────────────────────────┬─────5
└─WAITFILE(──┬─\IMMED────────────┬──)─┘ └─LVLCHK(──\NO──)─┘ │ ┌─\NO──┐ │ │ ┌─\ACTGRPDFN─┐ │
├─\CLS──────────────┤ └─SECURE(──┴─\YES─┴──)─┘ └─OVRSCOPE(──┼─\CALLLVL───┼──)─┘
└─number-of-seconds─┘ └─\JOB───────┘
5──┬─────────────────────┬──┬──────────────────────────────┬──┬──────────────────────┬──┬─────────────────────────┬─────────────5
└─SHARE(──┬─\NO──┬──)─┘ └─OPNSCOPE(──┬─\ACTGRPDFN─┬──)─┘ └─IGCDTA(──┬─\NO──┬──)─┘ └─IGCEXNCHR(──┬─\YES─┬──)─┘
└─\YES─┘ └─\JOB───────┘ └─\YES─┘ └─\NO──┘

P3-528 OS/400 CL Reference - Part 2 (Full Version)


OVRPRTF

5──┬─────────────────────────┬──┬────────────────────────────┬──┬─────────────────────────┬─────────────────────────────────────5
└─IGCCHRRTT(──┬─\NO──┬──)─┘ └─IGCCPI(──┬─\CPI───────┬──)─┘ └─IGCSOSI(──┬─\YES───┬──)─┘
└─\YES─┘ ├─\CONDENSED─┤ ├─\NO────┤
├─5──────────┤ └─\RIGHT─┘
├─6──────────┤
└─1ð─────────┘
5──┬───────────────────────────────────────────────────────────────────┬───────────────────────────────────────────────────────5%
└─IGCCDEFNT(──┬─\SYSVAL────────────────────────────────────────┬──)─┘
| │ ┌─\LIBL/────┐ ┌─\NONE──────┐ │
| └─┼─\CURLIB/──┼──coded-font-name──┴─point-size─┴─┘
└─lib-name/─┘
Notes:
1 A maximum of 12 channels with corresponding line numbers are allowed.

2 Valid values range from 1 through 255.

3 A maximum of 4 repetitions.

P All parameters preceding this point can be specified in positional form.

Purpose file-override-name: Specify the names of one or more


overridden files for which the overrides in the call level
The Override with Printer File (OVRPRTF) command is used are applied.
to (1) override (replace) the file named in the program, (2)
override certain parameters of a file that are used by the
program, or (3) override the file named in the program and Optional Parameters
override certain parameters of the file processed. Parame- TOFILE
ters overridden by this command are specified in the file Specifies the qualified name of the printer file that is
description, in the program, or in other file override com- used instead of the file specified in the FILE parameter.
mands run in the following command. If *FILE is specified, this parameter specifies that certain
attributes are overridden by the parameters specified in
If a file named in the program is overridden, the name of that
this command. The parameters specified on this
file is specified in the FILE parameter and the name of the
OVRPRTF command override the same parameters
overriding file (the file processed) is specified in the TOFILE
specified in the printer file, in the program, or in other
parameter. The OVRPRTF command also specifies parame-
called OVRPRTF commands.
ters to override values contained in the file description of the
overriding file. If the file named in the program is not *FILE: The printer file named in the FILE parameter has
replaced but certain parameters of the file are overridden, the some of its parameters overridden by values specified in
name of the file is specified in the FILE parameter and *FILE this command.
is specified in the TOFILE parameter. The parameters over- The name of the printer file can be qualified by one of
ridden are then specified by the other parameters of the the following library values:
OVRPRTF command. Parameters not specified do not affect
parameters specified in the file description, in the program, or *LIBL: All libraries in the job's library list are
in other file override commands run later. searched until the first match is found.
*CURLIB: The current library for the job is
More information on overriding files is in the Printer Device
searched. If no library is specified as the current
Programming book.
library for the job, the QGPL library is used.
Note: To see the parameter and value descriptions for this
library-name: Specify the name of the library to be
command, refer to the online help text. For more
searched.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. printer-device-file-name: Specify the name of the printer
file that is used instead of the overridden file.
Required Parameter DEV
Specifies the name of a printer device description. For
FILE
nonspooled output, this identifies the printer device used
Specifies the name of the file being used by the program
to produce the printed output. For spooled output, the
to which this override command is applied. If
file is placed on the output queue determined by the
TOFILE(*FILE) is specified, a display device file must be
OUTQ parameter. If OUTQ(*DEV) is used, the file is
specified. Otherwise, any device file or database file
placed on the output queue with the same name as the
can be specified.
device.
*PRTF: The *PRTF file override, which exists in the call
*SYSVAL: The value specified in the system value
level where this command is entered, is applied.
QPRTDEV is used.

Chapter 2. OS/400 Command Descriptions P3-529


OVRPRTF

*JOB: The printer device specified in the job description PAGESIZE


is used. Specifies the length and width of the printer forms used
by this printer file. The length is specified in lines per
device-name: Specify the name of the printer associ-
page or by the units specified for the UOM parameter.
ated with this display station. The printer and the
The width is specified in print positions (characters) per
display station must be attached to the same controller.
line or by the units specified for the UOM parameter.
When printing double-byte character set (DBCS) data,
specify a DBCS printer (5553 or 5583). The page size must be specified with reference to the
way the data is printed on the page. For example, if
DEVTYPE
using 8.5 inch wide by 11.0 inch long forms and printing
Specifies the type of data stream created for a printer
at 6 lines per inch with a 10-pitch font, specify
file.
PAGESIZE(66 85) PAGRTT(0). However, to rotate the
*SCS: An SNA character stream (SCS) is created. This page, specify the page size for an 11.0 inch wide by 8.5
parameter must be specified when using the 3287, 3812 inch long page and enter PAGESIZE(51 110)
SCS, 3816 SCS, 4214, 4234 SCS, 4245, 5219, 5224, PAGRTT(90).
5225, 5256, 5262, 6252, or 6262 work station printers.
Note: Specify PAGRTT(*AUTO) or PAGRTT(*DEVD)
Ÿ If *SCS is specified and the spooled printer file is and PRTQLTY(*DRAFT) on this command to
directed to an IPDS* printer, the SCS printer file is enable automatic reduction or rotation if the data
converted to emulate an IPDS printer file. More does not fit on the paper.
information is in the Printer Device Programming Specify PAGRTT(*COR) on this command to
book. enable automatic reduction whether or not the
Double-Byte Character Set Consideration: data fits on the paper.

When using the 5553 and 5583 DBCS-capable printers, This parameter overrides the form size values specified
DEVTYPE(*SCS) must be specified. in the printer file, in the program, or in other called
OVRPRTF commands.
*IPDS: An intelligent printer data stream* (IPDS*) is
created. This parameter can be specified when using an Element 1: Page Length Value
IPDS printer. page-length: Specify the page length that is used by
this printer file. Although a value ranging from 1 through
Ÿ If *IPDS is specified and the spooled printer file is
255 can be specified as the page length, the value spec-
directed to a printer other than an IPDS printer, the
ified must not exceed the actual length of the forms
IPDS printer file is converted to an SCS printer file.
used.
More information is in the Printer Device Program-
ming book. More information about the page lengths that are valid
for each printer type is in Appendix B, “Font, Character
*USERASCII: An ASCII data stream is placed on a Identifier, and Other Values Supported for Different
spooled output queue. The user is responsible for Printers.”
placing the entire hexadecimal data stream in the buffer,
Element 2: Page Width Value
since the AS/400 system does not change or validate
the values that are passed. This value cannot be speci- page-width: Specify the page width used by this printer
fied with SPOOL(*NO). file. The value specified must not exceed the actual
width of the forms used.
*AFPDS: An advanced function print data stream
(AFPDS) is created. Some systems refer to this data More information about page width is in Appendix B,
stream as MODCA-P. “Font, Character Identifier, and Other Values Supported
for Different Printers.”
*AFPDSLINE: Mixed data (line data and AFPDS data)
is created. This value can be specified when using the Element 3: Method of Measure
3812 IPDS, 3816 IPDS, 3820, 3825, 3827, 3828, 3829,
*ROWCOL: Page length and page width are measured
3831, 3835, 3900, 3912, 3916, 3930, 3935, 4028, 4224,
as numbers of rows and columns.
4230, 4234, 6404, 6408, or 6412 IPDS* printer. The
printer must be configured with AFP(*YES). *UOM: Page length and page width are measured in
the units specified on the UOM parameter.
*LINE: Line data is created. This value can be speci-
fied when using the 3812 IPDS, 3816 IPDS, 3820, 3825, LPI
3827, 3828, 3829, 3831, 3835, 3900, 3912, 3916, 3930, Specifies the line spacing setting on the printer, in lines
3925, 4028, 4224, 4230, 4234, 6406, 6408, or 6412 per inch, used by this printer file.
IPDS printers. The printer must be configured with
The line spacing on the 5256 printer must be set manu-
AFP(*YES).
ally. When the lines per inch (LPI) value on this param-
eter changes (from the value on the previous printer file),
an inquiry message is sent to the message queue asso-

P3-530 OS/400 CL Reference - Part 2 (Full Version)


OVRPRTF

ciated with the printer that requests a change to the LPI in Appendix B, “Font, Character Identifier, and Other
value. Values Supported for Different Printers.”
The line spacing on the 4214, 4224, 4230, 4234, 4245, This parameter overrides the value specified in the
and 5262 Printers is set by a print command. These printer file, in the program, or in other called OVRPRTF
also allow setting the lines per inch spacing on the commands.
control panel of the printer. The lines per inch value
5: Double-byte character density is 5 characters per
must not be set at the printer. If the LPI value is over-
inch.
ridden at the control panel, the system overrides the
value set with the LPI value of the next printer file 10: Character density is 10 characters per inch.
received. 12: Character density is 12 characters per inch.
More information about the lines per page and lines per 13.3: Character density is 13.3 characters per inch.
inch that are valid for each printer type is in Appendix B, This value is valid only for double-byte character set
“Font, Character Identifier, and Other Values Supported (DBCS) printers.
for Different Printers.”
15: Character density is 15 characters per inch.
This parameter overrides the overflow value specified in
the printer file, in the program, or in other called 16.7: Character density is 16.7 characters per inch.
OVRPRTF commands. 18: Character density is 18 characters per inch. This
3: The line spacing on the printer is 3 lines per inch. value is valid only on double-byte character set (DBCS)
This value is valid only for double-byte character set printers.
(DBCS) data. 20: Character density is 20 characters per inch. This
4: The line spacing on the printer is 4 lines per inch. value is valid only on double-byte character set (DBCS)
printers.
6: The line spacing on the printer is 6 lines per inch.
FRONTMGN
7.5: The line spacing on the printer is 7.5 lines per inch.
Specifies the offset, down and across, of the origin from
This value is valid only for double-byte character set
the edge on the front side of the paper. The offsets are
(DBCS) printers.
in the units of measure specified on the UOM parameter.
8: The line spacing on the printer is 8 lines per inch. If UOM(*CM) is specified, valid values range from 0
Note: When printing double-byte character set (DBCS) through 57.79, and if UOM(*INCH) is specified, valid
data for a file specified with LPI(8), use double values range from 0 through 22.57. This parameter can
spacing. Otherwise, the DBCS data does not only be used for printer files with DEVTYPE(*AFPDS)
print correctly. Alphanumeric data, however, specified.
prints correctly in single spacing when LPI(8) is *DEVD: The no-print border from the printer is used to
specified. place the text on the page when printing to a printer con-
9: The line spacing on the printer is 9 lines per inch. figured as AFP(*YES). A margin of 0 is used for IPDS*
printers without a no-print border, or which are config-
12: The line spacing on the printer is 12 lines per inch. ured as AFP(*NO).
CPI Element 1: Offset Down
Specifies the printer character density, in characters per
0: No offset of the origin occurs.
inch (CPI), used by this printer file.
offset-down: Specify the offset of the origin from the top
For the printers that support fonts, the value specified in of the page.
the font special value implies the CPI. If FONT(*CPI) is
specified, the font used is based on the CPI value. The Element 2: Offset Across
following diagram describes the default font ID for each 0: No offset of the origin occurs.
CPI value:
offset-across: Specify the offset of the origin from the
CPI FONT ID DEFAULT left side of the page.
5 245 BACKMGN
10 011 Specifies the offset, down and across, of the origin from
12 087 the edge on the back side of the paper. The offsets are
13.3 204 in the units of measure specified on the UOM parameter.
15 222 If UOM(*CM) is specified, valid values range from 0
16.7 400 through 57.79, and if UOM(*INCH) is specified, valid
18 252 values range from 0 through 22.57. This parameter can
20 281 only be used for printer files with DEVTYPE(*AFPDS)
specified.
More information about the characters per page and
characters per inch that are valid for each printer type is

Chapter 2. OS/400 Command Descriptions P3-531


OVRPRTF

*FRONTMGN: The offsets specified on the *YES: Records whose length exceeds the page width
FRONTMGN parameter are used. are folded on the following lines. Records whose length
exceeds the form width are folded on the following lines.
*DEVD: The no-print border from the printer is used to
place the text on the page when printing to a printer con- *NO: Records are not folded; if a record is longer than
figured as AFP(*YES). A margin of 0 is used for IPDS* the page width, only the part of the record that fits on
printers without a no-print border, or which are config- one line is printed.
ured as AFP(*NO).
RPLUNPRT
Element 1: Offset Down Specifies (1) whether unprintable characters are
0: No offset of the origin occurs. replaced and (2) which substitution character (if any) is
used. An unprintable character is a character the printer
offset-down: Specify the offset of the origin from the top is unable to print.
of the page.
Double-Byte Character Set Considerations:
Element 2: Offset Across
For double-byte character set (DBCS) data, an unprint-
0: No offset of the origin occurs.
able character is one that cannot be processed. When
offset-across: Specify the offset of the origin from the using DBCS-capable printers, consider the following:
left side of the page.
Ÿ If IGCEXNCHR(*YES) is also specified, the system
OVRFLW replaces unprintable extension characters with
Specifies the line number on the current page at which DBCS underline characters. There may be some
overflow to a new page begins. Generally, after the cases in which the system is unable to replace an
specified line is printed, the printer overflows to the next unprintable character with a DBCS underline char-
page before printing continues. Margins specified for the acter. In this case, the undefined character is
printer file are ignored when determining overflow. More printed.
information is in the Printer Device Programming book.
Ÿ If IGCEXNCHR(*NO) is also specified, the device
This parameter overrides the overflow value specified in
replaces all extension characters with the undefined
the printer file, in the program, or in other called
character. Choosing a blank as the replacement
OVRPRTF commands.
character for alphanumeric characters might
overflow-line-number: Specify the line number on the improve system performance.
current page at which overflow to a new page begins,
More information is in the Printer Device Programming
whether or not printing has occurred on that line. The
book.
value specified must not be greater than the page length
(PAGESIZE). Margins specified for the printer file are Element 1: Replace Character
ignored when determining overflow.
*YES: Unprintable characters are replaced. The
FOLD program is not notified when unprintable characters are
Specifies whether all positions in a record are printed detected. Note the DBCS considerations above.
when the record length exceeds the page width (speci- *NO: Unprintable characters are not replaced. When
fied by the PAGESIZE parameter). When folding is an unprintable character is detected, a message is sent
specified and a record exceeds the page width, any to the program.
portion of the record that cannot be printed on the first
line continues (is folded) on the next line or lines until Element 2: Replacement Character
the entire record has been printed. ' ': Specify, if *YES is also specified on this parameter,
that a blank is used as the substitution character when
The FOLD parameter is ignored under the following con-
an unprintable character is detected.
ditions:
'replacement-character': Specify, if *YES is also speci-
Ÿ When DEVTYPE(*SCS) is not specified.
fied on this parameter, the replacement character that is
Ÿ When printing through OfficeVision*.
used each time an unprintable character is detected.
Ÿ When in the S/36 execution environment.
Any printable EBCDIC character can be specified. Valid
Double-Byte Character Set Considerations: values range from 40 through 99 and A1 through FE.

The system ignores this parameter when printing double- ALIGN


byte character set (DBCS) files. The system assumes Specifies whether the page must be aligned in the
that DBCS records fit on a printed line. If the record printer before printing is started. If ALIGN(*YES) and
exceeds the page width, the system continues printing SPOOL(*NO) are specified, and forms alignment is
the record on the next line. required, the system sends a message to the message
queue specified in the printer device description and
This parameter overrides the value specified in the
waits for a reply to the message. When spool (*YES) is
printer file, in the program, or in other called OVRPRTF
specified on the CRTPRTF command and ALIGN(*FILE)
commands.

P3-532 OS/400 CL Reference - Part 2 (Full Version)


OVRPRTF

is specified on the STRPRTWTR command, then this *NONE: The point size is supplied by the system and is
parameter is used to determine whether an alignment determined by the specified font identifier.
message is sent by the system.
point-size: Specify a point size ranging from 0.1 through
This parameter is ignored when cut sheets are used 999.9.
(spooled and direct output). Page alignment can be
FORMFEED
done only for text-only files. Page alignment cannot be
Specifies the form feed attachment used by this printer
done for print jobs containing graphics or bar codes.
device file.
This parameter overrides the alignment value specified
*DEVD: The forms are fed into the printer in the manner
in the printer file, in the program, or in other called
specified in the device description.
OVRPRTF commands.
*CONT: Continuous forms are used by the printer. The
*NO: No page alignment is required.
tractor feed attachment must be on the device.
*YES: The page is aligned before the output is printed.
*CONT2: Continuous forms are used by the printer.
DRAWER The form is fed from the secondary tractor feed attach-
Specifies the source drawer used when single-cut sheets ment. The secondary tractor feed attachment must be
are fed into the printer (specified by on the printer device.
FORMFEED(*AUTOCUT)).
*CUT: Single-cut sheets are used by the printer. Each
*E1: The envelopes are fed from the envelope drawer sheet must be manually loaded. For cut sheets, the
on the sheet-feed paper handler. forms alignment message is not sent.
*FORMDF: The paper is fed from the source drawer *AUTOCUT: The sheet-feed attachment must be on the
specified in the form definition. If a form definition is not printer. Single-cut sheets are automatically fed into the
specified, then source drawer 1 is used. printer. The forms alignment message is not sent for cut
source-drawer: Specify the drawer from which the paper sheets.
is fed. Valid values range from 1 through 255. PRTQLTY
OUTBIN Specifies, for the 3812 SCS, 3816 SCS, 4214, 4224,
Specifies the destination of the output on printers 4230, 4234, and 5219 printers, the quality of print
capable of multiple output bins. produced.

*DEVD: The destination of the output is the device For the 5219 Printer, different print qualities are
default output bin. produced by varying the speed at which the print ribbon
advances. Quality mode (*STD or *NLQ) results in
output-bin: Specify the output bin for the destination of normal print ribbon advancement. In draft mode
the output. Valid values range from 1 through 65535. (*DRAFT), the ribbon advances at a rate of one-third the
FONT distance it advances in quality mode. The 5219 Printer
Specifies the font identifier and point size used with this has a conserve ribbon switch that overrides the value of
printer device file. If a font identifier or point size is not *DRAFT specified by this parameter.
specified, the system automatically sets them. For the 3812 SCS and 3816 SCS Printers, the automatic
More information about the valid font identifiers, the hardware selection of computer output reduction printing
display value, the characters per inch value implied with selected through soft switches on the printers occurs
each font style, a description of each font style, and only when *DRAFT is specified for PRTQLTY and
whether the font is supported on a particular printer is in PAGRTT is *DEVD. If PAGRTT(*COR) is specified, the
Appendix B, “Font, Character Identifier, and Other PRTQLTY parameter does not affect the printed output.
Values Supported for Different Printers.” For the 4224, 4230, and 4234 Printers, standard print
Note: Some fonts can be substituted by the printer. quality is produced by varying the density of the dot
Consult the various printer reference guides for matrix pattern used to create printable characters.
details. Standard mode (*STD) is the normal mode. Quality
mode (*NLQ) requires multiple passes by the printer to
*CPI: The identifier of the font with the specified pitch produce a line of data. Draft mode (*DRAFT) results in
(characters per inch (CPI)) is used. high-speed printing.
*DEVD: The font identifier and point size specified in For the 4214 printer, only draft (*DRAFT), quality
the device description are used. (*NLQ), and device default (*DEVD) modes are sup-
Element 1: Font Identifier ported. Other values are set to quality (*NLQ) mode.

identifier: Specify the numeric font identifier associated More information about the valid values for the 4214,
with this printer. 4224, 4230, 4234, and 5219 Printers is in Appendix B,
“Font, Character Identifier, and Other Values Supported
Element 2: Point Size
for Different Printers.”

Chapter 2. OS/400 Command Descriptions P3-533


OVRPRTF

Notes: CHLVAL
Specifies a list of channel numbers with their assigned
1. For the 4214 Printer, quality mode (*STD or *NLQ)
line numbers. Use this parameter only if
is only supported for 10 and 12 characters per inch.
CTLCHAR(*FCFC) has been specified.
If PRTQLTY(*STD or *NLQ) and 5, 15, or 16.7 char-
acters per inch is specified, the data is printed in Note: If one or more channel-number/line-number com-
draft mode. binations are changed, all other combinations
must be re-entered.
2. For the 4234 Printer, only a limited character set (62
characters) is supported when PRTQLTY(*DRAFT) *NORMAL: The default values for skipping to channel
is specified. A description of the character set sup- identifiers are used. The default values are found in the
ported with draft print quality is in the 4234 Printer following table.
Operator's Guide.
3. For the 4224 and 4230 printers, the fonts supported Code Action before Printing a Line
are not available for all three print qualities. The
OCR-A and OCR-B fonts are supported only with '' Space one line (blank code)
PRTQLTY(*NLQ). The Courier and Essay fonts are 0 Space two lines
available only with PRTQLTY(*NLQ) and - Space three lines
PRTQLTY(*STD). The Gothic font is available only
+ Suppress space
with PRTQLTY(*DRAFT) or
PRTQLTY(*FASTDRAFT). If there is a mismatch 1 Skip to line 1
between the print quality and the font selected, the 2-11 Space one line
font is changed to match the print quality.
12 Skip to overflow line (OVRFLW parameter)
4. Specify PAGRTT(*DEVD) and PRTQLTY(*DRAFT)
on this command to enable automatic rotation if the
data does not fit on the paper.
Figure 3. ANSI First-Character Forms-Control Codes
*STD: The output is printed with standard quality.
Element 1: Channel Number
*DRAFT: The output is printed with draft quality.
channel-number: Specify an American National
*DEVD: The print quality is set on the printer by the Standard channel number to be associated with a corre-
user, if it is not set within the data stream. sponding 'skip to' line number. Valid values for this
*NLQ: The output is printed with near letter quality. parameter range from 1 through 12, corresponding to
channels 1 through 12. The CHLVAL parameter associ-
*FASTDRAFT: The output is printed at a higher speed
ates the channel number with a page line number. For
and with lower quality than it would be if you specified
example, if you specify CHLVAL(2 20), channel identifier
*DRAFT. This value is only supported by the 4230
2 is allocated with line number 20; therefore, if you place
printer.
the forms-control 2 in the first position of a record, the
CTLCHAR printer skips to line 20 before printing the line.
Specifies whether the printer file supports input with print Note: If the printer stops and the next record processed
control characters. Any invalid control characters that has a channel value forms-control number that is
are found are ignored, and single spacing is assumed. the same value as the line number the printer is
*NONE: No print control characters are passed in the on, the printer advances to that value (line
data being printed. number) on the next page. However, if the
printer is positioned at the top of the page (line
*FCFC: The first character of every record contains an
number one) and the channel value forms-control
American National Standards Institute (ANSI) forms
value is associated with line number one, the
control character. If *FCFC is specified, the record
printer does not advance to a new a new page.
length must include one extra position for the first-
character forms-control code. This value is not valid for If no line number is specified for a channel identifier, and
externally described printer files. that channel identifier is encountered in the data, a
default of 'space one line' before printing is used. Each
*MACHINE: The first character of every record contains
channel number can be specified only once.
a machine code control character. If *MACHINE is
specified, the record length must include one extra posi- Element 2: Line Number
tion for the first character forms control code. This value line-number: Specify the line number assigned for the
is not valid for externally described printer files. channel number in the same list. Valid line numbers
If TBLREFCHR(*YES) is also specified, then the record range from 1 through 255. If no line number is assigned
length must include two extra positions for the control to a channel number, and that channel number is
character and the table reference character. encountered in the data, a default of 'space one line'

P3-534 OS/400 CL Reference - Part 2 (Full Version)


OVRPRTF

before printing is used. Each line number can be speci- FNTCHRSET


fied only once. Specifies a downloaded font consisting of a character
set and code page. For an outline font, a point size is
FIDELITY
required. For a raster font, the point size is ignored.
Specifies whether printing continues when print errors
This parameter can only be used for printer files with
are found for printers configured with AFP(*YES).
DEVTYPE(*AFPDS) specified.
*CONTENT: Printing continues when errors are found.
*FONT: The value specified on the FONT parameter is
*ABSOLUTE: Printing stops when errors are found. used.

CHRID Element 1: Font Character Set


Specifies the character identifier (graphic character set The name of the font character set can be qualified by
and code page) for the file. This parameter allows one of the following library values:
printing of text that is in different character identifier
(graphic character set and code page) coding. The *LIBL: All libraries in the job's library list are
value specified on this parameter is used to instruct the searched until the first match is found.
printer device to interpret the hexadecimal byte string to *CURLIB: The current library for the job is
print the same characters that were intended when the searched. If no library is specified as the current
text was created. More information about the character library for the job, the QGPL library is used.
identifier is in the Printer Device Programming book. A
list of valid CHRID values and applicable printers is in
library-name: Specify the name of the library to be
searched.
the "CHRID Values and Applicable Printers (CHRID
parameter)" table in Appendix B, “Font, Character Identi- character-set: Specify the font character set to use.
fier, and Other Values Supported for Different Printers.”
Element 2: Code Page Name
*DEVD: The default CHRID value that the device is
The name of the code page name can be qualified by
designed to handle is used. The *DEVD value means
one of the following library values:
character selection is normal because the file has the
same character identifier as the device default. *LIBL: All libraries in the job's library list are
*SYSVAL: The system determines the graphic char- searched until the first match is found.
acter set and code page values for the command param- *CURLIB: The current library for the job is
eters from the QCHRID system values. searched. If no library is specified as the current
*JOBCCSID: The character identifier for the printer file library for the job, the QGPL library is used.
is taken from the coded character set identifier (CCSID) library-name: Specify the name of the library to be
of the job. searched.
Note: This value is not allowed if the file was created code-page: Specify the code page value used to create
on a system at an earlier release level than the command parameters. Valid values range from 1
V2R3M0. through 999.
Element 1: Character Set | Element 3: Point Size
graphic-character-set: Specify the graphic character set | *NONE: The point size is supplied by the system and is
values that match the attributes of the printer. Valid
| determined by the specified font identifier.
values range from 1 through 32767.
| point-size: Specify a point size ranging from 0.1 through
Element 2: Code Page
| 999.9.
code-page: Specify the code page value that matches
CDEFNT
the attributes of the printer. Valid values range from 1
Specifies the coded font that the system uses for single-
through 32767.
byte character set (SBCS) printing. For coded fonts that
| DECFMT reference an outline font, a point size may also be speci-
| Specifies which decimal format value is used when fied. This parameter can only be used for printer files
| editing numeric fields with the EDTCDE DDS keyword. with DEVTYPE(*AFPDS) specified.
| The decimal format value determines the use of commas
*FNTCHRSET: The font specified on the FNTCHRSET
| and periods for the decimal position and three digit posi-
parameter is used.
| tional separators on edited fields.
The name of the coded font name can be qualified by
| *FILE: Use the decimal format value stored with the file
one of the following library values:
| when the file was created.
*LIBL: All libraries in the job's library list are
| *JOB: Use the decimal format value from the DECFMT
searched until the first match is found.
| job attribute when the file is opened.

Chapter 2. OS/400 Command Descriptions P3-535


OVRPRTF

*CURLIB: The current library for the job is *CURLIB: The current library for the job is
searched. If no library is specified as the current searched. If no library is specified as the current
library for the job, the QGPL library is used. library for the job, the QGPL library is used.
library-name: Specify the name of the library to be library-name: Specify the name of the library to be
searched. searched.

coded-font-name: Specify the DBCS-coded font name form-definition-name: Specify the name of the form defi-
to use. nition that must exist in the library specified. Valid
values range from 1 to 8 characters.
| Element 2: Point Size
| *NONE: The point size is supplied by the system and is AFPCHARS
| determined by the specified font identifier. Specifies one or more AFP characters (coded fonts) to
be used with line data and a page definition.
| point-size: Specify a point size ranging from 0.1 through
| 999.9. *NONE: No AFP character (coded fonts) specified.

PAGDFN
coded-font-name: Specify up to four 4-byte names of
coded fonts to be specified with line data and a page
Specifies the qualified name of the page definition to be
definition. The 4-byte names would be concatenated to
used to format line data.
X0 to identify up to four coded fonts which are to be
*NONE: No page definition is specified. used when TBLREFCHR is being used within the data.
Because PSF/400 requires a page definition when *LINE
TBLREFCHR
or *AFPSDLINE is specified, an inline page definition is
Specifies whether table reference characters are present
built from the print file parameters and passed to
in the line data.
PSF/400 when *NONE is specified.
*NO: No table reference character is present in line
The name of the page definition can be qualified by one
data.
of the following library values:
*YES: Table reference characters are present in line
*LIBL: All libraries in the job's library list are data.
searched until the first match is found.
If forms control characters are used with the data, the
*CURLIB: The current library for the job is table reference character follows the forms control char-
searched. If no library is specified as the current acter but precedes the data bytes. If forms control char-
library for the job, the QGPL library is used. acters are not used, the table reference character is the
library-name: Specify the name of the library to be first byte of the data record. As with forms control char-
searched. acter, if table reference characters are used, every data
record must contain a TRC byte.
page-definition-name: Specify the name of the page
definition that must exist in the library specified. Valid PAGRTT
values range from 1 to 8 characters. Device type Specifies the degree of text rotation for the 3112, 3116,
*AFPDSLINE or *LINE must be specified when using a 3130, 3812, 3816, 4028, 3820, 3825, 3827, 3829, 3831,
page definition. 3835, 3900, 3916, 3930 and 3935 printers. This param-
eter allows the user to specify the degree of rotation of
FORMDF the text on the page with respect to the way the form is
Specifies the form definition to use when printing the file. loaded into the printer. See the note under the
A form definition is a resource object that defines the PAGESIZE parameter for directions on specifying page
characteristics of the form, including overlays, position of size when rotating the page.
page data on the form, and number of copies of pages
Specify *AUTO or *DEVD for this parameter and
and modifications to pages. The form definition is
PRTQLTY(*DRAFT) on this command to enable auto-
located inline with the file being printed, or in a library.
matic rotation if the data does not fit on the paper.
*NONE: No form definition is used.
*AUTO: Indicates that automatic rotation of output is
Because PSF/400 requires a form definition, an inline done to fit the printed data on the form. If rotation does
form definition is built from the print file parameters and not accomplish this, computer output reduction is per-
passed to PSF/400 when *NONE is specified. formed automatically (regardless of the print quality
*DEVD: The name of the form definition is specified in being used). This parameter is valid only for printers
the printer device description. supporting rotation.

The name of the form definition can be qualified by one *DEVD: The operating system sends a device default
of the following library values: rotation value to the printer. Page rotation is dependent
on your printer's specifications. See your printer or
*LIBL: All libraries in the job's library list are
searched until the first match is found.

P3-536 OS/400 CL Reference - Part 2 (Full Version)


OVRPRTF

printer emulation documentation to determine how page 3: Three pages of output are printed on 1 physical
rotation is affected. sheet of paper.
*COR: Computer output reduction is done. Computer 4: Four pages of output are printed on 1 physical sheet
output reduction allows printed output intended for a of paper.
13.2 inch wide by 11.0 inch long form to be printed on
REDUCE
an 11 inch wide by 8.5 inch long form.
Specifies whether or not to reduce the output when
For computer output reduction printing, the following doing multiple up printing.
operations are done for the 3112, 3116, 3130, 3812,
For examples and more details see the Printer Device
3816, 4028, 3820, 3825, 3827, 3829, 3831, 3835, 3900,
3916, 3930 and 3935 printers:
Programming book.
*TEXT: The text output is reduced when doing multiple
Ÿ Automatic rotation to *COR is not done if the file
up printing.
contains graphics, bar codes, variable LPI, variable
font, variable page rotations, or variable drawer. *NONE: The output is not reduced when doing multiple
up printing.
Ÿ The text is rotated 90 degrees clockwise from the 0
degree rotation position (lower left corner of the first PRTTXT
edge loaded into the printer). Specifies up to 30 characters of text to be printed at the
bottom of each page of output. More information on this
Note: For landscape paper on a 3835 printer, the
parameter is in Appendix A, “Expanded Parameter
rotation is counter-clockwise from the 0
Descriptions.”
degree rotation position (upper right corner
of the first edge loaded into the printer). *JOB: The value for the current job is used.
Ÿ A top and left margin of 0.5 inches is added to the *BLANK: Text is not specified.
printed output. 'print-text': Specify the character string printed at the
Ÿ The 12-pitch fonts are changed to a 15-pitch font bottom of each page. No more than 30 characters of
and 15-pitch fonts are changed to a 20-pitch font. text can be entered, enclosed in apostrophes.
All other font widths are changed to a 13.3-pitch
JUSTIFY
font, except for the 4028 printer where they are
Specifies the printing positions of the characters on a
changed to a 15-pitch font.
page so the right-hand margin of printing is regular.
Ÿ Vertical spacing (specified by the LPI parameter) is Justification is done to the record length on the printer
70 percent of the normal spacing. file opened.
Ÿ The page size is set to 8.5 inches wide by 11 Note: The JUSTIFY parameter is supported only on the
inches long. 3812 SCS, 3816 SCS, and 5219 Printers.
0: No rotation occurs. Printing starts at and is parallel 0: No justification occurs.
to the edge loaded into the printer. 50: Spaces are added to the blanks in the text so that
90: Rotation of the text is done 90 degrees clockwise the right margin is more closely aligned but not flush.
from the 0 degree writing position. 100: The text is expanded by spaces (added where the
180: Rotation of the text is done 180 degrees clockwise blanks already exist) until the right margin is flush.
from the 0 degree writing position.
DUPLEX
270: Rotation of the text is done 270 degrees clockwise Specifies whether output is printed on one side or two
from the 0 degree writing position. sides of the paper.
MULTIUP *NO: The output is printed on one side of the paper.
Specifies, for spooled output only, the number of pages *YES: The output is printed on both sides of the paper
printed on a single physical page. with the top of each printed page at the same end of the
Note: Overlays are not reduced when more than one paper.
page is printed on a side. *TUMBLE: The output is printed on both sides of the
For examples and more details see the Printer Device paper with the top of one printed page at the opposite
Programming book. end of the sheet from the top of the other printed page.
1: One page of output is printed on one physical sheet This is usually used for output that is bound at the top.
of paper. *FORMDF: The output is printed on both sides of the
2: Two pages of output are printed on 1 physical sheet paper if the duplex value is specified in the form defi-
of paper. nition. If a form definition is not specified, then the
output is printed on one side of the paper.

Chapter 2. OS/400 Command Descriptions P3-537


OVRPRTF

UOM *CURLIB: The current library for the job is


Specifies the unit of measure that is used. searched. If no library is specified as the current
library for the job, the QGPL library is used.
*INCH: An inch is used as the unit of measure.
*CM: A centimeter is used as the unit of measure.
library-name: Specify the name of the library to be
searched.
FRONTOVL
Specifies the qualified name of the object that contains
overlay-name: Specify the name of the overlay.
both the overlay that is printed on the FRONT side of Element 2: Offset Down
the page and the offset, down and across, from the point
0: No offset down from the point of origin is used.
of origin used when the overlay is printed.
offset-down: Specify the offset down from the point of
*NONE: No overlay is used.
origin at which to begin printing the overlay. If
Element 1: Overlay Name UOM(*CM) is specified, valid values range from 0
through 57.79, and if UOM(*INCH) is specified, valid
The name of the overlay can be qualified by one of the
values range from 0 through 22.57.
following library values:
Element 3: Offset Across
*LIBL: All libraries in the job's library list are
searched until the first match is found. 0: No offset across from the point of origin is used.

*CURLIB: The current library for the job is offset-across: Specify the offset across from the point of
searched. If no library is specified as the current origin at which to begin printing the overlay. If
library for the job, the QGPL library is used. UOM(*CM) is specified, valid values range from 0
through 57.79, and if UOM(*INCH) is specified, valid
library-name: Specify the name of the library to be values range from 0 through 22.57.
searched.
DFRWRT
overlay-name: Specify the name of the overlay. Specifies how much output is held in the system buffer
Element 2: Offset Down before being sent to the printer.
0: No offset down from the point of origin is used. Note: If this command is specified, the Display Over-
ride (DSPOVR) command will either display or
offset-down: Specify the offset down from the point of
print the override along with any others that are
origin at which to begin printing the overlay. If
specified on this command.
UOM(*CM) is specified, valid values range from 0
through 57.79, and if UOM(*INCH) is specified, valid *YES: The system controls the amount of output that is
values range from 0 through 22.57. held in the buffer before being sent to the printer.
Element 3: Offset Across If SPOOL(*YES) is specified along with
SCHEDULE(*IMMED), output is held in the buffer until a
0: No offset across from the point of origin is used.
page of output is available or until the system buffer is
offset-across: Specify the offset across from the point of full.
origin at which to begin printing the overlay. If
*NO: If SPOOL(*NO) is specified, output is not held in
UOM(*CM) is specified, valid values range from 0
the buffer. Output is sent to the printer immediately after
through 57.79, and if UOM(*INCH) is specified, valid
the program performs a write operation.
values range from 0 through 22.57.
If the spooled output schedule is not immediate, speci-
BACKOVL
fying DFRWRT(*NO) has no effect.
Specifies the object name and library name containing
both the overlay that is printed on the BACK side of the SPOOL
page and the offset, down and across, from the point of Specifies whether the output data for the printer file is
origin used when the overlay is printed. spooled. If SPOOL(*NO) is specified, the following
parameters in this command are ignored: OUTQ,
*FRONTOVL: The values that are specified on the
COPIES, MAXRCDS, FILESEP, SCHEDULE, HOLD,
FRONTOVL parameter are used.
SAVE, OUTPTY, and USRDTA.
*NONE: No overlay is used.
Note: If SPOOL(*NO) is the current value in the printer
Element 1: Overlay Name file, or if SPOOL(*NO) is specified in this or any
The name of the overlay can be qualified by one of the other OVRPRTF command that is in effect when
following library values: the file is opened, the following parameters that
apply to spooled files are ignored: OUTQ,
*LIBL: All libraries in the job's library list are COPIES, MAXRCDS, FILESEP, SCHEDULE,
searched until the first match is found. HOLD, SAVE, OUTPTY, USRDTA, and
SPLFNAME. This parameter overrides the spool

P3-538 OS/400 CL Reference - Part 2 (Full Version)


OVRPRTF

value specified in the printer file, or in other COPIES


called OVRPRTF commands. Specifies, for spooled files, the number of copies being
printed.
*YES: The data is spooled for processing by a diskette
writer or a print writer. Note: This parameter overrides the copy value speci-
fied in the printer file.
*NO: The data is not spooled; it is sent directly to the
device and printed as the output becomes available. number-of-copies: Specify a value, ranging from 1
through 255, that indicates the number of identical print-
OUTQ
outs produced when this printer file is used.
Specifies, for spooled output only, the qualified name of
the output queue. This parameter overrides the output PAGERANGE
queue name specified in the printer file or in other called Specifies the page range to print for each copy of the file
OVRPRTF commands. to be printed.
*DEV: The output queue associated with the printer Element 1: Starting Page to Print
specified on the DEV parameter is used. The output
*ENDPAGE: Only the ending page is printed.
queue has the same name as the printer.
starting-page: Specify the page on which to start
*JOB: The output queue associated with the job is
printing.
used.
Element 2: Ending Page to Print
The name of the output queue can be qualified by one
of the following library values: *END: The last page in the file is printed.

*LIBL: All libraries in the job's library list are


ending-page: Only the ending page is printed.
searched until the first match is found. MAXRCDS
*CURLIB: The current library for the job is Specifies, for spooled output only, the maximum number
searched. If no library is specified as the current of records that can be in the spooled file for jobs using
library for the job, the QGPL library is used. this printer file. If this maximum is reached, an inquiry
message is sent to the program message queue. This
library-name: Specify the name of the library to be parameter overrides the value specified in the printer file
searched.
or in other called OVRPRTF commands.
output-queue-name: Specify the name of the output *NOMAX: The system maximum is used.
queue to which the output data is spooled.
maximum-records: Specify a value, ranging from 1
FORMTYPE through 999999, that specifies the maximum number of
Specifies the type of form on which the output is printed. records allowed in the spooled file.
The identifiers used to indicate the type of forms are
FILESEP
user-defined and can be a maximum of 10 characters in
Specifies, for spooled output only, the number of sepa-
length.
rator pages placed at the start of each printed file,
Note: If a form type other than *STD is specified, the including those between multiple copies of the same
system (when the output is produced) sends a output. Each separator page has the following items
message that identifies the form type to the printed on it: file name, file number, job name, user
system operator, and requests that the specified name, and the job number. This parameter overrides
type of forms be put in the printer. This param- the separator value specified in the printer file or in other
eter overrides the form type value specified in called OVRPRTF commands.
the printer file or in other called OVRPRTF com-
mands.
number-of-file-separators: Specify the number of sepa-
rator pages used at the start of each printed output file
*STD: The standard form type is used. The output is produced by this device file. Valid values range from 0
printed on the form type specified in the printer file for through 9. If 0 is specified, no separator pages are
the printers selected. The printer file contains informa- printed for the file. In this case, the printed output for
tion that controls how the document is printed on a par- each file (or copy of a file) starts at the top of a new
ticular printer. page.
form-type: Specify the identifier of the form type used SCHEDULE
with this device file for printed output from jobs. Up to
Specifies, for spooled output only, when the spooled file
10 alphanumeric characters can be specified. When the
is available to a writer. This parameter overrides the
device file is opened, the system sends a message iden-
scheduling value specified in the printer file or in other
tifying the form type to the system operator, and
called OVRPRTF commands.
requests that the identified forms be in the printer.
*JOBEND: The spooled file is made available to the
writer only after the entire job is completed.

Chapter 2. OS/400 Command Descriptions P3-539


OVRPRTF

*FILEEND: The spooled file is made available to the QWTSETP) to a new user profile, the new user profile is
writer as soon as the file is closed in the program. the owner of the spooled file.
*IMMED: The spooled file is made available to the *JOB: The spooled file is owned by the original user
writer as soon as the file is opened in the program. profile of the job. If the job has switched to a new user
profile, the original user profile is still the owner of the
HOLD
spooled file.
Specifies, for spooled output only, whether the spooled
file is held. The spooled file can be released by using *CURGRPPRF: The spooled file is owned by the group
the Release Spooled File (RLSSPLF) command. profile of the current user profile. If the job has switched
profiles, the owner of the spooled file is the group profile
Note: This parameter overrides the hold value specified
of the new user profile that the job has switched to. If
in the printer file or in other called OVRPRTF
no group profile exists for the current user profile, owner-
commands.
ship of the spooled file is determined the same way as
*NO: The spooled printer file is not held by the output *CURUSRPRF.
queue. The spooled output is available to a writer based
*JOBGRPPRF: The spooled file is owned by the group
on the SCHEDULE parameter value.
profile of the original user profile of the job. If the job
*YES: The spooled file is held until released by the has switched to a new user profile, the group profile of
Release Spool File (RLSSPLF) command. the original user profile is still the owner of the spooled
file. If no group profile exists, ownership of the spooled
SAVE
file is determined the same way as *JOB.
Specifies, for spooled output only, whether the spooled
file is saved (left on the output queue) after the output USRDFNOPT
has been produced. This parameter overrides the save Specifies, for spooled output only, one or more user-
value specified in the printer file or in other called defined options to be used by user applications or user-
OVRPRTF commands. specified programs that process spooled files. A
maximum of four user-defined options can be specified.
*NO: The spooled file data is not saved on the output
This parameter overrides the user-defined options speci-
queue after it has been produced.
fied in the printer file or in other called OVRPRTF com-
*YES: The spooled file data is saved on the output mands.
queue until the file is deleted. After the file is produced,
*NONE: No user-defined options specified.
the number of copies (see COPIES parameter) is set to
1, and its status is changed from WTR to SAV. Refer to user-defined-option: Specify the user-defined option to
the Release Spooled File (RLSSPLF) command for infor- be used by user applications or user-specified programs
mation on how to produce the spooled file again. that process spooled files. All characters are accept-
able.
OUTPTY
Specifies the output priority for spooled output files that USRDFNDTA
are produced by this job. The highest priority is 1 and Specifies, for spooled output only, the user-defined data
the lowest priority is 9. More information on this param- to be used by user applications or user-specified pro-
eter is in Appendix A, “Expanded Parameter grams that process spooled files. This parameter over-
Descriptions.” rides the user-defined data specified in the printer file or
in other called OVRPRTF commands.
*JOB: The output priority associated with the job that
created the spooled file is used. *NONE: No user-defined data specified.
output-priority: Specify the output priority. Valid values user-defined-data: Specify the user-defined data to be
range from 1 (high priority) through 9 (low priority). used by user applications or user-specified programs
that process spooled files. All characters are accept-
USRDTA
able.
Specifies, for spooled output only, the user-specified
data that identifies the file. USRDFNOBJ
Specifies, for spooled output only, the qualified name
*SOURCE: If the spooled file was created by an appli-
and type of the user-defined object to be used by user
cation program, the name of the program is used. Oth-
applications or user-specified programs that process
erwise, blanks are used.
spooled files. This parameter overrides the user-defined
user-data: Specify up to 10 characters of text. object name specified in the printer file or in other called
OVRPRTF commands.
SPLFOWN
Specifies, for spooled output only, who the owner of the *NONE: No user-defined object specified.
spooled file is.
Element 1: Name of User-Defined Object
*CURUSRPRF: The spooled file is owned by the
The name of the user-defined object can be qualified by
current user profile. If the job has switched (See API
one of the following library values:

P3-540 OS/400 CL Reference - Part 2 (Full Version)


OVRPRTF

*LIBL: All libraries in the job's library list are time for the device allocated when an acquire operation
searched until the first match is found. is performed to the file. Valid values range from 1
through 32767 seconds.
*CURLIB: The current library for the job is
searched. If no library is specified as the current LVLCHK
library for the job, the QGPL library is used. Specifies whether the record format level identifiers in
library-name: Specify the name of the library to be the program are checked against those in the device file
searched. when the file is opened. If so, the record format identi-
fiers in the program must match those in the device file.
object-name: Specify the user-defined object to be used Because the same record format name can exist in more
by user applications or user-specified programs that than one file, each record format is given an internal
process spooled files. system identifier when it is created.
Element 2: Type of User-Defined Object Note: This parameter overrides the value specified in
object-type: The user object type can be one of the fol- the printer file, in the program, or in other called
lowing: OVRPRTF commands. Level checking cannot
be done unless the program contains the record
*DTAARA Data Area format identifiers. This command cannot over-
*DTAQ Data Queue ride level checking from *NO to *YES.

*FILE File *NO: The level identifiers are not checked when the file
is opened.
*PSFCFG PSF Configuration Object
SECURE
*USRIDX User Index
Specifies whether this file is safe from the effects of pre-
*USRQ User Queue viously called file override commands. If SECURE is not
*USRSPC User Space specified, processing occurs as if SECURE(*NO) is
specified.
SPLFNAME *NO: This file is not protected from the effects of other
Specifies, for spooled output only, the spooled file name. file overrides; its values can be overridden by the effects
of previously called file override commands.
*FILE: The name of the printer file is used for the
spooled file name. *YES: This file is protected from the effects of any file
override commands previously called.
spooled-file-name: Specify up to 10 characters for the
spooled file name. OVRSCOPE
Specifies the extent of influence (scope) of the override.
WAITFILE
Specifies the number of seconds that the program waits *ACTGRPDFN: The scope of the override is determined
for the file resources and session resources to be allo- by the activation group of the program that calls this
cated when the file is opened, or for the device or command. When the activation group is the default acti-
session resources to be allocated when an acquire oper- vation group, the scope equals the call level of the
ation is performed to the file. If those resources are not calling program. When the activation group is not the
allocated within the specified wait time, an error default activation group, the scope equals the activation
message is sent to the program. More information on group of the calling program.
this parameter is in Appendix A, “Expanded Parameter
*CALLLVL: The scope of the override is determined by
Descriptions.”
the current call level. All open operations done at a call
Note: An immediate allocation of the device by the level that is the same as or higher than the current call
device resource is required when an acquire level are influenced by this override.
operation is performed to the file.
*JOB: The scope of the override is the job in which the
This parameter overrides the wait time specified in the override occurs.
printer file, in the program, or in other called OVRPRTF
SHARE
commands.
Specifies whether the open data path (ODP) for the
*IMMED: The program does not wait; when the file is printer file is shared with other programs in the routing
opened, an immediate allocation of the file resources is step. When an ODP is shared, the programs accessing
required. the file share facilities such as the file status and the
*CLS: The job default wait time is used as the wait time buffer.
for the file resources being allocated. More information on shared database files is in the DB2
number-of-seconds: Specify the number of seconds that for AS/400 Database Programming book.
the program waits for the file resources to be allocated *NO: The ODP created by the program with this attri-
to the printer file when the file is opened, or the wait bute is not shared with other programs in the routing

Chapter 2. OS/400 Command Descriptions P3-541


OVRPRTF

step. Every time a program opens the file with this attri- IGCCPI
bute, a new ODP to the file is created and activated. Specifies the printer character density of double-byte
Note: This includes several opens in the same character set (DBCS) characters, in characters per inch
program. (CPI).

*YES: The ODP created with this attribute is shared Note: This parameter does not specify the printer char-
with each program in the routing step that also specifies acter density of alphanumeric characters. Alpha-
SHARE(*YES) when it opens the file. numeric characters are printed with the value
specified on the CPI parameter.
Note: When SHARE(*YES) is specified and control is
passed to a program, a read operation in that *CPI: DBCS character density is based on the values
program retrieves the next input record. A write specified for the CPI parameter. The system prints one
operation produces the next output record. double-byte character for every two alphanumeric char-
acters.
OPNSCOPE
Specifies the extent of influence (scope) of the open Ÿ For CPI(10), DBCS characters print at 5 characters
operation. per inch.

*ACTGRPDFN: The scope of the open operation is Ÿ For CPI(12), DBCS characters print at 6 characters
determined by the activation group of the program that per inch.
called the OVRPRTF command processing program. If Ÿ For CPI(13.3), DBCS characters print at 6.7 charac-
the activation group is the default activation group, the ters per inch (same as IGCCPI(*CONDENSED)).
scope is the call level of the caller. If the activation
Ÿ For CPI(15), DBCS characters print at 7.5 charac-
group is a non-default activation group, the scope is the
ters per inch.
activation group of the caller.
Ÿ For CPI(18), DBCS characters print at 9 characters
*JOB: The scope of the open operation is the job in
per inch.
which the open operation occurs.
Ÿ For CPI(20), DBCS characters print at 10 characters
IGCDTA per inch.
Specifies, for program-described original files, whether
the file processes double-byte character set (DBCS) *CONDENSED: Condensed printing is used in which
data. For externally described printer files, this param- the system prints 20 DBCS characters every 3 inches.
eter specifies DBCS attributes of the file. This value is valid only for the 5553 or 5583 Printers.

For program-described files: 5: Double-byte character density is 5 characters per


inch.
*NO: The file does not process DBCS data.
6: DBCS character density is 6 characters per inch.
*YES: The file processes DBCS data.
This value is valid for the 5553 and 5583 Printers only.
IGCEXNCHR 10: DBCS character density is 10 characters per inch.
Specifies whether the system processes double-byte This value is valid for the 5553 or 5583 Printers only.
character set (DBCS) extension characters.
IGCSOSI
*YES: The system processes DBCS extension charac-
Specifies, for bracketed DBCS character strings only,
ters.
how the system prints shift control characters.
*NO: The system does not process DBCS extension
*NO: The system does not print shift control characters.
characters; it prints extension characters as the unde-
These characters do not occupy a position in printed
fined character.
output.
IGCCHRRTT *YES: The system prints shift control characters as
Specifies, for the 5553 and 5583 Printers only, whether blanks.
the printer rotates double-byte characters 90 degrees
counterclockwise when printing. The system prints *RIGHT: The system prints two blanks when printing
rotated double-byte characters so they appear in a ver- shift-in characters but does not print shift-out characters.
tical reading sequence. Alphanumeric characters are IGCCDEFNT
not rotated. Specifies the coded font that the system uses for DBCS
*NO: The system does not rotate double-byte charac- printing. For a coded font that references an outline
ters when printing. font, a point size may also be specified.

*YES: The system rotates double-byte characters 90 *SYSVAL: The DBCS-coded font specified in the
degrees counterclockwise when printing. The printer system value QIGCCDEFNT is used.
rotates each character individually. The name of the coded font name can be qualified by
one of the following library values:

P3-542 OS/400 CL Reference - Part 2 (Full Version)


OVRPRTF

*LIBL: All libraries in the job's library list are OVRPRTF FILE(PRINTOUT) TOFILE(PRINT3) SPOOL(\YES)
searched until the first match is found. COPIES(5) OUTQ(OUTPUT1)
*CURLIB: The current library for the job is This command overrides the file named PRINTOUT and
searched. If no library is specified as the current uses the printer file named PRINT3 to produce the spooled
library for the job, the QGPL library is used. output on the printer. The output from the program is sent to
library-name: Specify the name of the library to be the OUTPUT1 output queue. Five copies of the spooled file
searched. are printed on the printer specified on the Start Printer Writer
(STRPRTWTR) command.
coded-font-name: Specify the coded font name to use.
| Element 2: Point Size Example 2: Rotating Double-Byte Characters

| *NONE: The point size is supplied by the system and is OVRPRTF FILE(IGCLIB/IGCPRT) IGCDTA(\YES)
IGCCHRRTT(\YES)
| determined by the specified font identifier.
| point-size: Specify a point size ranging from 0.1 through This command overrides the IGCPRT printer file, which is
| 999.9. stored in the IGCLIB library. The override puts the
IGCALTTYP DDS keyword into effect to change character
output fields to DBCS fields, and rotates the double-byte
Examples characters when printing.
Example 1: Printing Output

Chapter 2. OS/400 Command Descriptions P3-543


OVRSAVF

OVRSAVF (Override with Save File) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ───────────────────────────5
55──OVRSAVF──FILE(──overridden-file-name──)──┬───────────────────────────────────────────────────┬───
│ ┌─\FILE─────────────────────────────┐ │
│ │ ┌─\LIBL/────────┐ │ │
└─TOFILE(──┴─┼───────────────┼──save-file-name─┴──)─┘
├─\CURLIB/──────┤
└─library-name/─┘
5──┬──────────────────────┬──┬────────────────────────────────────────────────┬──┬─────────────────────────────────────┬────────5
└─EXTEND(──┬─\NO──┬──)─┘ └─POSITION(──┬─\START───────────────────────┬──)─┘ └─WAITFILE(──┬─\IMMED────────────┬──)─┘
└─\YES─┘ └─\RRN──relative-record-number─┘ ├─\CLS──────────────┤
└─number-of-seconds─┘
5──┬──────────────────────┬──┬──────────────────────────────┬──┬─────────────────────┬──┬──────────────────────────────┬───────5%
│ ┌─\NO──┐ │ │ ┌─\ACTGRPDFN─┐ │ └─SHARE(──┬─\NO──┬──)─┘ └─OPNSCOPE(──┬─\ACTGRPDFN─┬──)─┘
└─SECURE(──┴─\YES─┴──)─┘ └─OVRSCOPE(──┼─\CALLLVL───┼──)─┘ └─\YES─┘ └─\JOB───────┘
└─\JOB───────┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose ters specified on this command override the other values


specified in the save file or in the program.
The Override with Save File (OVRSAVF) command is used
*FILE: The save file named in the FILE parameter has
to (1) override or replace a file named in a program, (2) over-
certain parameters overridden by the values specified in
ride certain attributes of a file that are used by a program, or
this command.
(3) override the file named in a program and certain attri-
butes of the overriding file. The name of the save file can be qualified by one of the
following library values:
Note: Overrides do not apply to save and restore com-
mands. *LIBL: All libraries in the job's library list are
searched until the first match is found.
More information on overriding files is in the Data Manage-
ment book. *CURLIB: The current library for the job is
searched. If no library is specified as the current
Note: To see the parameter and value descriptions for this library for the job, the QGPL library is used.
command, refer to the online help text. For more
information about printing the help text, refer to library-name: Specify the name of the library to be
“Printing CL Command Descriptions” in Chapter 1. searched.

save-file-name: Specify the qualified name of the save


Required Parameter file that is used instead of the overridden file name. If
no library qualifier is given, *LIBL is used to find the
FILE save file.
Specifies the name of the file being used by the program
to which this override command is applied. If EXTEND
TOFILE(*FILE) is specified, a display device file must be Specifies, for output operations only, whether new
specified. Otherwise, any device file or database file records are added to the end of the data currently in the
can be specified. save file. This option is used to start processing after an
application or system failure. When this operation is
Note: The information in a save file has meaning only completed, the file must contain the image of a single
to Operating System/400 save and restore; redi- save operation made by a save command, or it may not
recting another type of file to a save file or vice be possible to restore objects from the save file. This
versa is not recommended. parameter overrides the extend value specified in the
program. The sequencing information in the file's
records guarantees that after a system failure, a record
Optional Parameters cannot be skipped or sent twice.
TOFILE *NO: Records are not added to the end of the specified
Specifies the name of the save file that is used instead save file, but they replace existing records in the file. If
of the file specified in the FILE parameter or, if *FILE is the save file already contains records, an inquiry
specified, specifies that certain attributes are overridden message is sent that clears the file or cancels the opera-
by parameters specified on this command. The parame- tion. If no EXTEND value is specified by the program or

P3-544 OS/400 CL Reference - Part 2 (Full Version)


OVRSAVF

in an override, this is the default action assumed when OVRSCOPE


the file is opened for output. Specifies the extent of influence (scope) of the override.
*YES: New records are added to the end of the records *ACTGRPDFN: The scope of the override is determined
already contained in the save file. by the activation group of the program that calls this
command. When the activation group is the default acti-
POSITION
vation group, the scope equals the call level of the
Specifies the starting position for getting records from
calling program. When the activation group is not the
the save file. The first record to get is either at the
default activation group, the scope equals the activation
beginning of the file (*START) or at a particular relative
group of the calling program.
record number position in the file (*RRN). This param-
eter overrides the value specified in the program. *CALLLVL: The scope of the override is determined by
the current call level. All open operations done at a call
*START: Get the first record in the file first. If no POSI-
level that is the same as or higher than the current call
TION value is specified by the program, or in an over-
level are influenced by this override.
ride, this is the default action assumed when the file is
opened for input. *JOB: The scope of the override is the job in which the
override occurs.
*RRN relative-record-number: Specify the record
number (its position from the beginning of the file) of the SHARE
record that the user gets first. The value *RRN must go Specifies whether the open data path (ODP) for the save
before the relative record number. For example, file is shared with other programs in the routing step.
POSITION(*RRN 480) specifies that the 480th record in When an ODP is shared, the programs accessing the
the file is gotten first. file share facilities such as the file status and the buffer.

WAITFILE More information on shared database files is in the DB2


Specifies the number of seconds that the program waits for AS/400 Database Programming book.
for the file resources and session resources to be allo- *NO: The ODP created by the program with this attri-
cated when the file is opened, or for the device or bute is not shared with other programs in the routing
session resources to be allocated when an acquire oper- step. Every time a program opens the file with this attri-
ation is performed to the file. If those resources are not bute, a new ODP to the file is created and activated.
allocated within the specified wait time, an error
Note: This includes more than one open in the same
message is sent to the program. More information on
program.
this parameter is in Appendix A, “Expanded Parameter
Descriptions.” *YES: The ODP created with this attribute is shared
with each program in the routing step that also specifies
Note: An immediate allocation of the device by the
SHARE(*YES) when it opens the file.
device resource is required when an acquire
operation is performed to the file. Note: When SHARE(*YES) is specified and control is
passed to a program, a read operation in that
This parameter overrides the wait time specified in the
program retrieves the next input record. A write
program or in the save file.
operation produces the next output record.
*IMMED: The program does not wait; when the file is
opened, an immediate allocation of the file resources is OPNSCOPE
required. Specifies the extent of influence (scope) of the open
operation.
*CLS: The job default wait time is used as the wait time
for the file resources being allocated. *ACTGRPDFN: The scope of the open operation is
determined by the activation group of the program that
number-of-seconds: Specify the number of seconds that called the OVRSAVF command processing program. If
the program waits for the file resources to be allocated.
the activation group is the default activation group, the
Valid values range from 1 through 32767 seconds.
scope is the call level of the caller. If the activation
SECURE group is a non-default activation group, the scope is the
Specifies whether this file is safe from the effects of pre- activation group of the caller.
viously called file override commands. If SECURE is not *JOB: The scope of the open operation is the job in
specified, processing occurs as if SECURE(*NO) is which the open operation occurs.
specified.
*NO: This file is not protected from the effects of other Example
file overrides; its values can be overridden by the effects
of previously called file override commands. OVRSAVF FILE(ONLINE) POSITION(\RRN 1ðð) SECURE(\YES)

*YES: This file is protected from the effects of any file This command overrides the file named ONLINE so that the
override commands previously called. first record gotten after the file is opened for input is relative

Chapter 2. OS/400 Command Descriptions P3-545


OVRSAVF

record number 100. The file is also safe from overrides (in
previous program calls).

P3-546 OS/400 CL Reference - Part 2 (Full Version)


OVRTAPF

OVRTAPF (Override with Tape File) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──OVRTAPF──FILE(──overridden-file-name──)──┬──────────────────────────────────────────────────────────┬───────────────────────5
│ ┌─\FILE────────────────────────────────────┐ │
│ │ ┌─\LIBL/────────┐ │ │
└─TOFILE(──┴─┼───────────────┼──tape-device-file-name─┴──)─┘
├─\CURLIB/──────┤
└─library-name/─┘
5──┬─────────────────────────────┬─── (P) ──┬───────────────────────────────────────┬────────────────────────────────────────────────5
│ ┌──
─────────────┐ │ └─VOL(──┬─\NONE────────────────────┬──)─┘
└─DEV(───6─device-name─┴───
(1) ──)─┘ │ ┌──
───────────────────┐ │
└──6─volume-identifier─┴───
(2) ─┘

5──┬──────────────────────────────────────────┬──┬─────────────────────────────────┬──┬─────────────────────────────────┬───────5
└─REELS(──┬─\SL──┬──┬─────────────────┬──)─┘ └─SEQNBR(──┬─\END────────────┬──)─┘ └─LABEL(──data-file-identifier──)─┘
├─\NL──┤ └─number-of-reels─┘ ├─\NEXT───────────┤
├─\NS──┤ └─sequence-number─┘
├─\BLP─┤
└─\LTM─┘
5──┬───────────────────────────────┬──┬──────────────────────────────┬──┬───────────────────────────────────┬───────────────────5
└─RCDLEN(──┬─\CALC─────────┬──)─┘ └─BLKLEN(──┬─\CALC────────┬──)─┘ └─BUFOFSET(───(3) ─┬─\BLKDSC───────┬──)─┘
└─record-length─┘ └─block-length─┘ └─buffer-offset─┘
5──┬───────────────────────────┬──┬────────────────────────────────────┬──┬────────────────────────────┬────────────────────────5
(4) ─┬─\F───┬──)─┘ └─EXTEND(──┬─\NO────────────────┬──)─┘ └─DENSITY(──┬─\DEVTYPE──┬──)─┘
└─RCDBLKFMT(───
├─\FB──┤ │ ┌─\NOCHECK─┐ │ ├─16ðð──────┤
├─\V───┤ └─\YES──┼──────────┼─┘ ├─32ðð──────┤
├─\VB──┤ └─\CHECK───┘ ├─625ð──────┤
├─\D───┤ ├─\FMT348ð──┤
├─\DB──┤ ├─\FMT349ðE─┤
├─\VS──┤ ├─\FMT357ð──┤
├─\VBS─┤ ├─\FMT357ðE─┤
└─\U───┘ ├─\FMT359ð──┤
├─\QIC12ð───┤
├─\QIC525───┤
├─\QIC1ððð──┤
├─\QIC2GB───┤
├─\QIC3ð4ð──┤
├─\QIC5ð1ð──┤
├─\FMT2GB───┤
├─\FMT5GB───┤
└─\FMT7GB───┘
5──┬────────────────────────┬──┬───────────────────────┬──┬────────────────────────────────┬────────────────────────────────────5
└─COMPACT(──┬─\DEVD─┬──)─┘ └─CODE(──┬─\EBCDIC─┬──)─┘ └─CRTDATE(──┬─\NONE─────────┬──)─┘
└─\NO───┘ └─\ASCII──┘ └─creation-date─┘
5──┬──────────────────────────────────┬──┬─────────────────────────┬────────────────────────────────────────────────────────────5
└─EXPDATE(──┬─\NONE───────────┬──)─┘ └─ENDOPT(──┬─\REWIND─┬──)─┘
├─\PERM───────────┤ ├─\LEAVE──┤
└─expiration-date─┘ └─\UNLOAD─┘
5──┬───────────────────────────────────────────────────────────────┬──┬──────────────────────┬──────────────────────────────────5
└─USRLBLPGM(──┬─\NONE──────────────────────────────────────┬──)─┘ └─IGCDTA(──┬─\NO──┬──)─┘
│ ┌─\LIBL/────────┐ │ └─\YES─┘
└─┼───────────────┼──user-label-program-name─┘
├─\CURLIB/──────┤
└─library-name/─┘
5──┬─────────────────────────────────────┬──┬──────────────────────┬──┬──────────────────────────────┬──────────────────────────5
└─WAITFILE(──┬─\IMMED────────────┬──)─┘ │ ┌─\NO──┐ │ │ ┌─\ACTGRPDFN─┐ │
├─\CLS──────────────┤ └─SECURE(──┴─\YES─┴──)─┘ └─OVRSCOPE(──┼─\CALLLVL───┼──)─┘
└─number-of-seconds─┘ └─\JOB───────┘
5──┬─────────────────────┬──┬──────────────────────────────┬───────────────────────────────────────────────────────────────────5%
└─SHARE(──┬─\NO──┬──)─┘ └─OPNSCOPE(──┬─\ACTGRPDFN─┬──)─┘
└─\YES─┘ └─\JOB───────┘
Notes:
1 A maximum of 4 repetitions

P All parameters preceding this point can be specified in positional form.

2 A maximum of 50 repetitions

3 The value *BLKDSC is valid only for a file with record block format *D or *DB.

4 The values *F, *FB, *VS, *VBS, and *U are valid for both EBCDIC and ASCII codes; *V and *VB are valid only for EBCDIC;

*D and *DB are valid only for ASCII.

Chapter 2. OS/400 Command Descriptions P3-547


OVRTAPF

Purpose *CURLIB: The current library for the job is


searched. If no library is specified as the current
The Override with Tape File (OVRTAPF) command is used library for the job, the QGPL library is used.
to (1) override/replace a file named in a program, (2) override library-name: Specify the name of the library to be
certain attributes of a file that is used by a program, or (3) searched.
override the file named in a program and override certain
attributes of the file processed. tape-device-file-name: Specify the qualified name of the
Tape device file that is used instead of the overridden
Parameters overridden by this command are specified in the file.
file description, in the program, or in other called file override
commands. If a file named in the program is overridden, the DEV
name of that file is specified in the FILE parameter and the Specifies the names of one or more tape devices or one
name of the overriding file is specified in the TOFILE param- media library device used with this tape device file to
eter. The OVRTAPF command can also specify parameters perform input and output data operations. A media
to override values contained in the file description of the library device is a tape storage device that contains one
overriding file. If the file named in the program is not or more tape drives, tape cartridges, and a part (carriage
replaced, but certain parameters of the file are overridden, and picker assembly) for moving tape media between
the name of the file is specified in the FILE parameter and the cartridge storage slots and the tape drives. The
*FILE is specified in the TOFILE parameter. The parameters device names in the OVRTAPF command (up to four)
overridden are then specified by the other parameters of the override the device names specified in the program or in
OVRTAPF command. Parameters that are not specified do the tape device file.
not affect the parameters specified in the file description, in device-name: Specify the names of one or more
the program, or in other called file override commands. devices (no more than four) or the name of one media
library device used with this tape device file. The order
More information on overriding files is in the Data Manage- in which the device names are specified is the order in
ment book, the Application Display Programming book, and which tapes on the devices are processed. When more
the Printer Device Programming book. volumes are processed than the number of devices in
Note: To see the parameter and value descriptions for this the DEV list, the devices are used in the same order
command, refer to the online help text. For more specified, wrapping around to the first device as needed.
information about printing the help text, refer to Each device name must be known on the system by a
“Printing CL Command Descriptions” in Chapter 1. device description before this device file is created.

VOL
Required Parameter Specifies one or more volume identifiers used by the file.
The volumes must be installed in the same order as the
FILE identifiers are specified here (and as they are specified
Specifies the name of the file being used by the program on the DEV parameter). If the file is opened for read
to which this override command is applied. If backward, then the volume identifiers in the list are pro-
TOFILE(*FILE) is specified, a display device file must be cessed from last to first (while the devices in the device
specified. Otherwise, any device file or database file list are used in first-to-last order). If a list of volume
can be specified. identifiers is provided for the file, operator messages
indicate the name of the required volume. More infor-
Optional Parameters mation on this parameter is in Appendix A, “Expanded
Parameter Descriptions.”
TOFILE
This parameter overrides the volume identifiers specified
Specifies the qualified name of the tape device file that
in the tape device file.
is used instead of the file specified in the FILE param-
eter, or if *FILE is specified, specifies that certain attri- *NONE: No tape volume identifiers are specified for this
butes are overridden by parameters specified in this file. They can be supplied before the device file is
command. The parameters specified on this OVRTAPF opened, either in a CHGTAPF or OVRTAPF command
command override the other values specified in the tape or in the high-level language program. If volume identi-
device file or in the program. fiers are not specified before the device file is opened,
volume checking is not performed beyond verifying that
*FILE: The tape device file named in the FILE param-
the correct label type volume is on the device, and
eter has some of its parameters overridden by values
volume names are not provided in operator messages.
specified in this command.
The maximum number of reels processed for an *NL,
The name of the tape device file can be qualified by one *NS, *BLP, or *LTM input file when VOL(*NONE) is
of the following library values: specified is determined by the REELS(number-of-reels)
parameter value.
*LIBL: All libraries in the job's library list are
searched until the first match is found.

P3-548 OS/400 CL Reference - Part 2 (Full Version)


OVRTAPF

volume-identifier: Specify the identifiers of one or more *SL: The volumes have standard labels. If a list of
volumes in the order in which they are placed on the volume identifiers is specified (with the VOL parameter),
device. Each volume identifier contains a maximum of 6 the system checks that the correct tape volumes are on
alphanumeric characters. Use a blank as a separator the device in the specified sequence.
character when listing multiple identifiers. Up to 50
Ÿ If no volume identifier list is given and the file is
volume identifiers can be specified. These identifiers are
opened for output, any standard-label volumes may
used in messages sent to the operator during pro-
be installed on the device.
cessing. The maximum number of reels processed for
an *NL, *NS, *BLP, or *LTM input file is determined by Ÿ If no volume identifier list is given and the file is
the number of volume identifiers in the list. opened for input, the first volume may have any
volume identifier, but if the file is continued, the
Note: If the VOL parameter value used for the file
system requires the correct continuation volumes to
specifies a list of identifiers rather than
be processed (verified by checking the data file
VOL(*NONE), the number-of-reels part of the
labels). For an input file, the end-of-file message is
REELS parameter is ignored regardless of where
sent to the program being used when the labels on
it is specified. A description of how the param-
the last volume processed indicate that it is the last
eter values for the file are determined when over-
volume for the data file.
rides are used, the high-level language interface,
and the device file when the file is opened is in *NL: The volumes are not labeled. On a nonlabeled
the Data Management book. To ensure that the volume, tape marks are used to indicate the end of each
number-of-reels part of the REELS parameter is data file and the end of the volume. For an input file,
used (rather than a VOL identifier list) to control the end-of-file message is sent to the program when the
the volumes processed by the tape device file, number of volumes specified in the volume list have
specify VOL(*NONE) in the same command in been processed, or, if no list of volume identifiers is pro-
which the REELS parameter is specified. vided, when the number of reels specified in the REELS
parameter are processed.
REELS
Specifies the type of labeling used on the tape reels and *NS: The volumes have nonstandard labels. Each
the maximum number of reels processed if both a list of volume must start with some kind of label information,
volume identifiers is not specified (VOL parameter) and optionally preceded by a tape marker and always fol-
this device file is used with either *NL, *NS, *LTM, or lowed by a tape marker. This nonstandard label infor-
*BLP input files. When the number of reels is specified mation is ignored. The system spaces forward to a point
as the second element of this parameter, the volume beyond the tape marker that follows the nonstandard
identifiers on the volumes are ignored if labeled tapes labels and positions the tape at the file's data. Each reel
are being processed; instead, the order in which the must have a tape marker at the end of the file's data.
reels are installed on the device must be checked by the Information beyond this ending tape marker is ignored.
operator. Only a single data file can exist on a nonstandard tape.
Standard-label volumes cannot be processed by using
The number-of-reels value is not a limiting value for
the *NS label processing.
standard-label or output files. For a standard-label input
file, the data file labels limit the number of volumes pro- For an input file, the end-of-file message is sent to the
cessed by indicating end-of-file. For an output file, the program using the file when the number of volumes
number-of-reels value is ignored; the system requests specified in the volume list have been processed, or, if
that additional volumes be kept on the device until the no list of volume identifiers is provided, when the
file is closed. number of reels specified in the REELS parameter are
processed.
The system checks the first record following the load
point on the tape to see (1) whether it has exactly 80 *BLP: Standard-label processing is bypassed. Each
bytes for EBCDIC or at least 80 bytes for ASCII and (2) reel must have standard labels. Although each reel is
whether the first 4 bytes contain the values VOL and 1. checked for a standard volume label and each file must
If so, the reel contains a standard-label tape. *SL and have at least one standard header label (HDR1) and one
*BLP files require standard-label tape volumes. *NL, standard trailer label (EOV1 or EOF1), most other label
*NS, and *LTM tape files cannot process standard-label information (such as the data file record length or block
volumes. length) is ignored. The sequence number of each file on
the volume is determined only by the number of tape
Note: The values *SL, *NL, and *LTM can be specified
markers between it and the start of tape (in contrast to
if the device file is used for either reading or
*SL processing in which the file sequence number stored
writing on tapes. The values *NS and *BLP are
in the header and trailer labels of each file are used to
valid only if the device file is used to read tapes.
locate a data file).
This parameter overrides the values specified in the
Most of the information in the data file trailer label is
device file, in the program, or in other called OVRTAPF
ignored, but if an end-of-file (EOF) trailer label is found,
commands.

Chapter 2. OS/400 Command Descriptions P3-549


OVRTAPF

the end-of-file message is sent to the program using the sequence-number: Specify the sequence number of the
tape file. If no end-of-file trailer label is encountered by file. Valid values range from 1 through 16777215.
the time the specified number of volumes or reels have
LABEL
been processed (volume identifier list and REELS
Specifies the data file identifier of the data file processed
parameter), the end-of-file message is immediately sent
by this tape device file. An identifier is defined only for
to the program using the tape file. Bypass label pro-
standard-label tapes and is stored in the header label
cessing can be used when the user does not know the
immediately before the data file.
name of the file used or when some file label information
is incorrect. If a data file identifier is specified for any type of label
processing other than *SL, it is ignored.
*LTM: The volumes have no labels but do have a single
leading tape marker before the first data file. An identifier is required for a standard label output file,
REELS(*LTM) is processed the same as REELS(*NL) but is optional for an input file because the sequence
except that when SEQNBR(1) is specified for an output number uniquely identifies the data file to process.
file to create the first data file on the tape, a leading tape
For an input file or output file with EXTEND(*YES) speci-
marker is written at the start of the tape before the first
fied, this parameter specifies the identifier of the data file
data block.
on the tape. The specified identifier must match the one
number-of-reels: Specify the maximum number of reels in the labels of the data file that the SEQNBR parameter
to be processed for an *NL, *LTM, *NS, or *BLP input specifies; otherwise, an error message is sent to the
tape operation when a list of volume identifiers is not program using this device file. For output files with
specified (VOL parameter). If the next reel is not on the EXTEND(*NO) specified, this parameter specifies the
device when the end of the currently-processing tape is identifier of the data file to be created on the tape. More
reached, a message is sent to the operator requesting information on this parameter is in Appendix A,
that the next tape be installed on the next tape device. “Expanded Parameter Descriptions.”
The number-of-reels value is ignored for a standard-label
This parameter overrides the data file identifier specified
(*SL) file or for any output file.
in the device file, in the program, or in other called
SEQNBR OVRTAPF commands.
Specifies the sequence number of the data file on the data-file-identifier: Specify the identifier (17 alphanu-
tape being processed. meric characters maximum) of the data file used with
this tape device file. If this identifier is for a tape written
Ÿ When standard-label tapes are used, the four-
in the basic exchange format, and is used on a system
position file sequence number is read from the first
other than an AS/400 system, up to eight characters or a
header label of the data file.
qualified identifier having no more than eight characters
Ÿ When bypass label processing is used or when per qualifier must be used.
standard-label tapes are not used, the system
counts the tape markers from the start of the tape to RCDLEN
locate the correct sequence number data file to be Specifies, in bytes, the length of the records contained in
processed. the data file processed with this device file. The system
always uses the record length and block length specified
Ÿ When multiple-file, multiple-volume tapes are pro-
in the data file labels for any standard-label input file or
cessed using REELS(*SL), the file sequence
output file with EXTEND(*YES) specified (if a second
numbers continue consecutively through the
header label (HDR2) is found on the tape and *BLP
volumes; thus, each new data file has a sequence
label processing has not been specified).
number one greater than the previous file, regard-
less of its volume location. This parameter overrides the value specified in the
device file, in the program, or in other called OVRTAPF
*END: The file is written on the end of the tape. This commands.
value is used only for files that are written to tape.
*CALC: No record length is specified for the data file
An error message is shown on the display when a tape being processed. If *CALC is specified, the system will
device file is used to read from a tape and the *END attempt to calculate an appropriate record length when
special value is specified in the tape device file. the file is opened. RCDLEN(*CALC) can be used for
*NEXT: The next file in the sequence is processed. nonlabeled tapes or when there is no HDR2 label if a
This value is used for files read from tape. If the tape is BLKLEN value other than *CALC is specified for the file
currently in a position that is prior to the first file, the first and RCDBLKFMT does not specify spanned or blocked
file on the tape is processed. records. In this case, the system calculates an appro-
priate record length from the block length, record block
An error message is shown on the display when a tape
format, and buffer offset (for an ASCII file) specified for
file is used to write to a tape and the *NEXT special
the file. In any other case, the actual record length must
value is specified in the tape file.
be specified by a CHGTAPF command or OVRTAPF

P3-550 OS/400 CL Reference - Part 2 (Full Version)


OVRTAPF

command, or in the high-level language program that RCDLEN value other than *CALC is specified for the file
opens the device file. and RCDBLKFMT does not specify spanned or blocked
records. In this case, the system calculates an appro-
record-length: Specify a value ranging from 1 through
priate block length from the record length, record block
32767 bytes that indicates the length of each record in
format, and buffer offset (for an ASCII file) specified for
the data file. The minimum and maximum record length
the file. In any other case, the actual block length must
allowed for a file is dependent on the record block
be specified by a CHGTAPF command or OVRTAPF
format, block length, buffer offset (for an ASCII file), and
command, or in the high-level language program that
recording code. The EBCDIC Record Length Values
opens the device file.
and ASCII Record Length Values tables (at the end of
this parameter description) show the minimum and block-length: Specify a value, not exceeding 524288
maximum record length values allowed for each record bytes, that specifies the maximum length of each block
block format, assuming the block length value is large in the data file to be processed. The minimum block
enough to support the maximum record length. The fol- length that can be successfully processed is determined
lowing EBCDIC Record Length Values and ASCII by the tape device hardware and AS/400 system
Record Length Values tables show the minimum and machine support functions.
maximum record length values allowed for each record
Ÿ The maximum block length is always 524288 bytes
block format, assuming the block length value is large
for an input file, but is limited to 9999 bytes if block
enough to support the maximum record length.
descriptors must be created for an ASCII output file.
Ÿ The following table shows the minimum and
EBCDIC RCDLEN Ranges
maximum block length values allowed for an output
file:
RCDFBLKFMT FILETYPE(*DATA) FILETYPE(*SRC)
*F *FB *U 18 – 32767 30 – 32767
*V *VB 1 – 32759 13 – 32767 Minimum Maximum
CODE BUFOFSET BLKLEN BLKLEN
*VS *VBS 1 – 32759 13 – 32767
*EBCDIC Ignored 18 524288
*ASCII 0 18 524288
Figure 4. EBCDIC Record Length Vlaues (RCDLEN Parameter)
*ASCII *BLKDSC 18 9999

ASCII RCDLEN Ranges Figure 6. Absolute Block Length (BLKLEN) Ranges

RCDFBLKFMT FILETYPE(*DATA) FILETYPE(*SRC) BUFOFSET


*F *FB *U 18 – 32767 30 – 32767 Specifies the buffer offset value for the start of the first
*D *DB 1 – 9995 13 – 10007
record in each block in the tape data file. A buffer offset
value can be used for any record block format ASCII file,
*VS *VBS 1 – 32759 13 – 32767 and is ignored for an EBCDIC tape file. The system
uses the buffer offset specified in the data file labels for
Figure 5. ASCII Record Length Vlaues (RCDLEN Parameter) any standard-label input file or output file with
EXTEND(*YES) specified if a value is contained in the
BLKLEN second header label (HDR2) on the tape, and *BLP label
Specifies, in bytes, the maximum length of the data processing has not been specified.
blocks transferred to or from the tape for output or input The buffer offset parameter specifies the length of any
operations. The system uses the block length and information that precedes the first record in the block.
record length specified in the data file labels for any For record block formats *D, *DB, *VS, and *VBS, each
standard-label input file or output file with record or record segment is preceded by a descriptor
EXTEND(*YES) specified (if a second header label that contains the length of the record or segment. A
(HDR2) is found on the tape and *BLP label processing buffer offset value is used to indicate that there is infor-
has not been specified). mation ahead of the descriptor word for the first record
This parameter overrides the value specified in the in each block, or ahead of the data of the first fixed-
device file, in the program, or in other OVRTAPF com- length record or undefined format record in each block.
mands. This parameter is not needed for a standard-label file
*CALC: No block length is specified for the data file to processed for input if the tape includes a second file
be processed. If *CALC is specified, the system header label (HDR2) that contains the buffer offset
attempts to calculate an appropriate block length when value. A buffer offset value must be provided by the
the file is opened. BLKLEN(*CALC) can be used for Create Tape File (CRTTAPF) command, Change Tape
nonlabeled tapes or when there is no HDR2 label if a File (CHGTAPF) command, or Override Tape File

Chapter 2. OS/400 Command Descriptions P3-551


OVRTAPF

(OVRTAPF) command, or by the file labels for an input The Required RCDLEN/BLKLEN/BUFOFSET Relation
file that contains any information (such as a block table, at the end of this parameter description, shows the
descriptor) ahead of the first record in each block. If the required relationship between the record length, block
user does not specify a buffer offset value when a tape length, and buffer offset (for ASCII) file parameters for
file is created, it is not necessary to specify an offset an output file or an input file where the file parameters
value when the file is read. are not determined from a second file header label
(HDR2).
The only buffer offset values allowed for an output file
are zero and *BLKDSC. An existing standard-label data Note: When BUFOFSET(*BLKDSC) is specified for the
file with a buffer offset value in the HDR2 label can be file, a value of 4 should be used for the
extended only if the buffer offset value is either 0 or 4. BUFOFSET part of any BLKLEN calculations,
A buffer offset value of 0 in the HDR2 label adds data unless existing file labels on the tape specify a
blocks with no buffer offset. BUFOFSET(*BLKDSC) different value.
must be specified to extend an existing tape data file
This parameter overrides the value specified in the
that contains an offset value of 4 in the HDR2 label.
device file, in the program, or in other called OVRTAPF
This parameter overrides the value specified in the commands.
device file, in the program, or in other called OVRTAPF
*F: Fixed-length, unblocked, unspanned records in
commands.
either EBCDIC or ASCII code are processed. The
*BLKDSC: Creates 4-byte block descriptors in any tape system may change this record block format to *FB,
file created by using this device file. Any input file read based on other file parameters.
by using this device file should assume 4 bytes of buffer
*FB: Fixed-length, blocked, unspanned records in either
offset information preceding the first record in each data
EBCDIC or ASCII code are processed. The system may
block. This value is valid only for a record block format
change this record block format to *F, based on other
*D or *DB file. The contents of the buffer offset informa-
file parameters.
tion of each output data block when
BUFOFSET(*BLKDSC) is specified is the actual length *V: Variable-length, unblocked, unspanned records in
of the data block, expressed in zoned decimal format. EBCDIC type V format are processed. The system may
change this record block format to *VB, *D, or *DB,
buffer-offset: Specify a value ranging from 0 through 99 based on other file parameters.
bytes that specifies the length of the buffer offset infor-
mation that precedes the first record in each data block. *VB: Variable-length, blocked, unspanned records in
EBCDIC type V format are processed. The system may
RCDBLKFMT change this record block format to *DB, based on the
Specifies the type and blocking attribute of records in the volume code.
tape data file being processed.
*D: Variable-length, unblocked, unspanned records in
Record block format *V and *VB records can be pro- ASCII type D format are processed. The system may
cessed only for an EBCDIC file; *D and *DB records can change this record block format to *DB, *V, or *VB,
be processed only for an ASCII file. If a standard-label based on other file parameters.
tape (label type *SL or *BLP) is being processed and an
inconsistent record block format is specified for the *DB: Variable-length, blocked, unspanned records in
volume code, the correct record type is assumed (V or ASCII type D format are processed. The system may
D) for the volume code and a warning message is sent change this record block format to *VB, based on the
to the program that opens the file. If the record type and volume code.
code are inconsistent for a nonlabeled volume (label *VS: Variable-length, unblocked, spanned records in
type *NL, *LTM, or *NS), an error message is sent and either EBCDIC or ASCII code are processed. The
the file is not opened, because there are no labels to system may change this record block format to *VBS,
verify the correct volume code. based on other file parameters. Note that the represen-
If a valid record length, block length, and buffer offset tation of spanned records on the tape is different for
value (for an ASCII file) are specified for fixed-length EBCDIC and ASCII files, but the system selects the
records but the block attribute is incorrect, the correct correct format based on the file code.
block attribute is assumed (changing record block format *VBS: Variable-length, blocked, spanned records in
*F to *FB or record block format *FB to *F), and a either EBCDIC or ASCII code are processed. Note that
warning message is sent to the program that opens the the representation of spanned records on the tape differs
file. for EBCDIC and ASCII files, but the system selects the
If a block length is specified that is longer than required correct format based on the file code.
to process a maximum length record, then record block *U: Undefined format records in either EBCDIC or
format *V, *D, or *VS is changed to *VB, *DB, or *VBS ASCII code are processed. RCDBLKFMT(*U) records
and a warning message is sent to the program that are processed as variable-length records, and each
opens the file. record written or read is in a separate tape block. This

P3-552 OS/400 CL Reference - Part 2 (Full Version)


OVRTAPF

format can be useful for processing tape files that do not *NO: Records are not added to the end of the specified
have the formatting requirements of any other record data file. If there is already a data file with the specified
block format. or ASCII code. RCDBLKFMT(*U) records SEQNBR on the tape, a new data file is created by over-
are processed as variable length records, where each writing the existing data file and any files that follow it.
record written or read is in a separate tape block. This Records are not added to the end of the specified data
format is useful for processing tape device files that do
*YES: New records are added to the end of the speci-
not meet the formatting requirements of any other record
fied data file on tape when this device file is used.
block format.
Element 2: Checking Active Files
The following Required RCDLEN/BLKLEN/BUFOFSET
Relation table shows the required relationship between If EXTEND(*YES) is specified, the following values
the record length, block length, and buffer offset (for check to see whether the file already exists:
ASCII) file parameters for an output file or an input file *NOCHECK: The file is extended without being checked
where the file parameters are not determined from a to see whether the file is active.
second file header label (HDR2).
*CHECK: Before the file is extended, the file is checked
Note: When BUFOFSET(*BLKDSC) is specified for the to see whether it is active.
file, a value of 4 should be used for the
BUFOFSET part of any BLKLEN calculations, DENSITY
unless existing file labels on the tape specify a Specifies the density of the data that is written on the
different value. tape volume when this device file is created. This
parameter is used only for tape files being written to
tape; it is ignored for tape files being read from the tape
(in the case of files being read from tape, the density on
CODE RCDBLKFMT BLKLEN1
the tape is used).
*EBCDIC *F *U = RCDLEN
*ASCII *F *U = RCDLEN + BUFOFSET
The density of a standard-label volume is specified on
the INZTAP command, which initializes tapes as
*EBCDIC *FB = RCDLEN * n standard-label volumes by writing volume labels on
*ASCII *FB = (RCDLEN * n) + BUFOFSET
them. If the density specified on this parameter is dif-
(where n is the number of records ferent than the density of a standard-labeled tape, the
in a maximum-length block) tape must be reinitialized to the specified density.
*EBCDIC *V = RCDLEN * 8
*DEVTYPE: The density is based on the kind of tape
*ASCII *D = RCDLEN * 4 + BUFOFSET
device being used.
*EBCDIC *VB >= RCDLEN + 8
*ASCII *DB >= RCDLEN + 4 + BUFOFSET 1600: The data density on the tape volume is 1,600 bits
per inch, which is used for 1/2 inch reel tapes.
*EBCDIC *VS *VBS >= 18
*ASCII *BS *VBS >= 6 + BUFOFSET (18 minimum) 3200: The data density on the tape volume is 3,200 bits
1 Block length (BLKLEN) is a function of record length per inch, which is used for 1/2 inch reel tapes.
(RCDLEN) and buffer offset (BUFOFSET). 6250: The data density on the tape volume is 6,250 bits
per inch, which is used for 1/2 inch reel tapes.
*FMT3480: The format of this tape is FMT3480. The
Figure 7. Required RCDLEN/BLKLEN/BUFOFSET Relation data density on this tape volume is formatted to support
a 3480 device. This density is used for 1/2 inch car-
EXTEND tridge tapes.
Specifies, for output operations to tape, whether new
records are added to the end of a data file currently on *FMT3490E: The format of this tape is FMT3490E. The
the tape. The specific data file is identified by the data density on this tape volume is formatted to support
SEQNBR parameter and, for a standard-label file, the a 3490E device. This density is used for 1/2 inch car-
LABEL parameter. If the data file is extended, it tridge tapes.
becomes the last file on the tape volume; data files that *FMT3570: The format of this tape is FMT3570. The
follow it are overwritten as the specified file is extended. data format is written on the tape volume with a 3570
Note: This parameter is not valid for 1/4-inch cartridge device.
tape devices. *FMT3570E: The format of this tape is FMT3570E. The
This parameter overrides the extend value specified in data format is written on the tape volume with a 3570E
the device file, in the program, or in other called device.
OVRTAPF commands. *FMT3590: The format of this tape is FMT3590. The
Element 1: Adding Records to Data File data format is written on the tape volume with a 3590
device. This density is used for 1/2 inch cartridge tapes.

Chapter 2. OS/400 Command Descriptions P3-553


OVRTAPF

*QIC120: The format of this tape is QIC120, which is any type of label processing other than standard-
used for 1/4 inch cartridge tapes that can hold 120 label (*SL), it is ignored. If the creation date
megabytes of data. written on the tape containing the data file does
*QIC525: The format of this tape is QIC525, which is not match the date specified in this device file
used for 1/4 inch cartridge tapes that can hold 525 description, an inquiry message is sent to the
megabytes of data. operator.

*QIC1000: The format of this tape is QIC1000, which is This parameter overrides the value specified in the
used for 1/4 inch cartridge tapes that can hold 1200 program, device file, or in other called OVRTAPF com-
megabytes of data. mands.

*QIC2GB: The format of this tape is QIC2GB, which is *NONE: The creation date is not specified. It is not
used for 1/4 inch cartridge tapes that can hold 2.5 checked unless it is supplied before the device file is
gigabytes of data. opened, either in a OVRTAPF command or CHGTAPF
command, or in the high-level language program.
*QIC3040: The format of this tape is QIC3040, which is
used for 1/4 inch minicartridge tapes that can hold up to
creation-date: Specify the creation date of the data file
used by this device file. The date must be specified in
840 megabytes of data.
the format defined by the job attributes DATFMT and, if
*QIC5010: The format of this tape is QIC5010, which is separators are used, DATSEP.
used for 1/4 inch cartridge tapes that can hold 13.5
gigabytes of data. EXPDATE
Specifies, for tape output data files only, and only when
*FMT2GB: The format of this tape is FMT2GB, which is standard-labeled tapes are used, the expiration date of
used for 8 millimeter cartridge tapes that can hold 2 the data file used by this device file. If a date is speci-
gigabytes of data. fied, the data file is protected and cannot be overwritten
*FMT5GB: The format of this tape is FMT5GB, which is until after the specified expiration date. The files cannot
used for 8 millimeter cartridge tapes that can hold 5 be overwritten until after the expiration date.
gigabytes of data. Note: The data file expiration date is stored in file
*FMT7GB: The format of this tape is FMT7GB, which is labels on the tape. If an expiration date is speci-
used for 8 millimeter cartridge tapes that can hold 7 fied for any type of label processing other than
gigabytes of data. *SL, it is ignored.

COMPACT This parameter overrides the value specified in the


Specifies whether device data compaction is performed. program, device file, or in other called OVRTAPF com-
If the tape devices being used do not support data com- mands.
paction, this parameter will be ignored when the file is *NONE: No expiration date for the data file is specified;
opened. the file is not protected. An expiration date is written in
This parameter overrides the value specified in the the data file labels so the file can be used as a scratch
device file, in the program or in other called OVRTAPF data file.
commands. *PERM: The data file is permanently protected. An
*DEVD: Device data compaction is performed if the expiration date of 999999 is assigned.
devices being used support data compaction. expiration-date: Specify the date on which the data file
*NO: Device data compaction is not performed. expires, after which it can be overwritten with new data.
The expiration date must be later than or equal to the
CODE current date. The date must be specified in the format
Specifies the character code used. The code can be defined by the job attributes QDATFMT and, if separa-
either extended binary-coded decimal interchange code tors are used, QDATSEP.
(*EBCDIC) or the American National Standard Code for
Information Interchange (*ASCII). ENDOPT
Specifies the operation that is automatically performed
*EBCDIC: The extended binary-coded decimal inter- on the tape volume after the operation ends. If more
change code (EBCDIC) character set code is used. than one volume is included, this parameter applies only
*ASCII: The ASCII character set code is used. to the last tape volume used; all other tape volumes are
rewound and unloaded when the end of the tape is
CRTDATE reached.
Specifies, for tape input data files and for tape output for
which EXTEND(*YES) is specified, the date when the Note: Unless an ending option is specified by the high-
data file was created (written on tape). level language program when the file is closed,
this parameter overrides the ending operation
Note: The data file creation date is stored in file labels specified in the device file, in the program, or in
on the tape. If a creation date is specified for other called OVRTAPF commands.

P3-554 OS/400 CL Reference - Part 2 (Full Version)


OVRTAPF

*REWIND: The tape is automatically rewound, but not Note: An immediate allocation of the device by the
unloaded, after the operation has ended. device resource is required when an acquire
operation is performed to the file.
*LEAVE: The tape does not rewind or unload after the
operation ends. It remains at the current position on the This parameter overrides the wait time specified in the
tape drive. program or in the device file.
This option is used to reduce the time required to posi- *IMMED: The program does not wait; when the file is
tion the tape if the next tape file that opens to this device opened, an immediate allocation of the file resources is
uses a data file that is on this volume. required.
Note: Even if ENDOPT(*LEAVE) is specified, the next *CLS: The job default wait time is used as the wait time
tape file opened to this reel is positioned at the for the file resources being allocated.
beginning of some data file on the volume (or at
number-of-seconds: Specify the number of seconds that
the end of a data file, for either read backward or
the program waits for the file resources to be allocated
for output that extends an existing data file on
to the tape file when the file is opened, or the wait time
the volume). A tape file is always positioned at
for the device allocated when an acquire operation is
the start or end of a data file when it is opened.
performed to the file. Valid values range from 1 through
*UNLOAD: The tape is automatically rewound and 32767 seconds.
unloaded after the operation ends.
SECURE
USRLBLPGM Specifies whether this file is safe from the effects of pre-
Specifies the qualified name of the user program that viously called file override commands. If SECURE is not
processes user tape labels. On an output file, the user specified, processing occurs as if SECURE(*NO) is
label program will pass the user labels that are written to specified.
tape. On an input file, the user labels are passed to the
*NO: This file is not protected from the effects of other
user label program.
file overrides; its values can be overridden by the effects
*NONE: There is no user label program for this device of previously called file override commands.
file.
*YES: This file is protected from the effects of any file
The name of the user label program can be qualified by override commands previously called.
one of the following library values:
OVRSCOPE
*LIBL: All libraries in the job's library list are Specifies the extent of influence (scope) of the override.
searched until the first match is found.
*ACTGRPDFN: The scope of the override is determined
*CURLIB: The current library for the job is by the activation group of the program that calls this
searched. If no library is specified as the current command. When the activation group is the default acti-
library for the job, the QGPL library is used. vation group, the scope equals the call level of the
calling program. When the activation group is not the
library-name: Specify the name of the library to be
default activation group, the scope equals the activation
searched.
group of the calling program.
user-label-program-name: Specify the name of the user *CALLLVL: The scope of the override is determined by
program that processes the user tape labels. If no
the current call level. All open operations done at a call
library qualifier is given, *LIBL is used to find the file.
level that is the same as or higher than the current call
IGCDTA level are influenced by this override.
Specifies whether the file processes double-byte char- *JOB: The scope of the override is the job in which the
acter set (DBCS) data. override occurs.
*NO: The file does not process DBCS data.
SHARE
*YES: The file processes DBCS data. Specifies whether the open data path (ODP) for the tape
file is shared with other programs in the routing step.
WAITFILE
When an ODP is shared, the programs accessing the
Specifies the number of seconds that the program waits
file share facilities such as the file status and the buffer.
for the file resources and session resources to be allo-
cated when the file is opened, or for the device or More information on shared database files is in the DB2
session resources to be allocated when an acquire oper- for AS/400 Database Programming book.
ation is performed to the file. If those resources are not *NO: The ODP created by the program with this attri-
allocated within the specified wait time, an error bute is not shared with other programs in the routing
message is sent to the program. More information on step. Every time a program opens the file with this attri-
this parameter is in Appendix A, “Expanded Parameter bute, a new ODP to the file is created and activated.
Descriptions.”

Chapter 2. OS/400 Command Descriptions P3-555


OVRTAPF

Note: This includes many open files in the same Examples


program.
*YES: The ODP created with this attribute is shared Example 1: Overriding a File
with each program in the routing step that also specifies OVRTAPF FILE(OUT) VOL(DPT7ð6) LABEL(STATUSR)
SHARE(*YES) when it opens the file.
This command overrides a file named OUT in the program
Note: When SHARE(*YES) is specified and control is using the data file STATUSR on tape volume DPT706.
passed to a program, a read operation in that
program retrieves the next input record. A write Example 2: Allowing DBCS Data
operation produces the next output record.
OVRTAPF FILE(IGCLIB/IGCTAP) IGCDTA(\YES)
OPNSCOPE
Specifies the extent of influence (scope) of the open This command overrides the tape device file named IGCTAP,
operation. which is stored in the library IGCLIB, so the file may contain
double-byte character set data.
*ACTGRPDFN: The scope of the open operation is
determined by the activation group of the program that Example 3: Using Data Density of 1600 Bits Per Inch
called the OVRTAPF command processing program. If OVRTAPF FILE(OUT) DENSITY(16ðð)
the activation group is the default activation group, the
scope is the call level of the caller. If the activation This command overrides a file named OUT to use a data
group is a non-default activation group, the scope is the density of 1600 bits per inch when writing to the tape
activation group of the caller. volume.
*JOB: The scope of the open operation is the job in
which the open operation occurs.

P3-556 OS/400 CL Reference - Part 2 (Full Version)


PGM

PGM (Program) Command


Pgm: B,I

55──PGM──┬────────────────────────────────────┬─── (P) ─────────────────────────────────────────────────────────────────────────────5%


│ ┌──
───────────────────┐ │
6 (1) ──)─┘
└─PARM(────&CL-variable-name─┴───
Notes:
1 A maximum of 40 repetitions

P All parameters preceding this point can be specified in positional form.

Purpose information about printing the help text, refer to


“Printing CL Command Descriptions” in Chapter 1.
The Program (PGM) command is used in a CL program
source file to identify the start of a CL program that is to be
compiled and to specify the parameters that are to be Optional Parameters
received by the program after it is compiled. If a PGM PARM
command is used, it must be the first command in the Specifies the names of one or more CL variables that
program source file; if a PGM command is not used, a PGM are to receive the parameter values passed to this
command without parameters is assumed. The name of the program. Specify a CL variable name for each of the
program is specified in the Create Control Language values to be received from the calling program; the
Program (CRTCLPGM) command that is used to create the name must start with an ampersand (&). Null values,
CL program. *N, cannot be specified for any parameter. The param-
eter values are associated with the variables in the
The PGM command also specifies any parameters that are
PARM parameter in the order in which they were speci-
passed to the program when it is called for processing by
fied on the CALL or TFRCTL commands. The type and
another program. For information about how constants are
length of each value passed must have matching attri-
passed, see the PARM parameter description under the
butes in the calling and receiving programs. However,
CALL command.
for character constants, the receiving program can
This program can be called by a Call (CALL) or Transfer specify a shorter length; when this is done, the character
Control (TFRCTL) command, or by a routing entry in a sub- string passed is truncated to the length declared in the
system description. When the program is called by a CALL receiving program. For information on how each data
or TFRCTL command, the specified parameters can be type is passed, see the description of the PARM param-
passed to it. eter in the CALL command.
Note: If a parameter value is to be changed by a CL
Parameters defined in this command must be passed when program or specified as a variable on a CL
the program is called. The parameters passed must be of command, it must be in writeable storage. For
the type, length, and order specified in this command. Each example, in C/400, strings may be read only. If
of the parameter values passed to this program can be a a read only string is passed as a parameter to a
character string, a numeric value, or a CL variable. When CL program, and the CL program attempts to
received by this program, each value is given a different CL change the value of the variable or uses the vari-
variable name. Each CL variable name must be defined in able on a CL command, the CL program will fail.
the CL source file by a separate DCL (Declare) command
before the program is compiled. Up to 40 parameters can be
passed.
Examples
ILE programs and procedures will not detect parameter mis-
Example 1: Program Containing No Parameters
matches between the calling programs or procedure and the
called program or procedure. If the calling procedure passes PGM
more parameters than the called procedure expects, the Ÿ
Ÿ
called procedure will ignore the extra parameters. If the
Ÿ
calling procedure passed fewer parameters than are speci-
ENDPGM
fied on the called procedure PGM command, the result may
be unexpected. This PGM command is the first command in a CL program
source file for a program that contains no parameters.
Restriction: This command is valid only in a CL program.
Note: To see the parameter and value descriptions for this Example 2: Program Containing Two Parameters
command, refer to the online help text. For more PGM PARM(&X &Y)

Chapter 2. OS/400 Command Descriptions P3-557


PGM

This is the first command in a program source file for a This is the first command in a program source file for a
program that contains two parameters, &X and &Y, that have program that specifies two parameters in positional form,
values passed to them from the calling program. &PARM1 and &PARM2. When this program is called, the
calling program passes, through the CALL or TFRCTL
Example 3: Program Containing Two Parameters in command, the values to be assumed for &PARM1 and
Positional Form &PARM2.
PGM (&PARM1 &PARM2)

P3-558 OS/400 CL Reference - Part 2 (Full Version)


PING

PING Command
PING Command

For the description of the PING command, see the VFYTCPCNN (Verify TCP/IP Connection) command description.

Chapter 2. OS/400 Command Descriptions P3-559


POSDBF

POSDBF (Position Database File) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ────────────────────────────────────────────────────────────────5%
55──POSDBF──OPNID(──opnid-name──)──POSITION(──┬─\START─┬──)────
└─\END───┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose record in the current member. If the Override Database


File (OVRDBF) command MBR(*ALL) processing is in
The Position Database File (POSDBF) command allows the effect, a read previous operation gets the last record in
user to set the position of a database file to either the begin- the previous member. If a read previous is done and
ning or end of an open file. the previous member does not exist, the end of the file
Note: To see the parameter and value descriptions for this message (CPF5001) is sent.
command, refer to the online help text. For more *END: The position of the database file is set to the end
information about printing the help text, refer to of the member that is currently open. After the end posi-
“Printing CL Command Descriptions” in Chapter 1. tion is set, a read previous operation gets the last record
in the current member. If the Override Database File
(OVRDBF) command MBR(*ALL) processing is in effect,
Required Parameters a read next operation gets the first record in the next
OPNID member. If a read next is done and the next member
Specifies which opened file changes position. This file does not exist, the end of the file message (CPF5001) is
must be opened by either the Open Database File sent.
(OPNDBF) or Open Query File (OPNQRYF) command.

POSITION Example
Specifies the starting or ending position of the database POSDBF OPNID(XXX) POSITION(\START)
file.
This command sets the record position of the database file
*START: The position of the database file is set to the
that is opened with OPNID(XXX) to the starting position of
start position of the member currently open. After the
the database file member that is currently open.
start position is set, a read next operation gets the first

P3-560 OS/400 CL Reference - Part 2 (Full Version)


PRTADPOBJ

PRTADPOBJ (Print Adopting Objects) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─────────────────────────────────────5%
55──PRTADPOBJ──USRPRF(──┬─\ALL───────────────────────┬──)──┬──────────────────────────┬───
├─user-profile-name──────────┤ │ ┌─\NO──┐ │
└─generic\-user-profile-name─┘ └─CHGRPTONLY(──┴─\YES─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more
The Print Adopting Objects (PRTADPOBJ) command allows information about printing the help text, refer to
you to print a report of the objects that adopt the special and “Printing CL Command Descriptions” in Chapter 1.
private authorities of the specified user profile. This is a way
to check for security exposures associated with program
adoption. Required Parameter
USRPRF
This command prints two reports for a user profile. The first
Specifies the name of the user profile whose adopted
report (Full Report) contains all of the objects that adopt the
object information will be printed.
authorities of the user profile. The second report (Changed
Report) contains the objects that now adopt the authorities of *ALL: The adopted information is printed for all user
the user profile that did not adopt the authorities of the user profiles.
profile when the PRTADPOBJ command was previously run user-profile-name: Specify the name of the user profile
for the user profile. If the PRTADPOBJ command was not to print the adopted information for.
previously run for the user profile, there will be no 'Changed
Report'. If the command has been previously run for the generic*-user-name: Specify the generic name of the
user profile but no additional objects adopt the authorities of user profile to print the adopted information for. A
the user profile, then the 'Changed Report' is printed but generic name is a character string of one or more char-
there are no objects listed. acters followed by an asterisk (*).

An object is not listed in the Changed Report when the


Optional Parameter
object itself is changed. Therefore, you should periodically
review the entire list of objects that adopt to understand their CHGRPTONLY
current function. Specifies whether just the changed report should be
printed.
Restrictions:
*NO: The full and changed reports will be printed.
1. You must have *ALLOBJ special authority to use this
command. *YES: Only the changed report will be printed.

2. The user profile specified on the command is locked


while the command is running. The lock prevents such Example
things as objects having their owner changed to this PRTADPOBJ USRPRF(OURSECOFR)
profile. If this profile owns a lot of objects, the profile
could be locked for an extended period of time. This command will produce the full and changed reports for
the objects that adopt the special and private authorities of
the user profile OURSECOFR.

Chapter 2. OS/400 Command Descriptions P3-561


PRTAFPDTA

PRTAFPDTA (Print Advanced Function Printer Data) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ─┬──────────────────────────┬──┬──────────────────────────────────┬────5
55──PRTAFPDTA──FILE(──┼───────────────┼──file-name──)────
├─\CURLIB/──────┤ │ ┌─\FIRST──────┐ │ │ ┌─\JOB────────────────┐ │
└─library-name/─┘ └─MBR(──┴─member-name─┴──)─┘ └─DEV(──┼─\SYSVAL─────────────┼──)─┘
└─printer-device-name─┘
5──┬─────────────────────────────────────────────────────────┬──┬─────────────────────────────────────┬─────────────────────────5
│ ┌─\DEVD───────────────────────────────────┐ │ │ ┌─1────────────────┐ │
(1) ──)─┘
└─FORMDF(──┼─\INLINE─────────────────────────────────┼──)─┘ └─COPIES(──┴─number-of-copies─┴───
│ ┌─\LIBL/────────┐ │
└─┼───────────────┼──form-definition-name─┘
├─\CURLIB/──────┤
└─library-name/─┘
5──┬───────────────────────────────────────┬──┬─────────────────────────────────────┬──┬─────────────────────────────┬─────────5%
│ ┌─1────────────────────┐ │ │ ┌─\END───────────────┐ │ │ ┌─\ABSOLUTE─┐ │
└─STRPAGE(──┴─starting-page-number─┴──)─┘ └─ENDPAGE(──┴─ending-page-number─┴──)─┘ └─FIDELITY(──┴─\CONTENT──┴──)─┘
Notes:
P All parameters preceding this point can be specified in positional form.

1 Valid values range from 1 through 255

Purpose Optional Parameters


The Print Advanced Function Printer Data (PRTAFPDTA) MBR
command prints output received from a System/370* host. Specifies the member that contains the data to be
This command provides the user with a means of specifying printed.
the file being printed and the parameters used to control the *FIRST: The first member in the database file is used.
print operation.
member-name: Specify the member that contains the
Note: To see the parameter and value descriptions for this data to be printed.
command, refer to the online help text. For more
information about printing the help text, refer to DEV
“Printing CL Command Descriptions” in Chapter 1. Specifies the printer that prints the file.
*JOB: The printer device specified in the job description
Required Parameters is used.
*SYSVAL: The value specified in the system value
FILE
QPRTDEV is used.
Specifies the qualified name of the Advanced Function
Printing Data Stream (AFPDS) file to be printed. Only printer-device-name: Specify the name of the printer.
physical files are supported for this command. If you
FORMDF
use the Override with Printer File (OVRPRTF) command
Specifies the form definition to use when printing the file.
with PRTAFPDTA, do not override the device type
A form definition is a resource object that defines the
(DEVTYPE parameter).
characteristics of the form, including: overlays, position
The name of the file can be qualified by one of the fol- of page data on the form, and number of copies of
lowing library values: pages and modification to pages. The form definition is
located inline with the file being printed, or in a library.
*LIBL: All libraries in the job's library list are
searched until the first match is found. *DEVD: The device description obtains the name of the
form definition being used. If no value is specified,
*CURLIB: The current library for the job is
*DEVD is assumed.
searched. If no library is specified as the current
library for the job, the QGPL library is used. *INLINE: The form definition that is inline with the file
that is printed is used.
library-name: Specify the name of the library to be
searched. The name of the form definition can be qualified by one
of the following library values:
file-name: Specify the name of the AFPDS to be
printed. *LIBL: All libraries in the job's library list are
searched until the first match is found.

P3-562 OS/400 CL Reference - Part 2 (Full Version)


PRTAFPDTA

*CURLIB: The current library for the job is *END: Printing concludes at the end of the file.
searched. If no library is specified as the current
ending-page-number: Specify the page number on
library for the job, the QGPL library is used.
which printing ends.
library-name: Specify the name of the library to be
FIDELITY
searched.
Specifies the degree of exactness required when printing
form-definition-name: Specify the name of the form defi- the file.
nition that must exist in the library named. A valid name
*ABSOLUTE: The job is printed only if the file can be
has up to 8 characters.
printed exactly as specified by the data stream and
COPIES external controls.
Specifies, for spooled files, the number of copies being *CONTENT: Prints the file using all available exception
printed. handling.
1: One copy of the output is printed.
number-of-copies: Specify the number of copies that are Examples
printed.
Example 1: Printing Specific Pages
STRPAGE
PRTAFPDTA FILE(MYLIB/MYFILE)
Specifies the page on which printing starts. This param- STRPAGE(2) ENDPAGE(6)
eter is used for partial printing of a file.
1: Printing starts with page 1. If the start page is not This command prints the first member in file MYFILE in
specified, 1 is assumed. library MYLIB starting with page 2 and ending on page 6.

starting-page-number: Specify the page number on Example 2: Printing Using All Available Exception Han-
which printing starts. dling
ENDPAGE PRTAFPDTA FILE(MYLIB/MYFILE)
Specifies the page on which printing ends. This param- FORMDF(F1ð1ð1) FIDELITY(\CONTENT)
eter is used for partial printing of a file ending at a speci-
fied page number. If both start page and end page are This command prints the first member in file MYFILE in
specified, the end page must be greater than or equal to library MYLIB using a form definition of F10101 and all avail-
the start page. Specifying an end page beyond the end able exception handling.
of the actual file does not create an error condition.

Chapter 2. OS/400 Command Descriptions P3-563


PRTCMDUSG

PRTCMDUSG (Print Command Usage) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌──
─────────────────────────────────┐
│ ┌─\LIBL/────────┐ │
6 (1) ──)──┬───────────────────────────────────────────────────────┬───
55──PRTCMDUSG──CMD(────┼───────────────┼──command-name─┴─── (P) ───5%
└─library-name/─┘ │ ┌─\USRLIBL/─────┐ ┌─\ALL──────────────────┐ │
└─PGM(──┼───────────────┼──┼─program-name──────────┼──)─┘
├─\CURLIB/──────┤ └─generic\-program-name─┘
├─\ALLUSR/──────┤
└─library-name/─┘
Notes:
1 A maximum of 50 repetitions

P All parameters preceding this point can be specified in positional form.

Purpose libraries for which the user has some (any) authority are
included in the report. This parameter also can specify
The Print Command Usage (PRTCMDUSG) command that all (*ALL) programs in the specified library or
creates a cross-referenced list of a specified group of CL libraries (*USRLIBL/*ALLUSR, for example) are
commands that are used in a specified group of CL pro- searched.
grams. The report shows, program by program, which of the
The name of the program can be qualified by one of the
specified commands are used in each program. The report
following library values:
can be used to identify which programs need to be recom-
piled because of changes that have been made to the *USRLIBL: Only the libraries in the user portion of
command definition objects of commands specified on the the job's library list are searched.
PRTCMDUSG command. Note that this command can take
*CURLIB: The current library for the job is
a long time to run and can make a lot of printed output.
searched. If no library is specified as the current
Note: To see the parameter and value descriptions for this library for the job, the QGPL library is used.
command, refer to the online help text. For more
*ALLUSR: All user libraries are searched. All
information about printing the help text, refer to
libraries with names that do not begin with the letter
“Printing CL Command Descriptions” in Chapter 1.
Q are searched except for the following:
#CGULIB #DFULIB #RPGLIB #SEULIB
Required Parameter #COBLIB #DSULIB #SDALIB
CMD Although the following Qxxx libraries are provided
Specifies the qualified names of up to 50 CL commands by IBM, they typically contain user data that
for which specified programs are searched and printed in changes frequently. Therefore, these libraries are
a command usage report. The system searches the considered user libraries and are also searched:
specified programs for every occurrence of each library- | QDSNX QPFRDATA QUSRBRM QUSRSYS
name/command-name character string you specify. | QGPL QRCL QUSRIJS QUSRVxRxMx
The name of the command can be qualified by one of | QGPL38 QS36F QUSRINFSKR
| QMQMDATA QUSER38 QUSRNOTES
the following library values:
| QMQMPROC QUSRADSM QUSRRDARS
*LIBL: All libraries in the job's library list are Note: A different library name, of the form
searched until the first match is found. QUSRVxRxMx, can be created by the user
library-name: Specify the name of the library to be for each release that IBM supports. VxRxMx
searched. is the version, release, and modification level
of the library.
command-name: Specify the names of the commands
for which specified programs are searched.
library-name: Specify the name of the library to be
searched.
Optional Parameter
*ALL: All CL programs in the specified library (or all
PGM
libraries identified in the library qualifier) for which the
Specifies the qualified name of the program or the
user has some authority are searched.
generic name of several programs that are searched for
the specified commands. Only the programs and program-name: Specify the name of the program being
searched for the specified command.

P3-564 OS/400 CL Reference - Part 2 (Full Version)


PRTCMDUSG

generic*-program-name: Specify the name of the objects can be printed only if *ALL or *ALLUSR library
program or the generic name of several programs in the values can be specified for the name. For more infor-
specified library qualifier that are searched for the speci- mation on the use of generic names, refer to “Generic
fied commands. A generic name is a character string of Object Names” in Chapter 2.
one or more characters followed by an asterisk (*); for
example, ABC*. The asterisk substitutes for any valid
characters. A generic name specifies all objects with
Example
names that begin with the generic prefix for which the PRTCMDUSG CMD(CPYF) PGM(PAYROLL/\ALL)
user has authority. If an asterisk is not included with the
generic (prefix) name, the system assumes it to be the This commands searches all CL programs in the library
complete object name. If the complete object name is PAYROLL for the Copy File (CPYF) commands and prints
specified, and multiple libraries are searched, multiple the names of both the commands and the program.

Chapter 2. OS/400 Command Descriptions P3-565


PRTCMNSEC

PRTCMNSEC (Print Communications Security) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─────────────────────────────────────────────────────────────────────────────────5%
55──PRTCMNSEC──┬──────────────────────────┬───
│ ┌─\NO──┐ │
└─CHGRPTONLY(──┴─\YES─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose there will be no 'Changed Report'. If the command has been


previously run but no communication object information has
The Print Communications Security (PRTCMNSEC) changed then the 'Changed Report' is printed but there are
command allows you to print a report containing the security no objects listed.
attributes of the *DEVD, *CTLD and *LIND objects currently
on the AS/400 system. This command provides a way to Restrictions You must have *ALLOBJ and *IOSYSCFG
check the security of your communications configuration on special authority to use this command.
the AS/400 system. Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more
The Print Communications Security command creates two
information about printing the help text, refer to
spooled output files containing communications security infor-
“Printing CL Command Descriptions” in Chapter 1.
mation. The first spooled output file contains a report gener-
ated by the Display Configuration List (DSPCFGL) CL
command. This report contains the entries currently in the Optional Parameter
APPN remote configuration list QAPPNRMT. If the
QAPPNRMT configuration list does not exist on the system CHGRPTONLY
then no report is printed. The second spooled output file Specifies whether just the changed report should be
contains the security attributes of the *DEVD, *CTLD and printed.
*LIND objects on the system. *NO: The full and changed reports are printed.

The spooled output file containing the *DEVD, *CTLD and *YES: Only the changed report is printed.
*LIND objects contains two reports. The first report (Full
Report) contains all of the communications objects and prints Example
the security attributes of each object. The second report
PRTCMNSEC
(Changed Report) contains the communications objects that
have changed since the PRTCMNSEC command was last Both the full and change report will be generated for the
run. If the PRTCMNSEC command was not previously run, communication security information.

P3-566 OS/400 CL Reference - Part 2 (Full Version)


PRTCMNTRC

PRTCMNTRC (Print Communications Trace) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─┬──────────────────────────┬───────────────────────5
55──PRTCMNTRC──CFGOBJ(──────configuration-name──)──CFGTYPE(──┬─\LIN─┬──)────
├─\NWI─┤ │ ┌─\PRINT───┐ │
└─\NWS─┘ └─OUTPUT(──┴─\OUTFILE─┴──)─┘
5──┬───────────────────────────────────────────┬──┬───────────────────────────────────────────┬──┬───────────────────────┬──────5
│ ┌─\LIBL/────────┐ │ │ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │ │ ┌─\EBCDIC─┐ │
└─OUTFILE(──┼───────────────┼──file-name──)─┘ └─OUTMBR(──┼─────────────┼──┴─\ADD─────┴──)─┘ └─CODE(──┼─\ASCII──┼──)─┘
├─\CURLIB/──────┤ └─member-name─┘ └─\CALC───┘
└─library-name/─┘
5──┬──────────────────────────────┬──┬────────────────────────────────────┬──┬────────────────────────┬─────────────────────────5
│ ┌─\ALL──────┐ │ │ ┌─\ALL────────────┐ │ │ ┌─\NO──┐ │
(1) ┘ └─SLTCTLD(──┴─controller-name─┴──)───
└─SLTLIND(──┴─line-name─┴──)─── (2) ┘ └─FMTSNA(──┴─\YES─┴──)───
(3) ┘

5──┬─────────────────────────┬──┬────────────────────────────┬──┬───────────────────────────┬──┬──────────────────────────┬─────5
| │ ┌─\NO──┐ │ │ ┌─\LINTYPE─┐ │ │ ┌─\NO──┐ │ │ ┌─\NO──┐ │
| (4, 3) ┘ └─FMTTCP(──┼─\YES─────┼──)───
└─FMTRR(──┴─\YES─┴──)───── (3) ┘ └─FMTUI(──┴─\YES─┴──)───────
(3, 5, 6) ┘ └─FMTMAC(──┴─\YES─┴──)─────
(3, 5) ┘
| └─\NO──────┘
5──┬──────────────────────────┬──┬──────────────────────────┬──┬──────────────────────────┬──┬────────────────────────┬─────────5
│ ┌─\NO──┐ │ │ ┌─\NO──┐ │ │ ┌─\YES─┐ │ │ ┌─\NO──┐ │
(3, 7) ┘ └─FMTCCD(──┴─\YES─┴──)─────
└─FMTETH(──┴─\YES─┴──)───── (3, 8) ┘ └─FMTBCD(──┴─\NO──┴──)─────
(3, 5) ┘ └─EXCLMI(──┴─\YES─┴──)───
(3) ┘

5──┬──────────────────────────┬──┬─────────────────────────────────────────────────────┬──┬───────────────────────────┬─────────5
| │ ┌─\NO──┐ │ │ ┌─\ALL─────────┐ ┌─\ALL─────────┐ │ │ ┌─\YES─┐ │
| (3, 9) ┘ └─TCPIPADR(──┴─IP-address-1─┴──┴─IP-address-2─┴──)────
└─FMTLMI(──┴─\YES─┴──)───── (10) ┘ └─FMTLCP(──┴─\NO──┴──)──────
(3, 11) ┘

5──┬───────────────────────────┬───────────────────────────────────────────────────────────────────────────────────────────────5%
| │ ┌─\YES─┐ │
| (3, 11) ┘
└─FMTNCP(──┴─\NO──┴──)──────
Notes:
P All parameters preceding this point can be specified in positional form.

1 This parameter is valid only if CFGTYPE(*NWI) is specified.

2 This option is valid only for the following controllers: ASYNC, X.25, ISDN data link control (IDLC), synchronous data link

control (SDLC), and local area network (LAN)


3 This parameter is not used when printing to an output file.

4 This option is valid only for LANs, SDLC, IDLC, ISDN, and X.25.

5 This option is valid only for LANs.

6 FMTSNA(*NO) must be specified if FMTUI(*YES) is specified.

7 This option is valid only on Ethernet networks.

8 This option is valid only for the object type of *NWID.

9 FMTLMI(*YES) is not valid when EXCLMI(*YES) is specified.

10 This parameter is valid only if FMTTCP(*YES) is specified.

| 11 This option is valid only for Point-to-Point Protocol (PPP) lines.

Purpose 3. The following user profiles have authority to this


command:
The Print Communications Trace (PRTCMNTRC) command
Ÿ QSECOFR
transfers the communications trace data for the specified
line, network interface description, or network server Ÿ QSRV
description to a spooled file or an output file. Note: To see the parameter and value descriptions for this
Note: The trace data for network server description traces command, refer to the online help text. For more
can only be transferred to a spooled file. The trace information about printing the help text, refer to
data can not be transferred to an output file. There “Printing CL Command Descriptions” in Chapter 1.
are no formatting options available.

Restrictions: Required Parameters


1. *SERVICE authority is required to use this command. CFGOBJ
Specifies the name of the configuration object being
2. This command is shipped with public *EXCLUDE
traced. The object is either a line description, a network
authority.
interface description, or a network server description.

Chapter 2. OS/400 Command Descriptions P3-567


PRTCMNTRC

CFGTYPE (*EBCDIC) or the American National Standard Code for


Specifies the type of configuration description that was Information Interchange (*ASCII).
traced.
*EBCDIC: The user data is formatted in EBCDIC.
*LIN: The type of configuration object is a line
*ASCII: The user data is formatted in ASCII.
description.
*CALC: The system determines whether to format the
*NWI: The type of configuration object is a network
user data in EBCDIC or ASCII, based on the type of
*NWS: The type of configuration object is a network controller that is used.
server description.
SLTLIND
Specifies whether to format data for all lines or a specific
Optional Parameters line communicating on the network during a trace.
OUTPUT *ALL: Formats the data for all lines.
Specifies the format of the output data. line-name: Specify the line name.
Note: For network server description traces, *PRINT
SLTCTLD
must be specified for this parameter.
Specifies whether to format data for all controllers or a
*PRINT: The output is printed with the job's spooled specific controller communicating on the network during
output. a trace.
*OUTFILE: The output is directed to the database file *ALL: Formats data for all controllers.
specified on the OUTFILE parameter.
controller-name: Specify the controller name.
OUTFILE
FMTSNA
Specifies the database file where the output file is
Specifies whether line protocol data or Systems Network
stored.
Architecture (SNA) data is formatted. Line protocol data
The name of the output file can be qualified by one of includes SDLC, X.25, Carrier Sense Multiple Access with
the following library values: Collision Detection (CSMA/CD), Ethernet DIX V2, DDI,
wireless, and IBM Token-Ring Network (TRLAN).
*LIBL: All libraries in the job's library list are
searched until the first match is found. *NO: Only line protocol data is formatted.
*CURLIB: The current library for the job is *YES: Only SNA data is formatted.
searched. If no library is specified as the current
FMTRR
library for the job, the QGPL library is used.
Specifies whether receiver ready (RR) and receiver not
library-name: Specify the name of the library to be ready (RNR) commands are formatted with other data.
searched.
*NO: RR and RNR commands are not formatted with
file-name: Specify the output file name. other data.

OUTMBR *YES: RR and RNR commands are formatted with other


Specifies the name of the database file member to which data.
the output is directed. FMTTCP
Element 1: Member to Receive Output | Specifies whether line protocol data or Transmission
| Control Protocol/Internet Protocol (TCP/IP) data is for-
*FIRST: The first member in the database file is used.
| matted.
member-name: Specify the file member that receives
| *LINTYPE: For X.25, Ethernet, DDI, wireless, Token-
the output. If OUTMBR(member-name) is specified and
| Ring, and Frame Relay lines, only line protocol data is
the member does not exist, the system creates it.
| formatted. For all other lines supporting TCP/IP, TCP/IP
Element 2: Operation to Perform on Member | data is formatted.
*REPLACE: The system clears the existing member | *YES: TCP/IP data is formatted.
and adds the new records.
| *NO: TCP/IP data is not formatted.
*ADD: The system adds the new records to the end of
the existing records. FMTUI
Specifies whether line protocol data or unnumbered
CODE information (UI) data is formatted.
Specifies the character code used. The code can be
*NO: All line protocol data is formatted.
either extended binary-coded decimal interchange code
*YES: Only UI data is formatted.

P3-568 OS/400 CL Reference - Part 2 (Full Version)


PRTCMNTRC

FMTMAC ranging from 0 through 255. An internet address is not


Specifies whether line protocol data or medium access valid if it has a value of all binary ones or all binary
control (MAC) or station management (SMT) data is for- zeros for the network identifier (ID) portion or the host ID
matted. portion of the address. If the internet address is entered
from a command line, the address must be enclosed in
*NO: The line protocol data is formatted.
apostrophes.
*YES: Only MAC or SMT data is formatted.
Element 1: IP Address 1
FMTETH
*ALL: The communications between the systems speci-
Specifies whether IEEE 802.3 data or Ethernet V2 data
fied on the IP address 2 element and all other systems
is formatted.
are printed.
*NO: Only IEEE 802.3 data is formatted.
IP-address-1: Specify the address of the system for
*YES: IEEE 802.3 data and Ethernet V2 data are for- which communications between this system and the
matted. systems specified on the IP address 2 element are
printed.
FMTCCD
Specifies whether all network interface data or only Inte- Element 2: IP Address 2
grated Services Digital Network (ISDN) signalling data is *ALL: The communications between the systems speci-
formatted. fied on the IP address 1 element and all other systems
*NO: All network interface data is formatted. are printed.

*YES: Only Integrated Services Digital Network (ISDN) IP-address-2: Specify the address of the system for
signaling data is formatted. which communications between this system and the
systems specified on the IP address 1 element are
FMTBCD printed.
Specifies whether broadcast data and data received con-
taining destination MAC addresses is formatted. | FMTLCP
| Specifies whether Link Control Protocol (LCP) data is
*YES: Broadcast data is formatted.
| included in the formatted communications trace.
*NO: Broadcast data is not formatted.
| Note: If FMTLCP, FMTNCP, and FMTTCP are all
EXCLMI | specified *NO when formatting data for a Point-
Specifies whether to exclude local management interface | to-Point Protocol (PPP) line, then asynchronous
(LMI) data from the formatted output. | and unrecognized data will be placed in the
| spooled file. If all are specified *YES (or
*NO: LMI data is not excluded from the formatted
| *LINTYPE for FMTTCP), then all PPP line trace
output.
| data is formatted and placed in the spooled file.
*YES: LMI data is excluded from the formatted output.
| *YES: LCP data is formatted.
FMTLMI | *NO: LCP data is not formatted.
| Specifies whether LMI data is formatted.
| FMTNCP
*NO: LMI data is not formatted.
| Specifies whether Network Control Protocol (NCP) data
*YES: LMI data is formatted. | is included in the formatted communications trace.
Note: You cannot specify *YES on both the EXCLMI | *YES: NCP data is formatted.
and FMTLMI parameters.
| *NO: NCP data is not formatted.
TCPIPADR
Specifies an internet address pair for which TCP/IP data Example
is formatted. Any values that are valid for IP address 1
are also valid for IP address 2. PRTCMNTRC CFGOBJ(\QESLINE) CFGTYPE(\LIN)

The internet address is specified in the form This command prints communications trace data for line
nnn.nnn.nnn.nnn, where nnn is a decimal number description QESLINE.

Chapter 2. OS/400 Command Descriptions P3-569


PRTDEVADR

PRTDEVADR (Print Device Addresses) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ────────────────────────────────────────────────────────────────────────────5%
55──PRTDEVADR──CTLD(──controller-description──)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Required Parameters


The Print Device Addresses (PRTDEVADR) command pro- CTLD
vides a printed list of addresses and related information for
devices attached to a local or remote work station controller.
For each device attached to the work station controller Specifies the name of the local or remote work station
named in the controller description (CTLD parameter), the controller for which device address information is printed.
output shows the device's name, its port and switch setting,
its type and model number, shared session number (valid
only if device type is 3486 or 3487), and whether the device Example
is a display station or printer.
PRTDEVADR CTLD(CTLð1)
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more This command prints device address information for the
information about printing the help text, refer to devices that are attached to the CTL01 work station con-
“Printing CL Command Descriptions” in Chapter 1. troller.

P3-570 OS/400 CL Reference - Part 2 (Full Version)


PRTDOC

PRTDOC (Print Document) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──┬─────────────────────────────┬───
55──PRTDOC──┬────────────────────────────┬──┬──────────────────────────┬─── (K) ─────────────────5
│ ┌─\PRV──────────┐ │ │ ┌─\PRV────────┐ │ │ ┌─\NO──────┐ │
└─DOC(──┼─\ALL──────────┼──)─┘ └─FLR(──┴─folder-name─┴──)─┘ (1) ─┼─\YES─────┼──)─┘
└─OPTIONS(───
└─document-name─┘ ├─\PRTFILE─┤
└─\OUTFILE─┘
5──┬─────────────────────────────────────────────────────────────────────────────┬──────────────────────────────────────────────5
│ ┌─QSYSPRT─────────────────────────────────────┐ │
│ │ ┌─\LIBL/────────┐ │ │
├─PRTFILE(──┴─┼───────────────┼──printer-device-file-name─┴──)────────────────┤
│ ├─\CURLIB/──────┤ │
│ └─library-name/─┘ │
│ ┌─\PRV──────────────────────────────────┐ │
│ │ ┌─\LIBL/────────┐ │ │
└─OUTFILE(──┴─┼───────────────┼──database-file-name─┴──)──┤ OUTFILE Details ├─┘
├─\CURLIB/──────┤
└─library-name/─┘
5──┬──────────────────────────────────────────────────┬──┬─────────────────────────┬────────────────────────────────────────────5
│ ┌─\SAME──┐ │ │ ┌─\SAME──┐ │
(2) ─┼─\──────┼──)──┬────────────────────┬─┘ └─MRGTYPE(──┼─\QRY───┼──)─┘
└─OUTPUT(───
└─\PRINT─┘ └─┤ OUTPUT Details ├─┘ ├─\DOC───┤
├─\FILE──┤
└─\BLANK─┘
5──┬───────────────────────────────────────────────────────────────────────────────────┬──┬──────────────────────────┬──────────5
│ ┌─\SAME────────────────────────────────────┐ │ │ ┌─\SAME─┐ │
│ │ ┌─\LIBL/────────┐ │ │ └─MLTLINRPT(──┼─\YES──┼──)─┘
(3)
├─QRYDFN(────┴─┼───────────────┼──query-definition-name─┴──)────────────────────────┤ └─\NO───┘
│ └─library-name/─┘ │
│ ┌─\SAME─────────┐ ┌─\SAME───────┐ │
(4) ─┴─document-name─┴──)──DTAFLR(──┴─folder-name─┴──)──────────────────────┤
├─DTADOC(───
│ ┌─\SAME────────────────────────┐ │
│ │ ┌─\LIBL/────────┐ │ ┌─\SAME────────────┐ │
(5)
└─DTAFILE(────┴─┼───────────────┼──file-name─┴──)──DTAMBR(──┼─\FILE────────────┼──)─┘
├─\CURLIB/──────┤ ├─\FIRST───────────┤
└─library-name/─┘ ├─\LAST────────────┤
└─data-member-name─┘
5──┬─────────────────────────┬──┬─────────────────────────┬──┬─────────────────────────┬──┬───────────────────────────┬─────────5
│ ┌─\SAME─┐ │ │ ┌─\SAME─┐ │ │ ┌─\SAME─┐ │ │ ┌─\SAME─┐ │
└─ADJLINES(──┼─\YES──┼──)─┘ └─ADJPAGES(──┼─\YES──┼──)─┘ └─ALWWIDOW(──┼─\YES──┼──)─┘ └─RENUMBER(─── (6) ─┼─\YES──┼──)─┘
└─\NO───┘ └─\NO───┘ └─\NO───┘ └─\NO───┘
5──┬──────────────────────────┬──┬────────────────────────┬──┬───────────────────────────┬──┬───────────────────────┬───────────5
│ ┌─\SAME─┐ │ └─SYMBOLS(──┬─\SAME─┬──)─┘ │ ┌─\SAME─┐ │ │ ┌─\SAME─┐ │
└─PRTCHGSYM(──┼─\YES──┼──)─┘ └─value─┘ └─DRAFTSPACE(──┼─\YES──┼──)─┘ └─LINNBR(──┼─\YES──┼──)─┘
└─\NO───┘ └─\NO───┘ └─\NO───┘
5──┬────────────────────────┬──┬───────────────────────────┬──┬─────────────────────────────────────────┬───────────────────────5
│ ┌─\SAME─┐ │ │ ┌─\SAME─┐ │ │ ┌─\SAME────────────────────┐ │
└─RESOLVE(──┼─\YES──┼──)─┘ └─LEFTSPACES(──┴─value─┴──)─┘ └─CHRID(──┼─\BLANK───────────────────┼──)─┘
└─\NO───┘ └─character-set──code-page─┘
5──┬──────────────────────────┬──┬───────────────────────────────┬──┬─────────────────────────────┬──┬─────────────────────┬────5
│ ┌─\SAME─┐ │ │ ┌─\SAME─────────┐ │ │ ┌─\SAME───────┐ │ │ ┌─\SAME─┐ │
└─SAVOUTPUT(──┼─\YES──┼──)─┘ └─SAVDOC(──┼─\BLANK────────┼──)─┘ └─SAVFLR(──┼─\BLANK──────┼──)─┘ └─JOBQ(──┼─\YES──┼──)─┘
└─\NO───┘ └─document-name─┘ └─folder-name─┘ └─\NO───┘
5──┬───────────────────────────────────────────────────────┬──┬───────────────────────┬──┬───────────────────────┬──────────────5
│ ┌─\SAME───────────────────────────────────┐ │ │ ┌─\SAME─┐ │ │ ┌─\SAME─┐ │
│ │ ┌─\LIBL/────────┐ │ │ └─SNDMSG(──┼─\YES──┼──)─┘ └─CNLERR(──┼─\YES──┼──)─┘
└─JOBD(──┴─┼───────────────┼──job-description-name─┴──)─┘ └─\NO───┘ └─\NO───┘
└─library-name/─┘
5──┬─┬────────────────────────────────────────────────────────────┬───────────┬──┬──────────────────────────┬───────────────────5
│ │ ┌─\PAGERANGE──┐ ┌─\PAGERANGE──┐ │ │ │ ┌─\SAME─┐ │
│ └─STRPAGE(──┼─\SAME───────┼──)──ENDPAGE(──┼─\SAME───────┼──)─┘ │ └─LBLACROSS(──┴─value─┴──)─┘
│ ├─\FIRST──────┤ ├─\FIRST──────┤ │
│ ├─\LAST───────┤ ├─\LAST───────┤ │
│ └─page-number─┘ ├─\STRPAGE────┤ │
│ └─page-number─┘ │
└───┬──────────────────────────────────────────────────────────────────┬───┘
│ ┌─\SAME──────────────────────────────────────┐ │
│ │ ┌──
────────────────────────────────────────┐ │ │
└─PAGERANGE(──┴──6─(──┬─\FIRST──────┬──┬─\FIRST──────┬──)─┴─┴───
(7) ──)─┘
├─\LAST───────┤ ├─\LAST───────┤
└─page-number─┘ ├─\STRPAGE────┤
└─page-number─┘

Chapter 2. OS/400 Command Descriptions P3-571


PRTDOC

5──┬─────────────────────────┬──┬──────────────────────────┬──┬────────────────────────┬──┬───────────────────────────┬────────5%
│ ┌─\SAME─┐ │ │ ┌─\SAME─┐ │ │ ┌─\SAME─┐ │ │ ┌─\SAME─┐ │
└─LBLWIDTH(──┴─value─┴──)─┘ └─SHEETFEED(──┼─\YES──┼──)─┘ └─LBLDOWN(──┴─value─┴──)─┘ └─SHFLEFTMAR(──┼─\YES──┼──)─┘
└─\NO───┘ └─\NO───┘
OUTFILE Details:
┌─\FIRST──────┐ ┌─\REPLACE─┐ ┌─\PRV───┐ ┌─\PRV───┐ ┌─\PRV─┐
├──OUTMBR(──┼─────────────┼──┼──────────┼──)──CURSTS(──┼────────┼──)──NEWSTS(──┼────────┼──)──OUTDTATYP(──┼──────┼──)───────────5
├─\PRV────────┤ └─\ADD─────┘ ├─\NOCHK─┤ ├─\NOCHG─┤ ├─\ALL─┤
└─member-name─┘ └─value──┘ └─value──┘ └─\IDP─┘
┌─\NO──┐
5──DLTDOC(──┼──────┼──)─────────────────────────────────────────────────────────────────────────────────────────────────────────┤
└─\YES─┘
OUTPUT Details:
┌─\SAME────────┐ ┌─\SAME────────────────────────────────────┐ ┌─\SAME───────────┐
├──DEV(──┼──────────────┼──)──OUTQ(──┼──────────────────────────────────────────┼──)──SPLFILE(──┼─────────────────┼──)──────────5
├─\USRPRF──────┤ ├─\DEV─────────────────────────────────────┤ ├─\FILE───────────┤
├─\SYSVAL──────┤ ├─\FILE────────────────────────────────────┤ ├─\DOC────────────┤
├─\WRKSTN──────┤ ├─\WRKSTN──────────────────────────────────┤ └─spool-file-name─┘
└─printer-name─┘ │ ┌─\LIBL/────────┐ │
└─┼───────────────┼──┬───────────────────┬─┘
└─library-name/─┘ └─output-queue-name─┘
┌─\SAME─────┐ ┌─\SAME─┐ ┌─\SAME───┐ ┌─\SAME─┐
5──FORMTYPE(──┼───────────┼──)──COVERPAGE(──┼───────┼──)──PRTQLTY(──┼─────────┼──)──COPIES(──┼───────┼──)───────────────────────5
├─\STD──────┤ ├─\YES──┤ ├─\LETTER─┤ └─value─┘
└─form-type─┘ └─\NO───┘ ├─\TEXT───┤
└─\DRAFT──┘
┌─\SAME───┐ ┌─\SAME─┐ ┌─\SAME─┐ ┌─\PRV─┐
5──DUPLEX(──┼─────────┼──)──AUTOBIND(──┼───────┼──)──HOLD(──┼───────┼──)──PRTERRLOG(──┼──────┼──)───────────────────────────────5
├─\TUMBLE─┤ ├─\YES──┤ ├─\YES──┤ ├─\YES─┤
├─\YES────┤ └─\NO───┘ └─\NO───┘ └─\NO──┘
└─\NO─────┘
┌─\SAME───────────┐ ┌─\SAME─┐
5──ERRFORM(──┼─────────────────┼──)──LARGEPRINT(──┼───────┼──)──────────────────────────────────────────────────────────────────┤
├─\STD────────────┤ ├─\YES──┤
└─error-form-name─┘ └─\NO───┘
Notes:
P All parameters preceding this point can be specified in positional form.

1 Batch cannot be used if OPTIONS(*YES) is specified.

K All parameters preceding this point are key parameters.

2 Batch cannot be used if OUTPUT(*) is specified.

3 Only valid when MRGTYPE(*QRY) is specified.

4 Only valid when MRGTYPE(*DOC) is specified.

5 Only valid when MRGTYPE(*FILE) is specified.

6 This parameter is not valid if ADJPAGES(*YES) is specified.

7 A maximum of 7 repetitions

Purpose Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more
The Print Document (PRTDOC) command permits the user information about printing the help text, refer to
to print a document using the word processing function of “Printing CL Command Descriptions” in Chapter 1.
OfficeVision

This command also permits the user to override all print Optional Parameters
option values that are currently stored with a document.
DOC
When a document is created, a set of default print options is
Specifies the name of the document to print.
associated with that document. If the user wants to override
one or more of the parameters in this print command, the *PRV: The name used in the previous session is used.
user must select OPTIONS(*YES) so that the print options *ALL: All documents to which the user is authorized are
appear on the display. When the print options appear, any printed to a database file. This is valid only when the
of the print parameters can be changed. The user can over- output is directed to an OUTFILE.
ride one or all of the print option parameters with this
command. More information on printing documents is in the document-name: Specify the name of the document that
Using OfficeVision/400 Word Processing book. is printed.

P3-572 OS/400 CL Reference - Part 2 (Full Version)


PRTDOC

FLR does not exist, this command creates a database file


Specifies the name of the folder that contains the docu- and file member. If the file is created, the text is labeled
ment. 'OUTFILE for PRTDOC' and the public authority is
*EXCLUDE. Output to the database file is only sup-
*PRV: The name used in the previous session is used.
ported if the OPTIONS (*OUTFILE) is also specified.
folder-name: Specify the name of the folder containing
More information on defining the format of database files
the document to be printed.
(OUTFILES) is in the Office Services Concepts and
OPTIONS Programmer’s Guide book.
Specifies whether the print options for this document are
*PRV: The library and database file used in the pre-
displayed before the document is printed.
vious request is used.
*NO: The print options are not displayed before the
The name of the file can be qualified by one of the fol-
document is printed.
lowing library values:
*YES: The print options are displayed before the docu-
*LIBL: All libraries in the job's library list are
ment is printed. Regularly used print options are set
searched until the first match is found.
with this special value. For example, if STRPAGE(5)
and OPTIONS(*YES) is specified, the value 5 appears *CURLIB: The current library for the job is
on page 1 of the print options display. searched. If no library is specified as the current
library for the job, the QGPL library is used.
*PRTFILE: The print options specified in the PRTFILE
parameter are used. When additional parameters are library-name: Specify the name of the library to be
used, those parameters that are overridden by the searched.
appropriate printer file parameters when the document
actually prints are not displayed.
database-file-name: Specify the qualified name of the
database file in which the resolved document information
Note: When additional parameters are used, those is stored.
parameters not relevant to outfile processing are
not displayed. OUTMBR
Specifies the name of the database file member to which
*OUTFILE: The output is directed to the database file the output is directed. If a member already exists, the
specified on the OUTFILE parameter. system uses the second element of this parameter to
PRTFILE determine whether the member is cleared before the
Specifies which printer file to use for the print options. new records are added. If the member does not exist
The values found in the printer file for the print device, and a member name is not specified, the system creates
print quality, duplex, output queue, form type, copies, a member with the name of the output file specified on
and hold override the corresponding values in the print the OUTFILE parameter. If an output file member name
options for the document. This parameter is valid only if is specified, but the member does not exist, the system
OPTION(*PRTFILE) is also specified. creates it.

QSYSPRT: The document is printed using the system Element 1: Member to Receive Output
printer. This value overrides the printer name specified *FIRST: The first member in the file receives the output.
in the print options associated with the document. If OUTMBR(*FIRST) is specified and the member does
The name of the printer device file can be qualified by not exist, the system creates a member with the name of
one of the following library values: the file specified on the OUTFILE parameter.
*PRV: The name used in the previous session is used.
*LIBL: All libraries in the job's library list are
searched until the first match is found. member-name: Specify the file member that receives
the output. If OUTMBR(member-name) is specified and
*CURLIB: The current library for the job is
the member does not exist, the system creates it.
searched. If no library is specified as the current
library for the job, the QGPL library is used. Element 2: Operation to Perform on Member
library-name: Specify the name of the library to be *REPLACE: The system clears the existing member
searched. and adds the new records.

printer-device-file-name: Specify the name of the printer *ADD: The system adds the new records to the end of
file to use for this PRTDOC request. This value over- the existing records.
rides the printer file name specified in the print options
CURSTS
associated with the document.
Specifies the value the document Interchange Document
OUTFILE Profile (IDP) status field must have before the document
Specifies the qualified name of the database file where may be printed to the database file. This field is 20
the displayed information is stored. If the specified file

Chapter 2. OS/400 Command Descriptions P3-573


PRTDOC

characters long and is valid only if OUTFILE output is *PRINT: The output is printed with the job's spooled
requested. output.
Note: If the name of the document is specified in lower- DEV
case letters, the AS/400 system automatically Specifies the name of the selected printer.
shifts the name to uppercase letters. If the docu-
*SAME: The name of the printer specified in the docu-
ment name is to remain in lowercase letters, the
ment print options does not change.
name must be enclosed in apostrophes.
*USRPRF: The printer ID indicated in the user profile is
*PRV: The name used in the previous session is used.
used to print the document.
*NOCHK: The status field is not checked before printing
*SYSVAL: The value specified in the system value
this document to a database file.
QPRTDEV is used.
value: Specify the value to which the status field must
*WRKSTN: The printer assigned to the user's work
be equal before the document is printed to the database.
station is used to print the document.
NEWSTS
printer-name: Specify the name of the printer to use to
Specifies the value to which the document IDP status
print the document.
field value is set after the document has been printed to
the database file. If a NEWSTS value is specified, the OUTQ
user must have at least *CHANGE authorization to the Specifies the qualified name of the output queue.
document. This field is 20 characters long and is valid
*SAME: The output queue value specified in the docu-
only if OUTFILE output is requested.
ment print options does not change.
*PRV: The name used in the previous session is used.
*DEV: The output queue specified on the PRTDEV
*NOCHG: The status field is not changed after printing parameter is used.
this document to a database file.
*FILE: The output queue and output queue library
value: Specify the value to which the status field is set values are based on:
after the document is printed to a database file.
1. If the PRTFILE parameter is specified, the values
OUTDTATYP from the specified printer device are used.
Specifies whether the entire document, or just the IDP
2. If the PRTFILE parameter is not specified, the
information, is printed to the database file. This is valid
values from the printer file prompt on the document
only if OUTFILE output is requested.
print options are used.
*PRV: The name used in the previous session is used.
*WRKSTN: The output queue assigned to the user's
*ALL: The entire document is printed to a database file. work station is used.
*IDP: Only the IDP information is printed to a database The name of the output queue can be qualified by one
file. of the following library values:
DLTDOC *LIBL: All libraries in the job's library list are
Specifies whether a document is deleted after it has searched until the first match is found.
been printed to the database file. This is valid only if
*CURLIB: The current library for the job is
OUTFILE output is selected.
searched. If no library is specified as the current
Note: The user must be the owner of the document or library for the job, the QGPL library is used.
have *ALL authority to delete it.
library-name: Specify the name of the library to be
*NO: The document is not deleted after being printed to searched.
the database file.
output-queue-name: Specify the name of the output
*YES: The document is deleted after being printed to
queue to use to hold the output until it is ready to print.
the database file.
SPLFILE
OUTPUT
Specifies the name of the output file in which spooled
Specifies whether the output from the command is
files are kept.
shown at the requesting workstation or printed with the
job's spooled output. More information on this param- *SAME: The name of the output file specified in the
eter is in Appendix A, “Expanded Parameter document print options does not change.
Descriptions.” *FILE: The name chosen for the output file is the name
*SAME: The output device specified in the document for the printer file being used.
print options does not change. *DOC: The document name is used for the spool file
*: The document is shown on the display. name. However, if the document name is longer than

P3-574 OS/400 CL Reference - Part 2 (Full Version)


PRTDOC

10 characters or contains a period, the spool file name is DUPLEX


QSYSPRT. Specifies whether output is printed on one side or two
sides of the paper.
spool-file-name: Specify the name of the file to which to
send the output. The file is then spooled to the queue. *SAME: The duplex value specified in the document
print options does not change.
FORMTYPE
Specifies the type of form on which the output is printed. *TUMBLE: The document is printed on both sides of
The identifiers used to indicate the type of forms are the paper. In addition, this special value indicates that
user-defined and can be a maximum of 10 characters in the tops of both sides are on opposite ends of the page.
length. *YES: The document is printed on both sides of the
*SAME: The type of form specified in the document paper. In addition, this special value indicates that the
print options does not change. tops of both sides are on the same end of the page.

*STD: The standard form type is used. The output is *NO: The document is printed on one side of the paper.
printed on the form type specified in the printer file for
AUTOBIND
the printer selected. The printer file contains the infor-
Specifies whether the left and right margins of the even
mation controlling how the document is printed on a par-
pages will line up with the left and right margins of the
ticular printer.
odd pages when both sides of the paper are being
form-type: Specify the type of form to use. Valid values printed.
range from 1 through 10 alphanumeric characters.
*SAME: The automatic binding value specified in the
Note: Lowercase, blanks, or special characters must be document print options does not change.
enclosed in apostrophes. For example, a host
*YES: The document is adjusted for binding.
system form type is entered as FORMTYPE(' ').
The value is returned by the host system in a *NO: The document is not adjusted for binding.
forms mount message.
HOLD
COVERPAGE Specifies whether a print job is put on hold. Documents
Specifies whether a cover page is printed. The cover are held on the output queue and can be released to
page includes such reference items as: print or deleted. This parameter allows printing of
several documents together by putting them on the
Ÿ Document name output queue before releasing them to print.
Ÿ Folder name
*SAME: The hold value specified in the document print
Ÿ Document description
options does not change.
Ÿ Subject
Ÿ Reference, and *YES: The print job is held.
Ÿ Authors' names
*NO: The print job is not held.
*SAME: The cover page value specified in the docu-
PRTERRLOG
ment print options does not change.
Specifies whether a document error log is included as
*YES: The cover page is printed. part of the information printed with the document.
*NO: The cover page is not printed. *PRV: The value used in the previous (last) PRTDOC
request for this user is used.
PRTQLTY
Specifies the print quality used to print the document. *YES: The error log is printed with the document.

*SAME: The print quality value specified in the docu- *NO: The error log is not printed with the document.
ment print options does not change.
ERRFORM
*LETTER: The letter quality (highest quality) is used. Specifies the type of form on which to print the error log.
*TEXT: The text quality setting is used. *SAME: The error form value specified in the document
print options does not change.
*DRAFT: The draft quality (lowest quality) setting is
used. *STD: The standard form type is used. The output is
printed on the form type specified in the printer file for
COPIES
the selected printer. The printer file contains the infor-
Specifies the number of copies to print. This parameter
mation controlling how the document is printed on a par-
only applies to spooled files.
ticular printer.
*SAME: The number of copies specified in the docu- error-form-name: Specify the name of the form on which
ment print options does not change.
to print the error log.
value: Specify a value ranging from 1 through 99 indi-
cating the number of copies to print.

Chapter 2. OS/400 Command Descriptions P3-575


PRTDOC

LARGEPRINT *SAME: The folder name specified in the document


Specifies whether the document is printed using large print options does not change.
print.
folder-name: Specify the name of the folder that con-
*SAME: The large print value specified in the document tains the document to merge.
print options does not change.
DTAFILE
*YES: The document is printed in large print. Specifies the file that contains the member to merge.
*NO: The document is not printed in large print. This parameter is valid only when MRGTYPE(*FILE) is
selected.
MRGTYPE
*SAME: The file name specified in the document print
Specifies where data is located when it is merged.
options does not change.
*SAME: The merge source specified in the document
The name of the file can be qualified by one of the fol-
print options does not change.
lowing library values:
*QRY: The data is merged from a query. This query is
a request to select and copy data from a file of one or *LIBL: All libraries in the job's library list are
more records based on the defined conditions. searched until the first match is found.

*DOC: The data stored in a document is merged. *CURLIB: The current library for the job is
searched. If no library is specified as the current
*FILE: The data stored in a file is merged.
library for the job, the QGPL library is used.
*BLANK: No data is merged. library-name: Specify the name of the library to be
QRYDFN searched.
Specifies the name of the query that defines the data to
file-name: Specify the name of the file that contains the
be merged. This parameter is valid only when
data to merge.
MRGTYPE(*QRY)is selected.
DTAMBR
*SAME: The query name specified in the document
Specifies the name of the member that contains the data
print options does not change.
to merge. This parameter is valid only when
The name of the query can be qualified by one of the MRGTYPE(*FILE) is selected.
following library values:
*SAME: The member name specified in the document
*LIBL: All libraries in the job's library list are print options does not change.
searched until the first match is found.
*FILE: The member with the same name as the
*CURLIB: The current library for the job is member name is used.
searched. If no library is specified as the current
*FIRST: The first member is used.
library for the job, the QGPL library is used.
*LAST: The last member is used.
library-name: Specify the name of the library to be
searched. data-member-name: Specify the name of the member
that contains the data to merge.
query-definition-name: Specify the query name used to
move the merged data. MLTLINRPT
Specifies whether a multiple line report is created. In
DTADOC this report, data field instructions are merged to create
Specifies the name of the document that contains the records with several lines of output.
data being merged. This parameter is valid only when
*SAME: The multiple-line-report option specified in the
MRGTYPE(*DOC) is selected.
document print options is used.
*SAME: The document name specified in the document
*YES: A multiple line report is created.
print options does not change.
*NO: A multiple line report is not created.
document-name: Specify the name of the document by
selecting a value ranging from 1 to 12 alphanumeric ADJLINES
characters. If more than 8 characters are used, the Specifies whether the line endings in a printed document
ninth character must be a period (.) followed by a 1 to 3 are adjusted. The line endings are adjusted according
character extension. to the specifications on the Line Spacing/Justification
options display. This parameter is useful when printing
DTAFLR
a document that has been merged, has instructions, has
Specifies the name of the folder that contains the docu-
display attributes that do not print spaces, or that uses a
ment to merge. This parameter is valid only if
proportionally spaced font.
MRGTYPE(*DOC) is selected.

P3-576 OS/400 CL Reference - Part 2 (Full Version)


PRTDOC

*SAME: The line ending adjustment specified in the value: Specify up to 5 change symbol characters to
document print options does not change. appear in the left margin of the document.
*YES: The line endings are adjusted. DRAFTSPACE
*NO: The line endings are not adjusted. This special Specifies whether the spacing value in the document
value is used when text is to be printed out in the same can be adjusted. For example, if 3 (triple) is entered on
way that it was typed. the Line Spacing prompt, the double spacing value is 6,
and 5 blank lines are printed between each line in the
ADJPAGES text of the document. Nevertheless, the document is still
Specifies whether the page endings in a printed docu- paginated using the value specified in the Line Spacing
ment are adjusted. The page ending adjustment is prompt. Therefore, depending on the amount of text
specified on the first typing line and last typing line being printed on a page, one page may print over onto a
prompts on the Page Layout/Paper Options display. second page.
*SAME: The page ending adjustment specified in the *SAME: The draft space value specified in the docu-
document print options does not change. ment print options does not change.
*YES: The page endings are adjusted. *YES: The space value in the document is doubled.
*NO: The page endings are not adjusted. *NO: The space value in the document is not doubled.
ALWWIDOW LINNBR
Specifies whether the document's page endings are Specifies whether line numbers are printed in the docu-
determined by the exact number of lines per page speci- ment. The line numbers begin with 1 on the first page of
fied on the Page Layout/Paper Options display. the document. Line numbers are not printed in headers
*SAME: The allow widow lines value specified in the or footers.
document print options does not change. *SAME: The line numbers value specified in the docu-
*YES: The page endings are determined by the exact ment print options does not change.
number of lines per page. *YES: The line numbers are printed in the document.
*NO: The page endings are not determined by the *NO: The line numbers are not printed in the document.
exact number of lines per page.
RESOLVE
RENUMBER Specifies whether the instructions placed in the docu-
Specifies whether the pages are renumbered when the ment are processed. For example, the Date (.date)
document is printed. instruction is resolved to the actual date, which, in this
*SAME: The renumber system page numbers value example, is 04/03/62.
specified in the document print options does not change. *SAME: The resolve value specified in the document
*YES: The page numbers are renumbered when the print options does not change.
document is printed. *YES: The instructions placed in the document are
*NO: The page numbers are not renumbered when the resolved.
document is printed. *NO: The instructions placed in the document are not
resolved. For example, the Date instruction (.date)
PRTCHGSYM
prints as *date.
Specifies whether change symbols are printed in the left
margin of the document. Change symbols are used to LEFTSPACES
indicate all lines have been revised. Specifies whether the left margin of the document is
*SAME: The print-change-symbol value specified in the increased.
document print options does not change. *SAME: The left-spaces value specified in the docu-
*YES: The change symbols are printed in the left ment print options does not change.
margin of the document. value: Specify a value, ranging from 0 through 99, for
*NO: The change symbols are not printed in the left the number of spaces to add to the left margin in the
margin of the document. printed document.

SYMBOLS CHRID
Specifies whether 5 different kinds of change symbols Specifies the character identifier (graphic character set
appear in the left margin of the document. and code page) for the file. This parameter allows
printing of text that is in different character identifier
*SAME: The change symbol value specified in the doc-
(graphic character set and code page) coding. The
ument print options does not change.
value specified on this parameter is used to instruct the
printer device to interpret the hexadecimal byte string to

Chapter 2. OS/400 Command Descriptions P3-577


PRTDOC

print the same characters that were intended when the *SAME: The place on the job queue that is specified in
text was created. More information about the character the document print options does not change.
identifier is in the Printer Device Programming book. A
*YES: The printing of the document is placed in the job
list of valid CHRID values and applicable printers is in
queue.
the "CHRID Values and Applicable Printers (CHRID
parameter)" table in Appendix B, “Font, Character Identi- *NO: The printing of the document is not placed in the
fier, and Other Values Supported for Different Printers.” job queue.

*SAME: The graphic character set id specified in the JOBD


document print options does not change. Specifies the name of the job description that describes
how the printing job is run.
*BLANK: Text is not specified.
*SAME: The place on the job queue that is specified in
Element 1: Character Set
the document print options does not change.
character-set: Specify the type of graphic character set
The name of the job description can be qualified by one
to use by entering the appropriate 3-digit identifier.
of the following library values:
Element 2: Code Page
*LIBL: All libraries in the job's library list are
code-page: Specify the code page value used to create searched until the first match is found.
the command parameters. Valid values range from 1
through 999. *CURLIB: The current library for the job is
searched. If no library is specified as the current
SAVOUTPUT library for the job, the QGPL library is used.
Specifies whether the document being printed is also
saved as a final form document.
library-name: Specify the name of the library to be
searched.
*SAME: The save resolved output value specified in the
document print options does not change. job-description-name: Specify the name of the job
description.
*YES: The printed document is saved as a final form
document. SNDMSG
Specifies whether a print job has been sent to the job
*NO: The printed document is not saved as a final form
queue and the user wants to receive a message speci-
document.
fying that the job has completed.
SAVDOC
*SAME: The message value specified in the document
Specifies the name of the document that contains the
print options does not change.
final form document.
*YES: A message is sent to the user when the print job
*SAME: The save document name specified in the doc-
has completed.
ument print options does not change.
*NO: A message is not sent to the user when the print
*BLANK: A resolved output document is not specified.
job has completed.
document-name: Specify the name of the document that
CNLERR
contains the resolved document. The document name
Specifies whether printing is stopped if an error is
must range from 1 to 12 characters in length. If more
detected within the document.
than 8 characters are selected, the ninth character must
be a period (.) followed by a 1 to 3 character extension. *SAME: The cancel error value specified in the docu-
If the document name specified does not exist, a docu- ment print options does not change.
ment is created.
*YES: Printing is stopped on the document if an error is
SAVFLR detected. An error message stating that the job is can-
Specifies the name of the folder that contains the docu- celed is listed in the error log.
ment being saved in final form. *NO: Printing does not stop if an error is detected.
*SAME: The save folder value specified in the docu-
STRPAGE
ment print options does not change.
Specifies the page on which printing begins.
*BLANK: A resolved output folder is not specified.
Note: If the STRPAGE(page-number) value specified is
folder-name: Specify the name of the folder to contain larger than the ENDPAGE(page-number) value
the final-form document. specified, the entire document is printed.

JOBQ *PAGERANGE: The pages specified on the


Specifies whether the print request is put on the job PAGERANGE parameter are printed.
queue.

P3-578 OS/400 CL Reference - Part 2 (Full Version)


PRTDOC

Note: If the STRPAGE(page-number) value specified is *STRPAGE: The end page value is the same as the
larger than the ENDPAGE(page-number) value start page value. Only one page is printed.
specified, the entire document is printed.
page-number: Specify the page on which to stop
*SAME: The start page specified in the document print printing. Valid values range from 0.01 through 9999.99.
options does not change.
LBLACROSS
Note: If STRPAGE(*SAME) is specified and additional Specifies the number of labels to print across the page.
page ranges exist in the document print options,
*SAME: The label-across-the-page value specified in
an error message is sent and the document is
the document print options does not change.
not printed.
*FIRST: Printing is started on the first page of the docu-
value: Specify a value, ranging from 1 through 99, that
indicates the number of labels to print across the page.
ment.
*LAST: Printing is started on the last page of the docu- LBLWIDTH
ment. Specifies how wide to make the label. The width of a
label is the number of characters from the left edge of
page-number: Specify the page on which to begin the first label to the left edge of the next label, including
printing. Valid values range from 0.01 through 9999.99.
the blank spaces between the labels. If the width speci-
ENDPAGE fied is larger than the margins specified for the docu-
Specifies the page on which printing ends. ment, the margins are used as the width.

*PAGERANGE: The pages specified on the *SAME: The label width value specified in the docu-
PAGERANGE parameter are printed. ment print options does not change.

*SAME: The end page value specified in the document value: Specify a value, ranging from 2 through 198, that
print options does not change. indicates the label width.

Note: If ENDPAGE(*SAME) is specified and additional SHEETFEED


page ranges exist in the document print options, Specifies whether sheet feed paper is used for printing
an error message is sent and the document is and whether there are more than one row of labels on a
not printed. page. When using sheet feed paper, this is the only
parameter to use to print more than one row of labels on
*FIRST: Printing is ended after the first page of the doc-
a page.
ument.
*SAME: The sheet feed value specified in the document
*LAST: Printing is ended after the last page of the doc-
print options does not change.
ument.
*YES: Sheet feed printing is used and there are more
*STRPAGE: The end page value is the same as the
than one row of labels on a page.
start page value. Only one page is printed.
*NO: Sheet feed printing is not used, or there is only
page-number: Specify the page on which to stop
one row of labels on a page.
printing. Valid values range from 0.01 through 9999.99.
LBLDOWN
PAGERANGE
Specifies the number of rows of labels to print on a
Specifies the page ranges to print. A maximum of 7
page.
ranges can be specified.
*SAME: The label down value specified in the docu-
*SAME: The page range specified on the document
ment print options does not change.
print options is printed.
Element 1: Start Page
value: Specify a value, ranging from 1 through 99, that
indicates the number of rows of labels to be printed on a
*FIRST: Printing is started on the first page of the docu- page.
ment.
SHFLEFTMAR
*LAST: Printing is started on the last page of the docu-
Specifies whether to shift the left margin to prevent text
ment.
from being truncated.
page-number: Specify the page on which to begin *SAME: The SHFLEFTMAR value does not change.
printing. Valid values range from 0.01 through 9999.99.
*YES: When the right margin exceeds the paper edge,
Element 2: End Page
the left margin is shifted so that as much text as pos-
*FIRST: Printing is ended after the first page of the doc- sible is printed. If the right margin does not exceed the
ument. paper edge, the text is not shifted.
*LAST: Printing is ended after the last page of the doc-
ument.

Chapter 2. OS/400 Command Descriptions P3-579


PRTDOC

*NO: The left margin is not shifted when text exceeds Example 3: Printing Document Error Log
the right margin. Any text exceeding the right margin is PRTDOC DOC(MYDOC) FLR(MYFLR) OPTIONS(\NO)
truncated. PRTERRLOG(\YES)

This command prints the document with a document error


Examples log attached to it.
Example 1: Printing to a File
Example 4: Increasing Margin
PRTDOC DOC(MYDOC) FLR(MYFLR) OPTIONS(\OUTFILE)
PRTDOC DOC(MYDOC) FLR(MYFLR) OPTIONS(\NO)
OUTFILE(MYFILE/MYLIB) OUTMBR(MYMBR \REPLACE)
LEFTSPACES(1ð)
CURSTS(\PRV) NEWSTS(\PRV) OUTDTATYP(\PRV)
PRTERRLOG(\PRV) DLTDOC(\NO)
This command prints the document and has 10 extra spaces
This command prints the document MYDOC in folder MYFLR inserted in the left margin.
to the database file MYFILE in library MYLIB in the database
Example 5: Printing a Cover Page
file member MYMBR. If the member already exists, it is
replaced by the contents of MYDOC. The CURSTS, PRTDOC DOC(MYDOC) FLR(MYFLR) OPTIONS(\NO)
NEWSTS, OUTDTATYP, and PRTERRLOG are taken from COVERPAGE(\YES)
the last PRTDOC request. The document is not deleted after
This command prints the document with a cover page.
it is printed to the database file MYFILE.
Example 6: Printing One Page to a File
Example 2: Printing a Document
PRTDOC DOC(MYDOC) FLR(MYFLR) OPTIONS(\OUTFILE)
PRTDOC DOC(MYDOC) FLR(MYFLR) OPTIONS(\NO) OUTFILE(MYLIB/MYFILE)
DEV(MYPRNTR) OUTQ(\DEV) OUTMBR(\FIRST) PAGERANGE((5 5))
This command prints the document MYDOC in the folder This command prints page 5 of the document to the data-
MYFLR on a printer called MYPRNTR. base file MYFILE in library MYLIB in the first member.

P3-580 OS/400 CL Reference - Part 2 (Full Version)


PRTDSKINF

PRTDSKINF (Print Disk Information) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─┬───────────────────────────────────────┬──┬───────────────────────────────────┬───
55──PRTDSKINF──RPTTYPE(──┬─\LIB─┬──)──── (3) ────5
├─\FLR─┤ │ ┌─\ALL─────────────────┐ │ │ ┌─\ALL─────────────────┐ │
├─\OWN─┤ (1) ──)──┤ └─OBJ(──┼─\NONE────────────────┼──)─┘
├─LIB(──┼─library-name─────────┼───
├─\OBJ─┤ │ └─generic-library-name─┘ │ ├─object-name──────────┤
└─\SYS─┘ │ ┌─\ALL────────────────┐ │ └─generic\-object-name─┘
├─OWNER(──┼─owner-name──────────┼──)──── (2) ┤
│ └─generic\-owner-name─┘ │
│ ┌─\ALL─────────────────┐ │
├─FLR(──┼─folder-name──────────┼──)────(3) ─┤
│ └─generic\-folder-name─┘ │
│ ┌─\ALL───────────────────┐ │
└─DOC(──┼─document-name──────────┼──)───┘ (3)
└─generic\-document-name─┘
5──┬───────────────────────────────────┬──┬───────────────────────┬──┬────────────────────────────┬────────────────────────────5%
│ ┌─\ALL─────────────┐ │ │ ┌─ð────┐ │ │ ┌─\SIZE───┐ │
│ │ ┌──
─────────┐ │ (6, 7) ──)─┘
│ └─MINSIZE(──┴─size─┴──)─┘ └─SORT(──┼─\OWNER──┼─────
6 (4, 5)
└─OBJTYPE(──┴───objtype─┴──────┴──)─┘ ├─\LSTCHG─┤
├─\LSTUSE─┤
└─\NAME───┘
Notes:
P All parameters preceding this point can be specified in positional form.

1 This parameter is valid only if *LIB is specified on the RPTTYPE parameter.

2 This parameter is valid only if *OWN is specified on the RPTTYPE parameter.

3 This parameter is valid only if *FLR is specified on the RPTTYPE parameter.

4 A maximum of 60 repititions

5 A list of the valid OS/400 object types for this command is in Appendix A.

6 This parameter is not valid if *OWN is specified on the RPTTYPE parameter, unless the OBJ parameter is used with a value

other than *NONE.


7 This parameter is not valid if *SYS is specified on the RPTTYPE parameter.

Purpose *OBJ: A report of object information contained in the file


is printed.
The Print Disk Information (PRTDSKINF) command is used
*SYS: A report of only the system information contained
to print disk space information that is already stored in the
in the file is printed.
database file QAEZDISK. The output with file name
QPEZDISK goes to the spool queue associated with the job
using this command. Optional Parameters
Note: To see the parameter and value descriptions for this LIB
command, refer to the online help text. For more Specifies the names of the libraries to print information
information about printing the help text, refer to about.
“Printing CL Command Descriptions” in Chapter 1.
*ALL: The report has information on all user libraries on
the system.
Required Parameters library-name: Specify the user library.
RPTTYPE generic*-library-name: Specify the generic library name.
Specifies the type of report to print. The report informa- A generic name is a character string of one or more
tion is taken from member QCURRENT in QAEZDISK. characters followed by an asterisk (*); for example,
If QCURRENT does not contain any data, an error ABC*. The asterisk substitutes for any valid characters.
message is sent. A generic name specifies all objects with names that
*LIB: A report of the library information contained in the begin with the generic prefix for which the user has
file is printed. authority. If an asterisk is not included with the generic
(prefix) name, the system assumes it to be the complete
*FLR: A report of the folder information contained in the
object name. If the complete object name is specified,
file is printed.
and multiple libraries are searched, multiple objects can
*OWN: A report of the user profile (owner) information be printed only if *ALL or *ALLUSR library values can be
contained in the file is printed. specified for the name. For more information on the use

Chapter 2. OS/400 Command Descriptions P3-581


PRTDSKINF

of generic names, refer to “Generic Object Names” in printed on all the specified object types within the library
Chapter 2. or controlled by the owner. If an object name is speci-
fied, information on all object types within that name,
OWNER
within the library, or controlled by the owner is printed. If
Specifies the names of the owners (user profiles) to print
a library or owner is not specified, the report has infor-
information about.
mation on all object types on the system. If an object
*ALL: The report contains information on all user pro- name is specified, information only on object types with
files on the system. that name is printed.
owner-name: Specify the user profile. object-type: Specify a library or owner, then the object
type information is the object type specified within the
generic*-owner-name: Specify the generic user profile.
library or controlled by the owner. If an object is speci-
FLR fied, the report has information on the objects with the
Specifies the names of the folders to print information specified object type within the library or controlled by
about. the owner.
*ALL: The report has information on all user folders on MINSIZE
the system. Specifies the size of the smallest piece of information to
folder-name: Specify the folder name. include. For example, if a library report is requested
without objects, then this size would be the size of the
generic*-folder-name: Specify the generic folder name. smallest library to include. If objects within the library
DOC are requested, then this would be the size of the
Specifies the names of the documents to print informa- smallest object within the library to include.
tion about. 0: All objects are included regardless of size.
*ALL: The report contains information on all documents size: Specify size in thousands of bytes.
in the specified folder.
SORT
document-name: Specify the document by the given Specifies the order in which the information should be
name within the specified folder.
sorted.
generic*-document-name: Specify the documents speci- *SIZE: Information is sorted from large to small.
fied by the generic qualification.
*OWNER: The information is sorted in alphabetical
OBJ order by owner name.
Specifies the names of the objects to print information
*LSTCHG: The information is sorted by last-change
about.
date with the oldest information first.
*ALL: If you specify a library or owner, then the object
*LSTUSE: The information is sorted by last-use date
information is all objects within the library or those con-
with the oldest information first.
trolled by the owner
*NAME: Information is sorted in alphabetical order
*NONE: No library or owner is specified.
according to the report type.
object-name: Specify a library or owner, then the object
information is the object specified by the given name
within the library or controlled by the owner. Example
generic*-object-name: Specify a library or owner, then PRTDSKINF RPTTYPE(\LIB) LIB(\ALL) OBJ(\ALL)
the object information are the objects that meet the SORT(\SIZE)
specified generic qualification within the library or con-
This command prints a library report from database file
trolled by the owner.
QAEZDISK in library QUSRSYS in member QCURRENT,
OBJTYPE containing information about all libraries, objects, and object
Specifies the object types to print information about. types in the libraries. The information is sorted by size and
sent to the printer file QPEZDISK.
*ALL: If you specify a library or owner, information is

P3-582 OS/400 CL Reference - Part 2 (Full Version)


PRTERRLOG

PRTERRLOG (Print Error Log) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──┬───────────────────────────────────────────┬────────────────────────────────────5
55──PRTERRLOG──┬─────────────────────────┬───
│ ┌─\ALL──────┐ │ │ ┌─\ALL───────────────────────┐ │
└─TYPE(──┼─\ALLSUM───┼──)─┘ │ │ ┌──
─────────────────────┐ │ │
├─\ANZLOG───┤ ├─DEV(─── 6
(1) ─┴───logical-device-name─┴─── (2) ─┴──)─┤
├─\MCH──────┤ │ ┌──
───────────────┐ │
├─\DEV──────┤ └─RSRCNAME(─── 6─resource-name─┴───
(1) ── (2) ──)──────┘
├─\ERRLOGID─┤
└─\VOLSTAT──┘
5──┬─────────────────────────────────────────────┬──┬─────────────────────────┬─────────────────────────────────────────────────5
│ ┌──
──────────────────────┐ │ │ ┌─\CHAR─┐ │
└─ERRLOGID(─── 6─error-log-identifier─┴───
(3) ── (2) ──)─┘ └─PRTFMT(───
(4) ─┴─\HEX──┴──)─┘

5──┬──────────────────────────────────────────────────────────────────────────────────────┬──┬──────────────────────────┬───────5
│ ┌─\AVAIL─────┐ ┌─\CURRENT───┐ │ │ (7) ┐
┌─\PRINT─── │
(5, 6) ─┴─start-time─┴──┴─start-date─┴──)──┬──────────────────────────────────┬─┘ └─OUTPUT(──┴─\OUTFILE─┴──)─┘
└─PERIOD(─────
│ ┌─\AVAIL───┐ ┌─\CURRENT─┐ │
└─(──┴─end-time─┴──┼──────────┼──)─┘
└─end-date─┘
5──┬─────────────────────────────────────────────┬──┬───────────────────────────────────────────┬───────────────────────────────5
│ ┌─\LIBL/────────┐ │ │ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │
(8) ─┼───────────────┼──file-name──)─┘ └─OUTMBR(──┴─member-name─┴──┼──────────┼──)─┘
└─OUTFILE(───
├─\CURLIB/──────┤ └─\ADD─────┘
└─library-name/─┘
5──┬────────────────────────────┬──┬───────────────────────────┬──┬───────────────────────────────────┬─────────────────────────5
(9) ─volume-type──)─┘ └─MODEL(───
└─VOLTYPE(─── (9) ─model-number──)─┘ │ ┌─\ALL───────────────┐ │
│ │ ┌──
─────────────┐ │ │
(9) 6 (2)
└─VOL(────┴───volume-name─┴────┴──)─┘
5──┬────────────────────────────┬──┬───────────────────────────────┬──┬───────────────────────────┬─────────────────────────────5
│ ┌─\KEEP───┐ │ │ ┌─\LIFETIME─┐ │ │ ┌─\ALL───┐ │
(9) ─┴─\DLT────
└─VOLSTAT(─── (10) ┴──)─┘ └─VOLSTATTYP(──┴─\SESSION──┴──)─┘ └─SELECT(────
(11) ─┼─\PRC───┼──)─┘
├─\MEDIA─┤
├─\LWS───┤
├─\CMN───┤
├─\PWR───┤
├─\LPP───┤
└─\LIC───┘
5──┬────────────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\DATETIME─┐ │
(12) ─┼─\TIME─────┼──)─┘
└─SORT(────
├─\DEVADR───┤
├─\ERRTYPE──┤
└─\RSRCNAME─┘
Notes:
1 DEV and RSRCNAME are valid only if TYPE(*DEV) is specified.

2 A maximum of 10 repetitions

3 ERRLOGID is valid only if TYPE(*ERRLOGID) is specified.

4 PRTFMT is not valid if TYPE(*VOLSTAT), TYPE(*ALLSUM), or OUTPUT(*OUTFILE) is specified.

5 PERIOD contains 2 lists of 2 elements each. *N must be specified for any element that goes before the value specified.

PERIOD not valid when TYPE(*ERRLOGID) is specified.


6 PERIOD is not valid when TYPE(*VOLSTAT) and VOLSTATTYP(*LIFETIME) are specified.

7 *PRINT is not valid if VOLSTATTYP(*SESSION) is specified.

8 OUTFILE is valid only with TYPE(*ALL), TYPE(*ANZLOG), TYPE(*DEV), TYPE(*ERRLOGID), or TYPE(*VOLSTAT).

9 VOLTYPE, MODEL, VOL, VOLSTAT, and VOLSTATTYP are valid only if TYPE(*VOLSTAT) is specified.

10 *DLT is not valid if OUTPUT(*OUTFILE) is specified.

11 SELECT is valid only if TYPE(*ANZLOG) is specified.

12 SORT is valid only if TYPE(*ANZLOG) is specified.

P All parameters preceding this point can be specified in positional form.

Chapter 2. OS/400 Command Descriptions P3-583


PRTERRLOG

Purpose logical-device-name: Specify one or more device names


for which error log data is to be printed. Up to ten
The Print Error Log (PRTERRLOG) command is used prima- device names can be specified.
rily for problem analysis. It places a formatted printer file of
RSRCNAME
the data in the machine error log in a spooled printer device
Specifies the name of the resource for which error log
file named QPCSMPRT or in a specified output file. The
entries are printed. This parameter cannot be specified
error log data can be used by the IBM service represen-
if the DEV parameter is specified. This parameter is
tatives.
valid only if TYPE(*DEV) is specified. Up to ten
Restriction: This command is shipped with public resource names can be specified.
*EXCLUDE authority and the QPGMR, QSYSOPR, QSRV, Note: If you specify a storage controller input/output
and QSRVBAS user profiles have private authorities to use processor (IOP) as the resource name, no error
the command. log entries are printed for the resource.
Note: To see the parameter and value descriptions for this ERRLOGID
command, refer to the online help text. For more Specifies that error log entries with the specified error
information about printing the help text, refer to log identifier are printed. This parameter is valid only if
“Printing CL Command Descriptions” in Chapter 1. TYPE(*ERRLOGID) is specified. It is ignored for other
request types. Up to ten error log identifiers can be
Optional Parameters specified.

TYPE PRTFMT
Specifies the type of error log data from the machine Specifies that the indicated report prints any
error log to print in the spooled printer file. hexadecimal data in character format. This parameter
cannot be specified if TYPE(*VOLSTAT) is specified or if
*ALL: All the error codes in the machine's error log are the OUTFILE parameter is specified.
printed. In addition, the error codes for each subsystem
(for example, direct access storage devices or printers) *CHAR: The report is formatted so that hexadecimal
are printed in summary form. data prints as character data.

*ALLSUM: All the data in the error log is printed in *HEX: The report is formatted so that hexadecimal data
summary form. is printed in hexadecimal format.

*ANZLOG: A one-line summary is created for each Note: Specifying PRTFMT(*HEX) can cause spooling
entry in the error log. or printing of large amounts of data. This can
impact overall system performance.
*MCH: Only the error data produced by machine checks
is printed. PERIOD
Specifies the period of time for which the error log data
*DEV: Only the error data produced by the devices
is printed. This parameter is specified as two sets of
specified on the DEV or RSRCNAME parameters are
two values each.
printed.
Element 1: Start Time
*ERRLOGID: Only the error data with the specified
error log record is printed. If this value is specified, the *AVAIL: The error data that is available for the speci-
ERRLOGID parameter must also be specified. It is fied starting date is printed.
ignored for other request types. start-time: Specify the start time on the specified start
*VOLSTAT: If this value is specified and if date for which the error data is printed. The time is
OUTPUT(*PRINT) is specified, the tape or diskette specified in 24-hour format with or without a time sepa-
volume 'lifetime' statistical data records are printed. If rator as follows:
this value is specified and if OUTPUT(*OUTFILE) is
Ÿ With a time separator, specify a string of 5 or 8
specified, 'session' volume statistical data records are
digits, where the time separator for the job sepa-
printed.
rates the hours, minutes, and seconds. If you issue
DEV this command from the command line, the string
Specifies the device names for which the user wants the must be enclosed in apostrophes. If a time sepa-
error log data printed. rator other than the separator specified for your job
is used, this command fails.
Note: This parameter is valid only if TYPE(*DEV) is
specified. This parameter cannot be specified if Ÿ Without a time separator, specify a string of 4 or 6
the RSRCNAME parameter is specified. digits (hhmm or hhmmss) where hh = hours, mm =
minutes, and ss = seconds. Valid values for hh
*ALL: The error log data is printed for all device names.
range from 00 through 23. Valid values for mm and
ss range from 00 through 59.

P3-584 OS/400 CL Reference - Part 2 (Full Version)


PRTERRLOG

Element 2: Start Date new records are added. If the member does not exist
and a member name is not specified, the system creates
*CURRENT: The error data that is available for the
a member with the name of the output file specified on
current day and between the specified start and end
the OUTFILE parameter. If an output file member name
times (if specified) is printed.
is specified, but the member does not exist, the system
start-date: Specify the starting date. The date must be creates it.
specified in the job date format.
Element 1: Member to Receive Output
Element 3: End Time
*FIRST: The first member in the file receives the output.
*AVAIL: The error data that is available for the speci- If OUTMBR(*FIRST) is specified and the member does
fied end date is printed. not exist, the system creates a member with the name of
end-time: Specify the ending time for the specified the file specified on the OUTFILE parameter.
ending date that determines the error data that is member-name: Specify the file member that receives
printed. the output. If OUTMBR(member-name) is specified and
Element 4: End Date the member does not exist, the system creates it.

*CURRENT: The error data that is available for the Element 2: Operation to Perform on Member
current day and between the specified start and end *REPLACE: The system clears the existing member
times (if specified) is printed. and adds the new records.
end-date: Specify the end date for which error data is *ADD: The system adds the new records to the end of
printed. The date must be specified in job date format. the existing records.
OUTPUT VOLTYPE
Specifies whether the output from the command is Specifies the volume type of the specified volume identi-
printed with the job's spooled output or directed to a fier. Valid values are 4-digit device type numbers for
database file. More information on this parameter is in cartridge tape, reel tape, or diskette. This parameter
Appendix A, “Expanded Parameter Descriptions.” returns information about all the volumes that use the
*PRINT: The output is printed with the job's spooled same technology as the tape device type that was speci-
output. fied. For example, if 6380 is the specified value for this
parameter, information about all 1/4 inch tape cartridges
*OUTFILE: The output is directed to the database file
on the system is returned.
specified on the OUTFILE parameter.
MODEL
OUTFILE
Specifies the model number of the specified model type.
Specifies the database file to which the report is
This parameter is required if the device type is 9331 and
directed. If the output file already exists, the system
TYPE(*VOLSTAT) is specified.
attempts to use it. Records replace or are added to
existing data in the file member. If the output file does VOL
not exist, the system creates a database file in the spec- Specifies one or more volume identifiers used by the file.
ified library. A member is created for the file with the More information on this parameter is in Appendix A,
name specified in the OUTMBR parameter. “Expanded Parameter Descriptions.”
The name of the file can be qualified by one of the fol- *ALL: Volume statistics are processed for all volumes.
lowing library values:
volume-name: Specify the name of the volume for
*LIBL: All libraries in the job's library list are which statistics are processed. A maximum of 10
searched until the first match is found. volume names can be specified.

*CURLIB: The current library for the job is VOLSTAT


searched. If no library is specified as the current Specifies whether the volume statistical data records are
library for the job, the QGPL library is used. kept or deleted from the machine error log after they are
printed. This parameter is valid only if
library-name: Specify the name of the library to be
TYPE(*VOLSTAT) is specified.
searched.
Note: ENDOPT(*UNLOAD) must be specified during
file-name: Specify the name of the file that will receive the SAVE operation to generate volume statistics
the report.
at the completion of the tape operation.
OUTMBR *KEEP: The volume statistical data records are kept in
Specifies the name of the database file member to which the error log after they are printed.
the output is directed. If a member already exists, the
*DLT: The volume statistical data records are deleted
system uses the second element of this parameter to
from the error log for volumes that are not active after
determine whether the member is cleared before the
they are printed.

Chapter 2. OS/400 Command Descriptions P3-585


PRTERRLOG

Note: If OUTPUT(*OUTFILE) is specified, *DLT cannot *DEVADR: The entries are sorted by the address of the
be specified. device. The summary entries are divided into three
levels: those for which the first two digits of the address
VOLSTATTYP
are the same, those for which the first four digits of the
Specifies the type of volume statistics printed or directed
address are the same, and those for which the first eight
to an output file. This parameter is valid only if
digits of the address are the same.
TYPE(*VOLSTAT) is specified.
*ERRTYPE: The entries are sorted by the severity of
*LIFETIME: Lifetime statistics are printed. Lifetime sta-
the type of error. The more severe error types report at
tistics cannot be placed in an output file.
the top of the list. The summary entries are divided into
*SESSION: Session statistics are directed to the output two levels: those that have a common error type, and
file specified on the OUTFILE parameter. Session sta- those that have a common error type and system refer-
tistics cannot be printed. ence code.

SELECT *RSRCNAME: The entries are sorted by the resource


Specifies which type of error log entries are included on name of the device.
the report.
*ALL: All error log entries are included on the report. Examples
*PRC: The processor error log entries are included on Example 1: Printing Error Log Data
the report.
PRTERRLOG
*MEDIA: The error log entries for disk, tape, and
diskette devices are included on the report. This command gets the error data in the machine error log
*LWS: The error log entries for local workstations are that occurred for all device types and puts it in a spooled file.
included on the report. The entire error log is printed and any hexadecimal data is in
character format.
*CMN: The error log entries for communications are
included on the report. These include entries for com- Example 2: Using the System Resource Manager Data-
munications I/O processors, I/O adapters, ports, lines, base
controllers, and devices connected with SDLC, ASYNC, PRTERRLOG TYPE(\DEV) RSRCNAME(TAPEððððð1)
BSC, X.25, IDLC, ISDN, and local area network line pro- PRTFMT(\HEX)
tocols.
*PWR: The error log entries for system power control This command uses the system resource manager database
network (SPCN) are included on the report. to determine the device type, model, and serial number for
the resource TAPE000001. The print request is based on
*LPP: The error log entries for licensed programs are that information. The report is put in the spooled file and
included on the report. contains all records that pertain to that device type, model,
*LIC: The error log entries for Licensed Internal Code and serial number. Any hexadecimal data in the file is con-
are included on the report. verted to hexadecimal format.

SORT Example 3: Processing Error Log Entries


Specifies the order in which the entries appear on the
PRTERRLOG TYPE(\DEV) DEV(DISKLUD1)
report. OUTPUT(\OUTFILE) OUTFILE(MYLIB/MYDBD)
*DATETIME: The entries are sorted by date and time. OUTMBR(ELOG)
The summary entries are for each day.
This command processes all the error log entries for the
*TIME: The entries are sorted by the time of day only. logical device named DISKLUD1. They are put in the file
The summary entries are for each hour. MYDBD, in the library MYLIB, and in the member ELOG. No
spooled files are created.

P3-586 OS/400 CL Reference - Part 2 (Full Version)


PRTINTDTA

PRTINTDTA (Print Internal Data) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(1) ─┬─\DMP────┬──)────
55──PRTINTDTA──TYPE(─── (P) ─┬────────────────────────────────┬───────────────────────────────────────────────────5
├─\INTCFG─┤ │ ┌─\NONE───────────┐ │
└─\NOTES──┘ └─DMPID(──┴─dump-identifier─┴──)─┘
5──┬────────────────────────────────────────────────────────────────────────────────────┬──────────────────────────────────────5%
│ ┌─\AVAIL─────┐ ┌─\CURRENT───┐ │
(2) ─┴─start-time─┴──┴─start-date─┴──)──┬──────────────────────────────────┬─┘
└─PERIOD(───
│ ┌─\AVAIL───┐ ┌─\CURRENT─┐ │
└─(──┴─end-time─┴──┼──────────┼──)─┘
└─end-date─┘
Notes:
1 If *DMP is specified, the DMPID parameter must be specified.

P All parameters preceding this point can be specified in positional form.

2 PERIOD contains two lists of two elements each. PERIOD values must be coded in this order, using *N for those not being

specified: (start-time start-date) (end-time end-date). PERIOD is valid only if TYPE(*NOTES) is specified.

Purpose DMPID
Specifies, for internal dump operations only, the dump
The Print Internal Data (PRTINTDTA) command is used pri- identifier associated with the machine internal data that
marily for problem analysis. It writes the machine internal is printed. This parameter must be specified only if
data to a spooled printer file. The data is used to service the TYPE(*DMP) is specified; otherwise, it is ignored. The
system. The names of files produced by this and other com- dump identifier is sent in one of three ways:
mands is in the Programming Reference Summary book.
Ÿ In a message to the job that issued the
Restrictions: DMPJOBINT command that dumped the internal
data
1. This command is shipped with public *EXCLUDE
Ÿ In a damage message
authority and the QPGMR, QSYSOPR, QSRV, and
Ÿ In a device error message or machine function
QSRVBAS user profiles have private authorities to use
check message. The message containing the dump
the command.
identifier may also be sent to the system history log.
2. This command is intended for use by service represen-
tatives only. *NONE: No dump identifier is specified.

Note: To see the parameter and value descriptions for this dump-identifier: Specify the dump identifier of the dump
command, refer to the online help text. For more output that is printed. The identifier specified must
information about printing the help text, refer to contain eight characters.
“Printing CL Command Descriptions” in Chapter 1. PERIOD
Specifies the period of time for which the notes portion
Required Parameters of the machine internal data is printed. This parameter
is valid only if TYPE(*NOTES) is specified; otherwise, it
TYPE is ignored. The following values can be coded in this
Specifies the type of data to be printed. parameter, which contains two sets of two values each.
*DMP: The data to be printed was dumped by a previ- Refer to the syntax diagram for the location of each
ously issued Dump Job Internal (DMPJOBINT) value specified. If this parameter is not specified, all the
command or by the machine when it processes a device available notes for the current date are printed.
error or object damage. The dump identifier of the data Element 1: Starting Time
must be specified on the DMPID parameter.
*AVAIL: The notes that are available from the starting
*INTCFG: The machine internal configuration and date to the ending date (or for the current day only) are
resource information is printed. printed.
*NOTES: The notes portion of the machine internal start-time: Specify the starting time for the specified
data, for the period specified by the PERIOD parameter, starting date for which the user wants the notes printed.
is printed. The time is specified in 24-hour format with or without a
time separator as follows:
Optional Parameters Ÿ With a time separator, specify a string of 5 or 8
digits, where the time separator for the job sepa-

Chapter 2. OS/400 Command Descriptions P3-587


PRTINTDTA

rates the hours, minutes, and seconds. If you issue *AVAIL: The notes that are available from the starting
this command from the command line, the string date to the ending date (or for the current day only) are
must be enclosed in apostrophes. If a time sepa- printed.
rator other than the separator specified for your job
end-time: Specify the ending time for the specified
is used, this command fails.
ending date that determines the notes that is printed.
Ÿ Without a time separator, specify a string of 4 or 6
Element 4: Ending Date
digits (hhmm or hhmmss) where hh = hours, mm =
minutes, and ss = seconds. Valid values for hh *CURRENT: The notes that are available for the current
range from 00 through 23. Valid values for mm and day and between the specified starting and ending times
ss range from 00 through 59. (if specified) are printed.

Element 2: Starting Date


end-date: Specify the ending date after which the notes
are no longer printed. The system date format must be
*CURRENT: The notes that are available for the current used.
day and between the specified starting and ending times
(if specified) are printed.
Example
start-date: Specify the date printed. The date must be
entered in the format specified by the system values PRTINTDTA TYPE(\DMP) DMPID(ð1ð2FA3C)
QDATFMT and, if separators are used, QDATSEP.
This command prints the job internal dump output that has a
Element 3: Ending Time dump identifier of 0102FA3C.

P3-588 OS/400 CL Reference - Part 2 (Full Version)


PRTIPSCFG

PRTIPSCFG (Print IP over SNA Configuration) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──PRTIPSCFG──────────────────────────────────────────────────────────────────────────────────────────────────────────────────5%

Purpose There are no parameters for this command.

The Print IP over SNA Configuration (PRTIPSCFG)


command prints information about the current AF_INET Example
Sockets over SNA configuration. The spooled file created by PRTIPSCFG
this CL command is named QSYSPRT. It is sent to the job
default output queue. The user data value of the spooled file This command prints the current AF_INET sockets over SNA
is PRTIPSCFG. configuration data.

Chapter 2. OS/400 Command Descriptions P3-589


PRTJOBDAUT

PRTJOBDAUT (Print Job Description Authority) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─────────────────────────────────────────────────────5%
55──PRTJOBDAUT──LIB(──┬─\LIBL────────┬──)──┬──────────────────────────┬───
├─\USRLIBL─────┤ │ ┌─\NO──┐ │
├─\CURLIB──────┤ └─CHGRPTONLY(──┴─\YES─┴──)─┘
├─\ALL─────────┤
├─\ALLUSR──────┤
└─library-name─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose LIB
Specifies the name of the library to search for job
The Print Job Description Authority (PRTJOBDAUT) descriptions with public authority that is not *EXCLUDE
command allows you to print a report of the job descriptions and a user name is specified.
in a library that do not have public authority of *EXCLUDE,
and a user name is specified in the job description. This is a *LIBL: All libraries in the job's library list are
way to check for job descriptions that every user on the searched until the first match is found.
system is authorized to use that allow the user to run as *CURLIB: The current library for the job is
another user profile. searched. If no library is specified as the current
library for the job, the QGPL library is used.
This command will print two reports for a library. The first
report (Full Report) will contain all of the job descriptions that *USRLIBL: Only the libraries in the user portion of
do not have public authority of *EXCLUDE and have a user the job's library list are searched.
name specified. The second report (Changed Report) will *ALL: All libraries in the system, including QSYS,
contain the job descriptions that now do not have public are searched.
authority of *EXCLUDE or have a user name specified that
*ALLUSR: All user libraries are searched.
either did have public authority of *EXCLUDE, did not have a
user name specified, or did not exist when the library-name: Specify the name of the library to be
PRTJOBDAUT command was previously run for the library. searched.
If the PRTJOBDAUT command was not previously run for
the library, there will be no 'Changed Report'. If the
command has been previously run for the library but no addi- Optional Parameter
tional job descriptions do not have public authority of CHGRPTONLY
*EXCLUDE and a user name specified, then the 'Changed Specifies whether just the changed report should be
Report' will be printed but there will be no job descriptions printed.
listed. Changes to user profile special authorities will not
cause a 'Changed Report' to be generated. *NO: The full and changed reports will be printed.
*YES: Only the changed report will be printed.
Restriction: You must have *ALLOBJ special authority to
use this command.
Example
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more PRTJOBDAUT LIB(QGPL)
information about printing the help text, refer to
This command will generate the full and changed report for
“Printing CL Command Descriptions” in Chapter 1.
the job descriptions in the library QGPL.

Required Parameter

P3-590 OS/400 CL Reference - Part 2 (Full Version)


PRTPUBAUT

PRTPUBAUT (Print Publicly Authorized Objects) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──LIB(──┬─\LIBL────────┬──)─────────────────────────5
55──PRTPUBAUT──OBJTYPE(────object-type────)──┬──────────────────────────┬───
│ ┌─\NO──┐ │ ├─\USRLIBL─────┤
└─CHGRPTONLY(──┴─\YES─┴──)─┘ ├─\CURLIB──────┤
├─\ALL─────────┤
├─\ALLUSR──────┤
└─library-name─┘
5──┬──────────────────────┬──┬──────────────────────┬──┬──────────────────────┬──┬───────────────────────┬──────────────────────5
│ ┌─\NO──┐ │ │ ┌─\NO──┐ │ │ ┌─\NO──┐ │ │ ┌─\NO──┐ │
└─FILAUT(──┴─\YES─┴──)─┘ └─CMDAUT(──┴─\YES─┴──)─┘ └─PGMAUT(──┴─\YES─┴──)─┘ └─JOBDAUT(──┴─\YES─┴──)─┘
5──┬──────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────5%
└─FLR(──folder-name──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Optional Parameters


The Print Publicly Authorized Objects (PRTPUBAUT) CHGRPTONLY
command allows you to print a report of the specified objects Specifies whether just the changed report should be
that do not have public authority of *EXCLUDE. For *PGM printed.
objects, only the programs that do not have public authority *NO: The full and changed reports will be printed.
of *EXCLUDE that a user can call (the program is either user
*YES: Only the changed report will be printed.
domain or the system security level (QSECURITY system
value) is 30 or below) will be included in the report. This is a LIB
way to check for objects that every user on the system is Specifies the name of the library to search for objects
authorized to access. with public authority that is not *EXCLUDE.

This command will print two reports. The first report (Full *LIBL: All libraries in the job's library list are
Report) will contain all of the specified objects that do not searched until the first match is found.
have public authority of *EXCLUDE. The second report
*CURLIB: The current library for the job is
(Changed Report) will contain the objects that now do not
searched. If no library is specified as the current
have public authority of *EXCLUDE that did have public
library for the job, the QGPL library is used.
authority of *EXCLUDE or did not exist when the
PRTPUBAUT command was previously run. If the *USRLIBL: Only the libraries in the user portion of
PRTPUBAUT command was not previously run for the speci- the job's library list are searched.
fied objects and library or folder, there will be no 'Changed *ALL: All libraries in the system, including QSYS,
Report'. If the command has been previously run, but no are searched.
additional objects do not have public authority of *EXCLUDE,
*ALLUSR: All user libraries are searched.
then the 'Changed Report' will be printed but there will be no
objects listed. library-name: Specify the name of the library to be
searched.
Restrictions: You must have *ALLOBJ special authority to
use this command. This is a required parameter for all object types except
*AUTL, *CFGL, *CNNL, *COSD, *CTLD, *DEVD, *DOC,
Note: To see the parameter and value descriptions for this
*FLR, *LIB, *LIND, *MODD, *NWID, *NWSD, and
command, refer to the online help text. For more
*USRPRF.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. FILAUT
Specifies whether the Print Publicly Authorized Objects
(PRTPUBAUT) command will be run for *FILE objects
Required Parameter for each of the libraries that do not have public authority
OBJTYPE of *EXCLUDE. This parameter is only used when the
Specifies the type of object to search for. For a com- OBJTYPE is *LIB.
plete list of object types, position the cursor on the field *NO: The PRTPUBAUT command will not be run for
for the Object type prompt (OBJTYPE parameter), and *FILE objects for each of the libraries that does not have
press F4. public authority of *EXCLUDE.
object-type: The name of the object type to search for.

Chapter 2. OS/400 Command Descriptions P3-591


PRTPUBAUT

*YES: The PRTPUBAUT command will be run for *FILE JOBDAUT


objects for each of the libraries that does not have public Specifies whether the Print Job Description Authority
authority of *EXCLUDE. (PRTJOBDAUT) command will be run for each of the
libraries that does not have public authority of
CMDAUT
*EXCLUDE. The PRTJOBDAUT command will list all of
Specifies whether the Print Publicly Authorized Objects
the job descriptions in the library that do not have public
(PRTPUBAUT) command will be run for *CMD objects
authority of *EXCLUDE and have a user name specified.
for each of the libraries that do not have public authority
This parameter is only used when the OBJTYPE is *LIB.
of *EXCLUDE. This parameter is only used when the
OBJTYPE is *LIB. *NO: The PRTJOBDAUT command will not be run for
each of the libraries that does not have public authority
*NO: The PRTPUBAUT command will not be run for
of *EXCLUDE.
*CMD objects for each of the libraries that does not have
public authority of *EXCLUDE. *YES: The PRTJOBDAUT command will be run for
each of the libraries that does not have public authority
*YES: The PRTPUBAUT command will be run for
of *EXCLUDE.
*CMD objects for each of the libraries that does not have
public authority of *EXCLUDE. FLR
Specifies the name of the folder to search for documents
PGMAUT
with *PUBLIC authority that is not *EXCLUDE.
Specifies whether the Print Publicly Authorized Objects
(PRTPUBAUT) command will be run for *PGM objects This is a required parameter if *DOC is specified for the
for each of the libraries that do not have public authority Object type prompt (OBJTYPE parameter).
of *EXCLUDE. This parameter is only used when the folder-name: Specify the name of the folder searched.
OBJTYPE is *LIB.
*NO: The PRTPUBAUT command will not be run for Example
*PGM objects for each of the libraries that does not have
public authority of *EXCLUDE. PRTPUBAUT OBJTYPE(\FILE) LIB(QSYS)

*YES: The PRTPUBAUT command will be run for The command will create the full and changed reports for the
*PGM objects for each of the libraries that does not have file objects in the library QSYS.
public authority of *EXCLUDE.

P3-592 OS/400 CL Reference - Part 2 (Full Version)


PRTPVTAUT

PRTPVTAUT (Print Private Authorities) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──┬───────────────────────┬─────────────────────────5
55──PRTPVTAUT──OBJTYPE(────object-type────)──┬──────────────────────────┬───
│ ┌─\NO──┐ │ └─LIB(──library-name──)─┘
└─CHGRPTONLY(──┴─\YES─┴──)─┘
5──┬──────────────────────────┬──┬──────────────────────┬──┬───────────────────────┬───────────────────────────────────────────5%
│ ┌─\OBJECT─┐ │ └─FLR(──folder-name──)─┘ │ ┌─\NO──┐ │
└─AUTTYPE(──┼─\FIELD──┼──)─┘ └─AUTLOBJ(──┴─\YES─┴──)─┘
└─\ALL────┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Required Parameter


The Print Private Authorities (PRTPVTAUT) command allows OBJTYPE
you to print a report of all the private authorities for objects of Specifies the type of object to search for. For a com-
a specified type in a specified library or folder. The report plete list of object types, position the cursor on the field
lists all objects of the specified type and the users that are for the Object type prompt (OBJTYPE parameter), and
authorized to the object. This is a way to check for different press F4.
sources of authority to objects. object-type: Specify the object type to be processed.
This command prints three reports for the selected objects.
The first report (Full Report) contains all of the private Optional Parameters
authorities for each of the selected objects.
CHGRPTONLY
The second report (Changed Report) contains additions and Specifies whether just the changed reports should be
changes to the private authorities to the selected objects if printed.
the PRTPVTAUT command was previously run for the speci- *NO: The full and changed reports are printed.
fied objects in the specified library or folder. Any new
*YES: Only the changed report and deleted report are
objects of the selected type, new authorities to existing
printed.
objects, or changes to existing authorities to the existing
objects are listed in the 'Changed Report'. If the LIB
PRTPVTAUT command was not previously run for the speci- Specifies the name of the library to search for objects to
fied objects in the specified library or folder, there will be no be included in the private authority report.
'Changed Report'. If the command has been previously run
library-name: Specify the name of the library to be
but no changes have been made to the authorities on the
searched.
objects, then the 'Changed Report' is printed but there are no
objects listed. This is a required parameter for all object types except
*AUTL, *CFGL, *CNNL, *COSD, *CTLD, *DEVD, *DOC,
The third report (Deleted Report) contains any deletions of *FLR, *LIB, *LIND, *MODD, *NWID, *NWSD, and
privately authorized users from the specified objects since *USRPRF.
the PRTPVTAUT command was previously run. Any objects
that were deleted or any users that were removed as pri- AUTTYPE
vately authorized users are listed in the 'Deleted Report'. If Specifies whether object level authority, field level
the PRTPVTAUT command was not previously run, there will authority, or both object level and field level authority
be no 'Deleted Report'. If the command has been previously reports are generated. Field level authority information
run but no delete operations have been done to the objects, only applies to *FILE objects.
then the 'Deleted Report' is printed but there are no objects *OBJECT: Object level authority reports are generated
listed. for the specified objects.

Restriction: You must have *ALLOBJ special authority to *FIELD: For each data base file that has field level
use this command. authorities, a field level authority report is generated.

Note: To see the parameter and value descriptions for this This value is only valid if *FILE is specified for the
command, refer to the online help text. For more Object type prompt (OBJTYPE parameter).
information about printing the help text, refer to *ALL: For each data base file that has field level
“Printing CL Command Descriptions” in Chapter 1. authorities, a field level authority report is generated.

Chapter 2. OS/400 Command Descriptions P3-593


PRTPVTAUT

Also, the object level authority reports for all the files in vides a list of all the objects that are secured by a spe-
the specified library are generated. cific authorization list. This parameter is only used if the
object type is *AUTL. It is ignored for all other object
This value is only valid if *FILE is specified for the
types.
Object type prompt (OBJTYPE parameter).
*NO: The DSPAUTLOBJ command will not be run for
FLR
each of the authorization lists on the system.
Specifies the name of the folder to search for documents
to be included in the private authority report. *YES: The DSPAUTLOBJ command will be run for
each of the authorization lists on the system. The output
This is a required parameter if *DOC is specified for the for the command will be sent to the same output queue
Object type prompt (OBJTYPE parameter). as the authorization list report.

folder-name: Specify the name of the folder to be


searched. Example
AUTLOBJ PRTPVTAUT OBJTYPE(\FILE) LIB(PAYROLLLIB)
Specifies whether the Display Authorization List Objects
This command creates the full, changed, and deleted reports
(DSPAUTLOBJ) command will be run for each of the
for all file objects in the library PAYROLLLIB.
authorization lists on the system. DSPAUTLOBJ pro-

P3-594 OS/400 CL Reference - Part 2 (Full Version)


PRTQAUT

PRTQAUT (Print Queue Authority) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ────────────────────────────────────────────────────5%
55──PRTQAUT──┬───────────────────────────┬──┬──────────────────────────┬───
│ ┌─\ALL─────────┐ │ │ ┌─\NO──┐ │
└─LIB(──┼─\LIBL────────┼──)─┘ └─CHGRPTONLY(──┴─\YES─┴──)─┘
├─\USRLIBL─────┤
├─\CURLIB──────┤
├─\ALLUSR──────┤
└─library-name─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose LIB
Specifies the name of the library to search for output
The Print Queue Authority (PRTQAUT) command allows you queue and job queue objects to report.
to print a report of the output queue and job queue authority
information for the objects in the specified library. This *ALL: All libraries in the system, including QSYS,
command provides a way to check the authority attributes of are searched.
the output queue and job queue objects on the system. *LIBL: All libraries in the job's library list are
searched until the first match is found.
This command prints two reports for a library. The first
report (Full Report) contains all of the output queues and job *USRLIBL: Only the libraries in the user portion of
queues in the specified library. The second report (Changed the job's library list are searched.
Report) contains the output queues and job queues that have *CURLIB: The current library for the job is
been created or had the authority attributes changed since searched. If no library is specified as the current
the PRTQAUT command was last run for the library. If the library for the job, the QGPL library is used.
PRTQAUT command was not previously run for the library,
*ALLUSR: All user libraries are searched.
there will be no 'Changed Report'. If the command has been
previously run for the library but no additional queue informa- library-name: Specify the name of the library to be
tion is available then the 'Changed Report' is printed but searched.
there are no queues listed.
CHGRPTONLY
Restriction: You must have *ALLOBJ special authority to Specifies whether just the changed report should be
use this command. printed.

Note: To see the parameter and value descriptions for this *NO: The full and changed reports are printed.
command, refer to the online help text. For more *YES: Only the changed report is printed.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1.
Example
PRTQAUT LIB(QUSRSYS)
Optional Parameters
This command generates the full and changed reports for the
output queues and job queues in the library QUSRSYS.

Chapter 2. OS/400 Command Descriptions P3-595


PRTSBSDAUT

PRTSBSDAUT (Print Subsystem Description Authority ) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─────────────────────────────────────────────────────5%
55──PRTSBSDAUT──LIB(──┬─\LIBL────────┬──)──┬──────────────────────────┬───
├─\USRLIBL─────┤ │ ┌─\NO──┐ │
├─\CURLIB──────┤ └─CHGRPTONLY(──┴─\YES─┴──)─┘
├─\ALL─────────┤
├─\ALLUSR──────┤
└─library-name─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose LIB
Specifies the name of the library to search for sub-
The Print Subsystem Description Authority (PRTSBSDAUT) system descriptions contain a subsystem entry with a
command allows you to print a report of the subsystem default user profile specified.
descriptions in a library that contain a default user in a sub-
system entry. This command provides a way to check for *LIBL: All libraries in the job's library list are
subsystem descriptions that allow work to be performed on searched until the first match is found.
your system while running under a default user profile. *CURLIB: The current library for the job is
searched. If no library is specified as the current
This command prints two reports for a library. The first library for the job, the QGPL library is used.
report (Full Report) contains all of the subsytem descriptions
that contain a default user in a subsystem entry. The second *USRLIBL: Only the libraries in the user portion of
report (Changed Report) contains the subsystem descriptions the job's library list are searched.
that have been changed to contain a subsystem entry with a *ALL: All libraries in the system, including QSYS,
default user since the PRTSBSDAUT command was last run are searched.
for the library. If the PRTSBSDAUT command was not previ-
*ALLUSR: All user libraries are searched.
ously run for the library, there will be no 'Changed Report'. If
the command has been previously run for the library but no library-name: Specify the name of the library to be
additional subsystem descriptions contain subsystem entries searched.
with a default user, then the 'Changed Report' is printed but
there are no subsystem descriptions listed. Changes to user
profile special authorities do not cause a 'Changed Report' to Optional Parameter
be generated. CHGRPTONLY
Specifies whether just the changed report should be
Restriction: You must have *ALLOBJ special authority to
printed.
use this command.
*NO: The full and changed reports will be printed.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more *YES: Only the changed report will be printed.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1.
Example
PRTSBSDAUT LIB(QSYS)
Required Parameter
The full and changed report for all subsystem descriptions in
library QSYS will be created.

P3-596 OS/400 CL Reference - Part 2 (Full Version)


PRTSQLINF

PRTSQLINF (Print Structured Query Language Information) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ────────────────────────────────────────5%
55──PRTSQLINF──OBJ(──┼───────────────┼──object-name──)──┬──────────────────────────┬───
├─\CURLIB/──────┤ │ ┌─\PGM────┐ │
└─library-name/─┘ └─OBJTYPE(──┼─\SQLPKG─┼──)─┘
└─\SRVPGM─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *CURLIB: The current library for the job is


searched. If no library is specified as the current
The Print Structured Query Language Information library for the job, the QGPL library is used.
(PRTSQLINF) command prints information about the
library-name: Specify the name of the library to be
embedded SQL statements in a program, SQL package, or
searched.
service program. The information includes the SQL state-
ments, the access plans used during the running of the state- object-name: Specify the name of the program or SQL
ment, and a list of the command parameters used to package for which you want information printed.
precompile the source member for the object.
Note: To see the parameter and value descriptions for this Optional Parameters
command, refer to the online help text. For more
information about printing the help text, refer to OBJTYPE
“Printing CL Command Descriptions” in Chapter 1. Specifies the type of object.
*PGM: The object is a program.
Parameters *SQLPKG: The object is an SQL package.
OBJ *SRVPGM: The object is a service program.
Specifies the name of the program or SQL package for
which you want SQL information printed.
Example
The name of the object can be qualified by one of the
following library values: Example 1: Printing SQL Information
PRTSQLINF PAYROLL
*LIBL: All libraries in the job's library list are
searched until the first match is found. This command will print information about the SQL state-
ments contained in program PAYROLL.

Chapter 2. OS/400 Command Descriptions P3-597


PRTSWL

PRTSWL (Print Stop Word List) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─┬─────────────────────┬────────────────────────────────────────────────────────5%
55──PRTSWL──LANGID(──language-identifier──)────
│ ┌─\IBM──┐ │
└─TYPE(──┴─\USER─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Optional Parameters


The Print Stop Word List (PRTSWL) command is used to TYPE
print the words from an IBM-supplied or user-created stop Specifies the type of stop word list to print.
word list. *IBM: The stop word list is IBM-supplied.
Note: To see the parameter and value descriptions for this *USER: The stop word list is user-created.
command, refer to the online help text. For more
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. Example
PRTSWL LANGID(ENG) TYPE(\IBM)
Required Parameters This command prints the IBM-supplied stop word list with the
LANGID language ID ENG.
Specifies the language identifier (ID) for the stop word
list.

P3-598 OS/400 CL Reference - Part 2 (Full Version)


PRTSYSINF

| PRTSYSINF (Print System Information) Command

| Job: B,I Pgm: B,I REXX: B,I Exec


| 55──PRTSYSINF──────────────────────────────────────────────────────────────────────────────────────────────────────────────5%

| Purpose | 11. Access path recovery times (V3R1M0 and V3R2M0


| systems only)
| The Print System Information (PRTSYSINF) command | 12. Service attributes (V3R1M0 and V3R2M0 systems only)
| spools the following system information: | 13. Network server storage spaces information (V3R1M0
| 1. Current disk configuration | and V3R2M0 systems only)
| 2. History logs | 14. Power on/off schedule
| 3. List of user libraries | 15. Hardware configuration
| 4. List of folders | 16. Optical device descriptions
| 5. Current system values | 17. Configuration descriptions
| 6. Current network attributes | 18. Remote job entry descriptions
| 7. Current configuration lists | 19. SNADS configuration
| 8. user-defined edit descriptions | 20. IBM supplied subsystem descriptions
| 9. Installed PTFs | 21. Installed licensed programs
| 10. Reply list Entries | 22. Journaling environment information

| This command has no parameters.

Chapter 2. OS/400 Command Descriptions P3-599


PRTSYSSECA

PRTSYSSECA (Print System Security Attributes) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──PRTSYSSECA─────────────────────────────────────────────────────────────────────────────────────────────────────────────────5%

Purpose Restrictions:

The Print System Security Attributes (PRTSYSSECA) You must have *ALLOBJ special authority to use this
command prints a report of security-related system values command.
and network attributes to a spooled file. The report includes
the system value or network attribute name, the current
value, and the recommended value.

P3-600 OS/400 CL Reference - Part 2 (Full Version)


PRTTRGPGM

PRTTRGPGM (Print Trigger Program) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──────────────────────────────────────────────────────5%
55──PRTTRGPGM──LIB(──┬─\LIBL────────┬──)──┬──────────────────────────┬───
├─\USRLIBL─────┤ │ ┌─\NO──┐ │
├─\CURLIB──────┤ └─CHGRPTONLY(──┴─\YES─┴──)─┘
├─\ALL─────────┤
├─\ALLUSR──────┤
└─library-name─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose LIB
Specifies the name of the library to search for files that
The Print Trigger Program (PRTTRGPGM) command lists have trigger programs.
the programs which have been defined as a trigger program
for the physical files in the specified library. *LIBL: All libraries in the job's library list are
searched until the first match is found.
This command prints two reports for a library. The first *CURLIB: The current library for the job is
report (Full Report) contains all of the trigger programs asso- searched. If no library is specified as the current
ciated with files in the specified library. The second report library for the job, the QGPL library is used.
(Changed Report) contains the trigger programs that now
appear in the specified library and were not in the library *USRLIBL: Only the libraries in the user portion of
when the PRTTRGPGM command was previously run for the the job's library list are searched.
library. If the PRTTRGPGM command was not previously *ALL: All libraries in the system, including QSYS,
run for the library, there will be no 'Changed Report'. If the are searched.
command has been previously run for the library but no addi-
*ALLUSR: All user libraries are searched.
tional trigger programs are in the specified library, the
'Changed Report' is printed but there are no objects listed. library-name: Specify the name of the library to be
Changing the trigger time, trigger event or trigger update searched.
condition for a trigger program will not cause a 'Changed
Report' to be generated.
Optional Parameter
A program is not listed in the 'Changed Report' when the
CHGRPTONLY
program itself is changed. Therefore, you should periodically
Specifies whether just the changed report should be
review the entire list of objects that adopt to understand their
printed.
current function.
*NO: The full and changed reports are printed.
Restriction: You must have *ALLOBJ special authority to
*YES: Only the changed report is printed.
use this command.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more Example
information about printing the help text, refer to PRTTRGPGM LIB(\ALL)
“Printing CL Command Descriptions” in Chapter 1.
This command searches all files in all libraries and produces
the full and changed trigger program reports.
Required Parameter

Chapter 2. OS/400 Command Descriptions P3-601


PRTUSROBJ

PRTUSROBJ (Print User Objects) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──────────────────────────────────────────────────────────5%
55──PRTUSROBJ──LIB(──library-name──)──┬──────────────────────────┬───
│ ┌─\NO──┐ │
└─CHGRPTONLY(──┴─\YES─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose You must have *ALLOBJ special authority to use this


command.
The Print User Objects (PRTUSROBJ) command allows you
Note: To see the parameter and value descriptions for this
to print a report of the objects in a library that are not created
command, refer to the online help text. For more
by IBM. Objects are included in the report if the "Created by
information about printing the help text, refer to
user" attribute is not *IBM or QLPINSTALL.
“Printing CL Command Descriptions” in Chapter 1.
Use this command to check for user created objects that
are in libraries intended for use only by IBM. For example,
you may want to run this program for library QSYS to deter- Required Parameter
mine if it contains any non-IBM (user) objects.
LIB
This command prints two reports for a library. The first Specifies the name of the library to search for objects
report (Full Report) contains all of the objects that have not that were not created by IBM.
been created by IBM. The second report (Changed Report) library-name: Specify the name of the library to be
contains the objects that now appear in the specified library searched.
and were not in the library when the PRTUSROBJ command
was previously run for the library. If the PRTUSROBJ
command was not previously run for the library, there will be Optional Parameter
no 'Changed Report'. If the command has been previously
CHGRPTONLY
run for the library but no additional objects have been added
Specifies whether just the changed report should be
to the library that were not created by IBM, then the
printed.
'Changed Report' is printed but there are no objects listed.
*NO: The full and changed reports will be printed.
Note: Some objects created by IBM will still appear in this
*YES: Only the changed report will be printed.
report. For example, objects created by a PTF exit
program are included. Objects are excluded from the
report only when their 'Created by user' attribute is Example
either *IBM or QLPINSTALL. PRTUSROBJ LIB(QSYS) CHGONLY(\NO)
Restrictions: The library QSYS will be searched for any objects that were
not created by IBM and the full and changed reports will be
created.

P3-602 OS/400 CL Reference - Part 2 (Full Version)


PRTUSRPRF

PRTUSRPRF (Print User Profile) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P)─┬────────────────────────┬──┬───────────────────────────┬──┬────────────────────────────────────┬──────────────5
55──PRTUSRPRF───
│ ┌─\ALL─────┐ │ │ ┌─\SPCAUT───┐ │ │ ┌─\ALL───────────────┐ │
└─TYPE(──┼─\AUTINFO─┼──)─┘ └─SELECT(──┼─\USRCLS───┼──)─┘ │ │ ┌──
─────────────┐ │ │
├─\ENVINFO─┤ └─\MISMATCH─┘ 6 (1) ─┴──)─┘
└─SPCAUT(──┴──┬─\ALLOBJ───┬┴───
└─\PWDINFO─┘ ├─\AUDIT────┤
├─\JOBCTL───┤
├─\IOSYSCFG─┤
├─\SAVSYS───┤
├─\SECADM───┤
├─\SERVICE──┤
├─\SPLCTL───┤
└─\NONE─────┘
5──┬──────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\ALL─────────────┐ │
│ │ ┌──
───────────┐ │ │
6 (2)
└─USRCLS(──┴──┬─\USER───┬┴────┴──)─┘
├─\SYSOPR─┤
├─\PGMR───┤
├─\SECADM─┤
└─\SECOFR─┘
Notes:
P All parameters preceding this point can be specified in positional form.

1 A maximum of 9 repetitions

2 A maximum of 5 repetitions

Purpose SELECT
Specifies what criteria is used to select the user profiles
The Print User Profile (PRTUSRPRF) command allows you to include in the report.
to print a report containing information for the user profiles on
*SPCAUT: User profiles are selected for the report
the system. Three different reports can be printed. One
based on special authorities.
contains authority type information, one contains environment
type information, and one contains password type informa- *USRCLS: User profiles are selected for the report
tion. based on user class.
*MISMATCH: User profiles are selected for the report
Restriction: You must have *ALLOBJ special authority to
based on their special authorities not being the default
use this command.
values assigned to their user class.
Note: To see the parameter and value descriptions for this
Note: The defaulted special authorities for user classes
command, refer to the online help text. For more
were changed in Version 3, Release 7, Modifica-
information about printing the help text, refer to
tion 0. Therefore, when running this report for
“Printing CL Command Descriptions” in Chapter 1.
profiles created prior to V3R7M0, you may notice
a larger than expected number of profiles that do
Optional Parameters not match the default values.

TYPE SPCAUT
Specifies the type of information that can be printed for If *SPCAUT was specified for the SELECT parameter, it
the user profiles selected. specifies which special authorities should be used to
select users. User profiles with any of the special
*ALL: All of the reports are printed for the user profiles
authorities specified for this parameter are included in
selected.
the report. A maximum of 9 special authorities can be
*AUTINFO: A report containing the authority type infor- specified.
mation for the user profiles selected is printed.
*ALL: All user profiles are included in the report.
*ENVINFO: A report containing the environment type
*ALLOBJ: User profiles with *ALLOBJ special authority
information for the user profiles selected is printed.
are included in the report.
*PWDINFO: A report containing the password type
*AUDIT: User profiles with *AUDIT special authority are
information for the user profiles selected is printed.
included in the report.

Chapter 2. OS/400 Command Descriptions P3-603


PRTUSRPRF

*JOBCTL: User profiles with *JOBCTL special authority included in the report. A maximum of 5 user classes
are included in the report. can be specified.
*IOSYSCFG: User profiles with *IOSYSCFG special *ALL: All user profiles are included in the report.
authority are included in the report.
*USER: User profiles with *USER user class are
*SAVSYS: User profiles with *SAVSYS special authority included in the report.
are included in the report.
*SYSOPR: User profiles with *SYSOPR user class are
*SECADM: User profiles with *SECADM special included in the report.
authority are included in the report.
*PGMR: User profiles with *PGMR user class are
*SERVICE: User profiles with *SERVICE special included in the report.
authority are included in the report.
*SECADM: User profiles with *SECADM user class are
*SPLCTL: User profiles with *SPLCTL special authority included in the report.
are included in the report.
*SECOFR: User profiles with *SECOFR user class are
*NONE: User profiles with no special authorities are included in the report.
included in the report.

USRCLS Example
If *USRCLS was specified for the Select by prompt PRTUSRPRF TYPE(\ALL) SELECT(\SPCAUT)
(SELECT parameter), it specifies that user classes SPCAUT(\ALLOBJ \SECADM)
should be used to select users. User profiles with a
user class that is specified for this parameter are This command creates all three reports for user profiles that
have either *ALLOBJ or *SECADM special authority.

P3-604 OS/400 CL Reference - Part 2 (Full Version)


PWRDWNSYS

PWRDWNSYS (Power Down System) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──┬──────────────────────────────────────┬──────────5
55──PWRDWNSYS──┬─────────────────────────┬──┬───────────────────────────┬───
│ ┌─\CNTRLD─┐ │ │ ┌─36ðð───────┐ │ │ ┌─\NO─────────────────┐ │
└─OPTION(──┴─\IMMED──┴──)─┘ └─DELAY(──┼─\NOLIMIT───┼──)─┘ │ │ ┌─\IPLA─┐ │ │
└─delay-time─┘ └─RESTART(──┴───\YES────┼─\SYS──┼─┴──)─┘
└─\FULL─┘
5──┬────────────────────────┬──┬─────────────────────────────────────────┬──┬───────────────────────────────┬──────────────────5%
| │ ┌─\PANEL─┐ │ │ ┌─\DFT─────────────────┐ │ │ ┌─\CONTINUE──┐ │
| └─IPLSRC(──┼─A──────┼──)─┘ │ │ ┌──
───────────────┐ │ │ └─TIMOUTOPT(──┼─\MSD───────┼──)─┘
| ├─B──────┤ 6 (1)
└─ENDSBSOPT(──┴───┬─\NOJOBLOG─┬─┴────┴──)─┘ └─\SYSREFCDE─┘
| └─D──────┘ ├─\CHGPTY───┤
| └─\CHGTSL───┘
Notes:
P All parameters preceding this point can be specified in positional form.

| 1 A maximum of 3 repetitions

Purpose *IMMED: The subsystem ends all active jobs imme-


diately. This means the programs running in those jobs
The Power Down System (PWRDWNSYS) command pre- are not allowed to perform any job cleanup. Thus, a
pares the system for ending and then starts the power-down minimum amount of time is required when *IMMED is
sequence. All active subsystems are notified that the system specified. The amount of time allowed for cleanup when
is being powered down; no new jobs or routing steps can be *IMMED is specified is controlled by QPWRDWNLMT,
started by any subsystem. For example, jobs that are on a the system value. This option might cause undesirable
job queue as a result of a Transfer Job (TFRJOB) command results if data has been partially updated, and it should
are not allowed to complete. During the subsequent initial be used only after a controlled end has been unsuccess-
program load (IPL), they are removed from the job queue fully attempted.
and their job logs are produced.
When OPTION(*IMMED) is specified while the system is
Note: If tape units are installed on the system, all tape reels operating under auxiliary power, or if the delay time
that are on the devices should be unloaded before specified in the DELAY parameter ends while the system
the system is powered down. This step ensures the is under auxiliary power, the system ignores the
integrity of data on the tapes. QPWRDWNLMT system value and starts the power-
down sequence without additional job cleanup activity.
Restriction: To run this command, the user must have job
control (*JOBCTL) authority. DELAY
Specifies the number of seconds that the system allows
Note: To see the parameter and value descriptions for this
a controlled end of processing operation to be performed
command, refer to the online help text. For more
by the active subsystems. If the end-of-job cleanup
information about printing the help text, refer to
functions are not finished within the specified delay time,
“Printing CL Command Descriptions” in Chapter 1.
any remaining jobs are ended immediately.
3600: The amount of time in which to complete a con-
Optional Parameters trolled end of processing is limited to 3600 seconds.
OPTION *NOLIMIT: The system does not power down until the
Specifies whether the system either allows the active last job is complete.
subsystem to end processing of active jobs in a con-
Note: If *NOLIMIT is specified and a batch job begins
trolled manner (which lets the application program
to loop, the system does not power down.
perform end processing) or the system ends the jobs
immediately. In either case, the system performs certain delay-time: Specify the maximum number of seconds in
job-cleanup functions. which a controlled end operation can be performed.
Valid values range from 1 through 99999 seconds.
*CNTRLD: The subsystem, within the time specified by
the DELAY parameter, ends all active jobs in a con- RESTART
trolled manner. During that time, programs running in Specifies whether the system ends and powers down, or
those jobs are allowed to perform job cleanup ends and then restarts in unattended mode.
(end-of-job processing) functions. If an active job could
*NO: The system ends and powers down.
begin to loop or send an inquiry message to QSYSOPR,
an appropriate time delay should be specified by using Element 1: Restart after power down
the DELAY parameter.

Chapter 2. OS/400 Command Descriptions P3-605


PWRDWNSYS

*YES: If the system is on utility power, it undergoes end Notes:


of system processing (but does not power down) and
then does an initial program load (IPL). If the system is 1. If the system is not running on Version 2, Release
on auxiliary power, it powers down and does an auto- 1.1 or a subsequent release, specifying the
matic IPL when utility power is restored (if the D-source will fail.
QPWRRSTIPL system value is set to '1'). When the 2. It is recommended that the user specify
system restarts or an automatic IPL occurs, the IPL pro- RESTART(*YES), otherwise, the user cannot be
ceeds in an unattended mode. In unattended mode, dis- assured as to which source the system is actually
plays such as the IPL options prompt are not shown. starting. This precaution can save the user time.
More information is in the Work Management book.
*PANEL: The system is started from the source
Element 2: Restart type (A-source, B-source, or D-source) that is currently shown
Specifies the point from which the initial program load on the operator's display,
(IPL) restarts. Specifying *SYS rather than *FULL can A: The system is started from the A-source.
reduce the time required to restart the system.
B: The system is started from the B-source.
*IPLA: The value specified on the Change IPL Attri-
D: The system is started from the D-source, the install
butes (CHGIPLA) command is used. To determine the
media.
current setting for this value, use the Display IPL Attri-
butes (DSPIPLA) command. | ENDSBSOPT
*SYS: The operating system is restarted. The hardware | Specifies the options to take when ending the active
is restarted only if a PTF that requires a hardware restart | subsystems. In general, specifying these options will
is to be applied. | improve the performance of the PWRDWNSYS
| command. Each option has certain side effects that you
*FULL: All portions of the system, including the hard-
| need to analyze before using that option.
ware, are restarted.
| This parameter has no effect on jobs that are already in
IPLSRC | the ending status.
Specifies whether an initial program load (IPL) is started
| *DFT: The subsystems will end with no special ending
from the A-source, B-source, or D-source of the system.
| options.
This parameter allows the user to control which Licensed
Internal Code (LIC) storage source of the system to use | Ÿ Joblogs will be produced.
at IPL. Also, specifying the source of the system helps
| Ÿ The run priority will not change.
the user to determine the appropriate source in which to
send LIC during program temporary fixes (PTFs). | Ÿ The timeslice value will not change.
Source Considerations: | *NOJOBLOG: No joblogs will be created for jobs that
LIC has three storage areas, known as the A-source, the | are ended due to this command being invoked. This
B-source, and the D-source. The D-source is a tape | includes subsystem monitor jobs and all user jobs in the
device or CD-ROM. The A- and B-sources are part of | subsystem. This option can significantly reduce the
the system memory. Initially, the A- and B-sources are | amount of time necessary to complete the
identical, but when Licensed Internal Code fixes (PTFs) | PWRDWNSYS command. However, if a problem occurs
are applied temporarily (PTF), the temporary fixes are | in a job, there will be no joblog to record the problem,
stored only on the B-source. When these fixes become | which may make problem diagnosis difficult or impos-
permanent, they are copied from the B-source to the | sible.
A-source; therefore, the fixes reside on both the | NOTE: If OPTION(*IMMED) is specified, then no joblogs
A-source and B-source. | are produced during PWRDWNSYS regardless of the
The user who wants to send temporary fixes to the | ENDSBSOPT parameter. However, these joblogs will
B-source must start the system from the A-source, which | still be produced on the next IPL of the system unless
causes the fixes to be sent to the opposite source, or | the *NOJOBLOG option is specified. Therefore, if you
the B-source. | specify OPTION(*IMMED) ENDSBSOPT(*NOJOBLOG),
| the system will not power down more quickly, but the
A user that starts the system from the A-source is | subsequent IPL may be faster.
running the system from the permanent fixes. A user
that starts the system from the B-source is running the | *CHGPTY: The CPU priority of jobs that are ending is
system from a combination of temporary and permanent | changed to a higher value (worse priority). The
fixes. A user that starts the system from the D-source | remaining active jobs on the system may have better
uses the Licensed Internal Code loaded from the media. | performance when *CHGPTY is specified. However,
| jobs that are ending may take longer to finish. This
| option is ignored if the system is ending controlled. But
| if the DELAY time limit expires, this option will take
| affect immediately.

P3-606 OS/400 CL Reference - Part 2 (Full Version)


PWRDWNSYS

| *CHGTSL: The timeslice of jobs that are ending is controlled end is allowed one hour (3600 seconds) for com-
| changed to a lower value. The remaining active jobs on pletion before any remaining jobs are ended. This method of
| the system may have better performance when issuing the PWRDWNSYS command could be used to allow
| *CHGTSL is specified. However, jobs that are ending other higher priority jobs on job queue QBATCH (including
| may take longer to finish. This option is ignored if the those that are on the queue as a result of the Transfer Job
| system is ending controlled. But if the DELAY time limit (TFRJOB) command) to be completed before the
| expires, this option will take affect immediately. PWRDWNSYS command is run. There must be an active
subsystem for which the QBATCH job queue is a source of
| TIMOUTOPT work.
| Specifies the option to take when the system does not
| end within the time limit specified by the Example 3: Specifying a Controlled End With No Time
| QPWRDWNLMT system value. If this time limit is Limit
| exceeded, the subsequent IPL will be abnormal regard-
PWRDWNSYS OPTION(\CNTRLD) RESTART(\YES)
| less of the value specified for this parameter.
| *CONTINUE: The system will ignore the timeout condi- This command causes the system to perform a controlled
| tion and continue powering the system down. If end with no time limit. When all jobs in the system have
| RESTART(*YES) is specified, the system will restart completed, the system prepares for ending and starts an IPL.
| automatically. A minimum of information will be avail-
| able for service to debug the system. After PWRDWNSYS OPTION(*CNTRLD) is entered, and
before the delay time ends, this command can be overridden
| *MSD: The system will issue a main store dump which by entering PWRDWNSYS OPTION(*IMMED). In this case,
| can be used by service to debug the system. If the the values specified or defaulted for the RESTART param-
| main store dump manager is configured correctly, the eter on the second command also override the values speci-
| system will restart after the dump is finished. See the fied or defaulted for the first command.
| AS/400 Licensed Internal Code Diagnostic Aids –
| Volume 1, LY44-5900 book, for more information on Example 4: Changing the IPL Source After Immediate
| main store dump manager. End
| *SYSREFCDE: The system will display system reference PWRDWNSYS OPTION(\IMMED) RESTART(\YES) IPLSRC(A)
| code B900 3F10 and the system will stop. This will
| allow service to debug the system. This command causes the system to end immediately and
change the IPL source to A. When the system restarts, it
IPLs on the A source.
Examples Example 5: Allowing the operating system to determine
Example 1: Performing An Immediate End the restart point

PWRDWNSYS OPTION(\IMMED) PWRDWNSYS OPTION(\IMMED) RESTART((\YES \SYS))

This command causes the system to perform an immediate This command causes the IPL to restart at the point deter-
end without allowing any active jobs to perform cleanup rou- mined by the operating system.
tines. Once the system completes its end functions, it starts
| Example 6: Changing the time out option.
the power-down sequence.
| PWRDWNSYS OPTION(\IMMED) TIMOUTOPT(\MSD)
Example 2: Specifying a Controlled End
| This command causes the system to end immediately. If the
SBMJOB JOB(LASTJOB) JOBD(QBATCH) JOBPTY(9)
| QPWRDWNLMT system value is exceeded, the system will
JOBQ(QBATCH) RQSDTA('PWRDWNSYS \CNTRLD 36ðð')
| dump the main storage. If the main store dump manager is
This command submits a low priority batch job that, when | configured correctly, the system will restart. Otherwise, the
run, causes the system to perform a controlled end. The | B900 3F10 system reference code will be displayed and the
| system will halt.

Chapter 2. OS/400 Command Descriptions P3-607


QRYDOCLIB

QRYDOCLIB (Query Document Library) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──┬────────────────────────────────────────────────────────┬──────────5
55──QRYDOCLIB──┬──────────────────────────────────────┬───
│ ┌─\CURRENT──────────────┐ │ │ ┌─\NONE─────────────────────────────────┐ │
└─USRID(──┴─user-ID──user-address─┴──)─┘ │ │ ┌─\LIBL/────────┐ │ │
└─OUTFILE(──┴─┼───────────────┼──database-file-name─┴──)─┘
├─\CURLIB/──────┤
└─library-name/─┘
5──┬───────────────────────────────────────────┬──┬────────────────────────────────────────┬────────────────────────────────────5
│ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │ │ ┌─\DFT────────────────┐ │
└─OUTMBR(──┴─member-name─┴──┼──────────┼──)─┘ └─OUTDTATYP(──┼─\ALL────────────────┼──)─┘
└─\ADD─────┘ │ ┌──
──────────────┐ │
└──6─┬─\DOCD────┬─┴───
(1) ─┘
├─\DOCCLS──┤
├─\SUBJECT─┤
├─\EXPDATE─┤
├─\FILDATE─┤
├─\CHGDATE─┤
├─\USEDATE─┤
├─\CRTDATE─┤
├─\ACTDATE─┤
├─\CMPDATE─┤
├─\DOCDATE─┤
├─\AUTHOR──┤
├─\KWD─────┤
├─\CPYLST──┤
├─\REF─────┤
├─\STATUS──┤
├─\PROJECT─┤
├─\FILCAB──┤
├─\IDXDATE─┤
├─\REVDATE─┤
└─\IDP─────┘
5──┬──────────────────────────────────┬──┬─────────────────────────────┬──┬────────────────────────────┬────────────────────────5
│ ┌─\DFT───────────────┐ │ │ ┌─\BLANK────────┐ │ │ ┌─\NOMAX─────┐ │
└─DOCL(──┼─\NONE──────────────┼──)─┘ └─TEXT(──┴─'description'─┴──)─┘ └─TIMLMT(──┴─time-limit─┴──)─┘
└─document-list-name─┘
5──┬─────────────────────────────────┬──┬─────────────────────────────────┬──┬────────────────────────────┬─────────────────────5
│ ┌─\NOMAX──────────┐ │ │ ┌─\ALL───────────────┐ │ │ ┌─\NO──┐ │
└─SELLMT(──┴─selection-limit─┴──)─┘ └─FLR(──┼─\NONE──────────────┼──)─┘ └─SCHSUBFLR(──┴─\YES─┴───(3) ──)─┘
│ ┌──
─────────────┐ │
└──6─folder-name─┴───
(2) ─┘

5──┬──────────────────────────────────────────────────────────────────────────────────────────────────────┬─────────────────────5
│ ┌─\NONE────────────────────────────────────────────────────────────────────────────────┐ │
│ │ ┌──
──────────────────────────────────────────────────────────────────────┐ │ │
│ │ │ ┌─\AND─┐ │ │ │
6 (4) (5) (6) (7) (8)
└─QRYDFN(──┴─\IF(────(──┬─\DOCD────┬─────┬─\EQ─┬─────┬─\YES──────────┬─────┼──────┼─────)─┴─────)─┴──)─┘
├─\DOCCLS──┤ ├─\GT─┤ ├─\NO───────────┤ └─\OR──┘
├─\SUBJECT─┤ ├─\LT─┤ └─compare-value─┘
├─\DOCDATE─┤ ├─\NE─┤
├─\EXPDATE─┤ ├─\GE─┤
├─\FILDATE─┤ ├─\NL─┤
├─\CRTDATE─┤ ├─\LE─┤
├─\ACTDATE─┤ ├─\NG─┤
├─\CMPDATE─┤ ├─\CT─┤
├─\CHGDATE─┤ └─\BG─┘
├─\USEDATE─┤
├─\AUTHOR──┤
├─\KWD─────┤
├─\CPYLST──┤
├─\ALWRPL──┤
├─\OWNER───┤
├─\PROJECT─┤
├─\REF─────┤
├─\STATUS──┤
├─\DOCTYPE─┤
├─\IDXDATE─┤
├─\REVDATE─┤
└─\ASP─────┘

P3-608 OS/400 CL Reference - Part 2 (Full Version)


QRYDOCLIB

5──┬───────────────────────────────────────────────────────────────────────────────────────────────────┬────────────────────────5
│ ┌─\NONE─────────────────────────────────────────────────────────────────────────────┐ │
│ │ ┌──
────────────────────────────────────────────────────────────────┐ │ │
6
└─QRYTXT(──┴─\IF──(────'phrase'──┬──────────────────────────────────────────────────┬─┴──── (12) ──)─┴──)─┘
│ ┌─\ALL───┐ │
(9) ──┬───────────────────────────────┬─┘
└─┴─\EXACT─┴───
│ ┌─\NO──┐ ┌─\OR─────┐ │
(10) ──┼─────────┼────
└─┴─\YES─┴──── (11) ─┘
├─\AND────┤
└─\ANDNOT─┘
5──┬────────────────────────────────────────┬──┬─────────────────────────────────────────────────────────┬──────────────────────5
│ ┌─\JOB────────────────┐ │ │ ┌─\NONE────────────────────────────────────┐ │
└─TXTLANGID(──┴─language-identifier─┴──)─┘ │ │ ┌──
──────────────────────────────────┐ │ │
│ │ │ ┌─\ASCEND──┐ │ │ │
6 (13)
└─ORDER(──┴───(──┬─\DOCD────┬──┼──────────┼──)─┴─────┴──)─┘
├─\DOCCLS──┤ └─\DESCEND─┘
├─\SUBJECT─┤
├─\EXPDATE─┤
├─\FILDATE─┤
├─\CRTDATE─┤
├─\ACTDATE─┤
├─\CMPDATE─┤
├─\CHGDATE─┤
├─\USEDATE─┤
├─\DOCDATE─┤
├─\DOCTYPE─┤
├─\IDXDATE─┤
├─\REVDATE─┤
├─\KWD─────┤
├─\AUTHOR──┤
├─\CPYLST──┤
├─\OWNER───┤
├─\REF─────┤
├─\STATUS──┤
├─\PROJECT─┤
└─\ASP─────┘
5──┬────────────────────────────────────────────────────┬──────────────────────────────────────────────────────────────────────5%
│ ┌─\SYSVAL──────────────────────────┐ │
└─CMDCHRID(──┼─\DEVD────────────────────────────┼──)─┘
└─graphic-character-set──code-page─┘
Notes:
P All parameters preceding this point can be specified in positional form.

1 A maximum of 20 repetitions

2 A maximum of 100 repetitions

3 If SCHSUBFLR(*YES) is specified, FLR(*ALL) and FLR(*NONE) are not valid and only one user-specified folder name can

be specified.
4 Profile parameter.

5 Relational operator.

6 Compare value.

7 Logical operator to group multiple conditions.

8 A maximum of 49 repetitions

9 Type of phrase value.

10 Allow synonyms value.

11 Logical operator to group multiple conditions.

12 A maximum of 30 repetitions

13 A maximum of 5 repetitions

Purpose When the QRYDOCLIB command is run, a document list


object is created. The document list object is created regard-
The Query Document Library (QRYDOCLIB) command less of whether an output file is produced unless the user
allows the user to search for documents within the document specifies *NONE for the DOCL parameter. This document
library to which the user is authorized and to copy informa- list object is used by the OfficeVision product as well as the
tion about the documents that satisfy the search request into SAVDLO command.
a database file for processing.
Restriction: The current user of this command must have
the authority to work on behalf of the specified user ID

Chapter 2. OS/400 Command Descriptions P3-609


QRYDOCLIB

address. To work on behalf of other users, the user must OUTMBR


have special permission granted with the Grant User Permis- Specifies the name of the database file member to which
sion (GRTUSRPMN) command. Several QRYDOCLIB com- the output is directed. If a member already exists, the
mands can run concurrently. If the document list name or system uses the second element of this parameter to
the output file is the same on more than one QRYDOCLIB determine whether the member is cleared before the
command, errors may occur. new records are added. If the member does not exist
and a member name is not specified, the system creates
Note: The format of the output file must be the same as
a member with the name of the output file specified on
OSIQDL of the system file, QSYS/QAOSIQDL.
the OUTFILE parameter. If an output file member name
is specified, but the member does not exist, the system
Optional Parameters creates it.
USRID Element 1: Member to Receive Output
Specifies the user ID and address of the user for whom *FIRST: The first member in the file receives the output.
this request is made. If OUTMBR(*FIRST) is specified and the member does
*CURRENT: The user profile that is currently running is not exist, the system creates a member with the name of
used. the file specified on the OUTFILE parameter. If the
member exists, the system adds records to the end of
Element 1: User ID
the member or clears the member and then adds the
user-ID: Specify the user ID of the user for whom the records.
documents are requested.
member-name: Specify the file member that receives
Element 2: User Address the output. If OUTMBR(member-name) is specified and
user-address: Specify the user address of the user for the member does not exist, the system creates it.
whom the documents are requested. Element 2: Operation to Perform on Member
OUTFILE *REPLACE: The system clears the existing member
Specifies the name of the database file to which the and adds the new records.
output is directed. If the output file does not exist, this *ADD: The system adds the new records to the end of
command creates a database file in the specified library. the existing records.
If the file is created by this function, the descriptive text
is OUTFILE created by QRYDOCLIB and the authority OUTDTATYP
for users without specific authority to the file is Specifies the type of information about the selected doc-
*EXCLUDE. uments that is written to the output file if one is specified
on the OUTFILE parameter.
*NONE: The output is not directed to a database file. A
message is returned to the user indicating the number of *DFT: A system-created name is used as the default
documents that satisfied the search request. More infor- name. The document information record is written to the
mation on defining the format of database files (output output file. Specifying OUTDTATYP(*DFT) is equivalent
files) is in the Office Services Concepts and to specifying OUTDTATYP(*DOCD). The following
Programmer’s Guide book. record is written to the output file:
The name of the database file can be qualified by one of Record Code Description
the following library values: 105 Document Description
*LIBL: All libraries in the job's library list are *ALL: All record formats about the document are written
searched until the first match is found. to the output file. These record formats include the fol-
*CURLIB: The current library for the job is lowing:
searched. If no library is specified as the current
Record Code Description
library for the job, the QGPL library is used.
105 Document Description
library-name: Specify the name of the library to be 110 Creation Date
searched. 115 Expiration date
120 Document date
database-file-name: Specify the qualified name of the 125 File date
database file that receives the output. This file can be
130 Last document change date
reused when other QRYDOCLIB commands are entered.
135 Action due date
Output from the file can start at the start of the file 140 Completion date
member or be added to the file, as specified in the 145 Author
OUTMBR parameter. The IBM-supplied database file, 150 Copy list
QSYS/QAOSIQDL, cannot be specified.

P3-610 OS/400 CL Reference - Part 2 (Full Version)


QRYDOCLIB

Record Code Description *IDP: The interchange document profile is written to the
155 Document class output file.
160 File cabinet reference
165 Subject DOCL
170 Keyword Specifies the name of the document list. A document
175 Reference list is an object that contains a pointer to each document
180 Status in the document library that the current user is author-
185 Project ized to request. This list is a copy of the library at the
190 Last indexed date time the search was run. As documents are deleted
195 Last content revision date from or added to the library, the document list is not
200 Last used date updated. The document library list name is specified
500 Interchange document profile data with the name of the user requesting the search. Users
can use identical document names. For example, Tom
*DOCD: The document description record is written to could name his list SALES and so could Mary. The
the output file. system knows the lists as TOM_SALES and
*DOCCLS: The document class record is written to the MARY_SALES.
output file. *DFT: A system-created name is used as the default
*SUBJECT: The subject records are written to the document list name. The default list is the same as the
output file. user ID entered in the USRID parameter (TOM_TOM or
MARY_MARY).
*EXPDATE: The expiration date record is written to the
output file. *NONE: No document list is created.

*FILDATE: The file date record is written to the output document-list-name: Specify the name of the document
file. list. Up to 8 characters can be used.

*CHGDATE: The date of the last change to the docu- TEXT


ment is written to the output file. Specifies the text that briefly describes the document list
object. More information on this parameter is in
*USEDATE: The date of the last usage of the document
Appendix A, “Expanded Parameter Descriptions.”
is written to the output file.
*BLANK: Text is not specified.
*CRTDATE: The create date record is written to the
output file. 'description': Specify no more than 50 characters of text,
enclosed in apostrophes.
*ACTDATE: The action due date record is written to the
output file. TIMLMT
*CMPDATE: The completion date record is written to Specifies the maximum run time (in minutes) the search
the output file. request can use.

*DOCDATE: The document date record is written to the *NOMAX: No time limit for the search is set. All quali-
output file. fied documents are searched.

*AUTHOR: The author records are written to the output time-limit: Specify the maximum time limit (in minutes)
file. that the search runs. Up to 4 digits, ranging from 1
through 9999, can be specified for the number of
*KWD: The keyword records are written to the output minutes. A two-hour limit is specified as TIMLMT(120).
file. If the search has not been completed when the time limit
*CPYLST: The copy list records are written to the is reached, the search ends with an informational
output file. message followed by a completion message. The
output file, and if specified the document list, will contain
*REF: The reference record is written to the output file.
the documents found within the specified time limit.
*STATUS: The status record is written to the output file.
SELLMT
*PROJECT: The project record is written to the output Specifies the number of documents to select in the
file. search.
*FILCAB: The file cabinet reference record is written to *NOMAX: No document limit for the search is set. All
the output file. qualified documents are selected.
*IDXDATE: The last indexed date record is written to selection-limit: Specify the maximum number of docu-
the output file. OfficeVision text search services must be ments to select. A value ranging from 1 through 32767
installed if this value is specified. can be specified. If there are more query requests than
*REVDATE: The date of the last revision to the docu- the set limit, the document list and the output file contain
ment content is written to the output file. the information about the selected documents up to this
limit. If there is at least one more document that meets

Chapter 2. OS/400 Command Descriptions P3-611


QRYDOCLIB

the query definition, an informational message is sent Value Description


before the completion message. *DOCD Document description
*DOCCLS Document class
FLR *SUBJECT Document subject
Specifies the folders that are searched to locate the doc- *DOCDATE Document date
uments that match the query definition specified in the *EXPDATE Expiration date
QRYDFN parameter. *FILDATE File date
*ALL: All of the folders on the system are searched to *CRTDATE Create date
locate the documents. *ACTDATE Action due date
*CMPDATE Completion date
*NONE: Documents not located in any folder are *CHGDATE Last document change date
searched. *USEDATE Last used date
folder-name: Specify the name of the folders to search *DOCTYPE Document type
to locate the documents. A folder name can consist of a *IDXDATE Last indexed date
*REVDATE Last content revision date
series of folder names (FLR1/FLR2/and so on) if the
*AUTHOR Document author
documents being searched for are located in a folder
contained in another folder. A maximum of 100 folders *KWD Keyword
*CPYLST Copy list
can be specified and each folder name can be a
*ALWRPL Allow document
maximum of 63 characters in length.
replacement
SCHSUBFLR *OWNER Document owner
Specifies whether subfolders of the folder specified on *PROJECT Document project
the FLR parameter are searched. *REF Reference
*STATUS Document status
*NO: Subfolders are not searched. *ASP Auxiliary storage pool ID
*YES: Subfolders of the specified folder are searched.
Element 2: Relational Operator
QRYDFN relational-operator: Specify the operator that indicates
Specifies whether a query definition is used to select the relationship that must exist between the profile
documents. The values specified on this parameter are parameter contents in the document and the value spec-
used to search the document library. If values other ified as the third part of this QRYDFN relation for the
than *NONE are specified on both the QRYDFN param- relation to be true. The operators that can be used are:
eter and QRYTXT parameter, only documents that
match both sets of values are selected. Value Description

*NONE: No query definition is used to select the docu- *EQ Equal


ments. All documents that are owned or accessible are *GT Greater than
*LT Less than
selected.
*NE Not equal
*IF: A query definition is used to select the documents. *GE Greater than or equal

To specify the conditions under which documents are *NL Not less than
selected, a set of values is specified for each condition. *LE Less than or equal
*NG Not greater than
Each set contains four values.
*CT Contains
1. The name of the document profile parameter to be *BG Begins
compared
The *CT operator performs a context search. It asks the
2. One of the relational operator values system to determine whether the character string speci-
3. The comparison value fied by this value is contained anywhere in the profile.
For example, a query request of (*IF ((*SUBJECT *CT
4. One of the logical operators, *AND or *OR 'Sales'))) would find a match for subjects that were:
Values 1 and 3 are compared for the relationship speci- '1985 Car Sales', 'Sales Awards', 'Salesperson Training
fied by value 2. Courses', 'Book of Sales Do's and Don'ts'.

Each QRYDFN relational set must be enclosed in paren- The *BG operator performs a search that compares the
theses. A maximum of 49 sets (conditions) can be specified value with the start of the profile parameter.
specified. The profile parameter is truncated or extended as neces-
sary to match the length of the specified value. It asks
Element 1: Profile Parameters the system to determine whether the character string
profile-parameter: Specify a value representing the specified by the value is contained at the start of the
profile parameters to be compared. profile parameter. For example, a query request of (*IF
((*SUBJECT *BG 'Sales'))) would find a match for sub-

P3-612 OS/400 CL Reference - Part 2 (Full Version)


QRYDOCLIB

jects of: 'Sales Awards', 'Salesperson Training Courses', system changes both the specified comparison value
and 'Sales by Phone'. and the original parameter value to upper case before
making a comparison. If the original document had
Some operators are excluded from being used with
been filed with a subject equal to 'Salesperson Training
some profile parameters. If the excluded operators are
Courses', any of the following would be a match:
specified in restricted profile parameters, the request is
rejected with a diagnostic message followed by an (\IF ((SUBJECT \EQ 'salesperson training
escape message. Two cases are invalid: courses')))
(\IF ((SUBJECT \EQ 'Salesperson Training
Ÿ The *ALWRPL (allow document replacement) is a Courses')))
YES/NO value. The *EQ operator is the only oper- (\IF ((SUBJECT \EQ 'SALESPERSON TRAINING
ator allowed to have *ALWRPL. COURSES')))
(\IF ((SUBJECT \CT 'PERSON')))
Ÿ The *CT and *BG operators are not allowed with the
(\IF ((SUBJECT \CT 'person')))
*ASP value or date values such as *CRTDATE and (\IF ((SUBJECT \BG 'SALES')))
*EXPDATE. (\IF ((SUBJECT \BG 'sales')))
Element 3: Compare Values Element 4: Logical Operator
compare-value: Specify the value to compare with the *AND: The profile parameter value relational groups on
contents of the specified profile parameter. The param- both sides of the *AND value must be satisfied before a
eter value is specified in apostrophes if it contains document is selected.
blanks or special characters.
*OR: If the parameter value relational group on either
The *ALWRPL field has two special values: *YES and side of the *OR value is satisfied, the document is
*NO. When these are specified with the *ALWRPL field, selected.
they are changed to internal values for the indicator.
The logical operators are used to group conditions. The
When specified for the text field, *YES and *NO retain
first AND operator encountered signifies that a condition
their original values.
group starts with the condition immediately preceding the
The *OWNER field is an 8-character user ID followed by AND operator. Subsequent conditions with the AND
its address. Trailing blanks cannot be omitted from the operator are added to the condition group. The first con-
user ID. For example, if the user ID is JMDOE and the dition encountered that contains the OR operator (when
address is SYSTEM1, the query request would be (*IF no more matrix entries exist) ends the condition group.
((*OWNER *EQ 'JMDOE SYSTEM1'))). If the user ID
For example:
is JIMSMITH, the query request would be (IF ((*OWNER
*EQ 'JIMSMITHSYSTEM1'))). QRYDFN(\IF
((COND1 \OR)
Dates must be specified in the system date format. (COND2 \AND) <----|
The allowable length for the search fields is limited by (COND3 \AND) |--Group 1
the Document Interchange Architecture (DIA) search (COND4 \AND) <----|
database. When the length of the value is greater than (COND5 \OR)
(COND6 \OR)
the maximum, the value is truncated to the allowed
(COND7 \AND) <----|
length. The maximum lengths are:
(COND8 \AND) |--Group 2
Value Maximum Length (COND9))) <----|
*DOCD 44 characters The previous example could be expressed:
*DOCCLS 16 characters (cond1) | (cond2 & cond3 & cond4 & cond5)
*SUBJECT 60 characters | cond6 | (cond7 & cond8 & cond9)
*AUTHOR 20 characters
*KWD 60 characters Because the AND operator is used to group conditions,
*CPYLST 60 characters the following logical expression cannot be used by the
*OWNER 16 characters QRYDFN parameter.
*REF 60 characters (cond1 | cond2) & (cond3 | cond4)
*STATUS 20 characters
*PROJECT 10 characters QRYDFN Examples
QRYDFN(\IF ((\ACTDATE \GE '6/1/89' \AND)
For all operators except *CT and *BG, if a value that is
(\AUTHOR \EQ 'JOHN HARKER' \OR)
shorter than the profile parameter value is specified, it is (\ACTDATE \GE '6/1/89' \AND)
padded on the right with blanks to match the length of (\PROJECT \EQ 'MGMT')))
the profile parameter.
All documents that have an action date later than or
The case (upper, lower, or mixed) of the letter charac- equal to 6/1/89 with author John Harker or project
ters used to enter the original parameter value or the MGMT are selected. This request is made up of two
case of the comparison value does not matter. The condition groups (AND sets). The first group requires

Chapter 2. OS/400 Command Descriptions P3-613


QRYDOCLIB

that the documents selected 1) must have an action date To specify the conditions under which documents are
of 6/1/89 or later and 2) must have John Harker as the selected, a set of values is specified for each condition.
author. The second group requires that the documents Each set contains four values:
selected 1) must have an action date of 6/1/89 or later
1. A phrase, which the system compares to entries in
and 2) must be part of project MGMT. If either of these
the text search index
condition groups is true, the document is selected.
QRYDFN (\IF ((\AUTHOR \EQ 'SUSAN MICKLE' \OR) 2. One of the type of phrase matching values
(\PROJECT \EQ 'BASEBALL' \AND) 3. One of the allow synonyms values
(\CMPDATE \GE '6/1/89')))
4. One of the logical operators
All documents that with the author of Susan Mickle or
that have a project of BASEBALL with a completion date A maximum of 30 sets of values can be specified. Each
on or after 6/1/89 are selected. set must be enclosed in parentheses.
FLR('RECORDS/SPORTS/BASEBALL/NATIONAL') Element 1: Phrase
QRYDFN(\IF ((\DOCD \CT 'giants' \AND) 'phrase': Specify a phrase of one or more words, which
(\FILDATE \GE '1/1/84' \AND)
the system compares to entries in the text search index.
(\FILDATE \LE '1ð/1/86')))
A maximum of 50 characters can be specified. When
If the word 'giants' is contained somewhere in the docu- specifying phrases:
ment description profile parameter, and if the document
file date is between 1/1/84 and 10/1/86, the document is Ÿ an asterisk (*) can be used to mask a whole word
selected. within a phrase. For example, when searching for
documents containing references to various annual
The NATIONAL folder is contained in the BASEBALL reports, the following phrase can be specified:
folder, which is in the SPORTS folder, which is con-
annual \ report
tained in the RECORDS folder.
QRYDFN(\IF ((\EXPDATE \LE '1/1/86'))) The search results will include documents con-
taining such phrases as annual budget report,
All documents accessible by the user doing the search annual progress report, and annual sales report.
where the expiration date is less than or equal to 1/1/86, The search results will also include documents con-
are selected. taining the phrase 'annual report' without a word in
QRYDFN(\IF ((\AUTHOR \EQ 'ANDERSON' \AND) between.
(\DOCCLS \EQ 'account 431-2' \AND)
When using a word mask, a word must be specified
(EXPDATE \LE '1/1/86')))
before and after the asterisk. A word mask at the
All documents accessible by the user doing the search, beginning or end of a phrase is ignored.
when all three conditions on the author, document class,
Ÿ an asterisk (*) can be used to mask part of a word
and expiration date profile parameters are met, are
within a phrase. The mask can be used at the
selected.
beginning, middle, or end of a word. For example,
QRYDFN(\IF ((\KWD \EQ 'alphabet soup' \OR) when searching for documents containing refer-
(\KWD \CT Campbells \OR) ences to word processing, the following phrase can
(\KWD \BG 'good for you'))) be specified:
All documents accessible by the user doing the search, word process\
when any one of the three keyword tests is satisfied, are
The search results will include documents con-
selected.
taining such phrases as word processing, word
QRYTXT processor, and word processed.
Specifies the text search values used to select docu- Ÿ a question mark (?) can be used to mask one or
ments. The values specified on this parameter are used more characters in a word. For example, when
to search the text search index. If values other than searching for documents containing references to
*NONE are specified on both the QRYDFN parameter the various spellings of Johnson, the following
and the QRYTXT parameter, only documents that match phrase can be specified:
both sets of values are selected.
j?hns?n
*NONE: No text search values are used to select the
documents. The search results will include documents con-
taining such phrases as Johnson, Johnsen, and
*IF: Text search values are used in the document Jahnson.
search.
Note: When *IF is specified, ordering is not allowed. Element 2: Type of Phrase
*NONE must be specified on the ORDER param-
eter.

P3-614 OS/400 CL Reference - Part 2 (Full Version)


QRYDOCLIB

*ALL: The phrase must be contained within one sen- *CRTDATE: The returned documents are ordered by
tence, but the words do not have to be in the specified the create date profile parameter.
order.
*ACTDATE: The returned documents are ordered by
*EXACT: The phrase must be contained within one the action due date profile parameter.
sentence and the words must be in the specified order.
*CMPDATE: The returned documents are ordered by
Element 3: Synonyms the completion date profile parameter.
*NO: No synonyms are used when searching for docu- *CHGDATE: The returned documents are ordered by
ments. the last document change date.
*YES: Synonyms for each word in the phrase, if avail- *USEDATE: The returned documents are ordered by
able, are used to compare entries in the text index. the last used date.
Note: Using synonyms may affect the performance of *DOCDATE: The returned documents are ordered by
the request by causing more words to be the document date profile parameter.
searched for and by possibly causing more docu-
*DOCTYPE: The returned documents are ordered by
ments to be selected.
the document type profile parameter. Valid values range
Element 4: Logical Operator from 2 through 65535.
*OR: If the phrase on either side of the *OR value is *IDXDATE: The returned documents are ordered by the
found, the document is selected. last indexed date profile parameter. Text search ser-
*AND: If the phrases on both sides of the *AND value vices must be installed if this value is specified.
are found, the document is selected. *REVDATE: The returned documents are ordered by
*ANDNOT: If the phrase following the *ANDNOT value the last content revision date.
is not found, the document is selected. *KWD: The returned documents are ordered by the
keyword profile parameter.
TXTLANGID
Specifies the language identifier of the document for *AUTHOR: The returned documents are ordered by the
which the user is searching. This parameter is not author profile parameter.
allowed if the QRYTXT parameter is not specified. *CPYLST: The returned documents are ordered by the
*JOB: The language identifier specified for the job in copy list profile parameter.
which this command is entered is used. *OWNER: The returned documents are ordered by the
language-identifier: Specify the language identifier. owner profile parameter.

ORDER *REF: The returned documents are ordered by the ref-


Specifies the order in which selected documents are erence profile parameter.
placed in the created document list object and the output *STATUS: The returned documents are ordered by the
file (if OUTFILE is specified). For example, if *SUBJECT status profile parameter.
is specified, the selected documents are returned in
*PROJECT: The returned documents are ordered by
order, based on the collating sequence of the document
the project profile parameter.
subject.
*ASP: The returned documents are ordered by the
When a user specifies an order to the search request,
auxiary storage pool ID (ASPID) parameter.
the performance of the request may be affected. The
request performs best if an order is not specified. Up to Element 2: Ascending or Descending Order
5 document profile parameters can be specified. *ASCEND: The returned documents are ordered in the
Element 1: Method of Order ascending collating sequence.

*NONE: No order is applied to the selected documents. *DESCEND: The returned documents are ordered in
the descending collating sequence.
*DOCD: The returned documents are ordered by the
document name profile parameter. CMDCHRID
Specifies the character identifier (graphic character set
*DOCCLS: The returned documents are ordered by the
and code page) for data being specified as parameter
document class profile parameter.
values on this command. This character identifier
*SUBJECT: The returned documents are ordered by (CHRID) is related to the display device used to specify
the subject profile parameter. the command. More information about CHRID pro-
*EXPDATE: The returned documents are ordered by cessing is in the Application Display Programming book.
the expiration date profile parameter. Note: The CMDCHRID parameter applies to the fol-
*FILDATE: The returned documents are ordered by the lowing parameters and means that the data is
file date profile parameter. translated to the code page and character set

Chapter 2. OS/400 Command Descriptions P3-615


QRYDOCLIB

that is common to all of the documents in the Element 1: Character Set


search database.
graphic-character-set: Specify the graphic character set
This value translates the DOCL, QRYDFN, values used to create the command parameter.
USRID, QRYTEXT, and TEXT parameters to
Element 2: Code Page
values for character set and code page of '697
500'. code-page: Specify the code page value used to create
the command parameters. Valid values range from 1
This value translates the USRID parameter to
through 999.
character set and code page of '930 500'. The
SNA Distribution Services book contains the
character set and code page table for '930 500'. Example
*SYSVAL: The system determines the graphic char- QRYDOCLIB USRID(\CURRENT) OUTFILE(\NONE)
acter set and code page values for the command param- QRYDFN(\IF ((\DOCD \EQ DOCDESC \AND)
eters from the QCHRID system values. (\DOCCLS \BG CLASS \OR) (\FILDATE \LE 'ð6/13/88')))
DOCL(MYLIST)
*DEVD: The system determines the graphic character
set and code page values for the command parameter This command searches for documents that meet the fol-
from the display device description where the command lowing search conditions: document description equals
is entered. This option is valid only when specified from DOCDESC and document class starts with Class; or the file
an interactive job. If this value is specified in an interac- date is on or before 06/13/88. The results of the search will
tive CL program or a batch job, an error message is be stored in the document list MYLIST.
sent.

P3-616 OS/400 CL Reference - Part 2 (Full Version)


QRYDST

QRYDST (Query Distribution) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──┬────────────────────────┬───────────────────5
55──QRYDST──┬──────────────────────────────────────┬──┬──────────────────────┬───
│ ┌─\CURRENT──────────────┐ │ │ ┌─\IN──┐ │ │ ┌─\NO──┐ │
└─USRID(──┼─\ALLAUT───────────────┼──)─┘ └─OPTION(──┴─\OUT─┴──)─┘ (1) ─┴─\YES─┴──)─┘
└─DLTSTS(───
└─user-ID──user-address─┘
5──┬────────────────────────────────────────────────────────┬──┬───────────────────────────────────────────┬────────────────────5
│ ┌─\NONE─────────────────────────────────┐ │ │ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │
│ │ ┌─\LIBL/────────┐ │ │ └─OUTMBR(──┴─member-name─┴──┼──────────┼──)─┘
└─OUTFILE(──┴─┼───────────────┼──database-file-name─┴──)─┘ └─\ADD─────┘
├─\CURLIB/──────┤
└─library-name/─┘
5──┬───────────────────────────┬──┬──────────────────────────────────────────────────────┬─────────────────────────────────────5%
│ ┌─\ALL──────┐ │ │ ┌─\SYSVAL──────────────────────────┐ │
(2) ─┼─\DEVD────────────────────────────┼──)─┘
└─STATUS(──┼─\NEW──────┼──)─┘ └─CMDCHRID(───
├─\OLD──────┤ └─graphic-character-set──code-page─┘
├─\OPENED───┤
├─\UNOPENED─┤
├─\LOCAL────┤
├─\REMOTE───┤
├─\FILEPND──┤
├─\DELETED──┤
└─\DAMAGED──┘
Notes:
P All parameters preceding this point can be specified in positional form.

1 DLTSTS does not apply to incoming distributions. When OPTION(*IN) is specified, the DLTSTS parameter is ignored.

2 This parameter value applies to the USRID parameter.

Purpose Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more
The Query Distribution (QRYDST) command allows a information about printing the help text, refer to
request for distribution information for the user or on behalf “Printing CL Command Descriptions” in Chapter 1.
of another user.

Restrictions: Optional Parameters


1. If the current user of this command requests distribution USRID
information for another user, the current user must have Specifies the user ID and address of the user making
been granted the authority to work on behalf of the other this request. The user specifying this command must
user by means of the Grant User Permission have authority to work on behalf of the user specified in
(GRTUSRPMN) command. this parameter if the named user ID and address differs
2. If USRID(*ALLAUT) is specified and the current user of from that of the current user.
this command does not have the authority to work on
*CURRENT: The user profile that is currently running is
behalf of the other user, only the information about the
used.
current user's distributions is returned.
3. DLTSTS does not apply to incoming distributions. When *ALLAUT: Distribution information is returned for users
OPTION(*IN) is specified, the DLTSTS parameter is who have given the current user of this command the
ignored. authority to work on their behalf.
4. The requester of the command (the user who is signed Element 1: User ID
on) must be enrolled in the system distribution directory.
5. Personal distribution cannot be questioned if the user-ID: Specify the user ID of the user for whom the
requester is working on behalf of another user. distribution information is returned.

Note: The formats of the output files must be OSLIN or Element 2: User Address
OSLOUT. These formats are defined in the physical user-address: Specify the user address of the user for
files QAOSILIN or QAOSILOT, respectively. These whom the distribution information is returned.
files are located in library QSYS. Users can specify
the Create Duplicate Object (CRTDUPOBJ) OPTION
command to create duplicates of these files for their Specifies the type of distribution information that is
libraries. If the user's library does not contain the returned.
files, the files are created when the command is run. *IN: Information about incoming distributions is returned.
If an output file is specified in the OUTFILE parameter,

Chapter 2. OS/400 Command Descriptions P3-617


QRYDST

one incoming distribution information record per distribu- database-file-name: Specify the qualified name of the
tion is written to the output file. database file that receives the output of the display.
*OUT: Information about outgoing distributions is OUTMBR
returned. If an output file is specified, N outgoing distri- Specifies the name of the database file member to which
bution information records per distribution are written to the output is directed. If a member already exists, the
the output file. N is the number of original receivers of system uses the second element of this parameter to
the distribution or the number of receivers that have dis- determine whether the member is cleared before the
tribution errors. new records are added. If the member does not exist
and a member name is not specified, the system creates
DLTSTS
a member with the name of the output file specified on
Specifies whether the status being kept for outgoing dis-
the OUTFILE parameter. If an output file member name
tributions is deleted from the system. This can be error
is specified, but the member does not exist, the system
or confirmation of delivery status.
creates it.
*NO: The distribution status is not deleted from the
Element 1: Member to Receive Output
system. The information is kept by the system and can
be returned by a request using the QRYDST command. *FIRST: The first member in the file receives the output.
If OUTMBR(*FIRST) is specified and the member does
*YES: The distribution status is deleted if all receivers
not exist, the system creates a member with the name of
are at returned status or completed confirmation of
the file specified on the OUTFILE parameter.
delivery status.
Note: Other products use this status information. Care
member-name: Specify the file member that receives
the output. If OUTMBR(member-name) is specified and
should be taken not to delete information used
the member does not exist, the system creates it.
by other products to track their distributions.
Element 2: Operation to Perform on Member
Status is deleted by the system if all receivers have
returned status or the status is returned to another *REPLACE: The system clears the existing member
product (such as the OfficeVision) for this user. and adds the new records.

OUTFILE *ADD: The system adds the new records to the end of
Specifies the qualified name of the database file to the existing records.
which the output of the command is directed. If the file
STATUS
does not exist, this command creates a database file in
Specifies the mail entry status of the distribution for
the specified library.
which the user is requesting information. This parameter
For incoming distributions, the system uses QAOSILIN in is valid only if *IN is specified on the OPTION parameter
QSYS with the format name of OSLIN as a model. and an output file is specified on the OUTFILE param-
eter.
For outgoing distributions, the system uses QAOSILOT
in QSYS with the format name of OSLOUT as a model. *ALL: Distribution information is returned regardless of
the distribution's mail entry status.
The authority for users with no specific authority to the
output file is *EXCLUDE. More information on defining *NEW: Distribution information is returned only for distri-
the format of database files (output file) is in the Office butions with a mail entry status of NEW.
Services Concepts and Programmer’s Guide book. *OLD: Distribution information is returned only for distri-
*NONE: The output is not directed to a database file. If butions with a mail entry status of OLD. A mail entry
*NONE is specified, the output from this command is a status of OLD indicates that the distribution has been
completion message containing the number of distribu- queried once but has not been processed.
tions on the DIA Distribution Recipient Index (*DRX) for
*OPENED: Distribution information is returned only for
the specified category and user.
distributions with a mail entry status of OPENED.
The name of the database file can be qualified by one of
*UNOPENED: Distribution information is returned for
the following library values:
distributions with a mail entry status of OLD or NEW.
*LIBL: All libraries in the job's library list are *LOCAL: Distribution information is returned only for
searched until the first match is found. distributions with a mail entry status of LOCAL. A mail
*CURLIB: The current library for the job is entry status of LOCAL indicates that the distribution has
searched. If no library is specified as the current been filed on the local system.
library for the job, the QGPL library is used. *REMOTE: Distribution information is returned only for
library-name: Specify the name of the library to be distributions with a mail entry status of REMOTE. A mail
searched. entry status of REMOTE indicates that the distribution
has been filed on a remote system.

P3-618 OS/400 CL Reference - Part 2 (Full Version)


QRYDST

*FILEPND: Distribution information is returned only for *SYSVAL: The system determines the graphic char-
distributions with a mail entry status of FILEPND. A mail acter set and code page values for the command param-
entry status of FILEPND indicates that the distribution is eters from the QCHRID system values.
being filed on a local or remote system but the filing has
*DEVD: The system determines the graphic character
not been completed.
set and code page values for the command parameter
*DELETED: Distribution information is returned only for from the display device description where the command
distributions with a mail entry status of DELETED. A is entered. This option is valid only when specified from
mail entry status of DELETED indicates that the docu- an interactive job. If this value is specified in an interac-
ment referred to by the distribution has been deleted. tive CL program or a batch job, an error message is
sent.
*DAMAGED: Distribution information is returned only for
distributions with a mail entry status of DAMAGED. A Element 1: Character Set
mail entry status of DAMAGED indicates that the docu-
graphic-character-set: Specify the graphic character set
ment referred to by the distribution is damaged.
values used to create the command parameter.
CMDCHRID Element 2: Code Page
Specifies the character identifier (graphic character set
and code page) for data being specified as parameter
code-page: Specify the code page. Valid values range
from 1 through 9999.
values on this command. This character identifier
(CHRID) is related to the display device used to specify
the command. More information about CHRID pro- Example
cessing is in the Application Display Programming book.
QRYDST USER(\CURRENT) OPTION(\IN)
Note: This value translates the USRID parameter to the OUTFILE(\CURLIB/MYFILE) OUTMBR(\FIRST \ADD)
character set and code page set of '930 500'.
The SNA Distribution Services book contains the This command requests information about incoming distribu-
character set and code page table for '930 500'. tions for the current user of this command. The output is
directed to the database file MYFILE in the user's current
library and is added to the first member in that file.

Chapter 2. OS/400 Command Descriptions P3-619


QRYPRBSTS

QRYPRBSTS (Query Problem Status) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─┬────────────────────────────────────────────────────────────┬─────────────5
55──QRYPRBSTS──PRBID(──┬─problem-identifier─┬──)────
└─\PMR───────────────┘ │ ┌─\NETATR────────────┐ ┌─\NETATR────────────┐ │
└─ORIGIN(──┴─network-identifier─┴──┼────────────────────┼──)─┘
└─control-point-name─┘
5──┬───────────────────────────────────┬──┬──────────────────────────────────────────────┬──────────────────────────────────────5
│ ┌─service-identifier─┐ │ │ ┌─\IBMSRV───────────────────┐ │
(1) ────────────────┼──)─┘
└─SRVID(──┴────────────────────┴──)─┘ └─RMTCPNAME(──┼─\SELECT───
└─remote-control-point-name─┘
5──┬───────────────────────────────────────────────┬──┬──────────────────────────┬─────────────────────────────────────────────5%
│ ┌─\NETATR───────────────────┐ │ │ ┌─\YES─┐ │
(2) ─┴─remote-network-identifier─┴──)─┘ └─AUTOPRBCRT(──┴─\NO──┴──)─┘
└─RMTNETID(───
Notes:
P All parameters preceding this point can be specified in positional form.

1 The *SELECT parameter is not valid in batch mode.

2 This parameter is valid if remote control point name is used.

Purpose *NETATR: The LCLNETID value specified in the


system network attributes is used.
This command allows the retrieval of problem status informa-
control-point-name: Specify a control point name.
tion from *IBMSRV (RETAIN) or from another AS/400 system
that is enlisted as a service provider. SRVID
Specifies the service identifier for the problem log entry.
Restriction: This command is shipped with public This number is assigned when the problem is reported
*EXCLUDE authority and the QPGMR, QSYSOPR, QSRV, to IBM service support.
and QSRVBAS user profiles have private authorities to use
this command. service-identifier: Specify the service-assigned number
for the problem log entry.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more RMTCPNAME
information about printing the help text, refer to Specifies the destination of the service provider to whom
“Printing CL Command Descriptions” in Chapter 1. the service request is sent.
Element 1: Remote Control Point Name
Required Parameters *IBMSRV: The service request is sent to IBM service
support.
PRBID
Specifies the problem identifier of the problem log entry. *SELECT: A list of service providers is shown from
Problems with different system origins can have the which the user can select the destination the service
same identifier. This parameter can be used with the request is sent to.
ORIGIN parameter to select a single problem from a remote-control-point-name: Specify the name of the
particular system origin. control point that is the destination of the request.

RMTNETID
Optional Parameters Specifies the remote name of the service provider's
ORIGIN network.
Specifies the node of the system from which the problem *NETATR: The service provider is in the local network.
log entry originated. This parameter is used with the
remote-network-identifier: Specify the network name of
PRBID parameter to uniquely identify the problem.
the service provider to whom the request is sent.
Element 1: Network Identifier
AUTOPRBCRT
*NETATR: The LCLNETID value specified in the Specifies whether a problem should automatically be
system network attributes is used. created, if a problem does not exist on the system. This
network-identifier: Specify a network identifier. will be useful if the only thing the customer has is a
PMR number.
Element 2: Control Point Name
*YES: Create a problem.
*NO: Do not create a Problem.

P3-620 OS/400 CL Reference - Part 2 (Full Version)


QRYPRBSTS

Examples This command searches for the status of a specific problem


on another system (SYSTEM99).
Example 1: Querying Problem Status on Another
System Example 2: Querying IBM Service

QRYPRBSTS PRBID(123456789ð) RMTCPNAME(SYSTEM99) QRYPRBSTS PRBID(\PMR) RMTCPNAME(IBMSRV)


RMTNETID(IBMNETID) AUTOPRBCRT(\YES) RMTNETID(\NETATR) AUTOPRBCRT(\YES)

This command searches the IBM Service database for the


status of PMR 8X123.

Chapter 2. OS/400 Command Descriptions P3-621


QRYTIEF

QRYTIEF (Query Technical Information Exchange File) Command


Job: B Pgm: B REXX: B Exec

55──QRYTIEF────────────────────────────────────────────────────────────────────────────────────────────────────────────────────5%

Purpose There are no parameters for this command.

The Query Technical Information Exchange File (QRYTIEF)


command allows the user to determine whether any files are Example
available to be received from the remote support network. A QRYTIEF
message is returned that specifies the size (number of
records) of the largest file that is to be received. This command sends a message that specifies the number
of files to be received from the remote support network and
the size of the largest file to be received.

P3-622 OS/400 CL Reference - Part 2 (Full Version)


QSH

| QSH (Start QSH) Command


| QSH Command

| For the description of the QSH command, see the STRQSH (Start QSH) command description.

Chapter 2. OS/400 Command Descriptions P3-623


RCLACTGRP

RCLACTGRP (Reclaim Activation Group) Command


Job: B,I PGM: B,I

55──RCLACTGRP──ACTGRP(──┬─\ELIGIBLE─────────────┬──)──┬───────────────────────────┬────────────────────────────────────────────5%
└─activation-group-name─┘ │ ┌─\NORMAL───┐ │
└─OPTION(──┴─\ABNORMAL─┴──)─┘

Purpose tion on how the system performs the rollback operation under
commitment control.
The Reclaim Activation Group (RCLACTGRP) command
Note: To see the parameter and value descriptions for this
frees the resources associated with a specified activation
command, refer to the online help text. For more
group. This command can reclaim a specific activation group
information about printing the help text, refer to
or all eligible activation groups.
“Printing CL Command Descriptions” in Chapter 1.
An activation group is eligible to be reclaimed if it meets the
following criteria: Required Parameter
Ÿ The activation group is not the default activation group.
ACTGRP
The default activation group cannot be reclaimed. Specifies the activation group to be reclaimed.
Ÿ The activation group is not active. *ELIGIBLE: All eligible activation groups within the job
An activation group cannot be reclaimed if there are pro- are deleted.
grams or procedures running within the activation group. activation-group-name: Specify the activation group to
Ÿ The activation group is not one of the debug activation be reclaimed. The activation group can only be
groups. reclaimed if it has no active calls. If active calls exist, a
message is displayed informing the user that the request
When the job is in debug mode, the activation groups in failed. If the activation group is not found, a message is
use do not appear as active on the Call Stack or Display displayed informing the user that the request failed
Activation Group displays. When the job is no longer in because the activation group was not found.
debug mode, the activation groups used can be
reclaimed.
Optional Parameter
Ÿ The activation group is not a shared activation group.
A shared activation group cannot be reclaimed because OPTION
is may be in use by another job. Specifies whether to commit or roll back pending
changes for an activation group level commitment defi-
When an activation group is reclaimed, all resources within nition, and whether a normal or abnormal close notifica-
the scope of the activation group are reclaimed. Resources tion is sent to the attached host system when mixed,
within the scope of the activation group include static storage communications, BSC, and ICF files are closed. This
for programs in the activation group, open files, user inter- parameter is ignored for all other files and objects within
face manager (UIM) application resources, Common Pro- the scope of the activation group.
gramming Interface (CPI) Communications conversations, *NORMAL: The changes pending for an activation
hierarchical file systems (HFS) resources, open FM sessions, group level commitment definition are committed (if there
and pending changes for the commitment definition. are no errors when closing files using the commitment
definition), and a normal close notification is sent to the
A close option can be specified on this command, and is
attached host system when mixed, communications,
used when closing mixed, communications, binary synchro-
BSC, and ICF files are closed.
nous (BSC), and ICF files. If an activation group level com-
mitment definition has been started for the activation group, *ABNORMAL: The changes pending for an activation
and it has pending committable changes, the close option group level commitment definition are rolled back and an
also indicates whether the system implicitly commits or rolls abnormal close notification is sent to the attached host
back the pending changes before ending the commitment system when mixed, communications, BSC, and ICF
definition. When specifying a close option of *NORMAL, and files are closed.
there are no errors when closing files using the activation
group level commitment definition, a commit is performed. Example
Otherwise, a rollback is performed. See the Backup and
Recovery and the Backup and Recovery books for informa- RCLACTGRP ACTGRP(MYGROUP)

This command reclaims the activation group MYGROUP.

P3-624 OS/400 CL Reference - Part 2 (Full Version)


RCLDDMCNV

RCLDDMCNV (Reclaim Distributed Data Management Conversations) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──RCLDDMCNV──────────────────────────────────────────────────────────────────────────────────────────────────────────────────5%

Purpose taken down. A conversation is taken down only if there are


no active users for that conversation.
The Reclaim Distributed Data Management Conversations
(RCLDDMCNV) command reclaims all distributed data man- There are no parameters for this command.
agement (DDM) source system conversations that are not
currently being used by a source job, even if the DDMCNV
Example
attribute value for the job is *KEEP. The command allows
the user to reclaim unused DDM conversations without RCLDDMCNV
closing all open files or doing any of the other functions per-
This command checks all DDM conversations for the job in
formed by the RCLRSC command. The RCLDDMCNV
which the command is entered, determines if there are any
command applies only to the DDM conversations for the job
users of each conversation, and reclaims each one not being
on the source system in which the command is entered.
used.
Although this command applies to all DDM conversations
used by a job, using it does not mean that all of them are

Chapter 2. OS/400 Command Descriptions P3-625


RCLDLO

| RCLDLO (Reclaim Document Library Object) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─┬─────────────────────────────────────┬───────────────────────────────5
55──RCLDLO──DLO(──┬─\FLR─────────────────────────┬──)────
├─\SYSOBJNAM───────────────────┤ │ ┌─\NONE───────┐ │
├─\INT─────────────────────────┤ ├─FLR(──┴─folder-name─┴──)────────────┤
| ├─\DOCDTL──────────────────────┤ (1) ─system-object-name──)─┘
└─SYSOBJNAM(───
├─\ALL─────────────────────────┤
└─document-library-object-name─┘
5──┬────────────────────────────┬──┬─────────────────────────┬──┬────────────────────────────────────────────────────────┬──────5
│ ┌─\NONE───┐ │ │ ┌─\ANY───────┐ │ │ ┌─\NONE─────────────────────────────────┐ │
└─SYSOBJATR(──┼─\INTDOC─┼──)─┘ └─ASP(──┴─ASP-number─┴──)─┘ │ │ ┌─\LIBL/────────┐ │ │
└─\DST────┘ └─OUTFILE(──┴─┼───────────────┼──database-file-name─┴──)─┘
├─\CURLIB/──────┤
└─library-name/─┘
5──┬───────────────────────────────────────────┬───────────────────────────────────────────────────────────────────────────────5%
│ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │
└─OUTMBR(──┴─member-name─┴──┼──────────┼──)─┘
└─\ADD─────┘
Notes:
P All parameters preceding this point can be specified in positional form.

1 The SYSOBJNAM parameter is valid only when DLO(*SYSOBJNAM) is specified.

Purpose that reclaim internal system objects because they


obtain locks on internal system objects. All jobs
The Reclaim Document Library Object (RCLDLO) command running in the QSNADS subsystem and AS/400
is used to reclaim: PC/Support jobs should be ended before attempting
Ÿ A document. to reclaim internal system objects.
Ÿ A folder. Note: To see the parameter and value descriptions for this
Ÿ A folder and all documents and folders directly or indi- command, refer to the online help text. For more
rectly contained within it. information about printing the help text, refer to
Ÿ Internal document library system objects. “Printing CL Command Descriptions” in Chapter 1.
Ÿ Internal document library system objects, unfiled distribu-
tion documents, and all filed folders and documents on
the system. Related document details are synchronized. Required Parameter
Ÿ Internal document library system objects and all filed DLO
folders and documents in one auxiliary storage pool Specifies the document library object to reclaim.
(ASP). Related document details are synchronized.
*FLR: A folder, and all folders and documents directly
Restrictions: or indirectly within it, are to be reclaimed.
1. The user does not need authority to a document or *SYSOBJNAM: A system object name is used to iden-
folder to reclaim it. tify the folder or document to reclaim.
2. Exclusive use of the document or folder is required while DLO(*SYSOBJNAM) must be specified when reclaiming
it is being reclaimed. a folderless document, an internal document, or a distri-
3. The user does not need to be enrolled in the system dis- bution document. It can also be specified instead of a
tribution directory. folder or document name if the system object name is
4. Reclaiming internal document library system objects, all known.
document library objects, or all document library objects *INT: Internal document library system objects are to be
in one ASP can be done only when no other jobs are reclaimed.
using folders or documents. The user of this command
may receive an error message indicating that internal Note: The internal document library system objects are
objects are locked. This means that another user is used to manage the documents and folders on
using document library functions which cannot run at the the AS/400 system. RCLDLO DLO(*INT) is only
same time as the RCLDLO command. Try this necessary if the internal objects become
command again after other document library activity has damaged. If the internal objects are damaged,
ended. attempts to access documents and folders will
result in the message CPF8A46 (Internal system
Note: AS/400 PC/Support jobs and several jobs which run objects are damaged), possibly followed by the
in the QSNADS subsystem work with documents and message CPF9032 (Document interchange
folders. These jobs can prevent RCLDLO options session not started),

P3-626 OS/400 CL Reference - Part 2 (Full Version)


RCLDLO

| *DOCDTL: Internal document library system objects eter only if *ALL or *DOCDTL is specified on the DLO
| and document details are to be reclaimed. parameter.
| DLO(*DOCDTL) synchronizes the relationships between
*ANY: The objects to be reclaimed reside in any ASP.
| all document library objects and their document details
When *ALL is specified on the DLO parameter, all docu-
| and will fix inconsistencies between them.
ment library objects on the system are reclaimed.
| Note: The RCLDLO DLO(*DOCDTL) command can be
ASP-ID: Only document library objects that reside in the
| a long-running function, performing a subset of
specified ASP are to be reclaimed. All document library
| the RCLDLO DLO(*ALL) processing necessary to
objects in other ASPs are ignored. Valid values range
| guarantee consistency between internal system
from 1 through 16 and must designate an existing ASP
| objects, document details, and DLOs.
that contains document library objects. ASP 1 is the
*ALL: All documents and folders (as specified on the system ASP.
ASP parameter) are reclaimed in addition to
Note: Unfiled distribution documents are classified as
DLO(*DOCDTL) processing.
document library objects in the system ASP.
Note: The RCLDLO DLO(*ALL) command can be a
OUTFILE
long-running function, depending on the number
Specifies the name of the database file to which special
of documents and folders on the system. If the
output is directed. If the output file does not exist, this
RCLDLO command can be issued at the user's
command creates a database file in the specified library.
discretion, the user may wish to avoid the opera-
If the file is created by this function, the descriptive text
tion until the time required can be scheduled.
is "OUTFILE created by RCLDLO" and the authority for
document-library-object-name: Specify the name of the users without specific authority to the file is *EXCLUDE.
folder or document to reclaim. A value other than *NONE can be specified on this
parameter only if *ALL or *DOCDTL is specified on the
DLO parameter.
Optional Parameters The output directed to this file includes the names of any
FLR documents that are physically damaged (and therefore
Specifies the name of the folder that contains the docu- unusable) or documents or folders that were missing
ment. from the system (and for which the document details
have been removed). This file is intended to provide the
Note: A folder name is entered in this parameter only if
user with a record of what was lost (such as a user
*FLR, or a folder or document name is entered in
ASP) when recovering from hardware failure.
the DLO parameter.
*NONE: No output is directed to a database file.
*NONE: The folder or document is not within a folder.
The name of the database file can be qualified by one of
folder-name: Specify the name of the folder that con-
the following library values:
tains the document or folder to reclaim, or the name of
the folder to reclaim along with all documents and *LIBL: All libraries in the job's library list are
folders within it. searched until the first match is found.
SYSOBJNAM *CURLIB: The current library for the job is
Specifies the system object name. This parameter is searched. If no library is specified as the current
valid only when DLO(*SYSOBJNAM) or library for the job, the QGPL library is used.
DOCL(*SYSOBJNAM) is specified. A full ten characters library-name: Specify the name of the library to be
must be specified. searched.
SYSOBJATR database-file-name: Specify the qualified name of the
Specifies the attributes of the object to reclaim. A value database file that is to receive the output. This file can
other than *NONE can be entered in this parameter only be reused when other RCLDLO commands are issued.
if *SYSOBJNAM is entered in the DLO parameter. Output is added to the file as specified on the OUTMBR
*NONE: The object to reclaim is a filed document or parameter. The IBM-supplied database file,
folder. QSYS/QARCLDLO, cannot be specified.
*INTDOC: The object to reclaim is an internal docu- OUTMBR
ment. Specifies the name of the database file member to which
*DST: The object to reclaim is a distribution document. the output is directed. If a member already exists, the
system uses the second element of this parameter to
ASP determine whether the member is cleared before the
Specifies the identifier (ID) of the auxiliary storage pool new records are added. If the member does not exist
(ASP) of the document library object to be reclaimed. A and a member name is not specified, the system creates
value other than *ANY can be specified on this param- a member with the name of the output file specified on

Chapter 2. OS/400 Command Descriptions P3-627


RCLDLO

the OUTFILE parameter. If an output file member name This command reclaims internal document library system
is specified, but the member does not exist, the system objects.
creates it.
Example 7: Reclaiming Document Library System
Element 1: Member to Receive Output Objects and Document Details
*FIRST: The first member in the file receives the output. RCLDLO DLO(\DOCDTL)
If OUTMBR(*FIRST) is specified and the member does
not exist, the system creates a member with the name of This command reclaims internal document library system
the file specified on the OUTFILE parameter. If the objects and document details for all folders and documents.
member exists, the system adds records to the end of
the member or clears the member and then adds the Example 8: Reclaiming Document Library System
records. Objects and All Documents and Folders
member-name: Specify the file member that receives RCLDLO DLO(\ALL)
the output. If OUTMBR(member-name) is specified and
This command reclaims internal document library system
the member does not exist, the system creates it.
objects and all documents and folders and synchronizes their
Element 2: Operation to Perform on Member document details.
*REPLACE: The system clears the existing member
| Example 9: Reclaiming Document Library System
and adds the new records.
| Objects and All Documents and Folders in an ASP
*ADD: The system adds the new records to the end of
| RCLDLO DLO(\ALL) ASP(2)
the existing records.
| This command reclaims internal document library system
Examples | objects and all documents and folders residing in ASP 2 and
| synchronizes their document details.
Example 1: Reclaiming a Folder
RCLDLO DLO(FLR1) Additional Considerations
This command reclaims folder FLR1. When RCLDLO DLO(*ALL) or DLO(*DOCDTL) is run, the fol-
lowing items indicate what happens for folders and docu-
Example 2: Reclaiming a Document Within a Folder
ments whose document details are updated.
RCLDLO DLO(A) FLR(FLR2)
Ÿ Objects that have lost folder path information are associ-
This command reclaims folder or document A in folder FLR2. ated with a system reclaim folder. An informational
message is sent to QSYSOPR message queue for each
Example 3: Reclaiming a Folder and All Documents and object reclaimed in this manner. System reclaim folders,
Folders Within It recognized by the name 'QRCLnnnn.DOC' or
RCLDLO DLO(\FLR) FLR(FLR3) 'QRCLnnnn.FLR,' should be deleted from the system
after moving the objects within them to an appropriate
This command reclaims folder FLR3 and all folders and doc- user folder. It may also be necessary to use the Edit
uments directly or indirectly contained within it. Document Library Object Authority (EDTDLOAUT)
command to grant specific authority to the reclaimed
Example 4: Reclaiming an Internal Document
objects again.
RCLDLO DLO(\SYSOBJNAM) SYSOBJNAM(AMBT133ð8ð)
Note: System reclaim folders are created in the ASP of
SYSOBJATR(\INTDOC)
the object or objects they are to contain.
This command reclaims the internal document specified by Ÿ A log of the actions taken by the RCLDLO DLO(*ALL) or
the system object name AMBT133080. DLO(*DOCDTL) command is sent to the joblog and a
listing of status messages is sent to the QHST system
Example 5: Reclaiming a Distribution Document
log. Additional information about the objects shown in
RCLDLO DLO(\SYSOBJNAM) SYSOBJNAM(AMBT133ð82) the log can be displayed by the Display Object
SYSOBJATR(\DST) Description (DSPOBJD) command.
Ÿ If the OUTFILE option is used on RCLDLO DLO(*ALL)
This command reclaims the distribution document specified or DLO(*DOCDTL), records for every document or folder
by the system object name AMBT133082. which was physically damaged (permanently unusable)
or destroyed are placed into the specified file. This pro-
Example 6: Reclaiming Document Library System
vides the system administrator with a list that can be
Objects
used to determine which documents and folders need to
RCLDLO DLO(\INT) be restored from backup media.

P3-628 OS/400 CL Reference - Part 2 (Full Version)


RCLLIB

RCLLIB (Reclaim Library) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──────────────────────────────────────────────────────────────────────────────────────────5%
55──RCLLIB──LIB(──library-name──)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose 3. This command can be used on any library other than


QTEMP.
The Reclaim Library (RCLLIB) command rebuilds the internal
Note: To see the parameter and value descriptions for this
objects of a library that contain the object descriptive infor-
command, refer to the online help text. For more
mation for all objects in the library and the library object
information about printing the help text, refer to
itself.
“Printing CL Command Descriptions” in Chapter 1.
This command rebuilds, where possible, internal objects of
the library that were damaged or destroyed. Required Parameters
Restrictions: LIB
1. The user must have *OBJEXIST and *USE authority to Specifies the name of the library being rebuilt.
the library being rebuilt. This is the same authority
required to delete a library with the DLTLIB command. Example
2. Only the internal objects of a library which contain the RCLLIB LIB(TESTLIB)
object descriptive information are rebuilt. No other
objects in the library are validated or rebuilt. This command determines if the object descriptive informa-
tion of library TESTLIB is damaged. The damaged parts of
the library are rebuilt.

Chapter 2. OS/400 Command Descriptions P3-629


RCLOPT

RCLOPT (Reclaim Optical) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──┬──────────────────────────────────┬────────────5
55──RCLOPT──MLB(──┬─\ALL──────────────────┬──)──┬─────────────────────────┬───
└─optical-media-library─┘ │ ┌─\SYNC───┐ │ │ ┌─\ALL──────────────┐ │
└─OPTION(──┼─\UPDATE─┼──)─┘ (1) ─┴─volume-identifier─┴──)─┘
└─VOL(───
└─\RESET──┘
5──┬─────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\YES─┐ │
(1) ─┴─\NO──┴──)─┘
└─DIR(───
Notes:
1 This parameter is valid only when OPTION(*UPDATE) is specified.

P All parameters preceding this point can be specified in positional form.

Purpose the internal device index. If a volume is not in the


optical volume index, both the volume and the directory
The Reclaim Optical (RCLOPT) command rebuilds the index entries are created.
optical index database or the internal library indexes after
*UPDATE: The optical volume index and the optical
they have been damaged or destroyed. These database
directory index are rebuilt with information read from the
files include the optical volume index (QAMOVAR) and the
optical cartridge. The optical directory index parameter
optical directory index (QAMOPVR) in library QUSRSYS.
default is set to *YES.
This command requires exclusive use of the directly attached
optical device. *RESET: The internal device index is rebuilt with infor-
mation read from the optical cartridge. The optical
Restriction: You must have *USE authority to use this volume index and the optical directory index are then
command. It is shipped with *EXCLUDE public authority. rebuilt from the internal device index.
Note: To see the parameter and value descriptions for this VOL
command, refer to the online help text. For more Specifies which volumes are used during the reclaim
information about printing the help text, refer to operation when OPTION(*UPDATE) is specified.
“Printing CL Command Descriptions” in Chapter 1.
*ALL: All volumes in the optical device are used.
volume-identifier: Specify the volume identifier of a spe-
Required Parameter cific volume to use during the reclaim operation.
MLB
DIR
Specifies the name of the directly attached optical device
Specifies whether the optical directory index
for which the optical indexes are rebuilt.
(QAMOPVR) is rebuilt when OPTION(*UPDATE) is
*ALL: The optical indexes for all directly attached specified.
optical devices are rebuilt.
*YES: The optical directory index is rebuilt.
optical-media-library: Specify the name of the directly
*NO: The optical directory index is not rebuilt.
attached optical device for which the optical indexes are
rebuilt.
Example
Optional Parameters RCLOPT MLB(OPTð1) OPTION(\UPDATE) VOL(VOLð1)

OPTION This command re-creates both the optical volume index and
Specifies which type of reclaim operation is performed. the optical directory index for the optical volume VOL01 in
the optical media library OPT01.
*SYNC: The optical volume index is synchronized with

P3-630 OS/400 CL Reference - Part 2 (Full Version)


RCLRSC

RCLRSC (Reclaim Resources) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──┬───────────────────────────┬─────────────────────────────────────────────────────────5%
55──RCLRSC──┬──────────────────────┬───
│ ┌─\───────┐ │ │ ┌─\NORMAL───┐ │
└─LVL(──┴─\CALLER─┴──)─┘ └─OPTION(──┴─\ABNORMAL─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose More information about how static storage is used is in the


CL Programming book and the publications that apply to the
The Reclaim Resources (RCLRSC) command is designed to high-level languages.
free the resources for programs or procedures that are no
longer active. The resources reclaimed by this command are Restriction: Do not specify LVL(*CALLER) on this
static storage, open files, user interface manager (UIM) appli- command if it is used in a CL program that also uses the
cation resources, Common Programming Interface (CPI) Send File (SNDF), Receive File (RCVF), or Send Receive
Communications conversations, hierarchical file systems File (SNDRCVF) commands. Specifying RCLRSC
(HFS) resources, and user-defined communications sessions. LVL(*CALLER) in such a program causes unpredictable
This command is normally used only in the controlling results when the SNDF, RCVF, or SNDRCVF commands are
program of the application. used after the program runs.

The resources that can be reclaimed are those within the Unpredictable results may also occur if the RCLRSC
scope of the program activation. Only programs or proce- command is issued from a command line with the
dures in the default activation group are affected. If a LVL(*CALLER) parameter.
program or procedure is no longer active and has run in the Note: To see the parameter and value descriptions for this
default activation group, the resources are reclaimed. No command, refer to the online help text. For more
other activation groups are affected. information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1.
When a program ends abnormally, this command can be
used to reclaim resources with the close option
*ABNORMAL. This close option is used when closing mixed, Optional Parameters
communications, binary synchronous (BSC), and intersys-
tems communications function (ICF) files. LVL
Specifies the reference level at which resources are
The storage and other resources used by the opened files freed.
can then be used by other programs running on the system. *: The reference level is the program or procedure that
contains this RCLRSC command. The resources are
The RCLRSC command is not needed to reclaim the
reclaimed for programs or procedures that have finished
resources of all CL programs that end (return) normally, for
running and returned control to this program.
RPG programs that have the last record (LR) indicator set
on, or for COBOL programs. This is true because, on a *CALLER: The reference level is the program or proce-
normal return for all these types, the storage is freed and the dure that called the program or procedure containing this
files are closed automatically. RCLRSC command. This value allows controlling pro-
grams or procedures written in a high-level language to
However, the RCLRSC command should not be used if it call a CL program to reclaim resources to the level of
might be processed while any COBOL program is still active the controlling program or procedure. The effect is the
in the application; instead, the COBOL CANCEL statement same as if the command were issued from the control-
should be used to reclaim the resources. That is, instead of ling program or procedure.
using the RCLRSC command following a COBOL program
Note: Using the *CALLER value can cause unexpected
that might end abnormally, the user should, in the COBOL
results when running the RCLRSC command
program, use a CANCEL statement that can be processed
from a command line or from within a program
when an abnormal condition occurs in that program.
that works with open files.
The RCLRSC command does not close files that were OPTION
opened with the Open Database File (OPNDBF) or the Open Specifies whether a normal or abnormal close notifica-
Query File (OPNQRYF) commands specifying tion is sent to the attached host system when mixed,
TYPE(*PERM). communications, BSC, and ICF files are closed. This
parameter is ignored for all other files and objects.

Chapter 2. OS/400 Command Descriptions P3-631


RCLRSC

*NORMAL: The attached host system is given a normal In this example, PROGA is a controlling program that is
close notification when mixed, communications, BSC, written in another high-level language. The RCLRSC
and ICF files are closed. command cannot be issued from the high-level language
program so PROGD, a CL program, is called to issue the
*ABNORMAL: The attached host system is given an
command. When the RCLRSC command is issued in
abnormal close notification when mixed, communica-
PROGD, the static storage used by PROGB and PROGC is
tions, BSC, and ICF files are closed. Use this when the
freed; files that were left open are closed.
controlling program detects error conditions that should
be communicated to the host systems (the error condi-
Example 2
tion need not be file-related).
PROGA ┌───────5PROGB
┌────────────┐ │ ┌────────────┐
Examples │ . │ │ │ . │
│ . │ │ │ . │
│CALL PROGB──┼─┘ │CALL PROGC──┼──┐
Example 1 │ . %────────┼────┐ │ . %────────┼──┼─┐
PROGA │RCLRSC │ └─────┤RETURN │ │ │
└────────────┘ └────────────┘ │ │
Ÿ │ │
Ÿ │ │
CALL PROGB PROGC%──────────┘ │
RCLRSC ┌─────────┐ │
│ . │ │
Ÿ │ . │ │
Ÿ │RETURN───┼───────┘
CALL PROGC └─────────┘
RCLRSC
Ÿ In this example, PROGA is a controlling program. When the
Ÿ RCLRSC command is issued, the static storage used by
Ÿ PROGB and PROGC is freed; files that were left open are
closed.
In this example, PROGA is a controlling program in an appli-
cation. PROGA calls other programs, which return control to Example 3
PROGA when they have finished running. Because control
is returned to the next sequential instruction, the RCLRSC PROGA PROGC
┌──────────────┐ ┌─────────────┐
command is issued following each CALL command to free │ . │ │ . │
the static storage that was used by the called program, and │ . │ │ . │
to close the files that were left open. │ CALL PROGB │ │ CALL PROGB │
│ │ │ │
│ TFRCTL PROGC │ │ RCLRSC │
Example 2 └──────────────┘ └─────────────┘

PROGA ┌──────PROGD
┌───────────┐ │ ┌─────────────────────┐
In this example, PROGA calls PROGB and, after returning
│ . │ │ │ RCLRSC LVL(\CALLER) │ from PROGB, PROGA transfers to program PROGC.
│ . │ │ ┌─┤ RETURN │ Because PROGB has already been called, static storage
│CALL PROGB │ │ │ └─────────────────────┘
│ . │ │ │
exists, and the call to PROGB from PROGC does not cause
│ . │ │ │ any new allocation for static storage; PROGC cannot reclaim
│CALL PROGC │ │ │ the static storage used by PROGB. If PROGB opened files
│ . │ │ │ when it was called by PROGA, these files would remain
│ . │ │ │
│CALL PROGD─┼─┘ │ open; if PROGB opened files when it was called by PROGC,
│ . %───────┼────┘ these files are closed.
└───────────┘
Example 3

P3-632 OS/400 CL Reference - Part 2 (Full Version)


RCLRSC

Default Activation Group This example shows how ILE procedures and activation
┌────────────────────────────┐
│ PROGA │ groups are affected by the RCLRSC command.
│ ┌────────────┐ │
│ │ CALL PROGB ├──┐ │ In this example, PROGA is a program running in the default
│ │ . │ │ │ Activation Group AG1 activation group. PROGA calls program PROGB which runs
│ │ . │ │ │ ┌──────────────────────┐
│ │ RCLRSC │%─┼────┐ │ │ │ in the default activation group. PROGB calls ILE procedure
│ └────────────┘ │ │ │ │ │ PROCC which runs in the default activation group. PROCC
│ │ │ │ ┌─────┼─5 PROCD │ calls ILE procedure PROCD which causes activation group
│ │ │ │ │ │ ┌────────────┐ │
│ │ │ │ │ │ │ . │ │ AG1 to be created. PROCD returns to PROCC. PROCC
│ PROGB %────┘ │ │ │ │ │ . │ │ returns to PROGB. PROGB returns to PROGA, which then
│ ┌────────────┐ │ │ │ │ │ . │ │ calls the RCLRSC command.
│ │ CALL PROCC ├───┐ │ │ │ ┌──┼────┤ RETURN │ │
│ │ . │ │ │ │ │ │ │ └────────────┘ │
│ │ . │%──┼─┐ │ │ │ │ │ │ PROGA calls the RCLRSC command. Any resources in use
│ │ RETURN ├───┼─┼─┘ │ │ │ │ │ by PROGA are still open, since PROGA is still in use. Any
│ └────────────┘ │ │ │ │ │ │ │ resources by program PROGB or procedure PROCC are
│ │ │ │ │ │ └──────────────────────┘
│ │ │ │ │ │ reclaimed, since the program and procedure ran in the
│ │ │ │ │ │ default activation group and are no longer active. Any
│ PROCC %─────┘ │ │ │ │ resources opened by procedure PROCD are left alone, since
│ ┌────────────┐ │ │ │ │
│ │ CALL PROCD │ │ │ │ │ procedure PROCD ran in activation group AG1 and only the
│ │ . ├─────┼────┼──┘ │ default activation group is affected by the RCLRSC
│ │ . │%────┼────┼─────┘ command.
│ │ RETURN ├─────┘ │
│ └────────────┘ │
└────────────────────────────┘ Any other use of the RCLRSC command can result in files
remaining open and storage remaining allocated.

Chapter 2. OS/400 Command Descriptions P3-633


RCLSPLSTG

RCLSPLSTG (Reclaim Spool Storage) Command


Job: B,I Pgm: B,I Exec

(P) ───────────────────────────────────────────────────────────────────5%
55──RCLSPLSTG──DAYS(──┬─\NONE───────────────────────┬──)────
└─days-to-keep-unused-storage─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose DAYS
Specifies that storage for spooled files that have not
The Reclaim Spool Storage (RCLSPLSTG) command been used for the number of days specified by the user
reclaims unused storage for spooled files that have not been is reclaimed.
used for more than the number of days specified by the user.
*NONE: All unused storage for spooled files is
Spooled files are stored with database file members on the
reclaimed. If there is no unused storage when subse-
system. When a spooled file is deleted, the member is
quent spooled files are created, then the system allo-
emptied but not deleted. Therefore, the member can be
cates storage for those spooled files. The allocation of
reused for the next spool file created. Reusing empty
storage for these spooled files may slow down the jobs
members improves the performance time when creating new
that are creating them. More information is in the Data
spooled files. The RCLSPLSTG command deletes unused
Management book.
and empty database members. This command uses syn-
chronous processing. More information about synchronous days-to-keep-unused-storage: Specify the number of
processing is in the Backup and Recovery book. days to keep unused storage for spooled files. Storage
that remains unused for more than the number of speci-
Restriction: This command is shipped with public fied days is reclaimed.
*EXCLUDE authority and the QPGMR, QSYSOPR, QSRV,
and QSRVBAS user profiles have private authorities to use
the command. Example
RCLSPLSTG DAYS(3ð)
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more This command reclaims all unused storage for spooled files
information about printing the help text, refer to that have remained unused for more than 30 days. When
“Printing CL Command Descriptions” in Chapter 1. storage has been unused for 1 second over 30 days it is
reclaimed because a date and time stamp is placed on the
Required Parameters storage area.

P3-634 OS/400 CL Reference - Part 2 (Full Version)


RCLSTG

RCLSTG (Reclaim Storage) Command


Job: I Pgm: I REXX: I Exec

(P)─┬─────────────────────────┬──┬───────────────────────┬───────────────────────────────────────────────────────────5%
55──RCLSTG───
│ ┌─\ALL────┐ │ │ ┌─\NONE───┐ │
└─SELECT(──┴─\DBXREF─┴──)─┘ └─OMIT(──┴─\DBXREF─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose 1. This command is shipped with public *EXCLUDE


authority and the QPGMR, QSYSOPR, QSRV, and
The Reclaim Storage (RCLSTG) command is used to QSRVBAS user profiles have private authorities to use
perform a general cleanup of auxiliary storage. Use of this the command.
command should be considered after an unexpected failure
2. All subsystems must be inactive before the RCLSTG
occurs (such as a power or equipment failure) to correct
command can be specified. The End System (ENDSYS)
abnormal conditions on permanent objects in auxiliary
or End Subsystem (ENDSBS) command with *ALL spec-
storage that may be affected by the failure.
ified on the SBS parameter can be used to make the
The command corrects, where possible, objects that were subsystems inactive. You must have job control
incompletely updated (such as database files, libraries, (*JOBCTL) authority to use the ENDSBS or ENDSYS
device descriptions, directories, and stream files) and user command.
profiles containing incorrectly recorded object ownership 3. Only permanent objects in auxiliary storage are
information. Unusable objects or fragments are deleted. reclaimed; temporary objects are reclaimed by running a
system initial program load (IPL).
This command reclaims all objects secured by an authori-
zation list that is damaged or destroyed and assigns the 4. Before running the RCLSTG command after an IPL, you
objects to the authorization list QRCLAUTL. may need to wait several minutes for the IPL to com-
plete. Use the Work with Active Jobs (WRKACTJOB)
Because the amount of time required to run this command command to verify that no jobs are running.
varies with the number of objects in auxiliary storage, the 5. This job must be in the controlling subsystem and must
system periodically sends messages to the work station be the only job active in the system.
where the command was specified.
Note: To see the parameter and value descriptions for this
The RCLSTG command can also be used to reclaim storage command, refer to the online help text. For more
when, during an IPL, not enough storage is available to information about printing the help text, refer to
make the system fully operational. In that case, the system “Printing CL Command Descriptions” in Chapter 1.
operator can specify the command immediately after
receiving the message about insufficient storage.
Optional Parameters
If very little additional auxiliary storage is available, the SELECT
system overhead required to run the RCLSTG command Specifies the reclaim functions that are performed.
may need more than the remaining storage; in that case, the
RCLSTG command fails. *ALL: All reclaim functions are performed.

Note: The RCLSTG command can be a long-running func- *DBXREF: The database cross-reference table reclaim
tion, depending on the number and type of objects in function is performed.
the system, the amount of damage to them, the OMIT
amount of auxiliary storage configured to the system, Specifies the reclaim functions to be omitted from the
and the percentage of that storage in use. If data- reclaim operation.
base file objects are damaged, the keyed access
paths may need to be rebuilt; that operation takes a *NONE: No reclaim functions are omitted.
substantial amount of time. If the RCLSTG command *DBXREF: The database cross-reference table reclaim
can be run at the user's discretion, the user may want function is omitted.
to avoid the operation until the required time can be
scheduled.
Examples
Restrictions:
Example 1: Reclaim Storage of the Entire System
RCLSTG

Chapter 2. OS/400 Command Descriptions P3-635


RCLSTG

This command, specified interactively, locates all system RCLSTG SELECT(\DBXREF)


objects created before the last initial program load (IPL).
Objects without owners are given default owners, and those This command reclaims the database cross-reference table.
that are lost from their specified libraries are inserted into the
Example 3: Reclaim Storage of the Entire System That
QRCL library or the default library, or are deleted.
Omits the Reclaim of the Database Cross-reference
Objects that are lost from their specified directories are Table
inserted into one of the following directories, depending on RCLSTG OMIT(\DBXREF)
where the object was originally located.
This command performs all reclaim storage functions but
Ÿ Lost objects that were originally located in the root file
omits the reclaim of the database cross-reference table.
system are inserted into the '/QReclaim' directory.
Ÿ Lost objects that were originally located in the
QOpenSys file system are inserted into the Additional Considerations
'/QOpenSys/QReclaim' directory.
The following statements indicate what happens to objects
Ÿ Lost objects that were originally in a user-defined file (including data) that are lost. A lost object can no longer be
system (UDFS) are inserted into the 'QReclaim' directory addressed by the user specifying commands because the
located in the root directory of the UDFS. In order to system cannot determine which library contains the object.
access these objects, the UDFS must be mounted over
Ÿ Objects that cannot be identified as being in any library
another directory.
are placed in the system's reclaim library (QRCL), which
For example, assume a lost object was originally located (when needed) is automatically created to contain the
in the /dev/QASP02/stories.udfs user-defined file system. lost objects. An information message is sent to the
After running RCLSTG, the object was relocated to the QSYSOPR message queue for each object inserted into
QReclaim directory associated with the UDFS. Using QRCL.
the ADDMFS command, the UDFS is mounted over a
Note: For user-created objects remaining in QRCL after
directory, say '/books'. The lost object that was
storage is reclaimed, the user must either move
reclaimed can be accessed using the pathname
them to the appropriate library or delete them. It
'/books/QReclaim/QRCLxxxxxxxx' where 'QRCLxxxxxxxx'
may also be necessary to use the Grant Object
is the name assigned to the lost object by RCLSTG.
Authority (GRTOBJAUT) command to grant spe-
Ÿ Lost objects that were originally located in a directory, cific authority to use the reclaimed objects again.
that cannot be inserted into the proper 'QReclaim' direc-
Ÿ Objects that cannot be identified as being in any direc-
tory based on its original location, are inserted into the
tory are inserted into one of the following directories,
root directory of a special file system within the Auxiliary
depending on where the object was originally located.
Storage Pool (ASP) in which the object resides. This
Refer to the Example section of this command for
special file system is created by RCLSTG when needed.
details.
It is named '/dev/QASPxx/QReclaimFS.udfs' where 'xx' is
the ASP number. In order to access these objects, this – /QReclaim
file system must be mounted over another directory – /QOpenSys/QReclaim
using the ADDMFS command. The lost object that was
reclaimed can be accessed using the pathname of that – /dev/QASPxx/name.udfs/QReclaim
directory. – /dev/QASPxx/QReclaimFS.udfs

Lost objects that are deleted are certain user objects and These directories are automatically created as needed
certain OS/400 system objects that are damaged and not by the RCLSTG command. An informational message is
usable. sent to the QSYSOPR message queue for each object
inserted in to one of these special reclaim storage direc-
The QRCL library, which is created (when needed) by the tories.
RCLSTG command, is a permanent library; but if it contains Note: For user-created objects remaining in QReclaim
no objects at the end of the operation because they were all directories after storage is reclaimed, the user
reclaimed, the library is deleted. must either move them to the appropriate direc-
tory, using the Move (MOV) command, or delete
The '/QReclaim' directories and
them, using the Remove Link (RVMLNK)
'/dev/QASPxx/QReclaimFS.udfs' user-defined file systems,
command. It may also be necessary to use the
which are created (when needed) by the RCLSTG command,
Change Authority (CHGAUT) command to grant
are permanent directories; but if they contain no objects at
specific authority to use the reclaimed objects
the end of the operation because there were no lost objects,
again.
the directories and UDFS are deleted.
In order to access the QReclaim directories that
Example 2: Reclaim Storage to Reclaim the Database are located in a user-defined file system, or to
Cross-reference Table

P3-636 OS/400 CL Reference - Part 2 (Full Version)


RCLSTG

access the objects in one of the butes, checkout status, create auditing value (for directo-
/dev/QASPxx/QReclaimFS.udfs file systems, that ries), and file CCSID may no longer be available, even
user-defined file system must be mounted over a though the objects themselves can be reclaimed.
directory using the ADDMFS command.
Ÿ User-created objects whose owners cannot be identified
Ÿ Recovered user space (*USRSPC), user index are assigned to the system default owner user profile
(*USRIDX), and user queue (*USRQ) user domain (QDFTOWN). After storage is reclaimed, the Change
objects are deleted when neither QRCL nor the special Object Owner (CHGOBJOWN) command is used to
value *ALL are specified on the system value transfer each object back to its original owner or to a
QALWUSRDMN (allow user domain objects in libraries). new owner. As an object is transferred to an owner, a
If these recovered user objects are system domain message, stating that the object has been transferred
objects, they are moved to QRCL. and giving the name of the owner to whom it is trans-
ferred, is sent to the QSYSOPR message queue.
Ÿ For lost objects that are placed in the QRCL library, if
more than one lost object has the same name and type, Ÿ Damaged database files for which data still exists are
a unique name is assigned to each of those objects, rebuilt as field-level files. These field-level files are iden-
except the first one, and its original name is retained in tified in the QRCL library in their text descriptions.
the object's text description.
Ÿ A log of the actions taken by the RCLSTG command
Ÿ For lost objects that are placed in one of the QReclaim (such as objects deleted or renamed, and ownerships
directories, a unique name is given to them. Their ori- transferred) is sent to the QSYSOPR message queue
ginal name is lost. and to the QHST system log. The message CPF8260 is
Ÿ For lost objects that are placed in the QRCL library, always sent to QHST. The logged objects in libraries
information such as save/restore history, programming are displayed by the Display Object Description
change status, and text descriptions, may no longer be (DSPOBJD) command for additional information about
retrievable, even though the objects themselves can be the damaged or repaired object. The logged objects in
reclaimed. directories are displayed by the Work with Object Links
(WRKLNK) command.
Ÿ For lost objects that are placed in one of the QReclaim
directories, information such as personal computer attri-

Chapter 2. OS/400 Command Descriptions P3-637


RCLTMPSTG

RCLTMPSTG (Reclaim Temporary Storage) Command


Job: B,I Pgm: B,I REXX: B,I

55──RCLTMPSTG──┬───────────────────────────┬──┬──────────────────────────────┬─────────────────────────────────────────────────5%
│ ┌─\ALL─────────┐ │ │ ┌─7──────────────┐ │
└─LIB(──┼─\LIBL────────┼──)─┘ └─DAYS(──┼─\NONE──────────┼──)─┘
├─\CURLIB──────┤ └─number-of-days─┘
├─\USRLIBL─────┤
├─\ALLUSR──────┤
└─library-name─┘

Purpose Optional Parameters


The Reclaim Temporary Storage (RCLTMPSTG) command LIB
removes the temporarily decompressed copies of panel Specifies the name of the library in which allocated
groups, menus, display files, and printer files, thereby freeing storage space for temporarily decompressed objects is
up system storage space. reclaimed.

Ÿ Compressed Objects are objects that consume less *ALL: All libraries in the system, including QSYS, are
storage space than decompressed objects. When a searched.
compressed object is used or a compressed program is *LIBL: All libraries in the job's library list are searched
called, a decompressed version of the object automat- until the first match is found.
ically becomes available to the user.
*CURLIB: The current library for the job is searched. If
Ÿ Decompressed Objects are objects that use the system no library is specified as the current library for the job,
storage space allocated to them and are in a final, the QGPL library is used.
ready-to-use state.
*USRLIBL: Only the libraries in the user portion of the
Ÿ Temporarily Decompressed Objects are temporarily job's library list are searched.
decompressed copies of compressed objects. The
system allocates storage space for the decompressed *ALLUSR: All user libraries are searched. All libraries
objects, which is consumed by the temporary copies with names that do not begin with the letter Q are
until the system or the user determines that the tempo- searched except for the following:
rary storage space needs to be reclaimed. #CGULIB #DFULIB #RPGLIB #SEULIB
#COBLIB #DSULIB #SDALIB
Temporary storage is automatically reclaimed when:
Although the following Qxxx libraries are provided by
– The RCLTMPSTG command is run
IBM, they typically contain user data that changes fre-
– The next initial program load (IPL) is run quently. Therefore, these libraries are considered user
– The object is used often enough to cause the libraries and are also searched:
system to permanently decompress it | QDSNX QPFRDATA QUSRBRM QUSRSYS
| QGPL QRCL QUSRIJS QUSRVxRxMx
When an object is permanently decompressed, the com- | QGPL38 QS36F QUSRINFSKR
pressed version of the object is destroyed as well as any | QMQMDATA QUSER38 QUSRNOTES
temporary forms of the object; however, compressed | QMQMPROC QUSRADSM QUSRRDARS
versions remain intact as long as the objects are tempo-
rarily decompressed. Note: A different library name, of the form
QUSRVxRxMx, can be created by the user for
Restrictions: each release that IBM supports. VxRxMx is the
version, release, and modification level of the
1. This command is shipped with public *EXCLUDE
library.
authority and the QPGMR, QSYSOPR, QSRV, and
QSRVBAS user profiles have private authorities to use library-name: Specify the name of the library to be
the command. searched.
2. The user must have object management authority to the DAYS
object specified and execute authority to the library. Specifies the number of days an object has not been
Note: To see the parameter and value descriptions for this used or changed. If a temporarily decompressed object
command, refer to the online help text. For more has not been used or changed for more than the speci-
information about printing the help text, refer to fied number of days, it is reclaimed. If it has been used
“Printing CL Command Descriptions” in Chapter 1. or changed, it is left temporarily decompressed.

P3-638 OS/400 CL Reference - Part 2 (Full Version)


RCLTMPSTG

7: Objects that have not been used or changed for temporary space allocated for it is reclaimed. Valid
more than seven days are reclaimed. values range from 1 through 366.
*NONE: The storage space allocated for a temporarily
decompressed object is reclaimed regardless of the Example
number of days it has not been used or changed, unless
RCLTMPSTG LIB(QGPL)
the object is in use when this command is run.
number-of-days: Specify the number of days a tempo- This command reclaims the space consumed by all of the
rarily decompressed object can be unused before the temporarily decompressed copies of objects in library QGPL
that have not been used or changed in the last 7 days.

Chapter 2. OS/400 Command Descriptions P3-639


RCVDST

RCVDST (Receive Distribution) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ───────────────────────5
55──RCVDST──DSTID(──'distribution-ID'──)──┬────────────────────────────┬──┬──────────────────────────┬───
│ ┌─\NONE─────────┐ │ │ ┌─\NONE───────┐ │
└─DOC(──┴─document-name─┴──)─┘ └─FLR(──┴─folder-name─┴──)─┘
5──┬────────────────────────────────────────────────────────┬──┬───────────────────────────────────────────┬────────────────────5
│ ┌─\NONE─────────────────────────────────┐ │ │ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │
│ │ ┌─\LIBL/────────┐ │ │ └─OUTMBR(──┴─member-name─┴──┼──────────┼──)─┘
└─OUTFILE(──┴─┼───────────────┼──database-file-name─┴──)─┘ └─\ADD─────┘
├─\CURLIB/──────┤
└─library-name/─┘
5──┬─────────────────────────────────────────┬──┬──────────────────────────────────────┬──┬──────────────────────┬──────────────5
│ ┌─\DFT─────────────────┐ │ │ ┌─\CURRENT──────────────┐ │ │ ┌─\YES─┐ │
└─OUTDTATYP(──┼─\ALL─────────────────┼──)─┘ └─USRID(──┴─user-ID──user-address─┴──)─┘ └─ACKRCV(──┴─\NO──┴──)─┘
│ ┌──
───────────────┐ │
└──6┬─\DSTINFO────┬┴───
(1) ─┘
├─\MSG────────┤
├─\DOCD───────┤
├─\DOCDATE────┤
├─\FILDATE────┤
├─\CRTDATE────┤
├─\REF────────┤
├─\CHGDATE────┤
├─\EXPDATE────┤
├─\ACTDATE────┤
├─\CMPDATE────┤
├─\SUBJECT────┤
├─\FILCAB─────┤
├─\STATUS─────┤
├─\AUTHOR─────┤
├─\DOCCLS─────┤
├─\KWD────────┤
├─\CPYLST─────┤
├─\AUTUSR─────┤
├─\DSTEXPDATE─┤
├─\RPYDATE────┤
├─\IDP────────┤
├─\DOC────────┤
└─\PROJECT────┘
5──┬─────────────────────────────────────────────┬──┬────────────────────┬──────────────────────────────────────────────────────5
│ ┌─\NONE─────────────────────┐ │ │ ┌─\NO──┐ │
└─DSTIDEXN(──┴─distribution-ID-extension─┴──)─┘ └─KEEP(──┴─\YES─┴──)─┘
5──┬──────────────────────────────────────────────────────┬────────────────────────────────────────────────────────────────────5%
│ ┌─\SYSVAL──────────────────────────┐ │
(2) ─┼─\DEVD────────────────────────────┼──)─┘
└─CMDCHRID(───
└─graphic-character-set──code-page─┘
Notes:
P All parameters preceding this point can be specified in positional form.

1 A maximum of 24 repetitions

2 This parameter applies to the DSTID and USRID parameters.

Purpose 3. Private distributions cannot be received if the requester


is working on behalf of another user.
The Receive Distribution command allows a user to receive
Note: To see the parameter and value descriptions for this
incoming distributions, such as documents. The documents
command, refer to the online help text. For more
can be placed in folders, in document objects, or in an output
information about printing the help text, refer to
file for processing.
“Printing CL Command Descriptions” in Chapter 1.
Restrictions:
1. Users cannot receive distributions on behalf of another Required Parameters
user unless they have been granted permission to work
DSTID
on behalf of that user with the Grant User Permission
Specifies the unique identifier of the distribution. The
(GRTUSRPMN) command.
identifier is assigned to the distribution by the system
2. The user ID and address must be entered in the system
that creates it. Only incoming distributions can be
directory.

P3-640 OS/400 CL Reference - Part 2 (Full Version)


RCVDST

received. If the identifier represents an outgoing distri- (output files) is in the Office Services Concepts and
bution, an error message is returned to the user. Programmer’s Guide book.
The distribution identifier consists of the sender's *NONE: The output is not directed to a database file.
address (padded on the right with blanks up to 8 charac-
The name of the database file can be qualified by one of
ters), the sender's user ID (padded on the right with
the following library values:
blanks up to 8 characters), and a 4-digit zoned
sequence number with leading zeros, for example, *LIBL: All libraries in the job's library list are
'NEWYORK␣SMITH␣␣␣ð2ð4' searched until the first match is found.

or *CURLIB: The current library for the job is


searched. If no library is specified as the current
MARYLANDMIKEJONEðð99
library for the job, the QGPL library is used.
Apostrophes are needed if there are blanks or special
library-name: Specify the name of the library to be
characters in the distribution identifier. The distribution
searched.
identifier is specified this way because blank characters
are valid in a user ID or address. database-file-name: Specify the name of the database
Note: If DSTID is the only parameter for which a value file that receives the output.
is specified, the distribution specified is deleted OUTMBR
from the incoming mail log and confirmation of Specifies the name of the database file member to which
delivery is sent back to the sender, even if the output is directed. If a member already exists, the
ACKRCV(*NO) is specified. system uses the second element of this parameter to
determine whether the member is cleared before the
new records are added. If the member does not exist
Optional Parameters and a member name is not specified, the system creates
a member with the name of the output file specified on
DOC
the OUTFILE parameter. If an output file member name
Specifies the document object name under which a dis-
is specified, but the member does not exist, the system
tribution is filed when it is received. The document
creates it.
object name that is specified must not exist on the
system. Element 1: Member to Receive Output
*NONE: The distribution being received is not filed *FIRST: The first member in the file receives the output.
under a document object name. If OUTMBR(*FIRST) is specified and the member does
not exist, the system creates a member with the name of
document-name: Specify the name of the document
the file specified on the OUTFILE parameter. If the
object name under which the distribution is filed.
member already exists, there is the option to add new
FLR records to the end of the existing member, or to clear
Specifies the name of the folder that contains the docu- the member and then add the new records.
ment. member-name: Specify the file member that receives
Note: The folder must exist and the current user of this the output. If OUTMBR(member-name) is specified and
command must have authority to create new the member does not exist, the system creates it.
documents in the folder. Element 2: Operation to Perform on Member
*NONE: The distribution being received is not placed in *REPLACE: The system clears the existing member
a document object. Specify this value if the distributed and adds the new records.
document is received directly into a database file for pro-
cessing. *ADD: The system adds the new records to the end of
the existing records.
folder-name: Specify the name of the folder to contain
the document object name. A folder name can consist OUTDTATYP
of a series of folder names if the document receiving the Specifies which distribution data is written to the data-
distribution is located in a folder contained in another base file.
folder. Up to 63 characters can be specified. *DFT: The following record codes are written to the
OUTFILE output file:
Specifies the name of the database file to which the Record Code Description
output is directed. If the output file does not exist, this
010 Distribution Description
command creates a database file in the specified library.
020 Message Text
If the file is created by this function, the text will read 105 Document Description
"Outfile for RCVDST." The authority for users with no 800 Document Data
specific authority to use the outfile is *EXCLUDE. More
information on defining the format of database files *ALL: All record formats are written to the output file.

Chapter 2. OS/400 Command Descriptions P3-641


RCVDST

Record Code Description *KWD: The keyword records are written to the output
010 Distribution Description file.
020 Message Text
*CPYLST: The copy list records are written to the
105 Document Description
output file.
110 Creation Date
115 Expiration date *AUTUSR: The authorizing Userid and Address is
120 Document date written to the output file.
125 File date
130 Change date *DSTEXPDATE: The distribution expiration date and
135 Action due date time is written to the output file.
140 Completion date
*RPYDATE: The reply requested date and time is
145 Author
150 Copy list written to the output file.
155 Document class *IDP: The complete document record (base sub-profile,
160 File cabinet reference application subprofile, and any private sub-profiles) is
165 Subject
written to the output file.
170 Keyword
175 Reference *DOC: The document data records are written to the
180 Status output file.
185 Project
190 Authorizing Userid and Address *PROJECT: The project record is written to the output
195 Distribution expiration date and time file.
200 Reply requested date and time
500 Interchange document profile data USRID
800 Document Data Specifies the user ID and address of the user for whom
the distribution is received. The current user of this
*DSTINFO: The distribution description record is written command must have the authority to work on behalf of
to the output file. the specified user ID and address.
*MSG: The message text record is written to the output *CURRENT: The user profile that is currently running is
file. used.
*DOCD: The document description record is written to Element 1: User ID
the output file.
user-ID: Specify the user ID of the user for whom the
*DOCDATE: The document date record is written to the distribution is received.
output file.
Element 2: User Address
*FILDATE: The file date record is written to the output
user-address: Specify the user address of the user for
file.
whom the distribution is received.
*CRTDATE: The create date record is written to the
output file. ACKRCV
Specifies whether the acknowledgment for confirmation
*REF: The reference record is written to the output file. of delivery is sent back to the sender of the distribution.
*CHGDATE: The change date record is written to the *YES: The confirmation of delivery is sent back to the
output file. sender.
*EXPDATE: The expiration date record is written to the *NO: The confirmation of delivery is not sent back to
output file. the sender.
*ACTDATE: The action due date record is written to the
DSTIDEXN
output file.
Specifies the extension of the distribution identifier speci-
*CMPDATE: The completion date record is written to fied on the DSTID parameter. This extension uniquely
the output file. identifies duplicate distributions. This extension is a
*SUBJECT: The subject records are written to the 2-digit extension that ranges from 01 through 99. For
output file. example, if the distribution ID is NEWYORK SMITH
0204 and two copies of this distribution were sent to a
*FILCAB: The filing cabinet reference record is written user, then the user has 2 distributions with the same dis-
to the output file. tribution ID. To distinguish the two distributions, an
*STATUS: The status record is written to the output file. extension is added to each distribution ID and one
extension is NEWYORK SMITH 020401 and the other
*AUTHOR: The author records are written to the output
one is NEWYORK SMITH 020402. If there are no dupli-
file.
cates, the extension defaults to 01. These extensions
*DOCCLS: The document class record is written to the map one to one with the distribution ID specified on the
output file. DSTID parameter.

P3-642 OS/400 CL Reference - Part 2 (Full Version)


RCVDST

*NONE: There is no duplicate distribution. This is *DEVD: The system determines the graphic character
equivalent to an extension of 01. set and code page values for the command parameter
from the display device description where the command
distribution-ID-extension: Specify the extension associ-
is entered. This option is valid only when specified from
ated with the distribution. This is used to uniquely iden-
an interactive job. If this value is specified in an interac-
tify duplicate distribution IDs.
tive CL program or a batch job, an error message is
KEEP sent.
Specifies whether this distribution is either deleted from,
Element 1: Character Set
or kept in, the mail log.
graphic-character-set: Specify the graphic character set
*NO: When all the information requested has been
values used to create the command parameter.
written to the output file or document object name, the
distribution is removed from the user's incoming mail. Element 2: Code Page

*YES: When all the information requested has been code-page: Specify the code page. Valid values range
written to the output file or document object name, the from 1 through 9999.
distribution is not removed from the user's incoming mail.
The incoming distribution is available for another Examples
RCVDST request or for processing by another DIA inter-
face, such as OfficeVision. Example 1: Receiving Current User Distribution
CMDCHRID RCVDST DISTID('SYSTEM1 USERA ððð1')
Specifies the character identifier (graphic character set OUTFILE(MYLIB/MYFILE)
and code page) for data being specified as parameter OUTMBR(MYMBR \ADD) OUTDTATYP(\ALL) CMDCHRID(\DEVD)
values on this command. This character identifier
This command receives the current user distribution into
(CHRID) is related to the display device used to specify
output file MYFILE located in library MYLIB. The distribution
the command. More information about CHRID pro-
is added to member MYMBR. All output file information is
cessing is in the Application Display Programming book.
added to the output file MYFILE.
Note: This value translates the DSTID and USRID
parameters to the character set and code page Example 2: Receiving Distribution Sent to a User
of '930 500'. The SNA Distribution Services RCVDST DSTID('BAKER␣RCH38P␣ðð19') DSTINDEXN(ð1)
book contains the character set and code page OUTFILE(JOWLIB/DOCUMENTS) USRID(\CURRENT)
table for '930 500'.
This command receives a distribution that was sent to a
*SYSVAL: The system determines the graphic char-
user. It is copied into the first member in a database file
acter set and code page values for the command param-
called DOCUMENTS in a library called JOWLIB.
eters from the QCHRID system values.

Chapter 2. OS/400 Command Descriptions P3-643


RCVF

RCVF (Receive File) Command


Pgm: B,I

55──RCVF──┬──────────────────────────┬──┬──────────────────────────────────────┬───(P) ──┬────────────────────┬────────────────────5%
│ ┌─\FILE───────┐ │ │ ┌─\FILE──────────────┐ │ │ ┌─\YES─┐ │
(1) ─┴─record-format-name─┴──)─┘
└─DEV(──┴─device-name─┴──)─┘ └─RCDFMT(─── └─WAIT(──┴─\NO──┴──)─┘
Notes:
1 A CL variable cannot be coded on this parameter.

P All parameters preceding this point can be specified in positional form.

Purpose parameter may be specified only if the file is a display


device file.
The Receive File (RCVF) command is used within a CL
*FILE: The user's data is received from the device
program to receive data from a display device or database
associated with the device file (the device file that was
file. The command reads a record from the file and puts the
declared in the FILE parameter of the DCLF command).
data from the record into one or more CL variables. These
If more than one device name is specified in the device
CL variables were automatically declared in the program
file, *FILE cannot be specified.
when the CL source program was compiled and a Declare
File (DCLF) command was processed as part of the source. device-name: Specify the name of the device or the
There is one CL variable for each field in the record format name of the CL variable that contains the name of the
used to receive the data. The data that is entered by a user device from which the user's data is being received.
at the display or is contained in the input record is copied
RCDFMT
into CL variables in the program by the RCVF command,
Specifies the name of the record format that is used to
where it is processed by the program.
receive data from the file. The format contains all the
Only one record format, of those specified in the DCLF fields in the record. This parameter must be coded with
command, can be specified in each RCVF command. If the a record format name if there is more than one record
file has not been opened by a previous RCVF, SNDRCVF, or format in the device file. If the file is a database file, the
SNDF command, it is opened by this command. If the file specified record format is used to map the data from the
has been previously closed due to an end-of-file condition on record into the CL variables. The actual record format
a previous RCVF command, an error occurs. The file speci- name in the file at run time may be different. RCVF
fied in this command can be overridden if the override ignores the INVITE DDS keyword.
command is entered before the file is opened. If the file *FILE: There is only one record format in the device
specified in the DCLF command was a display file when the file; that is the format in which the data is being
program was compiled, the file may only be overridden to received. If more than one record format is specified in
another display file. If the file was a database file, the file the device file, *FILE cannot be specified.
may only be overridden to another database file that has a
record-format-name: Specify the name of the record
single record format. However, care should be taken that the
format in which the data records from the display device
fields in the overriding record format correspond to the CL
are being received. A CL variable cannot be used to
variables declared in the program.
specify the record format name.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more WAIT
information about printing the help text, refer to Specifies whether the CL program waits for the data
“Printing CL Command Descriptions” in Chapter 1. being received from the user's device or continues pro-
cessing the commands that follow this RCVF command.
If WAIT(*NO) is specified, the program must issue a
Optional Parameters WAIT command later in the program to complete the
input operation. This parameter may be specified only if
DEV
the file is a display device file.
Specifies the name of the display device from which
data is being received. If a CL variable name is used in *YES: The program waits until the input operation from
this parameter, only one RCVF command is needed in the device is completed; the next command is not pro-
the program to receive data from several devices. (The cessed until then.
variable specifying the device name can be changed *NO: The program does not wait for the input data;
while repeatedly running the same command.) This commands continue running until a WAIT command is
reached later in the program.

P3-644 OS/400 CL Reference - Part 2 (Full Version)


RCVF

Examples The CL program receives a record sequentially from the


database file named INPUT. The program monitors for the
Example 1 end-of-file exception CPF0864 and goes to label EOF when
DCLF FILE(MENU1) the message is received.
Ÿ
Example 4
Ÿ
Ÿ DCLF FILE(MSCREEN) RCDFMT(MIN1 MIN2 MIN3)
RCVF Ÿ
Ÿ
The CL program receives data from the user through the file Ÿ
named MENU1. The program waits for the user data before RCVF DEV(&DNAME) RCDFMT(MIN2) WAIT(\NO)
it continues processing. WAIT DEV(&DNAME)

Example 2 The CL program receives user data from several devices one
at a time by way of the device file named MSCREEN. The
DCLF FILE(SCREENX) RCDFMT(R1 R2)
Ÿ program receives data from the device named in the variable
RCVF DEV(DISPLAY2) RCDFMT(R1) &DNAME using the record format MIN2, but it does not wait
for the data to come in. The same RCVF command is used
The CL program receives data from the user at the display to receive data from several devices; because the CL vari-
station named DISPLAY2. The data is received in the record able &DNAME is used, only the device name in the DEV
format named R1 in the device file named SCREENX. The parameter must be changed each time the command is run.
program waits for the user data before it continues pro- A WAIT command for each device must be issued later in
cessing. the program because the WAIT command actually receives
the data. Both the RCVF and the WAIT commands may be
Example 3 processed for each device (one at a time) to send data to the
DCLF FILE(INPUT) program. If a user response is delayed, the commands can
Ÿ be processed as many times as necessary until the user
RCVF responds with the data or a End Receive (ENDRCV)
MONMSG CPFð864 EXEC(GOTO EOF) command cancels the request.

Chapter 2. OS/400 Command Descriptions P3-645


RCVJRNE

| RCVJRNE (Receive Journal Entry) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐ ┌─\LIBL/────────┐
55──RCVJRNE──JRN(──┼───────────────┼──journal-name──)──EXITPGM(──┼───────────────┼──program-name──)───────────────────────────────────────────────5
├─\CURLIB/──────┤ ├─\CURLIB/──────┤
└─library-name/─┘ └─library-name/─┘
5──┬───────────────────────────────────────────────────────────────────────────────────────┬──────────────────────────────────────────────────────5
│ ┌─\ALLFILE────────────────────────────────────────────────────────────────┐ │
│ │ ┌──
──────────────────────────────────────────────────────────────────┐ │ │
│ │ │ ┌─\LIBL/────────┐ ┌─\FIRST──────┐ │ │ │
6 (1) (2)
└─FILE(──┴───(──┼───────────────┼──┬─\ALL───────────────┬──┼─────────────┼──)─┴────┴──)─┘
├─\CURLIB/──────┤ └─physical-file-name─┘ ├─\ALL────────┤
└─library-name/─┘ └─member-name─┘
(P) ──────────────────────────────────5
5──┬────────────────────────────────────────────────────────────────────────────────────────────────────────┬───
│ ┌─\CURRENT───────────────────────────────────────────────────────────────────────────────┐ │
└─RCVRNG(──┼─\CURCHAIN──────────────────────────────────────────────────────────────────────────────┼──)─┘
│ ┌─\CURRENT────────────────────────────────┐ │
│ ┌─\LIBL/────────┐ │ ┌─\LIBL/────────┐ │ │
└─┼───────────────┼──start-journal-receiver──┴─┼───────────────┼──end-journal-receiver─┴─┘
├─\CURLIB/──────┤ ├─\CURLIB/──────┤
└─library-name/─┘ └─library-name/─┘
5──┬────────────────────────────────────────────────┬──┬──────────────────────────────────────────┬──┬───────────────────────┬────────────────────5
│ ┌─\FIRST───────────────────┐ │ │ (3) ──────────────┐
┌─\NONE──── │ │ ┌─\ALL──┐ │
├─FROMENT(──┴─starting-sequence-number─┴──)──────┤ ├─TOENT(──┼─\LAST──────────────────┼──)────┤ └─NBRENT(──┴─value─┴──)─┘
└─FROMTIME(──starting-date──┬───────────────┬──)─┘ │ └─ending-sequence-number─┘ │
└─starting-time─┘ └─TOTIME(──ending-date──┬─────────────┬──)─┘
└─ending-time─┘
5──┬────────────────────────────────────────────────────────┬──┬───────────────────────────────────┬──────────────────────────────────────────────5
│ ┌─\ALL───────────────────────────────────┐ │ │ ┌─\ALL──────────────┐ │
└─JRNCDE(──┼─\CTL───────────────────────────────────┼──)─┘ └─ENTTYP(──┼─\RCD──────────────┼──)─┘
│ ┌──
─────────────────────────────────┐ │ │ ┌──
────────────┐ │
│ │ ┌─\ALLSLT───────┐ │ │ └──6─entry-type─┴───
(6) ─┘
└──6─journal-code──┴─\IGNFILSLT────
(4) ┴─┴───
(5) ─┘

5──┬────────────────────────────────────────────────────────┬──┬───────────────────────────┬──┬───────────────────────────┬───────────────────────5
│ ┌─\ALL──────────────────────────────────────┐ │ │ ┌─\ALL─────────┐ │ │ ┌─\ALL──────┐ │
└─JOB(──┼─\─────────────────────────────────────────┼──)─┘ └─PGM(──┴─program-name─┴──)─┘ └─USRPRF(──┴─user-name─┴──)─┘
└─┬─────────────────────────────┬──job-name─┘
└─┬─────────────┬──user-name/─┘
└─job-number/─┘
5──┬───────────────────────────────────────────┬──┬───────────────────────┬──┬─────────────────────────────────────────────┬──────────────────────5
│ ┌─\ALL────────────────────┐ │ │ ┌─\ALL──┐ │ │ ┌─3ð────────────────────────┐ │
(7) ─┼─seconds───────────────────┼──)─┘
└─CMTCYCID(──┴─commit-cycle-identifier─┴──)─┘ └─DEPENT(──┴─\NONE─┴──)─┘ └─DELAY(────
(10)
└─\NEXTENT──────┬─\CLS────┬─┘
└─seconds─┘
5──┬────────────────────────┬──┬──────────────────────────────────────────────────────┬──┬───────────────────────────────┬───────────────────────5%
| │ ┌─\TYPE1─┐ │ │ ┌─\ENTFMT───────────────────────┐ │ │ ┌─\CONFIRMED─┐ │
| (8) ─┼─field-length──────────────────┼──)─┘ └─INCENT(────
└─ENTFMT(──┼─\TYPE2─┼──)─┘ └─NULLINDLEN(──── (9) ─┴─\ALL─────
(10) ──┴──)─┘
├─\TYPE3─┤ └─\VARLEN──maximum-field-length─┘
└─\TYPE4─┘

Notes:
1 If *ALL is specified instead of physical-file-name, the format must be library-name/*ALL.

2 A maximum of 300 repetitions.

3 TOENT(*NONE) is valid only if the RCVRNG parameter specifies a receiver that is currently attached when starting to

receive journal entries.


| 4 This value is not valid for journal code D, F or R.

| 5 A maximum of 12 repetitions

6 A maximum of 50 repetitions.

7 This parameter is valid only when TOENT(*NONE) is specified, and the last receiver specified on the RCVRNG parameter

identifies the receiver that is currently attached when starting to receive journal entries.
8 The NULLINDLEN parameter can be specified only if ENTFMT(*TYPE3) or ENTFMT(*TYPE4) is specified.

| 9 This parameter is only valid for a remote journal.

| 10 INCENT(*ALL) and DELAY(*NEXTENT) cannot be specified at the same time.

P All parameters preceding this point can be specified in positional form.

P3-646 OS/400 CL Reference - Part 2 (Full Version)


RCVJRNE

Purpose *CURLIB: The current library for the job is


searched. If no library is specified as the current
The Receive Journal Entry (RCVJRNE) command allows a library for the job, the QGPL library is used.
specified user exit program to continuously receive journal library-name: Specify the name of the library to be
entries. This program can be set up, for example, to write searched.
the entries either (1) to an ICF file, supplying updates to a
file on a backup system, or (2) on a tape, imitating a journal- journal-name: Specify the name of the journal where the
to-tape function. The information in the journal entries journal entries are to be received.
received can be used to update the database files being jour-
EXITPGM
naled to minimize the loss of data in the event of a disk
Specifies the qualified name of a user-written exit
failure, and to update database files on a backup system in
program that is given control to receive each journal
case of a system failure on the primary system.
entry passed from the command. Additional information
The value specified on the ENTFMT parameter determines on the interface between this command and the exit
the format of the journal entries passed to the exit program. program is supplied after the listing of possible values
for this parameter, and is described in more detail in the
Restrictions: Backup and Recovery book.
1. If the sequence number is reset in the range of receivers The name of the program can be qualified by one of the
specified, the first occurrence of the FROMENT or following library values:
TOENT parameter is used if either is specified.
*LIBL: All libraries in the job's library list are
2. The FILE, JRNCDE, ENTTYP, JOB, PGM, USRPRF, searched until the first match is found.
CMTCYCID, and DEPENT parameters can be used to
*CURLIB: The current library for the job is
specify a subset of all available entries within a range of
searched. If no library is specified as the current
journal entries.
library for the job, the QGPL library is used.
Ÿ If no values are specified using these parameters,
library-name: Specify the name of the library to be
all available journal entries are received.
searched.
Ÿ If more than one of these parameters are specified,
then a journal entry must satisfy all of the values program-name: Specify the name of the exit program
specified on these parameters, except when that controls the reception of each journal entry passed
*IGNFILSLT is specified on the JRNCDE parameter. from the command.
Ÿ If a journal code is specified on the JRNCDE
Additional Information on the Exit Program Interface
parameter and *IGNFILSLT is is the second element
of that journal code, then journal entries with the When the program is called, two parameters are passed
specified journal code are selected if they satisfy all to it at a time. A single journal entry or a block of
selection criteria except what is specified on the journal entries is passed in the first parameter.
FILE parameter.
Ÿ If a single journal entry is passed, and if the length
3. The JOB, PGM, and USRPRF parameters cannot be of the parameter defined by the program is smaller
used to specify selection criteria if one or more journal than the length of the journal entry, the journal entry
receivers in the specified receiver range was attached to passed to the program is truncated. If the length of
a journal that had RCVSIZOPT(*MINFIXLEN) specified. the parameter defined by the program is greater
Note: To see the parameter and value descriptions for this than the length of the journal entry, the parameter
command, refer to the online help text. For more positions beyond the length of the journal entry
information about printing the help text, refer to contain nonessential information. The user's
“Printing CL Command Descriptions” in Chapter 1. program should not specifically refer to data in the
positions beyond the length of the journal entry.
Ÿ If the exit program is specifying that a block of
Required Parameters journal entries is to be passed, the exit program
JRN must specify the size of the block in bytes as a
Specifies the qualified name of the journal where the zoned value in the first 5 bytes of the first param-
journal entries are to be received. eter. If an error is made in this specification, only
one journal entry is passed in the block.
The name of the journal can be qualified by one of the
following library values: At the end of the single journal entry or block of journal
entries passed, there is a zoned journal entry length field
*LIBL: All libraries in the job's library list are
that is filled with zeros. This field indicates that the last
searched until the first match is found.
journal entry has been passed. The format of the infor-
mation in each journal entry is shown in the ENTFMT

Chapter 2. OS/400 Command Descriptions P3-647


RCVJRNE

parameter description. The format of the first parameter Char(1) Passed to the Exit Program
is detailed in the Backup and Recovery book.
N Additional journal entries are not currently
Note: The maximum length of the parameter specifica- available to be passed after this call of the
tion in the exit program is language dependent exit program, or the RCVJRNE command
(for example, for CL or RPG, the maximum will be ending after this call of the exit
length is 9999). For more information about limi- program.
tations refer to the corresponding programming
Y Additional journal entries are currently
language book.
available to be passed after this call of the
| A character variable of LEN(3) is passed in the second exit program.
exit program parameter. This parameter will be passed
Any information passed from the exit program to the
from the system to the exit program and can be passed
system in the second byte will be ignored.
from the exit program to the system. Its values are pre-
sented in the following lists: The second byte of the second exit program param-
eter is provided whether journal entries are being
Ÿ Information in the first byte of the second parameter: passed as a single journal entry per call of the exit
Char(1) Passed to the Exit Program from the program, or as a block of journal entries per call.
System | Ÿ Information in the third byte of the second param-
0 No journal entry is passed on this call of | eter:
the exit program. | Char(1) Passed to the Exit Program
1 A single journal entry is passed to the exit | '00'x One or more journal entries are being
program. | passed to the exit program and the object
2 A block of one or more journal entries is | names in the fixed length portion of each
passed to the exit program. | journal entry do not necessarily reflect the
| name of the object at the time the journal
3 No journal entry is passed on this call to
| entry was deposited into the journal.
the exit program, and no more entries can
be passed, because the journal receiver | Note: This value is returned only when
that was attached when the receive | receiving journal entries from a
journal entry operation started is no longer | journal receiver that was attached
attached. | to a journal prior to V4R2M0.

Note: The system ends the RCVJRNE | 0 No journal entries are currently being
command after calling the exit | passed, so the information normally
program once with a reason code | returned in this byte is not applicable.
of 3. | 1 One or more journal entries are being
| 4 No journal entry is passed on this call to | passed to the exit program and the object
| the exit program, and no more entries can | names in the fixed length portion of each
| be passed unless the local or remote | journal entry reflect the name of the object
| journal is activated. | at the time the journal entry was deposited
| into the journal.
| Note: This value can only be passed to
| the exit program when receiving | 2 One or more journal entries are being
| journal entries from the attached | passed to the exit program and the object
| receiver of a local or remote | names in the fixed length portion of each
| journal and the journal state for the | journal entry do not necessarily reflect the
| journal is currently *INACTIVE. | name of the object at the time the journal
| entry was deposited into the journal. The
Char(1) Passed to the System from the Exit
| object name in the fixed length portion of
Program
| the journal entry may be returned as a
8 Requests the command processing | previously known name for the object prior
program to start passing one or more | to the journal entry being deposited into
journal entries in a block. | the journal or be returned as *UNKNOWN.
9 Requests the RCVJRNE command to end. | Note: This value will only be returned
The exit program returns control to the | when receiving journal entries from
system. | a remote journal and the remote
Ÿ Information in the second byte of the second param- | journal is currently being caught up
eter: | from its source journal. A remote
| journal is being caught up from its
| source journal when the

P3-648 OS/400 CL Reference - Part 2 (Full Version)


RCVJRNE

| QjoChangeJournalState API is | Ÿ If the specified file member currently exists on the


| invoked and is currently replicating | system, the journal identifier is determined from the
| journal entries to the remote | specified file member. All journal entries in the
| journal. After the call to the | specified receiver range for that journal identifier are
| QjoChangeJournalState API | converted for output.
| returns, the remote journal is main-
| Ÿ If the specified file member does not currently exist
| tained with a synchronous or asyn-
| on the system, the specified receiver range is
| chronous delivery mode, and the
| searched to determine all possible journal identifiers
| remote journal is no longer being
| that are associated with the specified file member.
| caught up.
| All journal entries in the specified receiver range for
| Any information passed from the exit program to the | those journal identifiers are converted for output.
| system in the third byte will be ignored.
| There can be more than one journal identifier asso-
| The second byte of the second exit program param- | ciated with the specified file member if, for example,
| eter is provided whether journal entries are being | a file member was created by that name, it was
| passed as a single journal entry per call of the exit | journaled, and then deleted. Then another file
| program, or as a block of journal entries per call. | member was created with the same name, and it
| was also journaled and then deleted. All of these
| Note: When an N is passed to the exit program in
| actions would have to occur within the specified
| the second byte of the second parameter
| receiver range.
| indicating that no additional journal entries
| are currently available, it does not neces- | Notes:
| sarily mean that when the exit program
| returns, that the RCVJRNE command will | 1. The journal identifier is the unique identifier associ-
| have to wait for additional journal entries to | ated with the object when journaling is started for
| be deposited into the journal. By the time | that object. The journal identifier stays constant,
| the exit program returns, additional journal | even if the object is renamed or moved. See the
| entries may already be available and | Backup and Recovery book for more information.
| depending upon what was specified on the 2. When specifying a database file on this parameter,
| DELAY parameter, may or may not be journal entries with the following journal code values
| immediately passed to the exit program. If are received only if they satisfy the values specified
| DELAY(N) was specified the system will wait on the other parameters:
| N seconds before passing the journal entries
| Ÿ Journal code D (database file-level information
| to the exit program. If DELAY(*NEXTENT)
| entries).
| was specified, the journal entries will imme-
| Ÿ Journal code F (file member-level information
| diately be passed to the exit program.
| entries).
| The third byte of the second exit program parameter Ÿ Journal code R (record-level information
| is provided whether journal entreis are being pro- entries).
| cessed as a single journal entry per call of the exit Ÿ Journal code U (user-generated entries).
| program, or as a block of journal entries per call. Ÿ Other journal codes, if *IGNFILSLT is specified
| When returned for a block of journal entries, the on that journal code. If *ALLSLT is specified on
| attribute applies to the object names for all of the that journal code, no journal entries with that
| journal entries being returned in the block. code are received.
For more information on the exit program and these two *ALLFILE: The search for the entries received is not
parameters used to receive the journal entries, see the limited to a particular file.
Backup and Recovery book.
Element 1: Physical File Name
The name of the file can be qualified by one of the fol-
Optional Parameters lowing library values:
FILE
*LIBL: All libraries in the job's library list are
Specifies a maximum of 300 qualified file names whose
searched until the first match is found.
journal entries are received. This parameter also speci-
fies the name of the file member whose journal entries *CURLIB: The current library for the job is
are to be received. searched. If no library is specified as the current
library for the job, the QGPL library is used.
| To determine which journal entries are to be converted
| for output, based on the specified file member name, the library-name: Specify the name of the library to be
| following is done: searched.

Chapter 2. OS/400 Command Descriptions P3-649


RCVJRNE

| *ALL: Journal entries in all physical files in the specified recent break in the chain through the receiver that is
| library (the library name must be specified) whose jour- attached when starting to receive journal entries.
| naled changes are currently in the journal receiver are
Element 1: Starting Journal Receiver
| converted for output. If *ALL is specified and the user
| does not have the required authority to all of the files, an The name of the journal receiver can be qualified by one
| error occurs, and the command ends. of the following library values:

physical-file-name: Specify the name of the physical *LIBL: All libraries in the job's library list are
database file for which a journal entry is received. searched until the first match is found.
Element 2: Member Name *CURLIB: The current library for the job is
searched. If no library is specified as the current
*FIRST: Entries for the first member in the file are
library for the job, the QGPL library is used.
received.
*ALL: Entries for currently existing members of the file
library-name: Specify the name of the library to be
searched.
are received.
member-name: Specify the name of the member for starting-journal-receiver: Specify the name of the first
which journal entries are received. journal receiver that contains the journal entries to be
received.
If *ALL is specified for the file-name value, this member
name is used for all applicable files in the library. For Element 2: Ending Journal Receiver
example, if library-name/*ALL *FIRST is specified on the *CURRENT: The journal receiver that is currently
FILE parameter, the journal entries of the first members attached when starting to receive journal entries is used.
of all applicable files in the specified library are received.
The name of the journal receiver can be qualified by one
| Note: If more than the maximum number of members of the following library values:
| is identified (32767 members if a list of files is
specified), an error occurs and no entries are *LIBL: All libraries in the job's library list are
received. This restriction is ignored if *ALLFILE searched until the first match is found.
is specified. *CURLIB: The current library for the job is
If the specified physical file does not exist on the searched. If no library is specified as the current
system, specify either *ALL or a specific file member library for the job, the QGPL library is used.
name. library-name: Specify the name of the library to be
searched.
RCVRNG
Specifies the starting (first) and ending (last) journal ending-journal-receiver: Specify the qualified name of
receivers used in the search for the journal entries that the last journal receiver that contains journal entries to
are received. The system starts the search with the be received. If the end of the receiver chain is reached
starting journal receiver (as specified by the first value) before a receiver with this name is found, an error
and proceeds through the receiver chain until the ending message is sent and no journal entries are received.
journal receiver (as specified by the last value) is pro-
Note: The maximum number of receivers in the range
cessed.
is 256. If more receivers than this maximum are
If dual receivers (receivers attached and detached in specified, an exception is signaled, and no
pairs) are used at any time, the system uses the first of journal entries are received.
the paired receivers when chaining through the
receivers. The Work with Journal Attributes (WRKJRNA) FROMENT
command can be used to display the order of the Specifies the first journal entry considered for reception.
receivers in the receiver chain. *FIRST: The first journal entry in the journal receiver
If a problem is found in the receiver chain (such as range specified is the first entry considered for reception.
damaged or not-found receivers) before the search oper- starting-sequence-number: Specify the sequence
ation begins, the system tries to use the second of the number of the first journal entry considered for reception.
dual receivers. If these receivers also are damaged or
not found, the operation ends. FROMTIME
Specifies the date and time of the first journal entry con-
*CURRENT: The journal receiver that is currently sidered for reception. The journal entry with the speci-
attached when starting to receive journal entries is used.
fied date and time or the next later journal entry is the
*CURCHAIN: The journal receiver chain that includes starting point for reception of journal entries.
the journal receiver that is currently attached when
Element 1: Starting Date
starting to receive journal entries is used. This receiver
chain does not cross a break in the chain. If there is a starting-date: Specify the date of the first journal entry
break in the chain, the receiver range is from the most considered for reception. The format of the date must

P3-650 OS/400 CL Reference - Part 2 (Full Version)


RCVJRNE

be as defined by the job attributes DATFMT and, if sep- NBRENT


arators are used, DATSEP. Specifies the total number of journal entries to receive.
Element 2: Starting Time *ALL: All journal entries that are for the specified
journal receivers and that satisfy the selection values are
starting-time: Specify the time of the first journal entry
received.
considered for reception. The time is specified in
24-hour format with or without a time separator as value: Specify the maximum number of journal entries
follows: to receive. If the specified journal entry identified by the
TOENT or TOTIME parameter is reached before the
Ÿ With a time separator, specify a string of 5 or 8
value specified for NBRENT is met, the command ends
digits, where the time separator for the job sepa-
normally.
rates the hours, minutes, and seconds. If you issue
this command from the command line, the string JRNCDE
must be enclosed in apostrophes. If a time sepa- Specifies whether the entries being considered are
rator other than the separator specified for your job limited to the journal entries that contain the specified
is used, this command fails. journal code.
Ÿ Without a time separator, specify a string of 4 or 6 *ALL: The journal entries received are not limited to
digits (hhmm or hhmmss) where hh = hours, mm = those containing a specified code.
minutes, and ss = seconds. Valid values for hh
*CTL: The journal entries received are those written to
range from 00 through 23. Valid values for mm and
control the journal functions. These journal entries have
ss range from 00 through 59.
codes J or F.
TOENT Element 1: Journal Code Value
Specifies the last journal entry considered for reception.
journal-code: Specify the journal code to which journal
*NONE: No journal entry is specified. Journal entries entries are limited. Only journal entries with the speci-
are passed to the exit program until the command is fied journal code are received. A list of journal codes
canceled (cancel request or cancel job) or until an end that can be specified is provided in the Backup and
reason code (9) is set by the exit program. If there are Recovery book.
no more entries to pass, the RCVJRNE command waits
Element 2: Journal Code Selection
the number of seconds indicated on the DELAY param-
eter before trying to find more entries to pass. *ALLSLT: The journal entries with the specified journal
code are received only if all other selection parameters
*LAST: The last journal entry in the journal receiver
are satisfied.
range specified is the last journal entry considered for
reception. *IGNFILSLT: The journal entries having the specified
journal code are received only if all selection parame-
ending-sequence-number: Specify the sequence
ters, except the FILE parameter, are satisfied.
number of the final journal entry considered for recep-
tion. | Note: This value is not valid for journal code D, F or R.
Note: The values specified for the from and to parame- ENTTYP
ters can be the same. For example, Specifies whether to limit the journal entries received to
FROMENT(234) and TOENT(234) can be speci- those of a specified journal entry type.
fied.
*ALL: The journal entries to be received are not limited
TOTIME to a specified entry type.
Specifies the date and time of the last journal entry con-
*RCD: The journal entries received are limited to those
sidered for reception. The first journal entry at or before
written for record level operations. These are entry
the specified date and time is the last journal entry con-
types: BR, DL, DR, PT, PX, UB, UP, and UR.
sidered for reception.
entry-type: Specify the entry type that limits the journal
Element 1: Ending Date
entries received. Only journal entries that contain the
ending-date: Specify the date of the last journal entry specified entry type are received. Up to 50 valid entry
considered for reception. The format of the date must types can be specified. A list of valid entry types that
be as defined by the job attributes DATFMT and, if sep- can be received is in the Backup and Recovery book.
arators are used, DATSEP.
JOB
Element 2: Ending Time Specifies whether the journal entries received are limited
ending-time: Specify the time of the last journal entry to those for a specified job. If the fully qualified name of
considered for reception. See the FROMTIME param- the job is not specified, all journal entries that contain
eter for a description of time formats. the simple job name are considered for reception.

Chapter 2. OS/400 Command Descriptions P3-651


RCVJRNE

A job identifier is a special value or a qualified name *ALL: The journal entries relating to trigger programs
with up to three elements. For example: and referential constraints are received.
\ALL *NONE: The journal entries relating to trigger programs
\ and referential constraints are not received.
job-name
user-name/job-name DELAY
job-number/user-name/job-name Specifies the number of seconds that the command pro-
cessing program (CPP) waits for a new journal entry to
More information on this parameter is in Appendix A,
arrive if the last entry has already been received. After
“Expanded Parameter Descriptions.”
the last entry in the journal is received and passed to the
*ALL: The journal entries received are not limited to a exit program, the CPP tries to receive the next entry. If
specified job. no new journal entry exists, the exit program is passed a
*: The journal entries received are limited to those for value of 0 in the first byte of the second parameter.
the current job. Note: This parameter is valid only when
job-name: Specify the name of the job whose journal TOENT(*NONE) is specified, and the last
entries are considered for reception. receiver specified on the RCVRNG parameter
identifies the journal receiver that is currently
user-name: Specify the name of the user of the job attached when journal entries are starting to be
whose journal entries are considered for reception. received.
job-number: Specify the number of the job whose When the last entry on the journal has been passed to
journal entries are considered for reception. the exit program and no journal entries are currently
PGM available to be passed to the exit program, one of the
Specifies whether the journal entries received are limited following occurs:
to the those created for a specified program. Ÿ If a number of seconds is specified for the first
*ALL: The journal entries received are not limited to element in the list, the exit program is immediately
those created by a specified program. called and a '0' is passed to the first byte of the
second exit parameter indicating that no additional
program-name: Specify the name of the program whose
journal entries are currently available. When the
journal entries are considered for reception. Only journal
exit program returns control to the command, the
entries for this program are considered for reception.
system delays for the specified number of seconds.
USRPRF When the delay time has expired, the system then
Specifies that the journal entries to be received are checks whether any additional journal entries are
limited to the journal entries for a specified user profile available to be passed to the exit program. Any
name. additional entries are passed to the exit program
*ALL: The journal entries received are not limited to sequentially, until there are no more available.
entries for a specified user profile. When there are no further journal entries available,
the exit program is called, and a '0' is passed as the
user-name: Specify the name of the user profile whose
first byte of the second exit program parameter, indi-
journal entries are considered for reception. Only journal
cating there are no more journal entries currently
entries for this user profile are considered for reception.
available. When the exit program returns control to
CMTCYCID the command, the system again delays for the spec-
Specifies that the journal entries are limited to the ified number of seconds.
journal entries that contain the specified commit cycle If there are no new journal entries to pass to the exit
identifier. program after the delay, the exit program is called,
*ALL: The journal entries received are not limited to a and a '0' is passed as the first byte of the second
specified commit cycle identifier. exit program parameter to indicate that no further
journal entries are available. The exit program then
commit-cycle-identifier: Specify the commit cycle identi-
can pass the value '9' for the first byte of the second
fier that limits the journal entries received. Only journal
parameter, indicating that this command is to end.
entries that contain the commit cycle ID are considered
for reception. Ÿ If *NEXTENT is specified for the first element in the
list, then additional journal entries are passed to the
DEPENT exit program as they become available. When this
Specifies whether to receive the journal entries recording option is used, the second element in the list indi-
actions that occur as a result of a trigger program and cates the maximum number of seconds between
actions on records that are part of a referential con- calls to the exit program. If there are no additional
straint. journal entries to pass after the specified maximum
delay time, the exit program is called, and a '0' is

P3-652 OS/400 CL Reference - Part 2 (Full Version)


RCVJRNE

passed to the first byte of the second exit program ENTFMT


parameter, indicating that no additional journal Specifies the format of the journal entries being
entries are currently available. received. For a description of what is represented by
each of the fields in the journal entry, see the Backup
The maximum delay time can be either of the fol-
lowing:
and Recovery book.
*TYPE1: The journal entries received are formatted to
– The time between a call to the exit program
include the minimum information that can be specified.
passing the last currently available journal
The information fields and the format of the information
entry, and a subsequent call to the exit program
in each journal entry is shown below:
indicating that no new journal entries are avail-
able.
– The time between calls to the exit program indi- Table 25. *TYPE1 Journal Entry Format
cating that no additional journal entries are Field Name Length From To
available. Entry Length 5 1 5
If the exit program is called after the maximum Sequence Number 10 6 15
delay has expired, it then can pass the value '9' for Journal Code 1 16 16
Journal Entry Type 2 17 18
the first byte of the second parameter, indicating
Date 6 19 24
that this command is to end. Time 6 25 30
Note: The previous description of the DELAY param- Job Name 10 31 40
User Name 10 41 50
eter assumes that the journal receiver that is cur-
Job Number 6 51 56
rently attached at the beginning of the RCVJRNE Program Name 10 57 66
command is still attached. If that journal receiver Object Name 10 67 76
has been detached, the exit program is sent the Object Library 10 77 86
reason code 3 after all journal entries have been Member Name 10 87 96
received by the exit program and the RCVJRNE Count/RRN 10 97 106
command ends. Flag 1 107 107
Commit Cycle ID 10 108 117
30: The command delays 30 seconds before checking Reserved 8 118 125
whether additional journal entries are available to be Entry-Specific Data N1 126 N+125
passed to the exit program.
Note:
seconds: Specify the length, in seconds, that the
1 The length of the entry-specific data field varies from
command delays before checking whether additional
entry to entry. It is long enough to accommodate all
journal entries are available to be passed to the exit
the entry-specific data in each received journal entry.
program. Valid values range from 1 through 99999.
Element 1: Delay Time Value
*TYPE2: The journal entries received include the infor-
*NEXTENT: A fixed delay time is not used. Additional mation returned when ENTFMT(*TYPE1) is specified,
journal entries are passed to the exit program as they the user profile field, which gives the name of the user
become available. who caused the logging of the received journal entries,
Note: If the RCVJRNE exit program causes any addi- and the name of the system on which the entry was
tional calls of the RCVJRNE command, those sent.
additional calls cannot specify The format for *TYPE2 journal entries is shown below.
DELAY(*NEXTENT) if a preceeding call specified
TOENT(*NONE).
Table 26 (Page 1 of 2). *TYPE2 Journal Entry Format
Element 2: Maximum Delay Time Field Name Length From To
This element indicates the maximum number of seconds Entry Length 5 1 5
between calls to the exit program when a fixed delay Sequence Number 10 6 15
time is not specified on the first element. This element Journal Code 1 16 16
is valid only if *NEXTENT is specified for the first Journal Entry Type 2 17 18
element. Date 6 19 24
Time 6 25 30
*CLS: The process default wait time is used as the Job Name 10 31 40
maximum number of seconds between calls to the exit User Name 10 41 50
program. Job Number 6 51 56
Program Name 10 57 66
seconds: Specify the maximum length of time between Object Name 10 67 76
calls to the exit program, in seconds. Valid values range Object Library 10 77 86
from 1 to 99999. Member Name 10 87 96
Count/RRN 10 97 106

Chapter 2. OS/400 Command Descriptions P3-653


RCVJRNE

Table 26 (Page 2 of 2). *TYPE2 Journal Entry Format Table 27. NULLINDLEN(*ENTFMT) Journal Entry Format
for ENTFMT(*TYPE3)
Field Name Length From To
Field Name Length From To
Flag 1 107 107
Commit Cycle ID 10 108 117 Object Library 10 91 100
User Profile 10 118 127 Member Name 10 101 110
System Name 8 128 135 Count/RRN 10 111 120
Reserved 20 136 155 Flag 1 121 121
Entry-Specific Data N1 156 N + 155 Commit Cycle ID 10 122 131
User Profile 10 132 141
Note: System Name 8 142 149
1 Number of Null 5 150 154
The length of the entry-specific data field varies from
Value Indicators1
entry to entry. It is long enough to accommodate all
Null Value Indicators M 155 154+M
the entry-specific data in each received journal entry.
Length of Entry- 5 155+M 159+M
Specific Data2
Entry-Specific Data N 160+M 159+
*TYPE3: The journal entries received include the infor-
M+N
mation returned when ENTFMT(*TYPE2) is specified, Notes:
and the null value indicators. The format of the received
1 This field contains the number of null value indicators
entries depends on the value specified on the
(in decimal digits) in the received journal entry.
NULLINDLEN parameter. The tables in the
2 This field contains the length of the entry-specific data
NULLINDLEN parameter description show the three
(in decimal digits) in the received journal entry.
formats for *TYPE3.
*TYPE4: The journal entries received include the infor-
mation returned when ENTFMT(*TYPE3) is specified,
Table 28. NULLINDLEN(*ENTFMT) Journal Entry Format
the journal identifier, the physical file trigger indicator,
for ENTFMT(*TYPE4)
and the referential constraint indicator. The format of
the received entries depends on the value specified on Field Name Length From To
the NULLINDLEN parameter. The tables in the Entry Length 5 1 5
NULLINDLEN parameter description show the three Sequence Number 10 6 15
formats for *TYPE4. Journal Code 1 16 16
Journal Entry Type 2 17 18
NULLINDLEN Timestamp 26 19 44
Specifies the length, in bytes, used for the null value Job Name 10 45 54
indicators portion of the journal entry received by the User Name 10 55 64
user. This parameter is valid only if ENTFMT(*TYPE3) Job Number 6 65 70
Program Name 10 71 80
or ENTFMT(*TYPE4) is specified.
Object Name 10 81 90
*ENTFMT: All null value indicators are received for Object Library 10 91 100
each journal entry. The format for this value is shown in Member Name 10 101 110
the following tables. Count/RRN 10 111 120
Flag 1 121 121
Note: The number of null value indicators, as well as Commit Cycle ID 10 122 131
the length of the entry-specific data can vary User Profile 10 132 141
from entry to entry. In the following table, the System Name 8 142 149
number of null value indicators is designated by Journal Identifier 10 150 159
the variable 'M' and the length of the entry- Referential 1 160 160
Constraint
specific data is designated by the variable 'N'.
Trigger 1 161 161
Reserved 8 162 169
Table 27. NULLINDLEN(*ENTFMT) Journal Entry Format Number of Null 5 170 174
for ENTFMT(*TYPE3) Value Indicators1
Field Name Length From To Null Value Indicators M 175 174+M
Length of Entry- 5 175+M 179+M
Entry Length 5 1 5 Specific Data2
Sequence Number 10 6 15 Entry-Specific Data N 180+M 179+
Journal Code 1 16 16 M+N
Journal Entry Type 2 17 18 Notes:
Timestamp 26 19 44
1 This field contains the number of null value indicators
Job Name 10 45 54
User Name 10 55 64 (in decimal digits) in the received journal entry.
Job Number 6 65 70 2 This field contains the length of the entry-specific
Program Name 10 71 80 data (in decimal digits) in the received journal entry.
Object Name 10 81 90

P3-654 OS/400 CL Reference - Part 2 (Full Version)


RCVJRNE

field-length: Specify the field length for the null value


Table 30. NULLINDLEN(field-length) Journal Entry Format
indicators portion of the received journal entry. Valid for ENTFMT(*TYPE4)
values range from 1 to 8000 characters. The format of
Field Name Length From To
the received journal entry is shown in the following
tables. Trigger 1 161 161
Reserved 8 162 169
Null Value Indicators field 170 169+
Table 29. NULLINDLEN(field-length) Journal Entry Format
length1 field
for ENTFMT(*TYPE3)
length
Field Name Length From To Entry-Specific Data M2 170+ 169+
Entry Length 5 1 5 field M+ field
Sequence Number 10 6 15 length length
Journal Code 1 16 16 Notes:
Journal Entry Type 2 17 18 1 The length of the null value indicators field is the
Timestamp 26 19 44 length specified on the NULLINDLEN parameter.
Job Name 10 45 54 2 The length of the entry-specific data field varies from
User Name 10 55 64
entry to entry and is designated by the variable M.
Job Number 6 65 70
This length accommodates all of the entry-specific
Program Name 10 71 80
data in each received journal entry.
Object Name 10 81 90
Object Library 10 91 100
Member Name 10 101 110
Count/RRN 10 111 120 If the journal entry being passed to the exit program has
Flag 1 121 121 fewer null value indicators than the length specified on
Commit Cycle ID 10 122 131 the NULLINDLEN parameter, the trailing bytes are set to
User Profile 10 132 141 'F0'X. Conversely, if a journal entry received has more
System Name 8 142 149 null value indicators than the specified field length and
Null Value Indicators field 150 149+
truncation will result in the loss of a 'F1'X indicator value,
length1 field
length the RCVJRNE request is ended.
Entry-Specific Data M2 150+ 149+ Element 1: Variable-Length Field
field M+ field
length length *VARLEN: The null value indicators field is a variable-
Notes: length field. The received journal entry has the format
1 The length of the null value indicators field is the length specified in the table at the end of this parameter
specified on the NULLINDLEN parameter. description.
2 The length of the entry-specific data field varies from Element 2: Maximum Field Length
entry to entry. It is long enough to accommodate all the
The maximum length of the null value indicators field.
entry-specific data in each received journal entry.
maximum-field-length: Specify the maximum number of
null value indicators to be included in each received
journal entry. Valid values range from 1 to 8000. If a
Table 30. NULLINDLEN(field-length) Journal Entry Format
for ENTFMT(*TYPE4) journal entry received has more null value indicators
than the specified field length and truncation will result in
Field Name Length From To
the loss of a 'F1'X indicator value, the RCVJRNE
Entry Length 5 1 5 request is ended. The format of the received journal
Sequence Number 10 6 15 entry is shown in the following tables.
Journal Code 1 16 16
Journal Entry Type 2 17 18
Table 31 (Page 1 of 2). NULLINDLEN(*VARLEN field-length)
Timestamp 26 19 44
Journal Entry Format for ENTFMT(*TYPE3)
Job Name 10 45 54
User Name 10 55 64 Field Name Length From To
Job Number 6 65 70
Entry Length 5 1 5
Program Name 10 71 80
Sequence Number 10 6 15
Object Name 10 81 90
Journal Code 1 16 16
Object Library 10 91 100
Journal Entry Type 2 17 18
Member Name 10 101 110
Timestamp 26 19 44
Count/RRN 10 111 120
Job Name 10 45 54
Flag 1 121 121
User Name 10 55 64
Commit Cycle ID 10 122 131
Job Number 6 65 70
User Profile 10 132 141
Program Name 10 71 80
System Name 8 142 149
Object Name 10 81 90
Journal Identifier 10 150 159
Object Library 10 91 100
Referential 1 160 160
Member Name 10 101 110
Constraint

Chapter 2. OS/400 Command Descriptions P3-655


RCVJRNE

Table 31 (Page 2 of 2). NULLINDLEN(*VARLEN field-length) Table 32. NULLINDLEN(*VARLEN field-length) Journal
Journal Entry Format for ENTFMT(*TYPE3) Entry Format for ENTFMT(*TYPE4)
Field Name Length From To Field Name Length From To
Count/RRN 10 111 120 Entry-Specific Data M3 177+ 176+
Flag 1 121 121 field M+ field
Commit Cycle ID 10 122 131 length length
User Profile 10 132 141 Notes:
System Name 8 142 149 1 This field contains the number of null value indicators
Number of Null Value 2 150 151
(in binary digits) in the received journal entry.
Indicators1
2 This field contains the length of the entry-specific
Null Value Indicators field 152 151+
length field data (in decimal digits) in the received journal entry.
length 3 The length of entry-specific data can vary from entry
Length of Entry -Spe- 5 152+ 156+ to entry and is designated by the variable M.
cific Data2 field field
length length
Entry-Specific Data M 157+ 156+ M+
field field | INCENT
length length | Specifies whether only the confirmed or both the con-
Notes: | firmed and unconfirmed, journal entries are converted for
1 This field contains the number of null value indicators (in | output. This parameter only applies when converting
binary digits) in the received journal entry. | journal entries for output from a remote journal.
2 This field contains the length of the entry-specific data (in | Confirmed entries are those journal entries which have
decimal digits) in the received journal entry. | been sent to this remote journal and the state of the
| Input/Output (I/O) to auxiliary storage for the same
| journal entries on the local journal is known.
Table 32. NULLINDLEN(*VARLEN field-length) Journal | Unconfirmed entries are those journal entries which have
Entry Format for ENTFMT(*TYPE4) | been sent to this remote journal, but the state of the
Field Name Length From To | Input/Output (I/O) to auxiliary storage for the same
| journal entries on the local journal is not known, or the
Entry Length 5 1 5
Sequence Number 10 6 15 | object name information for those journal entries is not
Journal Code 1 16 16 | yet known to the remote journal. Unconfirmed journal
Journal Entry Type 2 17 18 | entries can only exist within the attached receiver of a
Timestamp 26 19 44 | remote journal. This only applies if synchronous delivery
Job Name 10 45 54 | mode is being used for a particular remote journal.
User Name 10 55 64
Job Number 6 65 70 | *CONFIRMED: Only those journal entries which have
Program Name 10 71 80 | been confirmed are converted for output.
Object Name 10 81 90
| *ALL: All confirmed and unconfirmed journal entries are
Object Library 10 91 100
| converted for output.
Member Name 10 101 110
Count/RRN 10 111 120
Flag 1 121 121
Commit Cycle ID 10 122 131
Examples
User Profile 10 132 141
Example 1: Receiving Journal Entries
System Name 8 142 149
Journal Identifier 10 150 159 RCVJRNE JRN(APPLIB/JRN1) EXITPGM(MYLIB/RCVPGM)
Referential Con- 1 160 160 FILE(APPLIB/FILE3) TOENT(\LAST)
straint ENTFMT(\TYPE3) NULLINDLEN(\ENTFMT)
Trigger 1 161 161
Reserved 8 162 169 This command receives journal entries from the journal
Number of Null 2 170 171 receiver that is currently attached (when journal entries are
Value Indicators1 starting to be received) to the journal JRN1 in library APPLIB
Null Value Indicators field 172 171+
and passes them one at a time to program RCVPGM in
length field
library MYLIB. Only entries with file-level information for the
length
Length of Entry 5 172+ 176+ first member of file FILE3 in library APPLIB are received.
-Specific Data2 field field The format of each entry passed to the exit program is
length length shown in the "NULLINDLEN(*ENTFMT) Journal Entry Format
for ENTFMT(*TYPE3)" table shown within the NULLINDLEN
parameter description.

Example 2: Receiving Journal Entries

P3-656 OS/400 CL Reference - Part 2 (Full Version)


RCVJRNE

RCVJRNE JRN(JRNLIB/MYJRN) EXITPGM(RCVLIB/PGMA) Example 3: Receiving Journal Entries Using


FILE(FILELIB/PFILEB MBRONE) TOENT(\LAST) DELAY(*NEXTENT)
ENTFMT(\TYPE3) NULLINDLEN(\VARLEN 3ð)
RCVJRNE JRN(JRNLIB/MYJRN) EXITPGM(RCVLIB/PGMA)
RCVRNG(\CURCHAIN) TOENT(\NONE) DELAY(\NEXTENT)
This command receives journal entries with file-level informa-
tion for member MBRONE of file PFILEB in library FILELIB This command receives all available journal entries from the
from the journal receiver currently attached (when journal chain of journal receivers, which includes the journal receiver
entries are starting to be received) to journal MYJRN in that is attached at the start of receiving journal entries, asso-
library JRNLIB and sends them one at a time to program ciated with the journal MYJRN in the library JRNLIB. These
PGMA in library RCVLIB. The format of each entry passed journal entries are sent sequentially to exit program PGMA in
to the exit program is shown in the "NULLINDLEN(*VARLEN library RCVLIB, as they become available. The maximum
field-length) Journal Entry Format for ENTFMT(*TYPE3)" length of time between calls to the exit program is equal to
table at the end of the NULLINDLEN parameter description. the process default wait time value.
The null value indicators portion of each received entry is 30
characters in length.

Chapter 2. OS/400 Command Descriptions P3-657


RCVMSG

RCVMSG (Receive Message) Command


Pgm: B,I REXX: B,I

55──RCVMSG──┬─PGMQ(──job-message-queue-name──)──┤ JMQID Details ├───┬──┬─────────────────────────┬──────────────────────────────5


(1) ─┬─\PGMQ─────────────────────────────────┬──)─┘ │
└─MSGQ(─── ┌─\ANY───┐ │
│ ┌─\LIBL/────────┐ │ └─MSGTYPE(──┼─\COPY──┼──)─┘
└─┼───────────────┼──message-queue-name─┘ ├─\COMP──┤
├─\CURLIB/──────┤ ├─\DIAG──┤
└─library-name/─┘ ├─\EXCP──┤
├─\FIRST─┤
├─\INFO──┤
├─\INQ───┤
├─\LAST──┤
├─\NEXT──┤
├─\PRV───┤
├─\RPY───┤
└─\RQS───┘
(P) ──┬────────────────────────┬────────────────────5
5──┬───────────────────────────────────┬──┬─────────────────────────────────┬───
│ ┌─\NONE─────────────┐ │ │ ┌─ð─────────────────┐ │ │ ┌─\YES──────┐ │
└─MSGKEY(──┼─\TOP──────────────┼──)─┘ └─WAIT(──┼─\MAX──────────────┼──)─┘ └─RMV(──┼─\NO───────┼──)─┘
└─&CL-variable-name─┘ └─number-of-seconds─┘ └─\KEEPEXCP─┘
5──┬───────────────────────────────────────────────┬──┬───────────────────────────────┬──┬────────────────────────────┬─────────5
│ ┌─\JOB───────────────────────────┐ │ └─KEYVAR(──&CL-variable-name──)─┘ └─MSG(──&CL-variable-name──)─┘
└─CCSID(──┼─\HEX───────────────────────────┼──)─┘
└─coded-character-set-identifier─┘
5──┬───────────────────────────────┬──┬───────────────────────────────┬──┬──────────────────────────────────┬───────────────────5
└─MSGLEN(──&CL-variable-name──)─┘ └─SECLVL(──&CL-variable-name──)─┘ └─SECLVLLEN(──&CL-variable-name──)─┘
5──┬───────────────────────────────┬──┬──────────────────────────────────┬──┬──────────────────────────────┬────────────────────5
└─MSGDTA(──&CL-variable-name──)─┘ └─MSGDTALEN(──&CL-variable-name──)─┘ └─MSGID(──&CL-variable-name──)─┘
5──┬────────────────────────────┬──┬───────────────────────────────┬──┬─────────────────────────────┬───────────────────────────5
└─SEV(──&CL-variable-name──)─┘ └─SENDER(──&CL-variable-name──)─┘ │ ┌─\SHORT─┐ │
(2) ─┴─\LONG──┴──)─┘
└─SENDERFMT(───
5──┬────────────────────────────────┬──┬───────────────────────────────┬──┬─────────────────────────────┬───────────────────────5
└─RTNTYPE(──&CL-variable-name──)─┘ └─ALROPT(──&CL-variable-name──)─┘ └─MSGF(──&CL-variable-name──)─┘
5──┬────────────────────────────────┬──┬───────────────────────────────────┬──┬─────────────────────────────────┬───────────────5
└─MSGFLIB(──&CL-variable-name──)─┘ └─SNDMSGFLIB(──&CL-variable-name──)─┘ └─TXTCCSID(──&CL-variable-name──)─┘
5──┬─────────────────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────5%
└─DTACCSID(──&CL-variable-name──)─┘
JMQID Details:
┌─\PRV──┐ ┌─\──────────────────────────────────────────────────────────────────────┐
├──(──┬─┴─\SAME─┴──┼────────────────────────────────────────────────────────────────────────┼─┬──)──────────────────────────────┤
│ └─program-or-procedure-name──┬─────────────────────────────────────────┬─┘ │
│ │ ┌─\NONE───────┐ ┌─\NONE──────────────┐ │ │
│ └─┴─module-name─┴──┼────────────────────┼─┘ │
│ └─bound-program-name─┘ │
└─\EXT──────────────────────────────────────────────────────────────────────────────────┘
Notes:
1 When a value is specified for the PGMQ parameter, MSGQ(*PGMQ) is allowed.

2 This parameter is valid only when the SENDER parameter is specified.

P All parameters preceding this point can be specified in positional form.

Purpose This command copies a message received in the specified


message queue into control language (CL) variables within
The Receive Message (RCVMSG) command is used by a the program. The message and its attributes are copied into
program to receive a message that was previously sent to a the CL variables specified by the parameters KEYVAR
message queue. through DTACCSID.

The RCVMSG command receives messages from a job You can specify the message being received by indicating
message queue (a message queue associated with a call the message type, the reference key of the message, or
stack entry or the external message queue (*EXT)), or from a both. The program receiving the message can also specify,
named message queue. The program can receive a on the RCVMSG command, whether a message is removed
message from a message queue associated with its own call from the message queue or left there as an old message. If
stack entry or from a message queue associated with the specified message queue is not allocated to the job in
another call stack entry. which this command is entered, or to any other job, the

P3-658 OS/400 CL Reference - Part 2 (Full Version)


RCVMSG

message queue is implicitly allocated by this command for bound program name, which can be used to qualify the
the duration of the command's processing. procedure name.

If a message of the specified type has not been received by


Item 1: Program or Procedure Name
the queue, the requesting program can either wait for a *: Identifies the program running the RCVMSG
message to arrive or continue with other processing. This command.
allows a set of message queues to be polled.
program-or-procedure-name: Specify the name of the
program or procedure used.
If the message received is an unhandled exception message,
the program can specify whether this command should If Item 1 identifies a program, the name specified can be
handle the exception. An unhandled exception message is a maximum of 10 characters. If Item 1 identifies a pro-
an escape, status, or notify message that has been sent to cedure, the name specified can be a maximum of 256
an Integrated Language Environment (ILE) procedure. When characters.
this command is run, the ILE procedure has not yet taken
The procedure name alone may not identify the correct
action to tell the system that the exception is handled. One
procedure. Several different procedures with the same
action the ILE procedure can take is to call a CL program
name can run in a job. To further identify a procedure,
that receives the message using this command. More infor-
the name specified can be qualified by a module name,
mation on actions that can be taken is in the ILE C book.
or by both a module name and a bound program name.
Restriction: This command is valid only in compiled CL pro- Item 2: Module Name
grams.
The module name qualifier identifies the module into
Note: To see the parameter and value descriptions for this which the procedure was compiled.
command, refer to the online help text. For more
*NONE: No module name is specified.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. module-name: Specify the module name to be used as
a qualifier for the specified procedure name (modules
are associated only with procedures). The module name
Optional Parameters can be a maximum of 10 characters.
PGMQ If a module name is not specified but a bound program
Specifies the call stack entry message queue from which name is, *NONE must be specified in the module name
a message is received. The call stack entry message position.
queue can be the *EXT queue or it can be a message
Item 3: Bound Program Name
queue that is associated with a call stack entry for a
program or an ILE procedure. The bound program name qualifier identifies the program
to which the procedure was bound.
Element 1: Relationship
*NONE: No bound program name is specified.
Element 1 of this parameter specifies whether the
message queue is associated with the program or proce- bound-program-name: Specify the bound program name
dure identified by Element 2, or if it is associated with to be used as a qualifier for the specified procedure
the caller of the program or procedure. name (and module name if specified). The bound
program name can be a maximum of 10 characters.
*PRV: The message is received from the message
queue of the program or procedure that called the Single Value
program or procedure identified by Element 2. *EXT: The message is received from the external
Note: If the message queue previous to the one identi- message queue of the job. The external message
fied by Element 2 is for an ILE program entry queue is used to communicate with the external
procedure (PEP), the message will be received requester of the job, such as a display station user.
from the message queue immediately previous to
MSGQ
the PEP message queue. (Effectively this would
Specifies the qualified name of the message queue (not
be two message queues previous to the one
a program message queue) from which a message is
identified by Element 2).
received. If MSGQ is specified, the PGMQ parameter
*SAME: The message is received from the message cannot be specified.
queue of the program or procedure identified by Element
*PGMQ: The job message queue specified in the
2.
PGMQ parameter is the only queue from which a
Element 2: Program or Qualified Procedure message is received. The possible library values are:
Element 2 of this parameter has three items. Item 1 *LIBL: The library list is used to locate the
specifies the program or procedure of the job message message queue.
queue. Items 2 and 3 specify the module name and the

Chapter 2. OS/400 Command Descriptions P3-659


RCVMSG

*CURLIB: The current library for the job is used to another message available, blanks are returned in all CL
locate the message queue. If no library is specified variables.
as the current library for the job, the QGPL library is
When a message is received from a message queue
used.
associated with a call stack entry, *NEXT works only for
library-name: Specify the name of the library where one call stack entry. *NEXT cannot be used to receive
the message queue is located. messages for multiple call stack entries of the same
program.
message-queue-name: Specify the name of the
message queue from which a message is received. *PRV: The message previous to the message indicated
by the MSGKEY parameter is received.
MSGTYPE
Specifies the type of message received by this program. *RPY: A reply message is received. This program has
The message types *EXCP, and *RQS exists only on job sent an inquiry message to a message queue and
message queues and therefore can be received only expects a reply.
from a job message queue. For the coding relationships *RQS: A request message is received. The message
between the MSGTYPE and MSGKEY parameters, see specifies a request for a function. The receiving
Coding Relationships in the MSGKEY parameter program can then perform the function requested.
description.
MSGKEY
*ANY: Any type of message (except a sender's copy) is Specifies the message reference key of the message
received. To receive a sender's message, that is received.
MSGTYPE(*COPY) must be specified.
*NONE: No message reference key is specified.
*COPY: A copy of an inquiry message that was previ-
*TOP: The top of the message queue is used. *TOP
ously sent is received by this program. The message
can be used only when MSGTYPE(*NEXT) is specified.
queue specified for the PGMQ or MSGQ parameters
It causes the first message on the message queue to be
must be the same queue that was specified for the
received. For program message queues, this is the
RPYMSGQ parameter when the inquiry message was
message following the last request message that was
sent.
received, if any.
*COMP: A completion message is received. It indicates
the status of the work that this program requested of
&CL-variable-name: Specify the name of the control lan-
guage (CL) variable that contains the message reference
another program.
key of the message received by this program. This key
*DIAG: A diagnostic message is received. It provides is assigned by the system and cannot be shown. The
information about errors detected by another program in variable must be a character variable having a length of
the input sent by this program or errors that occurred 4 characters.
when the requested function was being processed by
Coding Relationships: The MSGTYPE and MSGKEY
the other program.
parameters can be used separately in the RCVMSG
*EXCP: An exception message is received. Exception command, or together.
messages (escape, notify, status) are received by the
program in last-in first-out (LIFO) order. The receiving Ÿ If neither MSGTYPE nor MSGKEY is specified,
program can monitor for exception messages by using MSGTYPE(*ANY) is assumed and the first new
the MONMSG command. message in the queue is received; that is, the mes-
sages are received in FIFO (first-in, first-out) order.
Note: Non-exception messages are received in first-in
first-out (FIFO) order. Ÿ If one of the message types specified on the
MSGTYPE parameter is *COMP, *DIAG, *INFO,
If an exception message is received from a message *INQ, *RPY, *COPY, or *RQS, a new message of
queue for a procedure, the related exception may not be the specified type is received in FIFO order. If the
handled at the time the RCVMSG command is run. The type is *EXCP, new messages are received in LIFO
RMV parameter can be used to specify whether the (last-in, first-out) order.
exception is to be handled by the RCVMSG command.
Ÿ If only MSGKEY is specified with a CL variable
*FIRST: The first message currently on the specified name and the message queue contains a message
message queue is received. with the specified message reference key, that
*INFO: An information only message is received. message is received. If the MSGKEY specified is
for a sender's copy message, the reply to the
*INQ: An inquiry message is received.
message is received if it is available. If the reply is
*LAST: The last message currently on the specified not available, blanks will be returned in all CL vari-
message queue is received. ables. If a message is requested by key and the
*NEXT: The message that follows the one specified in message is not available, an escape message is
the MSGKEY parameter is received. If there is not sent to the requesting program.

P3-660 OS/400 CL Reference - Part 2 (Full Version)


RCVMSG

Ÿ If MSGTYPE(*COPY) and MSGKEY program ignores the WAIT parameter (Value for Wait is
(&CL-variable-name) are specified, the sender's 0).
copy of an inquiry message is received.
0: The program does not wait for the arrival of a
Ÿ If both MSGTYPE and MSGKEY message. If a message of the specified type is not in
(&CL-variable-name) are specified and the message the queue when this command is processed, the speci-
queue has a message of that type, the message is fied CL variables are filled with blanks (or zeros, if they
received by the program. If the reference key is are decimal variables).
correct and the message type is not, then an error
*MAX: The program waits indefinitely for the arrival of
message is sent to the program.
the specified type of message.
Ÿ If MSGTYPE(*NEXT) is specified, MSGKEY must
number-of-seconds: Specifies the number of seconds
be specified. The message following the message
that the program waits for the arrival of a specific type of
with the specified reference key is received. If
message.
MSGKEY(*TOP) is specified with
MSGTYPE(*NEXT), the first message on the RMV
message queue is received. For call message Specifies whether the message received by the program
queues, this is the first message following the last is removed from the message queue. For exception
request message received. messages for unhandled exceptions, also specifies
whether the exception is to be handled by the RCVMSG
Ÿ If MSGTYPE(*PRV) is specified, MSGKEY must be
command. If MSGTYPE(*INQ) is specified, RMV(*NO)
specified. The message previous to the message
must also be specified so a reply to the inquiry message
with the specified reference key is recieved.
can be sent.
If MSGTYPE(*RPY) is specified with a MSGKEY value
*YES: The message is removed from the message
that refers to either a sender's copy or an inquiry
queue. If the message is an unhandled exception, the
message, any reply to the sender's copy or inquiry
exception is handled by running the RCVMSG
message is returned. If there is no reply to that sender's
command.
copy or inquiry message, blanks are returned. When the
MSGKEY value refers to an inquiry message, the WAIT *NO: The message is not removed from the message
parameter is ignored (this implies WAIT(0), which is the queue. It is left on the message queue as an old
default value for the WAIT parameter). message. If the message is an unhandled exception,
the exception is handled by running the RCVMSG
If MSGTYPE(*ANY) is specified with a KEYVAR variable
command.
and the first message type found is a reply message, the
KEYVAR variable returns the message reference key of Note: Old messages are messages that have been
the sender's copy message. Similarly, if received but not deleted. An old message can
MSGTYPE(*RPY) is specified with a KEYVAR variable, be received again in one of the following ways:
the message reference key of the sender's copy
1. The message reference key of the message
message is returned.
is specified for the MSGKEY parameter.
WAIT 2. A message type of *FIRST, *LAST, *NEXT,
Specifies the length of time (in seconds) that the or *PRV is specified for the MSGTYPE
program waits for a message of the specified type to parameter.
arrive in the message queue if it is not there when this
RCVMSG command is processed. If the message does *KEEPEXCP: If the message is an exception message
not arrive in the specified time, the CL variables named and the exception has not been handled, the exception
to receive message fields are filled with blanks. is left unhandled and the message is left on the
The program cannot wait for a message from a program message queue as a new message. It can be received
message queue unless it is receiving a reply. again by using the RCVMSG command to receive an
*EXCP message. If the message is not an exception
If a wait time is specified (not zero), the message queue
message, or if it is but the exception has already been
is implicitly allocated to the first user whose message is
handled, the message is left on the message queue as
received, and it is not released until the request has
an old message.
been handled by the program.
To handle an exception after the RCVMSG has been
If a message is sent to a message queue in the same
run, the command can be run a second time by speci-
job, and the message queue is in break delivery mode,
fying RMV(*YES) or RMV(*NO).
this parameter is ignored. (that implies WAIT(0), which
is the default value for the WAIT parameter). CCSID
Specifies the coded character set identifier (CCSID) that
If the value specified for MSGKEY refers to an inquiry
you want the message text returned in. This only
message, and MSGTYPE(*RPY) has been specified, the
applies to text returned in the MSG, SECLVL and
MSGDTA parameters. When replacement data is

Chapter 2. OS/400 Command Descriptions P3-661


RCVMSG

returned in the MSGDTA parameter or substituted into used again after a message has been received
the text returned in the MSG or SECLVL parameters, and then removed (by specifying *YES on the
only the part of the replacement text that is defined as a RMV parameter).
character that can be converted (*CCHAR) is converted.
The variable must be a character variable having a
The rest of the replacement data is not converted. For
length of 4 characters.
more information about the *CCHAR field, see the
ADDMSGD command. Note: When using the message reference key
(obtained from the CL variable specified by the
*JOB: The received message is converted to the
KEYVAR parameter of the Send Program
CCSID of the job before being returned.
Message (SNDPGMMSG) command) to receive
*HEX: The received message is not converted before the reply to an inquiry message, note that the
being returned. message reference key refers to the sender's
copy. The sender's copy message is located on
coded-character-set-identifier: Specify the CCSID that
the reply message queue (which defaults to the
you want your message converted to before being
program message queue that sent the inquiry
returned. Valid values range from 1 through 65535. For
message), not the message queue to which the
a list of valid CCSID values, see the International Appli-
inquiry message was sent.
cation Development book. Only CCSID values that a job
can be changed to will be accepted. MSG
For more information on the message handler and its Specifies the name of the CL character variable, if any,
use of CCSIDs, see the National Language Support that contains the message text when the message is
book. received by the program. This includes the message
data fields that were substituted for substitution variables
Parameters for Received Message Fields in the text before the message was sent (replies and
immediate messages contain no message data fields).
All of the following parameters are used to specify the names This is a variable-length field, but most first-level
of the CL variables that receive the specified fields and attri- message text is less than 132 characters in length. This
butes of a message when the message is received by the parameter receives the reply from an *INQ message
program. If WAIT (number-of-seconds) is specified, and the sent by the same program that issued the RCVMSG
time-out occurs, the variables, which must already be command.
declared in the program, are filled with blanks. If the
message field returned is larger than the CL variable speci- MSGLEN
fied, the message field is truncated; if the message field is Specifies the name of the CL decimal variable, if any,
shorter, it is padded with blanks. If the program does not that contains the total length of the first-level message
need the value for a specific message parameter, no CL vari- text available to be received. The variable must be a
able is specified for it. If a parameter is not specified, the decimal variable having a length of 5 positions.
corresponding message value is not received in the program.
SECLVL
KEYVAR Specifies the name of the CL character variable, if any,
Specifies the name of the CL character variable, if any, that contains the help text when the message is received
that contains the message reference key identifying the by the program. This includes the message data fields
message received by the program containing this that were substituted for substitution variables in the text
RCVMSG command. At the time the RCVMSG before the message was sent (replies and immediate
command is processed, the system returns the message messages do not have second-level messages). A
reference key to the variable specified by KEYVAR in message data field is a variable length field, but most
this command and changes the received message to an help text is less than 3000 characters in length.
old message. The message reference key can then be
SECLVLLEN
used in the MSGKEY parameter in a subsequent
Specifies the name of the CL decimal variable, if any,
RCVMSG command to receive the old message. If the
that contains the total length of the second-level
message is not found, blanks are returned for the
message available to be received. The variable must be
KEYVAR variable. For reply type messages, use the
a decimal variable having a length of 5 positions.
MSGKEY parameter on this command in conjunction
with the KEYVAR parameter on the SNDPGMMSG MSGDTA
command. The message reference key can also be Specifies the name of the CL character variable, if any,
used by this program for building message subfiles. The that contains the message data record received by the
CL variable is the name of the field for which the program as part of the message. The message data
SFLMSGKEY keyword is specified in the DDS for the record contains the substitution values (in a single char-
message subfile. acter string) that are used in the text of the received
message. The amount of data returned and its format
Note: For message queues not associated with call
depend on the message. Pointers contained in system
stack entries, message reference keys can be
messages are invalidated.

P3-662 OS/400 CL Reference - Part 2 (Full Version)


RCVMSG

Note: If you use data that has an invalidated pointer in – Program name (10) (for an ILE procedure, this
it an error message can occur. is the bound program name)
– Instruction number (4) (for an ILE procedure,
MSGDTALEN
this field is set to blanks)
Specifies the name of the CL decimal variable, if any,
Ÿ The next 1 character identifies the sender type
that contains the total length of the message data record
– "0" if the sender is an OPM program or a SLIC
available to be received. The variable must be a
program with 12 characters or less
decimal variable having a length of 5 positions.
– "1" if the sender is an ILE procedure and the
MSGID name is 256 characters or less
Specifies the name of the CL character variable, if any, – "2" if the sender is an ILE procedure and the
that contains the message identifier of the message name is more than 256 characters
received by the program. If the message being received – "3" if the sender is a SLIC program with more
is an immediate message, a message identifier is not than 12 characters
returned. The minimum length of the variable is 7 char- Ÿ The last 1 character identifies the sent-to type
acters. – "0" if the receiver is an OPM program
– "1" if the receiver is an ILE procedure and the
SEV name is 256 characters or less
Specifies the name of the CL decimal variable, if any, – "2" if the receiver is an ILE procedure and the
that contains the severity code of the message received name is more than 256 characters
by the program. The variable must be a decimal vari-
able having a length of two positions. If the message *LONG: The long format of the sender information is
being received is an immediate message, the message returned. The long format is 720 characters, with the
severity is not returned. last 46 characters set to blanks. The following informa-
tion is returned:
SENDER
Specifies the name of the CL character variable, if any, Ÿ The first 26 characters identify the sending job
that contains the identification of the sender of the – Job name (10)
message received through the RCVMSG command. – User name (10)
The length of the CL variable depends on the – Job number (6)
SENDERFMT specification. If SENDERFMT(*SHORT) Ÿ The next 13 characters are the date and time
is specified, the variable should be a minimum of 80 – Date (7) (in the format 0yymmdd)
characters. If SENDERFMT(*LONG) is specified, the – Time (6) (in the format hhmmss)
variable should be a minimum of 720 characters. Ÿ The next 1 character identifies the sender type
– "0" if the sender is an OPM program or a SLIC
SENDERFMT program with 12 characters or less
Specifies which format of the sender identification is – "1" if the sender is an ILE procedure and the
returned. This parameter is valid only when the name is 256 characters or less
SENDER parameter is specified. – "2" if the sender is an ILE procedure and the
*SHORT: The short format of the sender information is name is more than 256 characters
returned. The short format is 80 characters, with the last – "3" if the sender is a SLIC program with more
9 characters set to blanks. The following information is than 12 characters
returned: Ÿ The next 1 character identifies the sent-to type
– "0" if the receiver is an OPM program
Ÿ The first 26 characters identify the sending job – "1" if the receiver is an ILE procedure and the
– Job name (10) name is 256 characters or less
– User name (10) – "2" if the receiver is an ILE procedure and the
– Job number (6) name is more than 256 characters .
Ÿ The next 16 characters identify the sending program Ÿ The next 12 characters are the sender's program
– Program name (12) (for an ILE procedure, this name (for an ILE procedure, this is the bound
is the bound program name); if the sender type program name); if the sender type is 3 and the
is 3, the first three characters of this field are program name is greater than 12 characters in
less than symbols (<<<) followed by the last length, the first three characters of this field are less
nine characters of the program name than symbols (<<<) followed by the last nine charac-
– Instruction number (4) (for an ILE procedure, ters of the program name .
this field is set to blanks) Ÿ The next 10 characters are the sender's module
Ÿ The next 13 characters are the date and time name (if the sender is not an ILE procedure, this
– Date (7) (in the format 0yymmdd) field is set to blanks)
– Time (6) (in the format hhmmss) Ÿ The next 256 characters are the sender's procedure
Ÿ The next 14 characters identify the sent-to call stack name (if the sender is not an ILE procedure, this
entry if the message is sent to a call message field is set to blanks)
queue

Chapter 2. OS/400 Command Descriptions P3-663


RCVMSG

– For a nested procedure name, each procedure greater than 1, and each statement
name is separated by a colon (:) starting with number represents a point at which the
the outer-most procedure name , and ending message could have been sent. If it is
with the inner-most procedure name. not possible to return statement
– For a procedure name that is longer than 256 numbers, this count will be 0.
characters, three less than symbols (<<<) are – Statement numbers (30) (a maximum of 3
returned followed by the last 253 characters of statement numbers, 10 characters each)
the procedure name; the QMHRCPM API can
be used to obtain the entire procedure name RTNTYPE
Specifies the name of the CL variable, if any, that con-
Ÿ The next 1 character is blank tains the type code for the message received by the
Ÿ The next 4 characters are the number of statement program. The variable must be a character variable
numbers available having a length of 2 positions. The following values are
Note: A statement number represents a point in returned to indicate the message type:
the sending program at which the message
Value Message Type
was sent. For programs and non-optimized
01 Completion
procedures, this count is always 1. For opti-
02 Diagnostic
mized procedures, this count can be greater
04 Information
than 1, and each statement number repre-
05 Inquiry
sents a point at which the message could
06 Sender's Copy
have been sent. If it is not possible to return
08 Request
statement numbers, this count will be 0.
10 Request with prompting
Ÿ The next 30 characters return a maximum of 3 14 Notify (exception already handled at time of
statement numbers, 10 characters each RCVMSG)
Ÿ The next 320 characters return program or proce- 15 Escape (exception already handled at time of
dure information if the message being received was RCVMSG)
originally sent to a message queue associated with 16 Notify (exception not handled at time of
a call stack entry (otherwise, this field is set to RCVMSG)
blanks) 17 Escape (exception not handled at time of
– Sent-to program name (10) (for an ILE proce- RCVMSG)
dure, this is the bound program name) 21 Reply, not checked for validity
– Sent-to module name (10) (if the sender is not 22 Reply, checked for validity
an ILE procedure, this field is set to blanks) 23 Reply, message default used
– Sent-to procedure name (256) (if the sender is 24 Reply, system default used
not an ILE procedure, this field is set to blanks) 25 Reply, from System Reply List
- For a nested procedure name, each proce- ALROPT
dure name is separated by a colon (:) Specifies the name of the CL variable, if any, used to
starting with the outer-most procedure return the alert option of the message received by the
name, and ending with the inner-most pro- program. The variable must be a character variable 9
cedure name. positions in length.
- For a procedure name that is longer than
MSGF
256 characters, three less than symbols
Specifies the name of the CL variable, if any, used to
(<<<) are returned followed by the last 253
return the message file name of the message received
characters of the procedure name; the
by the program. If the message received is a stored
QMHRCVPM API can be used to obtain
message, the message file name of the file containing
the entire procedure name
the stored message is returned. If the received
– Blanks (10) message is not a stored message, the message file
– Number of statements available for the name is returned as blanks. The variable must be a
receiving call stack entry (4) character variable 10 positions in length.
Note: A statement number represents a point Note: The message file name returned on this param-
at which the sent-to program was sus- eter is the message file specified or defaulted on
pended (for example, due to a call oper- either the SNDPGMMSG or SNDUSRMSG
ation) at the time the message was command, not the overriding message file. If an
sent. For programs and non-optimized override was specified when sending the
procedures, this count is always 1. For message, the same override should be used
optimized procedures, this count can be when receiving the message.

P3-664 OS/400 CL Reference - Part 2 (Full Version)


RCVMSG

MSGFLIB is returned. For immediate messages, 0 is returned.


Specifies the name of the CL variable, if any, used to You can check for a conversion error by comparing the
return the message file library name of the message CCSID you passed in against the DTACCSID returned.
received by the program. If the message received is a If they are not equal and they are not 65535 or 0, a con-
stored message, the message file library name specified version error occurred.
when the message was sent is returned. If *LIBL was
specified on the send command, *LIBL is returned. If
the received message is not a stored message, the
Examples
message file library name is returned as blanks. The Example 1: Receiving a Message
variable must be a character variable 10 positions in
length. RCVMSG MSGQ(SMITH) MSGKEY(&KEY) MSG(&WORK)

Note: The message file library name returned on this This command receives the message having the message
parameter is the message file specified or reference key specified by the program variable &KEY from
defaulted on either the SNDPGMMSG or the message queue SMITH. The text of the message is
SNDUSRMSG command, not the overriding copied into the CL variable &WORK.
message file library. If an override was specified
when sending the message, the same override Example 2: Receiving a New Message
should be used when receiving the message. RCVMSG MSGQ(INV) WAIT(12ð) MSG(&WORK)
SNDMSGFLIB This command receives a new message from the message
Specifies the name of the CL variable, if any, used to queue named INV into the CL variable &WORK. The
return the name of the library that contains the message program waits no more than 120 seconds for the arrival of a
file used to send the message. If the message received new message if there are no new messages in the message
is stored in a message file, the name of the library con- queue. If there is more than one new message in the queue,
taining the message file is returned. For example, if the the first message in the queue is the message received by
name of the library containing the message file is the program.
MYLIB, and *LIBL is used to send a predefined
message, this parameter would return MYLIB. If the Example 3: Receiving a Message From a Procedure
message received is not a stored message, the
RCVMSG PGMQ(\SAME CURRENT_MONTH_TOTALS) MSGTYPE(\EXCP)
message file library name is returned as blanks. RMV(\KEEPEXCP) MSGID(&MID) MSG(&MTEXT)
TXTCCSID
This command receives an exception message from the pro-
Specifies the name of the CL variable, if any, used to
cedure CURRENT_MONTH_TOTALS. Since the specified
return the coded character set identifier (CCSID) associ-
name is more than 10 characters, the system does search
ated with the text returned by the MSG and SECLVL
for any programs. If the message is an unhandled excep-
parameters. If a conversion error occurs, or if the
tion, the message is left on the call message queue as a
CCSID you requested the text to be converted to is
new message and the exception is not handled by the
65535, the CCSID that the message description or the
RCVMSG command. The message ID is returned in the CL
text for an immediate message is stored in is returned.
variable &MID and the message text in the CL variable
Otherwise, the CCSID you wanted the text converted to
&MTEXT. To handle the exception and remove the
is returned. If you do not want the text converted before
message, run the following RCVMSG command:
it is returned to you but you do want to know which
CCSID that the message description or the text for an RCVMSG PGMQ(\SAME CURRENT_MONTH_TOTALS)
immediate message is stored in, specify 65535 on the MSGTYPE(\EXCP) RMV(\YES)
CCSID parameter, and the CCSID is returned by the
TXTCCSID parameter. You can also check for a con- Example 4: Receiving a Message from a Program or
version error by comparing the CCSID you passed in Procedure
against the TXTCCSID returned. If they are not equal RCVMSG PGMQ(\SAME TARGETPGM) MSGTYPE(\EXCP)
and they are not 65535, a conversion error occurred. RMV(\NO) MSGID(&MID) MSG(&MTEXT)

DTACCSID This command receives an exception message from the


Specifies the name of the CL variable, if any, used to message queue of the program or procedure named
return the coded character set identifier (CCSID) associ- TARGETPGM. Since the specified name is only 9 charac-
ated with the replacement data defined as *CCHAR. All ters, the system searches both programs and procedures.
other replacement data is not converted before it is Because RMV(*NO) is specified, if the message is an unhan-
returned. If a conversion error occurs, or if the CCSID dled exception, the exception is handled by the RCVMSG
you requested the text to be converted to is 65535, the command. The message is left on the message queue as
CCSID of the message data is returned. If there is no an old message.
*CCHAR replacement data in the text, 65535 is returned.
Otherwise, the CCSID you wanted the text converted to Example 5: Receiving a Message Using Qualifiers

Chapter 2. OS/400 Command Descriptions P3-665


RCVMSG

RCVMSG PGMQ(\SAME PRINT_RPT_FMT1 DEPTRPTS AREARPTS) tion. The message is always removed from the message
MSGTYPE(\EXCP) RMV(\YES) queue.
MSGID(&MID) MSG(&MTEXT)
Example 6: Receiving a Message Using a Partial Proce-
This command receives an exception message from the dure Name
message queue of the procedure named PRINT_RPT_FMT1.
RCVMSG PGMQ(\SAME HANDLE_FORM_NUM>>>)
The procedure must have been compiled into the module MSGID(&MID) MSG(&MTEXT)
DEPTRPTS and have been bound into the bound program
AREARPTS. Since RMV(*YES) is specified, the exception is This command receives a new message from the most
handled if the exception message is for an unhandled excep- recent procedure whose name begins with
HANDLE_FORM_NUM.

P3-666 OS/400 CL Reference - Part 2 (Full Version)


RCVNETF

RCVNETF (Receive Network File) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──RCVNETF──FROMFILE(──file-name──)──┬──────────────────────────────────────────────┬──┬──────────────────────────────┬────────5
│ ┌─\LIBL/────────┐ ┌─\FROMFILE─┐ │ │ ┌─\ONLY───────┐ │
└─TOFILE(──┼───────────────┼──┴─file-name─┴──)─┘ └─FROMMBR(──┴─member-name─┴──)─┘
├─\CURLIB/──────┤
└─library-name/─┘
(P) ──┬──────────────────────────┬──┬────────────────────────────┬──────────────────────────────5
5──┬────────────────────────────┬───
│ ┌─\FROMMBR────┐ │ │ ┌─\REPLACE─┐ │ │ ┌─\LAST─────────┐ │
└─TOMBR(──┼─\FIRST──────┼──)─┘ └─MBROPT(──┴─\ADD─────┴──)─┘ └─NBR(──┼─\ONLY─────────┼──)─┘
└─member-name─┘ └─member-number─┘
5──┬─────────────────────────┬──┬────────────────────────────┬─────────────────────────────────────────────────────────────────5%
│ ┌─\CURRENT──┐ │ │ ┌─\NETFILE─┐ │
└─USER(──┴─user-name─┴──)─┘ └─FROMTYPE(──┴─\SRC─────┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more
The Receive Network File (RCVNETF) command receives a information about printing the help text, refer to
network file and copies the records into a physical database “Printing CL Command Descriptions” in Chapter 1.
file or a save file.

If the original file is a save file, it must be received into a Required Parameter
save file. Once the file has been received, it is removed
FROMFILE
from the queue of network files. Before a file can be
Specifies the name of the file that is received. This is
received, the file specified by the TOFILE parameter must
the name of the file on the sending system.
already exist.

When a source physical file is sent, the source sequence Optional Parameters
number and change date in positions 1 through 12 of the
record are sent with the file. These are kept if the file is TOFILE
received into a source physical file, and are truncated if the Specifies the qualified name of the file that receives the
file is received into a nonsource physical file. When a file copied records.
that was originally a nonsource physical file is received into a Note: If the network file sent is a database file, the
source physical file, the source sequence numbers are to-file must be a physical database file with a
created and placed in front of the records. record length at least as large as that of the ori-
ginal file. If the file sent is a save file, the to-file
If the file is a physical file, the record length of the to-file
must be a save file. Overrides to this file are
must be at least as large as the record length of the original
ignored.
file. If the record length of the to-file is larger than that of the
original file, the records are padded to the end with the The name of the file can be qualified by one of the fol-
default record value for the to-file. lowing library values:

Restrictions: *LIBL: All libraries in the job's library list are


searched until the first match is found.
1. A user with security officer authority can receive the files
sent to any user. Users with other than security officer *CURLIB: The current library for the job is
authority can receive only files sent to them or to their searched. If no library is specified as the current
group profile. library for the job, the QGPL library is used.
2. The user must have read authority to the library con- library-name: Specify the name of the library to be
taining the to-file, and use and add authority to the searched.
to-file. The following additional authority may be
required: *FROMFILE: The network file is received into a file of
the same name as the file sent.
Ÿ Object management authority, if a member is added
to the file. file-name: Specify the name of the file into which the
network file is received.
Ÿ Object management authority and delete authority, if
a save file or existing physical file member is
cleared.

Chapter 2. OS/400 Command Descriptions P3-667


RCVNETF

FROMMBR user-name: Specify the name of the user to whom the


Specifies the name of the file member that is received. files were sent. Only a user with security officer
authority can specify a name other than the user's own
*ONLY: Only one member is received for this file. This
or the user's group profile.
parameter value is valid only if there is one member for
the specified network file, or if the NBR parameter is FROMTYPE
used to uniquely identify a single member. Specifies the type of file that is received. This option
member-name: Specify the name of the member that is should be used mainly when the file is an AS/400
received. A member name cannot be specified if the file system or System/38 source file that was sent by a
is a save file. System/370 Virtual Machine (VM) or Multiple Virtual
Storage (MVS) user. Since VM or MVS cannot identify
TOMBR whether the file is a source file, the user must specify
Specifies the database file member that receives the that the file is a source file or a nonsource file.
data.
*NETFILE: The network file type is used to determine
*FROMMBR: The data is received into a member with whether file type conversion is needed.
the same name as the member specified in the
If the file is a nonsource file and is:
FROMMBR parameter.
*FIRST: The first member in the file receives the copied Ÿ Received into a nonsource file, the file is received
records. unchanged.

member-name: Specify the name of the member that Ÿ Received into a source file, the sequence numbers
receives the records. A member name cannot be speci- and date fields are added.
fied if the file is a save file.
If the file is a source file and is:
MBROPT
Ÿ Received into a nonsource file, the sequence
Specifies whether the new records replace or are added
numbers and date fields are removed (the first 12
to the existing records.
bytes of each record).
*REPLACE: The system clears the existing member
Ÿ Received into a source file, the file is received
and adds the new records.
unchanged.
*ADD: The system adds the new records to the end of
*SRC: The file being received is a source file. The
the existing records.
sequence numbers and date fields are in the file. If the
NBR file is received into another source file, the sequence
Specifies the number of the file member that is received. numbers and date fields are not added to the file being
This number is used to identify the member that is received. If the file is received into a nonsource file, the
received when there is more than one member of the sequence numbers and date fields are removed from the
same name available for the file. file.
*LAST: The last network file member with the specified Note: *SRC must not be specified if the network file
member name is received. The last member is deter- does not contain sequence numbers and date
mined as the last member to arrive at the user's system; fields in the first 12 bytes of each record.
both FROMFILE and FROMMBR parameter values are
used to determine the last network file member.
Note: The file member that arrived last at the user's Examples
system may not have been the last one sent by
Example 1: Receiving a Member
the sending user. The network does not guar-
antee the arrival sequence of separately sent RCVNETF FROMFILE(FILEA) TOFILE(FILEB/FILEA)
files. FROMMBR(PAYROLL)

*ONLY: Only one file member of the specified file name This command receives member PAYROLL of file FILEA into
is received. If more than one member of that name is member PAYROLL of file FILEA in library FILEB. If there is
available, an escape message is sent, and the command an existing member of that name, the records in the member
is not run. are replaced. If multiple members of that name are avail-
member-number: Specify the number of the member able, the last one to arrive at the destination system is
that is received. received.

USER Example 2: Receiving a Network File


Specifies the user to whom the file was sent. RCVNETF FROMFILE(PERSONNEL) NBR(\LAST) USER(USR1)
*CURRENT: The user profile that is currently running is
used. This command receives a network file named PERSONNEL,
which was sent to user USR1, into a file with the same

P3-668 OS/400 CL Reference - Part 2 (Full Version)


RCVNETF

name. Because the FROMMBR parameter is not specified, RCVNETF FROMFILE(FILEA) TOFILE(FILEB/FILEA)
there must be only one member name available for this file. FROMMBR(PAYROLL) FROMTYPE(\SRC)
Because USR1 is specified, only someone with a user profile
of USR1, someone with a group profile of USR1, or someone This command specifies that the file being received is a
with security officer authority can use this command. source file and the sequence numbers and date fields are
not added to the file being received.
Example 3: Receiving a Source File

Chapter 2. OS/400 Command Descriptions P3-669


RCVTIEF

RCVTIEF (Receive Technical Information Exchange File) Command


Job: B Pgm: B REXX: B Exec

┌─\LIBL────────┐
(P) ─┬──────────────────────┬──┬────────────────────────┬──┬─────────────────────────┬───5%
55──RCVTIEF──LIB(──┼─\CURLIB──────┼──)────
└─library-name─┘ │ ┌─\ALL───┐ │ │ ┌─\NONE──┐ │ │ ┌─1ðððð──┐ │
└─TYPE(──┼─\OTHER─┼──)─┘ └─OUTPUT(──┴─\PRINT─┴──)─┘ └─MAXRCDS(──┼─\NOMAX─┼──)─┘
└─\SAVF──┘ └─number─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *SAVF: Save files are received.

The Receive Technical Information Exchange File (RCVTIEF) OUTPUT


command receives files transmitted from the remote support Specifies whether the output from the command is
network. shown at the requesting workstation or printed with the
job's spooled output. More information on this param-
Note: To see the parameter and value descriptions for this eter is in Appendix A, “Expanded Parameter
command, refer to the online help text. For more Descriptions.”
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. *NONE: A list of files received is not printed.
*PRINT: The output is printed with the job's spooled
output.
Required Parameters
MAXRCDS
LIB
Specifies the maximum size (number of records) of any
Specifies the library where the files are stored.
file that can be received.
*LIBL: The library list is used to locate the file.
10000: The maximum file size is 10000 records.
*CURLIB: The current library is used to locate the file.
*NOMAX: The system maximum is used.
If no library is specified as the current library for the job,
the QGPL library is used. number: Specify the maximum file size that can be
received.
library-name: Specify the name of the library where the
file is located.
Example
Optional Parameters RCVTIEF LIB(MAIL) TYPE(\OPEN) OUTPUT(\PRINT)
MAXRCDS(1ððð)
TYPE
Specifies the types of files that are received. This command receives from TIE all OPEN files (any file
except a save file). A list of the received files is printed. If
*ALL: All available files are received.
any of the received files are larger than 1000 records, the
*OTHER: Files with unspecified contents are received. RCVTIEF command fails. If all OPEN files are received suc-
cessfully, they are removed from the mailbox.

P3-670 OS/400 CL Reference - Part 2 (Full Version)


RD

RD (Remove Directory) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(1) ─'directory-path-name'──)────
55──RD──DIR(─── (P) ─┬──────────────────────┬──────────────────────────────────────────────────────────5%
│ ┌─\NO──┐ │
└─RMVLNK(──┴─\YES─┴──)─┘
Notes:
1 You can specify a pattern for this path name.

P All parameters preceding this point can be specified in positional form.

Purpose fully unlinked, and the object is deleted when no longer


in use.
This command is an alias for the Remove Directory
Note: To see the parameter and value descriptions for this
(RMVDIR) command and can also be issued using the fol-
command, refer to the online help text. For more
lowing alternative command names:
information about printing the help text, refer to
Ÿ RMDIR “Printing CL Command Descriptions” in Chapter 1.
Ÿ RMVDIR

The Remove Directory (RD) command removes a specified Required Parameter


directory from the system after all objects in the directory
DIR
have been unlinked and the directory is no longer in use. If
Specifies the path name of the directory or a pattern to
a directory being removed contains objects, this command
match the path name or names of directories to be
optionally unlinks all of the objects and then deletes the
removed.
directory. If the user does not have the authority to unlink
every object in the directory, only those objects for which the The object path name can be either a simple name or a
user has the authority are unlinked. When an object cannot name that is qualified with the name of the directory in
be unlinked, the directory and all objects in the directory that which the object is located. A pattern can be specified
cannot be unlinked are not removed. in the last part of the path name. An asterisk (*)
matches any number of characters and a question mark
For more information about integrated file system commands, (?) matches a single character. If the path name is qual-
see the Integrated File System Introduction book. ified or contains a pattern, it must be enclosed in apos-
trophes. For more information on specifying path
Restrictions: names, refer to Chapter 2, “Path Names (*PNAME).”
1. To remove a directory in QOpenSys and QSYS.LIB, the
user must have use and object existence authority for
Optional Parameter
the specified directory and object existence authority for
every object in it. In QDLS, the user must have *ALL RMVLNK
authority to the directory and *CHANGE authority to its Specifies whether to unlink all objects in a directory or
parent directory. QOpenSys requires *WX authority to not allow the directory to be deleted if it contains objects.
the parent directory.
*NO: Only an empty directory is removed. A directory
2. The user must have execute authority to the prefix direc- may contain entries for the directory (.) and for the
tory. If the user does not have object existence authority parent directory (..) and still be treated as an empty
for the directory being removed, nothing is removed or directory.
unlinked. If the user does not have object existence
*YES: All objects within the specified directory are
authority for one or more objects in the directory, those
deleted. If the file system that contains the directory
objects are not unlinked and the directory is not
does not support removal of links in the directory, the
removed.
error message CPFA0AC "Request cannot be com-
3. You cannot remove a directory if it is the current direc- pleted" is sent.
tory for your job.
4. This command cannot be used to delete reserved direc- Example
tories and libraries.
RD DIR('W') RMVLNK(\YES)
5. When an object is in use in QSYS.LIB or QDLS, the
object cannot be unlinked. When an object is in use in This command removes directory W after all of its objects
QOpenSys or the root file system, the object is success- have been unlinked. If directory W contains objects and you
have the authority to unlink all of those objects, all of the

Chapter 2. OS/400 Command Descriptions P3-671


RD

objects are unlinked and directory W is removed. If you do which you have authority are unlinked and the directory is
not have authority to unlink all of the objects, only those for not removed.

P3-672 OS/400 CL Reference - Part 2 (Full Version)


REN

REN (Rename) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──────────────────────────────────────────────────────────5%
55──REN──OBJ(──'object-path-name'──)──NEWOBJ(──new-object-name──)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Rename Document Library Object (RNMDLO) command


apply to objects in the QSYS.LIB and QDLS file
This command is an alias for the Rename (RNM) command systems.
and can also be issued using the following alternative
6. In the QSYS.LIB file system, the new name must contain
command names:
the same object type suffix.
Ÿ RNM
7. Some objects cannot be renamed. An error is returned
The Rename (REN) command changes the name of an if an attempt is made to rename these objects.
object in a directory. Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more
For more information about integrated file system commands, information about printing the help text, refer to
see the Integrated File System Introduction book. “Printing CL Command Descriptions” in Chapter 1.
Restrictions:
1. This command works on only one object. If a pattern is Required Parameters
specified on the OBJ parameter and more than one OBJ
object matches the pattern, you can select the object Specifies the path name of the object to be renamed.
from a list in an interactive job. If this is a batch job, the For more information on specifying path names, refer to
command fails with the error message CPFA08E, "More Chapter 2, “Path Names (*PNAME).”
than one name matches pattern."
NEWOBJ
2. When renaming an object in the root or QOpenSys file
Specifies the new name with which you can refer to the
systems, the user must have *OBJMGT authority to the
object. This name cannot contain any directory qual-
object being renamed, and *WX authority to the directory
ifiers and is in the same directory containing the existing
that contains the object. If the object being renamed is
object.
a directory, the user must also have *W authority to the
directory.
3. The user must have execute authority to each directory Example
in the path. REN OBJ('DECEMBER-1994-MONTHLY-PAYROLL-FILE')
4. Execute authority is required for all path prefixes in the NEWOBJ(JANUARY-1995-MONTHLY-PAYROLL-FILE)
QOPNSYS file system.
This command renames a file named
5. The authority requirements and restrictions from the DECEMBER-1994-MONTHLY-PAYROLL-FILE to a file
existing Rename Object (RNMOBJ) command and named JANUARY-1995-MONTHLY-PAYROLL-FILE.

Chapter 2. OS/400 Command Descriptions P3-673


RETURN

RETURN (Return) Command


Job: I Pgm: B,I REXX: I

55──RETURN─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────5%

Purpose Ÿ An End System (ENDSYS) command


Ÿ A Power Down System (PWRDWNSYS)
The Return (RETURN) command returns control either to the command)
next higher call stack entry in the call stack or to the sub-
end-of-job processing occurs unless you receive the
system monitor that controls the job.
inquiry message and indicate that you want to return
When used outside a CL program, this command performs to the command entry display.
the same function as the CF1 key. It returns control from the
There are no parameters for this command.
most recent invocation of QCMD (the IBM-supplied control
language processor that interprets and processes CL com-
mands for the system) back to the outside program manager. Example
When used in a CL program, this command returns control to RETURN
the next command or high-level language statement in the
calling program at the point where it called the returning When used in a CL program, this command returns control to
program. If this command is used in the highest invocation the CL command or high-level language statement imme-
level in the routing step (either the QCMD program, which is diately following the point in the last calling program at which
the interpretive CL command processor, or a CL program), this program was called. When used in a an interactive job,
the routing step is ended. this command returns control to the next higher level of
Note: If the RETURN command is entered interactively from QCMD. If the RETURN command is run in the highest call
the highest recursion level while the subsystem is level program (QCMD) in the routing step, an inquiry
undergoing a controlled end resulting from message is sent, and the user has the option of returning to
the command entry display. Otherwise, the routing step
Ÿ An End Subsystem (ENDSBS) command ends as usual.

P3-674 OS/400 CL Reference - Part 2 (Full Version)


RGZDLO

RGZDLO (Reorganize Document Library Object) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──RGZDLO──DLO(──┬─\ALL────────────────────┬──)──┬─────────────────────────────────────┬───(P) ────────────────────────────────────5
├─\SYSOBJNAM──────────────┤ │ ┌─\NONE───────┐ │
└─document-or-folder-name─┘ ├─FLR(──┼─\ANY────────┼──)────────────┤
│ └─folder-name─┘ │
(1) ─system-object-name──)─┘
└─SYSOBJNAM(───
5──┬──────────────────────────────┬──┬─────────────────────┬───────────────────────────────────────────────────────────────────5%
│ ┌─ð──────────────┐ │ │ ┌─\NO───┐ │
└─DAYS(──┴─number-of-days─┴──)─┘ └─MAIL(──┼─\YES──┼──)─┘
└─\ONLY─┘
Notes:
1 The SYSOBJNAM parameter is valid only when DLO(*SYSOBJNAM) is specified.

P All parameters preceding this point can be specified in positional form.

Purpose FLR(*NONE) is specified with this parameter, all


folderless documents are reorganized. If FLR(*ANY) is
The Reorganize Document Library Object (RGZDLO) specified with this parameter, all filed documents and
command allows the user to reorganize five types of objects: folders are reorganized. If MAIL(*YES) is specified with
1. All folderless documents. this parameter, all unfiled mail documents as well as all
filed documents and folders are reorganized. If
2. All unfiled mail documents. MAIL(*ONLY) is specified with this parameter, only
3. All filed documents and folders. unfiled mail documents are reorganized. If FLR(folder-
name) is specified with this parameter, all folders and
4. All documents and folders within a specified folder.
documents within it are reorganized.
5. Individual documents or folders specified by a folder
*SYSOBJNAM: A system object name specified on the
name, document name, or system-object-name.
SYSOBJNAM parameter is used to identify the docu-
When a document is reorganized, all unused storage is ment or folder being reorganized.
removed Some major causes of unused storage is adding, document-or-folder-name: Specify the name of the doc-
deleting, or editing information. ument or folder being reorganized. The FLR parameter
also can be used to reorganize a document by speci-
Restrictions: fying reorganization of:
1. The user must have *ALLOBJ or *SECADM special
Ÿ The folder that contains the document being reor-
authorities to specify DLO(*MAIL) or to specify
ganized
DLO(*ALL) and FLR(*ANY) together.
Ÿ The folder that contains the nested folder that con-
2. To reorganize a document or folder, the user must have
tains the document being reorganized
*ALLOBJ or *SECADM special authority or at least
*CHANGE authority to the document or folder and be
enrolled in the system directory. Optional Parameters
3. To reorganize a document or folder, the user must have
exclusive use of the document or folder. FLR
4. No other jobs that use documents or folders can be Specifies the name of the folder that contains the docu-
running while mail documents that have not been filed ment.
are being reorganized. Note: If the document does not exist in a folder,
Note: To see the parameter and value descriptions for this *NONE is specified.
command, refer to the online help text. For more *NONE: The document or folder is not located in a
information about printing the help text, refer to folder. If DLO(*ALL) is specified, this refers to all
“Printing CL Command Descriptions” in Chapter 1. folderless documents. If DLO(document-or-folder-name)
is specified, this refers to a first-level folder.
Required Parameters *ANY: The documents and folders being reorganized
are not qualified by any folder. This value is valid only
DLO when DLO(*ALL) is specified.
Specifies the document library object being reorganized.
folder-name: Specify the folder name that contains the
*ALL: All document library objects are reorganized. If documents or folders.

Chapter 2. OS/400 Command Descriptions P3-675


RGZDLO

SYSOBJNAM This command reorganizes all filed folders, documents, and


Specifies the system object name. This parameter is all unfiled mail documents that exist on the system.
valid only when DLO(*SYSOBJNAM) or
DOCL(*SYSOBJNAM) is specified. A full ten characters Example 3: Reorganizing Unfiled Mail Documents
must be specified. RGZDLO DLO(\ALL) FLR(\ANY) MAIL(\ONLY)
DAYS This command reorganizes all unfiled mail documents that
Specifies the number of days that must elapse since a exist on the system.
document was last referred to before it is eligible for
reorganization. Example 4: Reorganizing Folderless Documents
0: Any document may be reorganized. RGZDLO DLO(\ALL) FLR(\NONE)
number-of-days: Specify the number of days that This command reorganizes all folderless documents that
elapsed since a document or folder was last used before
exist on the system.
it is eligible for reorganization.

MAIL Example 5: Reorganizing Documents Within Folders


Specifies whether objects being reorganized include, Within Folders
omit, or are limited to mail documents that have not RGZDLO DLO(\ALL) FLR(FLRA)
been filed.
This command reorganizes all documents within folders con-
*NO: Mail documents that have not been filed are not tained in folder FLRA, then the folders within folder FLRA are
reorganized. reorganized.
*YES: Mail documents that have not been filed are reor-
ganized along with other folders and documents. This Example 6: Reorganizing an Individual Document or
value is valid only when DLO(*ALL) and FLR(*ANY) are Folder
specified. RGZDLO DLO(\SYSOBJNAM) SYSOBJNAM(DCN1371951)
*ONLY: Only mail documents that have not been filed
This command reorganizes the individual document or folder
are reorganized. This value is valid only when
identified by the SYSOBJNAM object.
DLO(*ALL) and FLR(*ANY) are specified.
Example 7: Reorganizing a Document
Examples RGZDLO DLO(DOC1) FLR(FLRA)

Example 1: Reorganizing Folders and Documents This command reorganizes the document named DOC1 in
RGZDLO DLO(\ALL) FLR(\ANY) folder FLRA.

This command reorganizes all filed folders and documents Example 8: Reorganizing Documents Not Referenced
that exist on the system. RGZDLO DLO(\ALL) FLR(\ANY) DAYS(3ð)

Example 2: Reorganizing Folders, Documents, and This command reorganizes all filed documents and folders
Unfiled Mail that have not been referenced in the past 30 days.
RGZDLO DLO(\ALL) FLR(\ANY) MAIL(\YES)

P3-676 OS/400 CL Reference - Part 2 (Full Version)


RGZPFM

RGZPFM (Reorganize Physical File Member) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ────────────────────────────────────5
55──RGZPFM──FILE(──┼───────────────┼──physical-file-name──)──┬──────────────────────────┬───
├─\CURLIB/──────┤ │ ┌─\FIRST──────┐ │
└─library-name/─┘ └─MBR(──┼─\LAST───────┼──)─┘
└─member-name─┘
5──┬────────────────────────────────────┬──┬─────────────────────────────────────────────────────┬──────────────────────────────5
│ ┌─\SAME──────────────┐ │ │ ┌─1.ðð───────────┐ ┌─1.ðð────────────┐ │
│ │ ┌──
─────────────┐ │ │ └─SRCSEQ(──┴─starting-value─┴──┼─────────────────┼──)─┘
6 (1)
└─SRCOPT(──┴───┬─\SEQNBR─┬─┴────┴──)─┘ └─increment-value─┘
└─\DATE───┘
5──┬────────────────────────────────────────────────────────────────────┬──┬────────────────────────────────────┬──────────────5%
│ ┌─\NONE─────────────────────────────────────────────┐ │ │ ┌─\ONLY──────────────┐ │
└─KEYFILE(──┼─\FILE─────────────────────────────────────────────┼──)─┘ └─RCDFMT(──┴─record-format-name─┴──)─┘
│ ┌─\LIBL/────────┐ │
└─┼───────────────┼──logical-file-name──member-name─┘
├─\CURLIB/──────┤
└─library-name/─┘
Notes:
P All parameters preceding this point can be specified in positional form.

1 A maximum of 2 repetitions

Purpose fied on the FILE and KEYFILE parameters identify the


files actually used in the reorganize operation, regard-
The Reorganize Physical File Member (RGZPFM) command less of overrides that may exist for these files.
compresses (removes deleted records from) one member of
a physical file in the database, and it optionally reorganizes Restriction:
that member. 1. During the reorganization of a physical member, the file
being reorganized is locked (similar to an *EXCL lock
If a keyed file is identified in the KEYFILE parameter, the
with no time-out) for the time of the RGZPFM command
system reorganizes the member by changing the physical
so that no access is possible. Concurrent attempts by
sequence of the records in storage to either match the keyed
another job to use a function that refers to the file may
sequence of the physical file member's access path, or to
result in a "lock up" for that work station until the running
match the access path of a logical file member that is
of the RGZPFM command is completed. Examples of
defined over the physical file. Reorganization can decrease
commands that cannot be used on a file that is concur-
file processing time when a program is reading sequentially
rently being reorganized are:
through a keyed physical file or through a keyed logical file.
Ÿ WRKACTJOB (Work with Active Jobs) (Select
When the member is reorganized and the KEYFILE param- 11-Locks; Select 1-WRKOBJLCK)
eter is specified, the sequence in which the records are actu- Ÿ DSPDBR (Display Database Relations)
ally stored is changed, and any deleted records are removed Ÿ DSPFD (Display File Description)
from the file. If the KEYFILE parameter is not specified, the Ÿ DSPFFD (Display File Field Description)
sequence of the records does not change, but deleted Ÿ DSPJOB (Display Job) (Option 12-Display Locks;
records are removed from the member. Optionally, new Option 14-Display Open files; F10-Job record locks)
sequence numbers and zero date fields are placed in the Ÿ WRKJOB (Work with Job) (Option 12-Display Locks;
source fields of the records. These fields are changed after Option 14-Display Open files; F10-Job record locks)
the member has been compressed or reorganized. Ÿ WRKLIB (Work with Library) (The library that con-
tains the file being reorganized)
Notes: Ÿ DSPOBJD (Display Object Description)
1. If the system ends abnormally, or if you end this Ÿ WRKOBJLCK (Work with Object Locks)
command using the End Job Abnormal (ENDJOBABN) Ÿ DSPRCDLCK (Display Record Locks)
command, you must rebuild all the access paths for the Ÿ WRKOBJ (Work with Object Descriptions)
member. If you cancel this command normally, the Ÿ DSPLIB (Display Library) (The library that contains
system rebuilds the access paths and prevents updates the file being reorganized)
to the physical file that has a unique access path over it Ÿ WRKF (Work with Files)
until the access path is completely rebuilt. Ÿ Any other function that refers to the file being reor-
ganized
2. The RGZPFM command ignores all file overrides that
are currently in effect for the job. The file names speci-

Chapter 2. OS/400 Command Descriptions P3-677


RGZPFM

2. The user needs object operational authority, object man- SRCSEQ


agement or alter authority, all data authority to the phys- Specifies, only when SRCOPT(*SEQNBR) is also speci-
ical file containing the member to be reorganized, and fied, the sequence number that is given to the first
execute authority to the library. The user also needs record in the source file member and the increment
object operational authority to the file specified on the value that is used to renumber all other records in the
KEYFILE parameter and execute authority to the library. member. If the member is renumbered but SRCSEQ is
not specified, SRCSEQ(1.00 1.00) is assumed; the
Note: To see the parameter and value descriptions for this
source records are renumbered sequentially starting with
command, refer to the online help text. For more
1.00, and the whole number increment of 1 is used.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. Element 1: Starting Value
1.00: The first source record in the member has a
Required Parameters sequence number of 0001.00.

FILE starting-value: Specify the sequence number (ranging


Specifies the qualified name of the physical file whose from 0000.01 through 9999.99) of the first source record
member is being reorganized. in the member. A whole number of no more than four
digits and/or a fraction of no more than two digits can be
The name of the physical file can be qualified by one of specified. If the starting value contains a fraction, a
the following library values: decimal point must be used. Examples are .01 and
*LIBL: All libraries in the job's library list are 3250.4. If a value has a fraction of .00, such as
searched until the first match is found. 5000.00, it can be coded without the fraction; either
5000 or 5000.00 is valid.
*CURLIB: The current library for the job is
searched. If no library is specified as the current Element 2: Increment Value
library for the job, the QGPL library is used. 1.00: The source records are renumbered in the
library-name: Specify the name of the library to be member with whole number increments of 1 (for
searched. example, 1.00, 2.00, 3.00 and so on).
increment-value: Specify the increment value (ranging
physical-file-name: Specify the name of the physical file.
from 0000.01 through 9999.99) for renumbering all
source records following the first record. A whole
Optional Parameters number of no more than four digits and/or a fraction of
no more than two digits can be specified. If the incre-
MBR ment value contains a fraction, a decimal point must be
Specifies the name of the member in the file being reor- used. For example, if SRCSEQ(5000 10) is specified,
ganized. the first record in the reorganized member is numbered
*FIRST: The first member in the database file is used. 5000.00, the second is 5010.00, the third is 5020.00,
and so on. If SRCSEQ(*N .25) is specified, the records
*LAST: The last member of the specified physical file is
are numbered 1.00, 1.25, 1.50, 1.75, 2.00, and so on. If
reorganized.
a starting value of .01 and an increment value of .01 are
member-name: Specify the name of the file member specified, there are 999,999 unique sequence numbers
being reorganized. possible. If the maximum sequence number of 9999.99
is reached, the remaining records are also assigned the
SRCOPT
sequence number 9999.99.
Specifies, for physical source files only, whether the
member places new numbers in the sequence number KEYFILE
field, places zeros in the date field, or changes both Specifies whether the physical file member has its arrival
fields. Changes occur after the records are compressed sequence changed to match its keyed sequence, is reor-
or reorganized. ganized in the sequence of a logical file member, or is
*SAME: The value does not change. not reorganized. If KEYFILE specifies a multiple-format
logical file and member, the RCDFMT parameter must
*SEQNBR: The records have a new sequence number also be specified.
placed into the sequence number field. The SRCSEQ
parameter specifies a start value and an increment Note: Join logical files cannot be specified as key files,
value. If *SEQNBR is specified, *DATE can also be and a logical file in this parameter is not allowed
specified. to have a select/omit access path.

*DATE: The records have a null date (000000) placed *NONE: The member is not reorganized; it is only com-
in the date field. If *DATE is specified, *SEQNBR can pressed by having its deleted records removed.
also be specified. *FILE: For a physical file member having a keyed
sequence access path, the arrival sequence of the

P3-678 OS/400 CL Reference - Part 2 (Full Version)


RGZPFM

records in the member is changed to match their keyed record-format-name: Specify the name of a record
sequence. format in the multiple-format logical file that is used to
reorganize the physical file member.
Element 1: Logical File Name
Note: Compression of a file occurs when the space
The name of the logical file can be qualified by one of
occupied by a deleted record is freed to hold a
the following library values:
record that is not deleted.
*LIBL: All libraries in the job's library list are
searched until the first match is found.
*CURLIB: The current library for the job is Examples
searched. If no library is specified as the current
Example 1: Reorganizing by Deleting Records
library for the job, the QGPL library is used.
RGZPFM FILE(PAYROLL) MBR(MBR1)
library-name: Specify the name of the library to be
searched. This command compresses member MBR1 of the PAYROLL
logical-file-name: Specify the qualified name of the file by removing the deleted records from the file member.
logical file whose member's sequence is used to reor-
Example 2: Reorganizing in Keyed Sequence
ganize the physical file member.
RGZPFM FILE(QCLSRC) MBR(CLMBR2)
Element 2: Member Name SRCOPT(\SEQNBR \DATE) KEYFILE(\FILE)
member-name: Specify the name of the member whose SRCSEQ(1.ðð .25)
sequence is used to reorganize the physical file
member. This command reorganizes the member CLMBR2 of the CL
source file QCLSRC in keyed sequence, with the sequence
RCDFMT number field used as the key. The reorganized member has
Specifies the record format name if the physical file new sequence numbers (starting at 1.00 and incrementing by
member is reorganized in the sequence of a multiple- .25) and a null date (000000) placed in all records when the
format logical file. original member is reorganized.
*ONLY: The logical file specified by the KEYFILE
parameter has only one record format, which is used to
reorganize the physical file member.

Chapter 2. OS/400 Command Descriptions P3-679


RLSCMNDEV

RLSCMNDEV (Release Communications Device) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ────────────────────────────────────────────────────────────────────────────────────────5%
55──RLSCMNDEV──DEV(──device-name──)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose 3279 Display station


3287 Printer (work station)
The Release Communications Device (RLSCMNDEV)
command restores the communications capability of a speci- 5219 Printer (work station)
fied device held by the Hold Communications Device 5224 Printer (work station)
(HLDCMNDEV) command.
5225 Printer (work station)
Restriction: This command is shipped with public 5251 Display station
*EXCLUDE authority and the QPGMR, QSYSOPR, QSRV,
and QSRVBAS user profiles have private authorities to use 5252 Display station
the command. 5256 Printer (work station)
Note: To see the parameter and value descriptions for this 5291 Display station
command, refer to the online help text. For more
5292 Display station
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. PLU1 Primary logical unit, type 1 (for SNA)
BSC Binary synchronous device (Base and
Required Parameters RJE)
BSCT This AS/400 system is a BSC multipoint
DEV
tributary station
Specifies the name of the device whose communications
are released after being held. Specify the name of the APPC Logical unit in advanced program-to-
device. Devices whose communications can be held by program communications network
the HLDCMNDEV command are:

DEV Value Device Example


3180 Display station RLSCMNDEV DEV(WSPRð5)
3277 Display station This command restores the communications capability of the
3278 Display station currently held device WSPR05.

P3-680 OS/400 CL Reference - Part 2 (Full Version)


RLSDSTQ

RLSDSTQ (Release Distribution Queue) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ───────────────────────────────────────────────────────5%
55──RLSDSTQ──DSTQ(──distribution-queue-name──)──PTY(──┬─\NORMAL─┬──)────
(1) ┘
└─\HIGH───
Notes:
1 This value is not valid for a SystemView distribution services (SVDS) type of distribution queue.

P All parameters preceding this point can be specified in positional form.

Purpose DSTQ
Specifies the name of the distribution queue being
The Release Distribution Queue (RLSDSTQ) command released from being held. Both normal and high priority
releases a distribution queue from a held status and allows it portions of the specified distribution queue are shown or
to be sent. printed. The queue specified must have been previously
configured. See the Configure Distribution Services
Distribution queue names are translated to the graphic char- (CFGDSTSRV) command or the Add Distribution Queue
acter set and code page 930 500, using the job's coded char- (ADDDSTQ) command.
acter set identifier (CCSID).
PTY
Restrictions: Specifies whether the normal priority or high priority
1. This command is shipped with public *EXCLUDE portion of the specified queue is released from being
authority and the QPGMR and QSYSOPR user profiles held.
have private authorities to use the command. *NORMAL: Releases the normal priority queue, which
2. Messages that report errors about distribution queues is for distributions with a service level of data low.
may display or print different characters than the user
*HIGH: Releases the high priority queue, which is for
entered for the distribution queue name because of
distributions with a service level of fast, status, or data
internal system transformations. Similarly (depending on
high.
the language used for the work station), the internal
value for a distribution queue name may differ from the
characters shown on the Work with Distribution Queue Examples
(WRKDSTQ) command. An error may be reported if the
character-string value specified for the DSTQ parameter Example 1: Releasing the Normal Priority Portion of the
does not match the rules for an internal distribution Queue
queue value or if it does not match the internal value for RLSDSTQ DSTQ(CHICAGO) PTY(\NORMAL)
any defined distribution queue (ignoring case differ-
ences). This command releases the normal priority portion of the
CHICAGO distribution queue.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more Example 2: Releasing the High Priority Portion of the
information about printing the help text, refer to Queue
“Printing CL Command Descriptions” in Chapter 1.
RLSDSTQ DSTQ(ATLANTA) PTY(\HIGH)

Required Parameters This command releases the high priority portion of the
ATLANTA distribution queue.

Chapter 2. OS/400 Command Descriptions P3-681


RLSIFSLCK

RLSIFSLCK (Release Integrated File System Locks) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P)─┬─RMTLOCNAME(───
55──RLSIFSLCK─── (1) ─'remote-location-name'──)─┬──────────────────────────────────────────────────────────────────5%
(1) ─'path-name'──)───────────────────┘
└─OBJ(───
Notes:
P All parameters preceding this point can be specified in positional form.

1 One parameter from the choices RMTLOCNAME or OBJ is required.

Purpose Ÿ The last character must be either A through Z or 0


through 9.
The Release Integrated File System Locks (RLSIFSLCK)
Ÿ Uppercase and lowercase characters are allowed,
command can be used to release all Network File System
but no significance is attached to the case.
(NFS) byte-range locks held by a specified NFS client, or to
release all byte-range locks (of any type) held on a specified Ÿ Blanks ( ) are not allowed.
object. This command should only be used to free resources Ÿ The special characters, period (.) and minus (-), are
that cannot be freed using normal means. allowed.
For more information about byte range locks, see the fcntl Ÿ Parts of the name separated by periods (.) cannot
API in the System API Reference book or the OS/400 exceed 63 characters in length.
Network File System Support book. Ÿ Names must be from 1 to 255 characters in length.
Restriction: You must have *IOSYSCFG special authority 'remote-location-name': Specify the host name or
to use this command. internet address of a remote system whose NFS-related
Note: To see the parameter and value descriptions for this locks on local files are to be released.
command, refer to the online help text. For more OBJ
information about printing the help text, refer to Specifies the path name of an object on which all byte-
“Printing CL Command Descriptions” in Chapter 1. range locks are to be released. This will release all locks
on that object, regardless of the type of lock or the type
Required Parameters of process that is holding them. A message will be sent
to each job whose locks are released.
RMTLOCNAME
'path-name': Specify the path name of the local object
Specifies the host name or internet address of a remote
for which all locks are to be released.
system whose NFS-related locks on local files are to be
released.
To be successful, the remote system name must be Examples
valid. You can assign host names to an internet
Example 1: Releasing Locks for a Remote System
address with the Work with TCP/IP host table entries
option on the Configure TCP/IP menu (CFGTCP RLSIFSLCK RMTLOCNAME('rainbow1')
command). Also, a remote name server can be used to
This command releases the NFS-related locks held on local
map remote system names to internet addresses. You
files by the system named rainbow1.
can use the Change remote name server option on the
CFGTCP menu to specify a remote name server. Example 2: Releasing Locks for a Local Object
Host names must follow these conventions: RLSIFSLCK OBJ('/CustAccounts/May')
Ÿ The first character must be either A through Z or 0
This command releases all byte-range locks held on the
through 9.
object /CustAccounts/May.

P3-682 OS/400 CL Reference - Part 2 (Full Version)


RLSJOB

RLSJOB (Release Job) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─┬────────────────────────────┬──────────────────────────5%
55──RLSJOB──JOB(────┬─────────────────────────────┬──job-name────)────
└─┬─────────────┬──user-name/─┘ │ ┌─\SELECT─┐ │
└─job-number/─┘ └─DUPJOBOPT(──┴─\MSG────┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose More information on this parameter is in Appendix A,


“Expanded Parameter Descriptions.”
The Release Job (RLSJOB) command makes a job eligible
job-name: Specify the name of the job being released.
for processing after that job has been held from processing
by the HLDJOB (Hold Job) command or if the job was sub- user-name: Specify the name of the user of the job
mitted to the system as a held job by the JOB or SBMJOB being released.
(Submit Job) commands. The job being released could have job-number: Specify the number of the job being
been on the job queue, output queue, or active in a sub- released.
system (competing for system resources) when it was held.
Spooled files that are held because SPLFILE(*YES) is speci- DUPJOBOPT
fied in the HLDJOB command are also released. Specifies the action taken when duplicate jobs are found
by this command.
Restriction: The job being released must belong to the user
*SELECT: The selection display is shown when dupli-
issuing the command or the user must have the special job
cate jobs are found during an interactive session. Other-
control authority (*JOBCTL).
wise, a message is issued.
Note: To see the parameter and value descriptions for this
*MSG: A message is issued when duplicate jobs are
command, refer to the online help text. For more
found.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1.
Examples
Required Parameters Example 1: Releasing a Job for Processing
JOB RLSJOB JOB(123456)
Specifies the qualified name of the job being released.
If no job qualifier is given, all of the jobs currently in the This command releases the job 123456 for processing. If
system are searched for the job name. If more than one the corresponding HLDJOB command had specified
of the specified names are found, a qualified job name SPLFILE(*YES), any spooled files for job 123456 are also
must be specified. released.

A job identifier is a qualified name with up to three ele- Example 2: Releasing a Job for Processing
ments. For example:
RLSJOB JOB(DEPTXYZ/987654)
job-name
user-name/job-name This command releases job name 987654 that was sub-
job-number/user-name/job-name mitted by a user through the user profile DEPTXYZ and later
held. The qualified form of the job name is used when jobs
with duplicate names exist in the system.

Chapter 2. OS/400 Command Descriptions P3-683


RLSJOBQ

RLSJOBQ (Release Job Queue) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ───────────────────────────────────────────────────────────────────5%
55──RLSJOBQ──JOBQ(──┼───────────────┼──job-queue-name──)────
├─\CURLIB/──────┤
└─library-name/─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *LIBL: All libraries in the job's library list are


searched until the first match is found.
The Release Job Queue (RLSJOBQ) command releases, for
*CURLIB: The current library for the job is
additional processing, the jobs on the specified job queue
searched. If no library is specified as the current
that were previously held by a HLDJOBQ (Hold Job Queue)
library for the job, the QGPL library is used.
command. If the jobs were held by something other than a
HLDJOBQ command, they are not released. library-name: Specify the name of the library to be
searched.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more job-queue-name: Specify the name of the job queue.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1.
Example
RLSJOBQ JOBQ(QBATCH)
Required Parameters
Jobs on the job queue QBATCH that were held by a
JOBQ
HLDJOBQ command become eligible for processing,
Specifies the qualified name of the job queue to be
including jobs that were placed on the queue while it was
released for further processing.
being held. Specific jobs that were held by the HLDJOB
The name of the job queue can be qualified by one of command or that were put on the job queue in the held state
the following library values: are not released.

P3-684 OS/400 CL Reference - Part 2 (Full Version)


RLSJOBSCDE

RLSJOBSCDE (Release Job Schedule Entry) Command


Job: B,I Pgm: B,I REXX Exec

┌─\ONLY────────┐
(P) ─ENTRYNBR(──┼─\ALL─────────┼──)──────────────────────────────────────────────5%
55──RLSJOBSCDE──JOB(──┬─\ALL──────────────┬──)────
├─job-name──────────┤ └─entry-number─┘
└─generic\-job-name─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose generic names, refer to “Generic Object Names” in


The Release Job Schedule Entry (RLSJOBSCDE) command Chapter 2. If a generic name is specified,
releases an entry, entries, or generic entries in the job ENTRYNBR(*ALL) must also be specified.
schedule. Each job schedule entry contains the information ENTRYNBR
needed to automatically submit a batch job one time, or at Specifies the number of the job schedule entry you want
regularly scheduled intervals. If you release a job schedule to release. The message sent when an entry is suc-
entry, a job is not submitted immediately, even if the date cessfully added contains the entry number. You can
and time at which it was scheduled to be submitted passed also determine the entry number by using the Work with
while the entry was held. The job is submitted on any future Job Schedule Entries (WRKJOBSCDE) command.
dates for which the entry is scheduled to be submitted. Press F11 from the Work with Job Schedule Entries
display to show the entry numbers of the selected
Restriction: To release entries, you must have *JOBCTL
entries.
special authority; otherwise you can release only those
entries that you added. *ONLY: One entry in the job schedule has the job name
specified on the JOB parameter. If *ONLY is specified
Note: To see the parameter and value descriptions for this
and more than one entry has the specified job name, no
command, refer to the online help text. For more
entries are released and a message is sent.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. *ALL: All entries with the specified job name are
released.

Required Parameters entry-number: Specify the number of the job schedule


entry you want to release.
JOB
Specifies the name of the job schedule entry.
Examples
*ALL: All of the job schedule entries for which you have
authority are released. If JOB(*ALL) is specified, Example 1: Releasing All Job Schedule Entries
ENTRYNBR(*ALL) must also be specified. RLSJOBSCDE JOB(\ALL) ENTRYNBR(\ALL)
job-name: Specify the name of the job schedule entry.
This command releases all the job schedule entries.
generic*-job-name: Specify a generic name. A generic
name is a character string of one or more characters fol- Example 2: Releasing an Individual Job Schedule Entry
lowed by an asterisk (*); for example, ABC*. The
RLSJOBSCDE JOB(PAYROLL) ENTRYNBR(\ONLY)
asterisk substitutes for any valid characters. A generic
name specifies all objects with names that begin with the This command releases entry PAYROLL in the job schedule.
generic prefix for which the user has authority. If an
asterisk is not included with the generic (prefix) name, Example 3: Releasing a Generic Job Schedule Entry
the system assumes it to be the complete object name. RLSJOBSCDE JOB(PAY\) ENTRYNBR(\ALL)
If the complete object name is specified, and multiple
libraries are searched, multiple objects can be released This command releases all entries in the job schedule with
only if *ALL or *ALLUSR library values can be specified the prefix PAY in their names.
for the name. For more information on the use of

Chapter 2. OS/400 Command Descriptions P3-685


RLSOUTQ

RLSOUTQ (Release Output Queue) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ────────────────────────────────────────────────────────────────5%
55──RLSOUTQ──OUTQ(──┼───────────────┼──output-queue-name──)────
├─\CURLIB/──────┤
└─library-name/─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *LIBL: All libraries in the job's library list are


searched until the first match is found.
The Release Output Queue (RLSOUTQ) command releases
*CURLIB: The current library for the job is
an output queue that was previously held by a HLDOUTQ
searched. If no library is specified as the current
(Hold Output Queue) command. This command allows all
library for the job, the QGPL library is used.
currently waiting spooled files, and all spooled files that are
added to the output queue after the command is sent, to be library-name: Specify the name of the library to be
processed by a spooling writer. Files held by a HLDSPLF searched.
(Hold Spooled File) command or created in a held state, are
output-queue-name: Specify the name of the output
not released.
queue being released.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more
information about printing the help text, refer to Example
“Printing CL Command Descriptions” in Chapter 1. RLSOUTQ OUTQ(PRINTER)

On the output queue named PRINTER, spooled files that


Required Parameters were held by a HLDOUTQ command are released for further
processing. This includes spooled files placed on the queue
OUTQ
while it was being held, except for specific files that have
Specifies the qualified name of the output queue.
been held by the HLDSPLF command or were put on the
The name of the output queue can be qualified by one queue in hold.
of the following library values:

P3-686 OS/400 CL Reference - Part 2 (Full Version)


RLSRDR

RLSRDR (Release Reader) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ───────────────────────────────────────────────────────────────────────────────────────5%
55──RLSRDR──RDR(──RDR-reader-name──)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Required Parameters


The Release Reader (RLSRDR) command releases the RDR
specified spooling reader making it available to again Specifies the name of the spooling reader being
process jobs on the job queue. The specified reader was released. Specify the name of the spooling reader.
held by a previous HLDRDR (Hold Reader) command. Data
is not lost. Example
Note: To see the parameter and value descriptions for this RLSRDR RDR(DISKETTE)
command, refer to the online help text. For more
information about printing the help text, refer to This command releases the diskette reader named
“Printing CL Command Descriptions” in Chapter 1. DISKETTE for additional processing.

Chapter 2. OS/400 Command Descriptions P3-687


RLSRMTPHS

RLSRMTPHS (Release Remote Phase) Command


Job: B,I Pgm: B,I Exec

55──RLSRMTPHS──PHASE(──phase-cname──)──PLAN(──plan-cname──)──APPID(──application-identifier-name──)─────────────────────────────5
(P) ─────────────────────────────────────────────────────────────5%
5──RMTLOCNAME(──remote-location-cname──)──DEV(──device-name──)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose NDM host system as part of the plan specified by the


PLAN parameter, and must be in a HELD state.
The Release Remote Phase (RLSRMTPHS) command initi-
ates a session between the AS/400 system and a PLAN
System/370* NetView* Distribution Manager (NDM) host Specifies the name of the NetView Distribution Manager
system. After the NDM releases the phase, or there is an plan that contains the phase that is released. This plan
unsuccessful attempt to release the phase, the session is must exist on the NDM host.
ended. APPID
Specifies the name of the NetView Distribution Manager
The following considerations apply when running this
application under which the plan name specified by the
command:
PLAN parameter was submitted. This is the same name
Ÿ The NDM phase specified by the PHASE parameter by which NDM was made known to MVS when it was
must exist and be part of the NDM plan specified by the generated.
PLAN parameter.
Ÿ The NDM phase specified by the PHASE parameter RMTLOCNAME
must be in a HELD state on the host system. Specifies the remote location name of the system with
Ÿ The NDM plan specified by the PLAN parameter must which this object communicates.
exist and have been previously submitted to the NDM Note: The device with which the user's program is
host application specified by the APPID parameter. communicating is specified on the DEV param-
Ÿ The device specified by the DEV parameter must be a eter.
Systems Network Architecture upline facility (SNUF)
device and must be program start request (PSR) DEV
capable. Specifies the device name of the AS/400 device that is
Ÿ This command runs only on a node which is currently used for the communications session started as a result
functioning as a host interface node to the NDM host of this command. The device must be a SNUF device
system. However, it is not restricted to releasing only and must be PSR capable.
those NDM phases whose destination is the node
sending the command. Any phase may be released for Example
any node that shares the same host interface node
RLSRMTPHS PHASE(MESSAGE) PLAN(ALEXPLAN) APPID(DSXNDM)
sending this command.
RMTLOCNAME(Að83187) DEV(SNUFDEV)
Restriction: This command is shipped with public
This command initiates a session using device SNUFDEV
*EXCLUDE authority and the QPGMR and QSYSOPR user
with remote location name A083187 to connect with the
profiles have private authorities to use the command.
System/370 NetView Distribution Manager host application
Note: To see the parameter and value descriptions for this DSXNDM. After the session connection is made, phase
command, refer to the online help text. For more MESSAGE, as part of plan ALEXPLAN, attempts to release.
information about printing the help text, refer to If the release is successful, message CPC8889 (Phase
“Printing CL Command Descriptions” in Chapter 1. MESSAGE released by NetView Distribution Manager) is
sent. If the release is not successful, message CPF8880
(Phase MESSAGE not released by Netview Distribution
Required Parameters Manager) is sent.
PHASE
Specifies the name of the NetView Distribution Manager
phase that is released. This phase must exist on the

P3-688 OS/400 CL Reference - Part 2 (Full Version)


RLSSPLF

RLSSPLF (Release Spooled File) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──RLSSPLF──FILE(──┬─\SELECT───────────┬──)────────────────────────────────────────────────────────────────────────────────────5
└─spooled-file-name─┘
┌─\─────────────────────────────────────────┐ ┌─\ONLY───────────────┐
(1) ─┴─┬─────────────────────────────┬──job-name─┴──)──SPLNBR(──┼─\LAST───────────────┼──)────
5──┬─JOB(─── (P) ┬────────────────────────5%
│ └─┬─────────────┬──user-name/─┘ └─spooled-file-number─┘ │
│ └─job-number/─┘ │
│ ┌─\CURRENT──┐ │
(2)
└─SELECT(────┼─\ALL──────┼──┬───────────────────────────────────────────────────┬──)───────────────┘
└─user-name─┘ │ ┌─\ALL────────┐ │
└─┼─\OUTQ───────┼──┬──────────────────────────────┬─┘
└─device-name─┘ │ ┌─\ALL──────┐ ┌─\ALL──────┐ │
└─┼─\STD──────┼──┼───────────┼─┘
└─form-type─┘ └─user-data─┘
Notes:
1 Only valid when FILE(*SELECT) is not specified.

P All parameters preceding this point can be specified in positional form.

2 Only valid when FILE(*SELECT) is specified.

Purpose JOB
Specifies the name of the job that created the file being
The Release Spooled File (RLSSPLF) command releases a released for additional processing.
specified spooled file formerly held on an output queue for
A job identifier is a special value or a qualified name
processing by a spooling writer. The RLSSPLF command
with up to three elements. For example:
can release a spooled file that was held by:
\
Ÿ A HLDSPLF command job-name
Ÿ HOLD(*YES) being specified in the device file or on an user-name/job-name
override command job-number/user-name/job-name

Ÿ SAVE(*YES) being specified in the device file, on an More information on this parameter is in Appendix A,
override command, or in the CHGSPLFA command “Expanded Parameter Descriptions.”

Ÿ A HLDWTR command and a RLSWTR command with *: The job that issued this RLSSPLF command is the
OPTION(*BYPASS) specified job that produced the spooled file being released. If no
job qualifier is given, all of the jobs currently in the
Ÿ The operator canceling a system request to put forms on system are searched for the simple job name.
the printer
job-name: Specify the name of the job that created the
Note: To see the parameter and value descriptions for this spooled file.
command, refer to the online help text. For more
information about printing the help text, refer to user-name: Specify the name of the user of the job that
“Printing CL Command Descriptions” in Chapter 1. created the file being released.
job-number: Specify the number of the job that created
the file being released.
Required Parameters
SPLNBR
FILE
Specifies the number of the spooled file being released.
Specifies the name of the spooled file that is being
More information on this parameter is in Appendix A,
released to be written to an output device.
“Expanded Parameter Descriptions.”
*SELECT: All spooled files that meet the selection
*ONLY: One spooled file from the job has the specified
requirements specified in the SELECT keyword are
file name. The number of the spooled file is not neces-
released. This value is mutually exclusive with the JOB
sary. If *ONLY is specified and more than one spooled
and SPLNBR parameters. Specifying *SELECT causes
file has the specified file name, a message is sent.
the JOB and SPLNBR parameters to be ignored.
*LAST: The spooled file with the highest number and
spooled-file-name: Specify the name of the spooled file
the specified file name is used.
being released.
spooled-file-number: Specify the number of the spooled
file to release that has the specified file name.
Optional Parameters

Chapter 2. OS/400 Command Descriptions P3-689


RLSSPLF

SELECT Element 3: Form Type Values


Specifies which group of files is selected for being
*ALL: Files for all form types are released.
released. Files can be selected based on user, device,
form type, or user data. Only files that meet each of the *STD: Only files that specify the standard form type are
requirements are selected. selected.

Element 1: User Values form-type: Only files with the specified form type are
released.
*CURRENT: Only files created by the user running this
command are released. Element 4: User Data Values

*ALL: Files created by all users are released. *ALL: Files with any user data tag specified are
released.
user-name: Specify the user name of the files being
released. user-data: Only files with the specified user data tag are
released.
Element 2: Device Values
*ALL: Files queued for any device or on any object
queue are released.
Example
RLSSPLF FILE(STOCK14) JOB(ðððð47/SMITH/MASTER)
*OUTQ: All files that are not queued for a device are
released. These files are on output queues that are not This command releases the spooled file named STOCK14
associated with printers. created in the job named MASTER. The file can now be
device-name: Specify the name of the device whose selected for processing by the spooling writer. The job was
queued files are released. run under the user profile named SMITH and was assigned
the job number 000047 by the system.

P3-690 OS/400 CL Reference - Part 2 (Full Version)


RLSWTR

RLSWTR (Release Writer) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─┬──────────────────────────┬──────────────────────────────────────────────────────────────5%
55──RLSWTR──WTR(──writer-name──)────
│ ┌─\CURRENT─┐ │
├─OPTION(──┼─\BEGIN───┼──)─┤
│ ├─\BYPASS──┤ │
│ ├─+number──┤ │
│ └─–number──┘ │
└─PAGE(──page-number──)────┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose message is sent to the user if the specified value goes


beyond the number of records or printed pages in the
The Release Writer (RLSWTR) command releases a held file. This option may be specified only if the writer was
writer for additional processing. The specified writer was held while producing the file.
held by a previously issued HLDWTR (Hold Writer)
−number: Specify the number of pages preceding the
command. If the writer was writing a file when it was held,
point where the writer was held that it is released. An
the writer can be released either to resume writing the file it
error message is sent to the user if the specified value is
was writing or to start writing the next file. In any case, data
greater than the number of records or printed pages pre-
from the file that was being written when the HLDWTR
viously processed in the file before the writer was held.
command was issued is not lost.
This option may be specified only if the writer was held
Note: To see the parameter and value descriptions for this while producing the file.
command, refer to the online help text. For more
information about printing the help text, refer to PAGE
“Printing CL Command Descriptions” in Chapter 1. Specifies the page where the writer starts printing. This
parameter is mutually exclusive with the OPTION param-
eter and is only valid for a print writer. An error
Required Parameters message is sent if the PAGE parameter is specified for a
diskette writer. Specify the page number where the
WTR
writer starts printing.
Specifies the name of the spooling writer being released
to do additional processing.
Examples
Optional Parameters Example 1: Releasing a Writer at Beginning of File
OPTION RLSWTR WTR(PRINTER) OPTION(\BEGIN)
Specifies the point in the file where the writer is
released. Also, a diskette writer can be released if This command releases writer PRINTER to begin producing
*CURRENT is specified. the current file at its beginning.

*CURRENT: The writer is released at the point where it Example 2: Releasing Writer at Specified Point
was held by the HLDWTR (Hold Writer) command. This
RLSWTR WTR(PRTR) OPTION(-3)
option may be specified when the writer is not producing
a file. This command releases writer PRTR to begin printing again
*BEGIN: The writer is released at the beginning of the at a point three pages before the point where the writer was
current file. This option may be specified only if the held. That is, the last three pages previously printed are the
writer was held while producing the current file. first three pages printed this time.
*BYPASS: The writer is released at the beginning of Example 3: Starting Printing on Page Ten
the next file. The current file is implicitly held on the
RLSWTR WTR(PRTR) PAGE(1ð)
queue. This option may be specified only if the writer
was held while producing the current file. This command releases writer PRTR to start printing again at
+number: Specify the number of pages past the point page ten.
where the writer was held that it is released. An error

Chapter 2. OS/400 Command Descriptions P3-691


RMDIR

RMDIR (Remove Directory) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(1) ─'directory-path-name'──)────
55──RMDIR──DIR(─── (P) ─┬──────────────────────┬───────────────────────────────────────────────────────5%
│ ┌─\NO──┐ │
└─RMVLNK(──┴─\YES─┴──)─┘
Notes:
1 You can specify a pattern for this path name.

P All parameters preceding this point can be specified in positional form.

Purpose fully unlinked, and the object is deleted when no longer


in use.
This command is an alias for the Remove Directory
Note: To see the parameter and value descriptions for this
(RMVDIR) command and can also be issued using the fol-
command, refer to the online help text. For more
lowing alternative command names:
information about printing the help text, refer to
Ÿ RD “Printing CL Command Descriptions” in Chapter 1.
Ÿ RMVDIR

The Remove Directory (RMDIR) command removes a speci- Required Parameter


fied directory from the system after all objects in the directory
DIR
have been unlinked and the directory is no longer in use. If
Specifies the path name of the directory or a pattern to
a directory being removed contains objects, this command
match the path name or names of directories to be
optionally unlinks all of the objects and then deletes the
removed.
directory. If the user does not have the authority to unlink
every object in the directory, only those objects for which the The object path name can be either a simple name or a
user has the authority are unlinked. When an object cannot name that is qualified with the name of the directory in
be unlinked, the directory and all objects in the directory that which the object is located. A pattern can be specified
cannot be unlinked are not removed. in the last part of the path name. An asterisk (*)
matches any number of characters and a question mark
For more information about integrated file system commands, (?) matches a single character. If the path name is qual-
see the Integrated File System Introduction book. ified or contains a pattern, it must be enclosed in apos-
trophes. For more information on specifying path
Restrictions: names, refer to Chapter 2, “Path Names (*PNAME).”
1. To remove a directory in QOpenSys and QSYS.LIB, the
user must have use and object existence authority for
Optional Parameter
the specified directory and object existence authority for
every object in it. In QDLS, the user must have *ALL RMVLNK
authority to the directory and *CHANGE authority to its Specifies whether to unlink all objects in a directory or
parent directory. QOpenSys requires *WX authority to not allow the directory to be deleted if it contains objects.
the parent directory.
*NO: Only an empty directory is removed. A directory
2. The user must have execute authority to the prefix direc- may contain entries for the directory (.) and for the
tory. If the user does not have object existence authority parent directory (..) and still be treated as an empty
for the directory being removed, nothing is removed or directory.
unlinked. If the user does not have object existence
*YES: All objects within the specified directory are
authority for one or more objects in the directory, those
deleted. If the file system that contains the directory
objects are not unlinked and the directory is not
does not support removal of links in the directory, the
removed.
error message CPFA0AC "Request cannot be com-
3. You cannot remove a directory if it is the current direc- pleted" is sent.
tory for your job.
4. This command cannot be used to delete reserved direc- Example
tories and libraries.
RMDIR DIR ('W') RMVLNK(\YES)
5. When an object is in use in QSYS.LIB or QDLS, the
object cannot be unlinked. When an object is in use in This command removes directory W after all of its objects
QOpenSys or the root file system, the object is success- have been unlinked. If directory W contains objects and you
have the authority to unlink all of those objects, all of the

P3-692 OS/400 CL Reference - Part 2 (Full Version)


RMDIR

objects are unlinked and directory W is removed. If you do which you have authority are unlinked and the directory is
not have authority to unlink all of the objects, only those for not removed.

Chapter 2. OS/400 Command Descriptions P3-693


RMVACC

RMVACC (Remove Access Code) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌──
─────────────┐
55──RMVACC──ACC(───6─access-code─┴───
(1) ──)────
(P) ────────────────────────────────────────────────────────────────────────────────────5%

Notes:
1 A maximum of 50 repetitions

P All parameters preceding this point can be specified in positional form.

Purpose information about printing the help text, refer to


“Printing CL Command Descriptions” in Chapter 1.
The Remove Access Code (RMVACC) command removes
an access code from the system that was previously defined
by the Add Access Code (ADDACC) command. Required Parameters
ACC
Notes:
Specifies the access codes to remove from the system.
1. This command can take a long time to run because it The access code is a decimal number ranging from 1
must update each object in the document library that has through 2047. If the access code specified is not
been assigned the access code being removed. defined to the system, a diagnostic message is sent, and
2. This command removes the access code from all filed processing continues with any additional access codes
documents and folders, from all users authorized to the specified.
access code, and from the system.
Example
Restriction: This command is shipped with public
*EXCLUDE authority. RMVACC ACC(3ðð)

Note: To see the parameter and value descriptions for this This command removes access code 300 from the system.
command, refer to the online help text. For more

P3-694 OS/400 CL Reference - Part 2 (Full Version)


RMVAJE

RMVAJE (Remove Autostart Job Entry) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ─────────────────────────────────────5%
55──RMVAJE──SBSD(──┼───────────────┼──subsystem-description-name──)──JOB(──job-name──)────
├─\CURLIB/──────┤
└─library-name/─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *LIBL: All libraries in the job's library list are


searched until the first match is found.
The Remove Autostart Job Entry (RMVAJE) command
*CURLIB: The current library for the job is
removes a job entry that starts automatically from the speci-
searched. If no library is specified as the current
fied subsystem description.
library for the job, the QGPL library is used.
Restriction: To use this command, the user must have library-name: Specify the name of the library to be
object operational and object management authorities for the searched.
specified subsystem description.
subsystem-description-name: Specify the name of the
Note: To see the parameter and value descriptions for this subsystem description from which the autostart job
command, refer to the online help text. For more entry is being removed.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. JOB
Specifies the name of the job entry to remove.

Required Parameters
Example
SBSD
RMVAJE SBSD(MYLIB/PAYROLL) JOB(INITIAL)
Specifies the qualified name of the subsystem
description from which the autostart job entry is being This command removes job entry named INITIAL that starts
removed. automatically from the PAYROLL subsystem description in
The name of the subsystem description can be qualified the library MYLIB.
by one of the following library values:

Chapter 2. OS/400 Command Descriptions P3-695


RMVALRD

RMVALRD (Remove Alert Description) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ────────────────────────────────────────5%
55──RMVALRD──MSGID(──message-ID──)──ALRTBL(──┼───────────────┼──alert-table-name──)────
├─\CURLIB/──────┤
└─library-name/─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose The name of the alert table can be qualified by one of


the following library values:
The Remove Alert Description (RMVALRD) command allows
you to remove an alert description that was added previously *LIBL: All libraries in the job's library list are
by the ADDALRD command. More information on alerts is in searched until the first match is found.
the Alerts Support book. *CURLIB: The current library for the job is
Note: To see the parameter and value descriptions for this searched. If no library is specified as the current
command, refer to the online help text. For more library for the job, the QGPL library is used.
information about printing the help text, refer to library-name: Specify the name of the library to be
“Printing CL Command Descriptions” in Chapter 1. searched.

alert-table-name: Specify the name of the alert table.


Required Parameters
MSGID
Example
Specifies the message identifier for the alert description
to be removed. RMVALRD MSGID(USR1234) ALRTBL(USER/USRMSGS)

ALRTBL This command removes the alert description for message


Specifies the alert table from which this alert description identifier USR1234.
is removed.

P3-696 OS/400 CL Reference - Part 2 (Full Version)


RMVAUTLE

RMVAUTLE (Remove Authorization List Entry) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌──
─────────┐
55──RMVAUTLE──AUTL(──┬─authorization-list-name──────────┬──)──USER(───6─user-ID─┴───
(1) ──)────
(P) ─────────────────────────────────────5%
└─generic\-authorization-list-name─┘
Notes:
1 A maximum of 50 repetitions

P All parameters preceding this point can be specified in positional form.

Purpose authorization-list-name: Specify the authorization list


name from which the user entries are removed.
The Remove Authorization List Entry (RMVAUTLE)
generic*-authorization-list-name: Specify the generic
command removes user entries from an authorization list.
name of the authorization list. A generic name is a char-
The authorization list must already exist.
acter string of one or more characters followed by an
Restrictions: asterisk (*); for example, ABC*. The asterisk substitutes
for any valid characters. A generic name specifies all
1. Only the owner of the authorization list, a user with objects with names that begin with the generic prefix for
authorization list management authority (*AUTLMGT) on which the user has authority. If an asterisk is not
the authorization list, or a user with all object (*ALLOBJ) included with the generic (prefix) name, the system
authority can use this command. assumes it to be the complete object name. If the com-
2. The user with *AUTLMGT authority can only remove a plete object name is specified, and multiple libraries are
user if the user with *AUTLMGT authority has at least searched, multiple objects can be removed only if *ALL
the same specific authorities as the user being removed. or *ALLUSR library values can be specified for the
name. For more information on the use of generic
Note: To see the parameter and value descriptions for this
names, refer to “Generic Object Names” in Chapter 2.
command, refer to the online help text. For more
information about printing the help text, refer to USER
“Printing CL Command Descriptions” in Chapter 1. Specifies the user entry or entries to be removed from
the authorization list. Up to 50 user entries can be
specified.
Required Parameters
AUTL
Example
Specifies the name of the authorization list from which
the user entries are removed. The authorization list RMVAUTLE AUTL(PAYROLL) USER(TOM JULIE KAREN)
must exist.
This command removes users TOM, JULIE, and KAREN
from the authorization list PAYROLL.

Chapter 2. OS/400 Command Descriptions P3-697


RMVBKP

RMVBKP (Remove Breakpoint) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──RMVBKP──┬─────────────────────────────────────────────┬──┬─────────────────────────────┬─── (P) ────────────────────────────────5%


│ ┌─\───────────────────────────┐ │ │ ┌─\DFTPGM──────┐ │
(1) ─┼─\ALL────────────────────────┼──)─┘ └─PGM(───
└─STMT(─── (3) ─┼─\ALL─────────┼──)─┘
│ ┌──
──────────────────────┐ │ └─program-name─┘
6 (2) ─┘
└───statement-identifier─┴───
Notes:
1 STMT cannot be specified if PGM(*ALL) is specified.

2 A maximum of 10 repetitions

3 PGM cannot be specified if STMT(*) is specified.

P All parameters preceding this point can be specified in positional form.

Purpose specified. If STMT(*) is specified, the breakpoint that the


most recently stopped program has reached is removed.
The Remove Breakpoint (RMVBKP) command removes one Also, all breakpoints can be removed from all programs
or more breakpoints from the specified program being in debug mode.
debugged. It can also remove all breakpoints from all pro-
*: The most recent breakpoint at which a program is
grams in debug mode.
currently stopped is the breakpoint removed.
Restrictions: *ALL: All breakpoints in the specified program are
1. This command is valid only in debug mode. To start removed.
debug mode, refer to the STRDBG (Start Debug) statement-identifier: Specify the statement identifiers
command. removed from the program specified by the PGM param-
2. This command cannot be used if the user is servicing eter. No more than 10 identifiers can be specified.
another job, and that job is on a job queue, or is being
held, suspended, or ended. PGM
3. This command cannot be used to remove breakpoints Specifies the program from which the specified break-
from a bound program. points are removed. This parameter can be specified
only if STMT (*) is omitted.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more *DFTPGM: The default program is the program whose
information about printing the help text, refer to breakpoints are removed.
“Printing CL Command Descriptions” in Chapter 1. *ALL: All programs currently in debug mode have their
breakpoints removed. PGM(*ALL) is valid only if the
STMT parameter is not specified.
Optional Parameters
program-name: Specify the name of the program from
STMT which the specified breakpoints are removed.
Specifies which high-level language (HLL) statements or
machine instructions in a program have their breakpoints
removed. Breakpoints can be removed from a specified Example
program (PGM parameter) or from the most recent RMVBKP STMT(1ðð)
program that has reached a breakpoint (STMT(*) speci-
fied). If a program is specified, one or more statement This command removes the breakpoint that is on statement
identifiers can be specified or all the breakpoints can be 100 from the default program.

P3-698 OS/400 CL Reference - Part 2 (Full Version)


RMVCCTRTE

RMVCCTRTE (Remove Circuit Route) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─────────────────────────────────────5%
55──RMVCCTRTE──CCTNAME(──IPX-circuit-name──)──RMTNETNBR(──remote-IPX-network-number──)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Note: The circuit which the route is associated with


must not be in an active state when you attempt
The Remove Circuit Route (RMVCCTRTE) command to remove the route.
removes the definition of a static route from the Internetwork
IPX-circuit-name: Specify the name of the IPX circuit for
Packet Exchange (IPX) configuration. The route must have
which the route is being removed. The IPX circuit name
been previously configured using the Add Circuit Route
can be 1 to 18 characters in length.
(ADDCCTRTE) CL command or by selecting Option 1 from
the Work with Circuit Routes display. RMTNETNBR
Specifies the remote IPX network number or system that
Restriction: You must have *IOSYSCFG special authority this route connects to. The remote IPX network number
to use this command. is usually the internal IPX network number of the remote
Note: To see the parameter and value descriptions for this server or router. The remote IPX network number is a
command, refer to the online help text. For more 4-byte hexadecimal number ranging from 00000001
information about printing the help text, refer to through FFFFFFFE.
“Printing CL Command Descriptions” in Chapter 1. 'FFFFFFFE'X is allowed in this case since this value is
for the "designated" router in an IPX network and this
Required Parameters AS/400 might be the designated router.

CCTNAME
Specifies the unique name of the circuit from which this Example
static route is being removed. The circuit is usually an RMVCCTRTE CCTNAME(CIRCUIT2)
X.25 SVC on demand type circuit. The static route is RMTNETNBR(ð23D62A7)
only associated with this circuit. The circuit must have
been previously configured using the Add IPX Circuit This command removes a static route from the IPX config-
(ADDIPXCCT) CL command or by selecting option 1 uration associated with a circuit named CIRCUIT2 and a
from the Work with IPX Circuits display. remote IPX network number of '023D62A7'X.

Chapter 2. OS/400 Command Descriptions P3-699


RMVCCTSRV

RMVCCTSRV (Remove Circuit Service) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──────────────────────5%
55──RMVCCTSRV──CCTNAME(──IPX-circuit-name──)──SRVNAME(──service-name──)──SRVTYPE(──┬─\ADVPRTSVR──┬──)────
├─\ARCHIVEQ───┤
├─\ARCHIVESVR─┤
├─\FILESVR────┤
├─\JOBQ───────┤
├─\JOBSVR─────┤
├─\NTWENHINTG─┤
├─\PRTQ───────┤
├─\PRTSVR─────┤
├─\RMTBRGSVR──┤
└─\SVRMAP─────┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose comma (,)


asterisk (*)
The Remove Circuit Service (RMVCCTSRV) command question mark (?)
removes the definition of a static service for a circuit from the
Internetwork Packet Exchange (IPX) configuration. service-name: Specify the name of the remote system's
service. The service name can be 1 to 48 characters.
A static service is uniquely identified by the combination of The name is padded with null characters to the 48th
the circuit name (CCTNAME), service name (SRVNAME) byte. The 48th byte must be a null character.
and service type (SRVTYPE) values. The service must have
SRVTYPE
been previously configured using the Add Circuit Service
Specifies the type of service available on the remote
(ADDCCTSRV) CL command or by selecting Option 1 from
system. This is a required parameter value. A set of
the Work with Circuit Services display.
special values are allowed including *PRTQ and
Restriction: You must have *IOSYSCFG special authority *FILESVR that represent the well known server type
to use this command. values. Users can also enter a variable value for 2 byte
hexadecimal value.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more Note: The hex values of '0000'X through '8000'X and
information about printing the help text, refer to 'FFFF'X are reserved service type values.
“Printing CL Command Descriptions” in Chapter 1. The set of allowed special values and their hex values
are:
Required Parameters *ADVPRTSVR: An advertising print server type is avail-
able. The hex value of '0047'X is used.
CCTNAME
The circuit is usually an X.25 SVC on demand type *ARCHIVEQ: An archive queue server type is available.
circuit. The static route is only associated with this The hex value of '0008'X is used.
circuit. The circuit must have been previously configured *ARCHIVESVR: An archive server type is available.
using the Add IPX Circuit (ADDIPXCCT) CL command The hex value of '0009'X is used.
or by selecting option 1 from the Work with IPX Circuits
*FILESVR: A file server type is available. The hex
display.
value of '0004'X is used.
IPX-circuit-name: Specify the name of the IPX circuit
*JOBQ: A job queue server type is available. The hex
which the service is defined to. The IPX circuit name
value of '000A'X is used.
must be 1 to 18 characters in length.
*JOBSVR: A job server type is availale. The hex value
SRVNAME of '0005'X is used.
Specifies the name of the service available on the
remote system. Characters allowed for this parameter *NTWENHINTG: A NetWare Enhanced Integration for
include any English upper-case character A-Z, 0-9, and the AS/400 server type is available.
any character in the 7-bit ASCII code page 1009 except:
The hex value of '08B0'X is used.
forward slash (/)
backward slash (\)
*PRTQ: A print queue server type is available. The hex
semicolon (;)
value of '0003'X is used.
colon (:)

P3-700 OS/400 CL Reference - Part 2 (Full Version)


RMVCCTSRV

*PRTSVR: A print server type is available. The hex Example


value of '0007'X is used.
*RMTBRGSVR: A remote bridge server type is avail- RMVCCTSRV CCTNAME(CIRCUIT2)
SRVNAME(FILEPRINTER1)
able. The hex value of '0024'X is used.
SRVTYPE(\FILESVR)

*SVRMAP: The AS/400 port mapping server is avail- This command removes a static service that had been
able for mapping service names to port numbers. The defined to a circuit named CIRCUIT2 in the IPX configuration
hex value of '0899'X is used. with a service name of FILEPRINTER and a service type of
file server.

Chapter 2. OS/400 Command Descriptions P3-701


RMVBNDDIRE

RMVBNDDIRE (Remove Binding Directory Entry) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
55──RMVBNDDIRE──BNDDIR(──┼───────────────┼──binding-directory-name──)───────────────────────────────────────────────────────────5
├─\CURLIB/──────┤
├─\USRLIBL/─────┤
└─library-name/─┘
┌──
────────────────────────────────────────────────────────────────┐
│ ┌─\LIBL/────────┐ ┌─\SRVPGM─┐ │
6 (1) ──)──────────────────────────────────────────────5%
5──OBJ(────(──┼───────────────┼──┬─\ALL─────────────────┬──┼─────────┼──)─┴───
└─library-name/─┘ ├─object-name──────────┤ └─\MODULE─┘
└─generic\-object-name─┘
Note:
1 A maximum of 50 repetitions

Purpose Element 1: Removing an Object by Name


The name of the object can be qualified by one of the
The Remove Binding Directory Entry (RMVBNDDIRE)
following library values:
command removes an entry from the binding directory.
*LIBL: All libraries in the job's library list are
Restrictions: searched until the first match is found.
1. You must have *READ and *OBJOPR authority for the library-name: Specify the name of the library to be
library where the binding directory is being updated. searched.
2. You must have *OBJOPR and *DELETE authority to the
binding directory. *ALL: All objects with the specified type are removed
from the specified library.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more object-name: Specify the name of the object to remove.
information about printing the help text, refer to generic*-object-name: Specify the generic name of the
“Printing CL Command Descriptions” in Chapter 1. object. A generic name is a character string of one or
more characters followed by an asterisk (*); for example,
Required Parameters ABC*. The asterisk substitutes for any valid characters.
A generic name specifies all objects with names that
BNDDIR begin with the generic prefix for which the user has
Specifies the binding directory from which an entry is authority. If an asterisk is not included with the generic
removed. (prefix) name, the system assumes it to be the complete
The name of the binding directory can be qualified by object name. If the complete object name is specified,
one of the following library values: and multiple libraries are searched, multiple objects can
be removed only if *ALL or *ALLUSR library values can
*LIBL: All libraries in the job's library list are be specified for the name. For more information on the
searched until the first match is found. use of generic names, refer to “Generic Object Names”
*CURLIB: The current library for the job is in Chapter 2.
searched. If no library is specified as the current Element 2: Removing an Object by Type
library for the job, the QGPL library is used.
*SRVPGM: Indicates the object being removed is a
*USRLIBL: Only the libraries in the user portion of service program.
the job's library list are searched.
*MODULE: Indicates the object being removed is a
library-name: Specify the name of the library to be module.
searched.

binding-directory-name: Specify the name of the binding Example


directory to be updated. RMVBNDDIRE BNDDIR(SOURCE) OBJ(LIST)
OBJ
This command allows you to remove the object LIST from
Specifies the object name to be removed from the
the binding directory SOURCE.
binding directory.

P3-702 OS/400 CL Reference - Part 2 (Full Version)


RMVCFGLE

RMVCFGLE (Remove Configuration List Entries) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─CFGL(───
55──RMVCFGLE──TYPE(──┬─\APPNDIR───┬──)──── (1) ─Async-network-address-list-name──)──────────────────────────────────────────5
├─\APPNLCL───┤
├─\APPNRMT───┤
├─\APPNSSN───┤
├─\ASYNCADR──┤
├─\ASYNCLOC──┤
├─\RTLPASTHR─┤
└─\SNAPASTHR─┘
5──┬──────────────────────────────────────────┬──┬────────────────────────────────────┬─────────────────────────────────────────5
│ ┌──
─────────────────────┐ │ └─APPNRMTE(──┤ APPNRMTE Details ├──)─┘
└─APPNLCLE(───6─local-location-name─┴───
(2) ──)─┘

5──┬───────────────────────────────────────┬──┬────────────────────────────────────────────┬────────────────────────────────────5
│ ┌──
─────────────────┐ │ │ ┌──
──────────────────────┐ │
└─ASYNCADRE(───6─network-address─┴─── 6─remote-location-name─┴───
(2) ──)─┘ └─ASYNCLOCE(─── (2) ──)─┘

5──┬───────────────────────────────────────────┬──┬────────────────────────────────────────────────┬────────────────────────────5
│ ┌──
────────────────────┐ │ │ ┌─\ANY──────────────────────┐ │
└─RTLPASTHRE(───6─retail-device-name─┴───
(2) ──)─┘ └─FTRCPNAME(───
(4) ─┼─generic\-filtered-CP-name─┼──)─┘
└─filtered-CP-name──────────┘
5──┬──────────────────────────────────────────────┬──┬────────────────────────────────────────────────────┬─────────────────────5
│ ┌─\NETATR────────────────┐ │ │ ┌─\ANY─────────────────────────┐ │
(4) ─┴─filtered-CP-network-ID─┴──)─┘ └─LCLLOCNAME(───
└─FTRCPNETID(─── (5) ─┼─generic\-local-location-name─┼──)─┘
└─local-location-name──────────┘
┌──
──────────────────────────────────────┐
5───6┬────────────────────────────────────┬┴────────────────────────────────────────────────────────────────────────────────────5%
(3) ─)─┘
└─SNAPASTHRE(──(──group-name──)───
APPNRMTE Details:
┌──
────────────────────────────────────────────────────────────────────────────────────────────┐
│ ┌─\NETATR───────────────────┐ │
6
├────(──┬─\ANY─────────────────┬──┼───────────────────────────┼──┬─────────────────────────┬──)─┴───────────────────────────────┤
└─remote-location-name─┘ └─remote-network-identifier─┘ │ ┌─\NETATR─────────────┐ │
└─┼─────────────────────┼─┘
└─local-location-name─┘
Notes:
1 Required only for TYPE(*ASYNCADR).

2 A maximum of 50 repetitions

3 A maximum of 254 repetitions

4 This parameter is valid only if TYPE(*APPNDIR) is specified.

5 This parameter is valid only if TYPE(*APPNSSN) is specified.

P All parameters preceding this point can be specified in positional form.

Purpose TYPE
Specifies one of the possible configuration list types.
The Remove Configuration List Entries (RMVCFGLE)
*APPNDIR: An advanced peer-to-peer networking
command removes entries from a configuration list.
(APPN) directory search filter configuration list is used.
Note: The user may also use the full screen entry display of The user can specify one APPN directory search filter
the Change Configuration List (CHGCFGL) command entry in the configuration list.
to add, remove, or change entries in an existing list *APPNLCL: An APPN local location list is used. The
except for the configuration list TYPE(*SNAPASTHR). user can specify up to 476 APPN local location entries in
Note: To see the parameter and value descriptions for this the configuration list.
command, refer to the online help text. For more *APPNRMT: An APPN remote location list is used. The
information about printing the help text, refer to user can specify up to 1898 APPN remote location
“Printing CL Command Descriptions” in Chapter 1. entries in the configuration list.
*APPNSSN: An APPN session end point filter config-
Required Parameters uration list is used. The user can specify one APPN
session entry in the configuration list.

Chapter 2. OS/400 Command Descriptions P3-703


RMVCFGLE

*ASYNCADR: An asynchronous network address list is location name being used. When a bind is received
used. The user can specify up to 294 asynchronous from another system, this is the Secondary Logical Unit
network address entries in the configuration list. (SLU) name being used.
*ASYNCLOC: An asynchronous remote location list is Note: This parameter is valid only if TYPE(*APPNSSN)
used. The user can specify up to 4995 asynchronous is specified.
remote location entries in the configuration list.
*ANY: Any local location name will be filtered by the
*RTLPASTHR: A retail pass-through list is used. The local system.
user can key up to 450 retail pass-through entries in the
generic*-local-location-name: Specify the generic local
configuration list.
location name (part of a name followed by an asterisk)
*SNAPASTHR: An SNA pass-through list is used. The of the local location(s) being filtered. The generic local
user can key one SNA pass-through entry in the config- location name allows one entry to be defined for all local
uration list. location names, on the system, with a name that
matches the characters preceding an *.
CFGL
Specifies the name of the configuration list. This param- local-location-name: Specify the local location name that
eter is valid only when *ASYNCADR is specified on the is being filtered by the local system.
TYPE parameter. Only one of the other configuration list
APPNLCLE
types is allowed on a system. The list types have
Specifies the APPN local location entry. If
system-supplied names: QAPPNDIR, QAPPNLCL,
TYPE(*APPNLCL) is specified, this value is required.
QAPPNRMT, QAPPNSSN, QASYNCADR,
Up to 50 entries can be specified for this parameter.
QASYNCLOC, QRTLPASTHR, QSNAPASTHR.
APPNRMTE
Specifies the APPN remote location entry. If
Optional Parameters TYPE(*APPNRMT) is specified, this value is required.
FTRCPNAME Up to 50 entries can be specified for this parameter.
Specifies the control point name of the adjacent control Element 1: Remote Location Name
point that is being filtered by the local system when a
directory search request is made. *ANY: The system potentially accepts all requests sent
to it.
Note: This parameter is valid only if TYPE(*APPNDIR)
is specified. remote-location-name: Specify the remote location of
the entry being removed from the configuration list.
*ANY: Any control point name is filtered.
Element 2: Remote Network Identifier
generic*-filtered-CP-name: Specify the generic control
point name (part of a name followed by an asterisk) of *NETATR: The RMTNETID value specified in the
the adjacent control point(s) being filtered. The generic system network attributes is used.
control point name allows one directory entry to be remote-network-identifier: Specify the remote network
defined for all control points, in a single network, with a identifier of the entry being removed from the configura-
name that matches the characters preceding an *. tion list.
filtered-CP-name: Specify the control point name of the Element 3: Local Location Name
adjacent control point being filtered.
*NETATR: The LCLLOCNAME value specified in the
FTRCPNETID system network attributes is used.
Specifies the control point network identifier of the adja- local-location-name: Specify the local location of the
cent control point being filtered by the local system when entry being removed from the configuration list.
a directory search request is made.
ASYNCADRE
Note: This parameter is valid only if TYPE(*APPNDIR)
Specifies the asynchronous network address entry. This
is specified.
value is required if TYPE(*ASYNCADR) is specified. Up
*NETATR: The LCLNETID value specified in the to 50 entries can be specified for this parameter.
system network attributes is used.
Note: All entries having the same network address as
filtered CP-network-ID: Specify the control point network that specified are removed from the configuration
identifier of the adjacent control point being filtered by list.
the local system.
ASYNCLOCE
LCLLOCNAME Specifies the asynchronous remote location entry. This
Specifies the local location name being supplied by the value is required if TYPE(*ASYNCLOC) is specified. Up
caller that is being filtered by the local system. When to 50 entries can be specified for this parameter.
the local system is initiating a session, this is the local

P3-704 OS/400 CL Reference - Part 2 (Full Version)


RMVCFGLE

RTLPASTHRE SNAPASTHRE
Specifies the retail pass-through entry. This value is Specifies the SNA pass-through entry. This value is
required if TYPE(*RTLPASTHR) is specified. Up to 50 required if TYPE(*SNAPASTHR) is specified. One
entries can be specified for this parameter. group entry can be specified for this parameter.
Note: All entries that have the same retail device name
as the one the user specified are removed from Example
the configuration list.
RMVCFGLE TYPE(\ASYNCLOC) ASYNCLOCE(RMTLOC1)

This command removes the configuration list entry


RMTLOC1 from the asynchronous remote location list
QASYNCLOC.

Chapter 2. OS/400 Command Descriptions P3-705


RMVCMNE

RMVCMNE (Remove Communications Entry) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ───────────────5
55──RMVCMNE──SBSD(──┼───────────────┼──subsystem-description-name──)──┬─DEV(──┬─\ALL─────────────────┬──)────┬───
├─\CURLIB/──────┤ │ ├─\APPC────────────────┤ │
└─library-name/─┘ │ ├─\ASYNC───────────────┤ │
│ ├─\BSCEL───────────────┤ │
│ ├─\FINANCE─────────────┤ │
│ ├─\INTRA───────────────┤ │
│ ├─\RETAIL──────────────┤ │
│ ├─\SNUF────────────────┤ │
│ ├─device-name──────────┤ │
│ └─generic\-device-name─┘ │
└─RMTLOCNAME(──remote-location-name──)─┘
5──┬───────────────────────────┬───────────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\ANY──────┐ │
(1) ─┴─mode-name─┴──)─┘
└─MODE(───
Notes:
P All parameters preceding this point can be specified in positional form.

1 MODE(*ANY) must be specified if DEV(*ASYNC), DEV(*BSCEL), DEV(*FINANCE), DEV(*INTRA), DEV(*RETAIL), or

DEV(*SNUF) is specified.

Purpose library-name: Specify the name of the library to be


searched.
The Remove Communications Entry (RMVCMNE) command
removes a communications device entry from an existing subsystem-description-name: Specify the name of the
subsystem description. subsystem description.

DEV
Restrictions:
Specifies the name of the device description or the type
1. The user of this command must have object operational of the device for which a communications device entry is
and object management authorities for the specified sub- being removed from the subsystem description.
system description.
Note: The DEV parameter and the RMTLOCNAME
2. All jobs that are active through the communications entry parameter are mutually exclusive.
being removed must be ended before this command can
*ALL: The *ALL communication entry is removed.
be run.
*APPC: The advanced program-to-program communica-
3. A communications entry cannot be removed from an
tions device entry is removed.
active subsystem while there are active jobs associated
with it. *ASYNC: The asynchronous communications device
entry is removed with this communications entry. This
Note: To see the parameter and value descriptions for this
value is valid only when MODE(*ANY) is specified.
command, refer to the online help text. For more
information about printing the help text, refer to *BSCEL: The binary synchronous equivalency link com-
“Printing CL Command Descriptions” in Chapter 1. munications device entry is removed. This value is valid
only when MODE(*ANY) is specified.

Required Parameters *FINANCE: The FINANCE communications device entry


is removed. This value is valid only when MODE(*ANY)
SBSD is specified.
Specifies the qualified name of the subsystem
*INTRA: The INTRA communications device entry is
description from which the communications device entry
removed. This value is valid only when MODE(*ANY) is
is being removed.
specified.
The name of the subsystem description can be qualified
*RETAIL: The RETAIL communications device entry is
by one of the following library values:
removed. This value is valid only when MODE(*ANY) is
*LIBL: All libraries in the job's library list are specified.
searched until the first match is found. *SNUF: The SNA upline facility communications device
*CURLIB: The current library for the job is entry is removed. This value is valid only when
searched. If no library is specified as the current MODE(*ANY) is specified.
library for the job, the QGPL library is used.

P3-706 OS/400 CL Reference - Part 2 (Full Version)


RMVCMNE

device-name: Specify the device description name or checking is not done on the remote location
the type of device to use with this communications name.
device entry. The name specified on the CRTDEVxxx
command associated with this device description name
is used. Optional Parameters
generic*-device-name: Specify the generic device MODE
description used with this remove communications Specifies the name of the mode of the device specified
device entry. A generic name is a character string of by the DEV parameter or the remote location specified
one or more characters followed by an asterisk (*); for by the RMTLOCNAME parameter from which the com-
example, ABC*. The asterisk substitutes for any valid munications device entry is removed.
characters. A generic name specifies all objects with
names that begin with the generic prefix for which the *ANY: The communications device entry which has a
user has authority. If an asterisk is not included with the value of *ANY for the device is removed.
generic (prefix) name, the system assumes it to be the mode-name: Specify the name of the mode entry of the
complete object name. If the complete object name is communications device or remote location from which
specified, and multiple libraries are searched, multiple the communications device entry is removed.
objects can be removed only if *ALL or *ALLUSR library
values can be specified for the name. For more infor-
mation on the use of generic names, refer to “Generic Example
Object Names” in Chapter 2. RMVCMNE SBSD(LIB2/SBS1) DEV(COMDEV)
RMTLOCNAME This command removes the communications device entry for
Specifies the name of the remote location that is used the device COMDEV from the subsystem description SBS1
with this object. in library LIB2.
Note: The remote location name specified on the
CRTDEV command can be used. Validity

Chapter 2. OS/400 Command Descriptions P3-707


RMVCNNLE

RMVCNNLE (Remove Connection List Entry) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─────────────────────────────────────────────────────5%
55──RMVCNNLE──CNNL(────connection-list-name────)──ENTRY(────entry────)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose CNNL
Specifies the name of the connection list.
The Remove Connection List Entry (RMVCNNLE) command
removes an entry from the specified connection list. ENTRY
Specifies which entry in the connection list is removed.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more
information about printing the help text, refer to Example
“Printing CL Command Descriptions” in Chapter 1. RMVCNNLE CNNL(CHICAGO) ENTRY(CORPORATE)

This command removes entry CORPORATE from the con-


Required Parameters nection list CHICAGO.

P3-708 OS/400 CL Reference - Part 2 (Full Version)


RMVCOMSNMP

RMVCOMSNMP (Remove Community for SNMP) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─┬────────────────────────┬─────────────────────────────────────────────────────────5%
55──RMVCOMSNMP──COM(──community-name──)────
│ ┌─\YES─┐ │
└─ASCIICOM(──┴─\NO──┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Optional Parameter


The Remove Community for SNMP (RMVCOMSNMP) ASCIICOM
command is used to remove a Simple Network Management Specifies whether the community name is translated to
Protocol (SNMP) community profile from the SNMP agent ASCII characters before it is compared with the commu-
community list. The community profile consists of a commu- nity name specified in a request from an SNMP
nity name, an object access specification, and a list of the manager. This parameter is used in combination with
SNMP managers that are part of the community. The combi- the community name to determine the community to be
nation of the community name (COM) and the translate to removed. If two communities have the same name and
ASCII community (ASCIICOM) parameters defines a commu- you don't specify the ASCIICOM parameter, the commu-
nity. nity with ASCIICOM set to *YES is removed.

Note: To see the parameter and value descriptions for this *YES: The community name is translated to ASCII char-
command, refer to the online help text. For more acters before it is compared with a community name
information about printing the help text, refer to specified by an SNMP manager.
“Printing CL Command Descriptions” in Chapter 1. *NO: The community name is not translated to ASCII
characters before it is compared with a community name
Required Parameter specified by an SNMP manager.

COM
Specifies the name of the SNMP community being
Example
removed. The community must already exist in the RMVCOMSNMP COM(ROCHESTER)
SNMP agent community list.
This command removes community ROCHESTER from the
community-name: Specify the name of the SNMP com- SNMP agent community list.
munity being removed. The name may contain charac-
ters that cannot be displayed.

Chapter 2. OS/400 Command Descriptions P3-709


RMVDIR

RMVDIR (Remove Directory) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(1) ─'directory-path-name'──)────
55──RMVDIR──DIR(─── (P) ─┬──────────────────────┬──────────────────────────────────────────────────────5%
│ ┌─\NO──┐ │
└─RMVLNK(──┴─\YES─┴──)─┘
Notes:
1 You can specify a pattern for this path name.

P All parameters preceding this point can be specified in positional form.

Purpose information about printing the help text, refer to


“Printing CL Command Descriptions” in Chapter 1.
The Remove Directory (RMVDIR) command removes a spec-
ified directory from the system after all objects in the direc-
tory have been unlinked and the directory is no longer in use. Required Parameter
If a directory being removed contains objects, this command DIR
optionally unlinks all of the objects and then deletes the Specifies the path name of the directory or a pattern to
directory. If the user does not have the authority to unlink match the path name or names of directories to be
every object in the directory, only those objects for which the removed.
user has the authority are unlinked. When an object cannot
be unlinked, the directory and all objects in the directory that The object path name can be either a simple name or a
cannot be unlinked are not removed. name that is qualified with the name of the directory in
which the object is located. A pattern can be specified
This command can also be issued using the following alter- in the last part of the path name. An asterisk (*)
native command names: matches any number of characters and a question mark
(?) matches a single character. If the path name is qual-
Ÿ RD
ified or contains a pattern, it must be enclosed in apos-
Ÿ RMDIR
trophes. For more information on specifying path
For more information about integrated file system commands, names, refer to Chapter 2, “Path Names (*PNAME).”
see the Integrated File System Introduction book.
Optional Parameter
Restrictions:
1. To remove a directory, the user must have use and RMVLNK
object existence authority for the specified directory and Specifies whether to unlink all objects in a directory or
object existence authority for every object in it. The user not allow the directory to be deleted if it contains objects.
must also have execute authority to the directory that *NO: Only an empty directory is removed. A directory
contains the directory to be removed. If you do not have may contain entries for the directory (.) and for the
object existence authority for the directory being parent directory (..) and still be treated as an empty
removed, nothing is removed or unlinked. If you do not directory.
have object existence authority for one or more objects
*YES: All objects within the specified directory are
in the directory, those objects are not unlinked and the
deleted. If the file system that contains the directory
directory is not removed.
does not support removal of links in the directory, the
2. You cannot remove a directory if it is the current direc- error message CPFA0AC "Request cannot be com-
tory for your job. pleted" is sent.
3. This command cannot be used to delete reserved direc-
tories and libraries. Example
4. When an object is in use in QSYS.LIB or QDLS, the
RMVDIR DIR('W') RMVLNK(\YES)
object cannot be unlinked. When an object is in use in
QOpenSys or the root file system, the object is success- This command removes directory W after all of its objects
fully unlinked, and the object is deleted when no longer have been unlinked. If directory W contains objects and you
in use. have the authority to unlink all of those objects, all of the
Note: To see the parameter and value descriptions for this objects are unlinked and directory W is removed. If you do
command, refer to the online help text. For more not have authority to unlink all of the objects, only those for
which you have authority are unlinked and the directory is
not removed.

P3-710 OS/400 CL Reference - Part 2 (Full Version)


RMVDIRE

RMVDIRE (Remove Directory Entry) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─┬────────────────────────────────┬────────────────────────────────────────────5
55──RMVDIRE──USRID(──user-ID──user-address──)────
│ ┌─\FIRST───────────┐ │
└─USRD(──┼─\ALL─────────────┼──)─┘
└─user-description─┘
5──┬────────────────────────────────────────────────────┬──────────────────────────────────────────────────────────────────────5%
│ ┌─\SYSVAL──────────────────────────┐ │
└─CMDCHRID(──┼─\DEVD────────────────────────────┼──)─┘
└─graphic-character-set──code-page─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose from the directory. If the user responds no, the user
ID and address is not removed from the directory.
The Remove Directory Entry (RMVDIRE) command removes
Ÿ If the request is not entered interactively (for
a specific entry from the system distribution directory. When
example, the request is from a batch CL program),
a user ID and address is removed from the directory, it is
the user ID and address is not removed from the
also removed from all distribution lists and the list of nick-
directory.
names for that user. However, the user ID and address for
that user is not removed in the list of nicknames for other Note: To see the parameter and value descriptions for this
users. command, refer to the online help text. For more
information about printing the help text, refer to
If an *ANY user is removed and an *ANY *ANY directory “Printing CL Command Descriptions” in Chapter 1.
entry exists, the user is not removed from the distribution
lists but the description is changed to the *ANY *ANY
description. Required Parameter
USRID
If a user ID and address has multiple descriptions associated
Specifies the user ID and address for the user entry to
with it, options exist to remove only a specific description or
be removed.
all descriptions.
Element 1: User ID
The RMVDIRE command does not provide interactive display
user-ID: Specify the user ID that is removed. Up to 8
support. This is provided by the Work with Directory Entries
characters can be specified.
(WRKDIRE) command.
Element 2: User Address
If the specified user ID, address, and description do not exist
user-address: Specify the user address to be removed.
in the directory, an error message is returned.
Up to 8 characters can be specified.
Restrictions:
1. The person running this command must have security Optional Parameters
administrator (*SECADM) authority.
USRD
2. The user ID and address being removed must not: Specifies the description associated with the user ID and
Ÿ Be enrolled in OfficeVision address. Since more than one entry can exist in the
directory for a specific user ID and address, the
Ÿ Have ownership of documents or folders in the Doc- description fully defines the user entry being removed.
ument Interchange Architecture (DIA) library
*FIRST: The first entry in the directory for the specified
If either of the above conditions are not met, the user ID user ID and address is removed. If only one entry
and address is not removed from the directory. exists, it is removed.
3. If the user ID and address being removed has not *ALL: All entries with the specified user ID and address
received mail from the mail queue, the following can are removed.
happen:
user-description: Specify up to 50 characters for the
Ÿ If the request is entered interactively, a status description for the user. This description must be the
message is sent asking whether the queue should same as the one in the directory for this user ID and
be cleared. If the user responds yes, the mail is address.
cleared from the queue and the user is removed

Chapter 2. OS/400 Command Descriptions P3-711


RMVDIRE

CMDCHRID Element 2: Code Page


Specifies the character identifier (graphic character set
code-page: Specify the code page. Valid values range
and code page) for data being specified as parameter
from 1 through 9999.
values on this command. This character identifier
(CHRID) is related to the display device used to specify
the command. More information about CHRID pro- Example
cessing is in the Application Display Programming book. RMVDIRE USRID(HURST NEWYORK)
*SYSVAL: The system determines the graphic char- USRD('Manager of Payroll')
acter set and code page values for the command param-
eters from the QCHRID system values. User ID and address HURST NEWYORK is removed if the
following is true:
*DEVD: The system determines the graphic character
set and code page values for the command parameter Ÿ An entry exists in the directory with the specified user
from the display device description where the command ID, address, and description.
is entered. This option is valid only when specified from Ÿ The user does not own any documents or folders in the
an interactive job. If this value is specified in an interac- document interchange architecture (DIA) library.
tive CL program or a batch job, an error message is
Ÿ The user is not enrolled in the OfficeVision.
sent.
Ÿ The user has received all mail from the mail queue.
Element 1: Character Set
In addition, the user is removed from all distribution lists.
graphic-character-set: Specify the graphic character set
values used to create the command parameters. Valid
values range from 1 through 9999 characters.

P3-712 OS/400 CL Reference - Part 2 (Full Version)


RMVDIRSHD

RMVDIRSHD (Remove Directory Shadow System) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─┬──────────────────────┬────────────────────────────────────────────────────5%
55──RMVDIRSHD──SYSNAME(──shadow-system-name──)────
│ ┌─\NO──┐ │
└─RMVDTA(──┴─\YES─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose are not part of an invariant character set and are not
available on all keyboards.
The Remove Directory Shadow System (RMVDIRSHD)
command removes a system that is currently shadowing
directory data to the local system. Optional Parameter
RMVDTA
Restriction: To use this command, you must have security
This parameter specifies whether to remove directory
administrator (*SECADM) authority.
data received from the system that is being removed.
Note: To see the parameter and value descriptions for this
*NO: Directory data that has been previously shadowed
command, refer to the online help text. For more
is left on the local system. Modifications are not made
information about printing the help text, refer to
to this data through shadowing unless you shadow data
“Printing CL Command Descriptions” in Chapter 1.
from another system that has shadowed data from the
system being removed.
Required Parameter *YES: Directory entry data that was shadowed from the
SYSNAME specified system is removed from the local system.
Specifies the name of the system for which shadowing is Department and location data is not removed.
to be removed. The name can contain a maximum of
eight alphanumeric characters. You can specify upper- Example
case letters A through Z, numbers 0 through 9, and
RMVDIRSHD SYSNAME(NYCITY) RMVDTA(\YES)
special characters @, #, $, and embedded blanks.
Embedded blanks must be enclosed in single quotation This command removes the system NYCITY from shadowing
marks ('). Leading blanks are not allowed. The @, #, and removes all the data shadowed from NYCITY.
and $ characters are not recommended because they

Chapter 2. OS/400 Command Descriptions P3-713


RMVDLOAUT

RMVDLOAUT (Remove Document Library Object Authority) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(2) ─┬─\SYSOBJNAM───────────────────┬──)──┬────────────────────────────┬──────────────────────────────────────5
55──RMVDLOAUT──DLO(───
├─\ALL─────────────────────────┤ │ ┌─\NONE───────┐ │
└─document-library-object-name─┘ (3) ─┴─folder-name─┴──)─┘
└─FLR(───
(P) ──┬───────────────────────────────────────┬─────────────────────────────────────5
5──┬────────────────────────────────────────┬───
│ ┌─\SAME────────────────────┐ │ │ ┌─\SAME───────────────────┐ │
└─USER(──┼─\ALL─────────────────────┼──)─┘ └─AUTL(──┴─authorization-list-name─┴──)─┘
│ ┌──
───────────────────┐ │
└──6─user-profile-name─┴───
(1) ─┘

5──┬─────────────────────────────────┬──┬───────────────────────────────────┬──────────────────────────────────────────────────5%
│ ┌─\SAME──────────────┐ │ └─SYSOBJNAM(──system-object-name──)─┘
└─ACC(──┼─\ALL───────────────┼──)─┘
│ ┌──
─────────────┐ │
└──6─access-code─┴───
(1) ─┘

Notes:
1 A maximum of 50 repetitions

2 If DLO(*SYSOBJNAM) is specified, then the FLR parameter is ignored.

3 If DLO(*ALL) is specified, then the FLR parameter must be specified.

P All parameters preceding this point can be specified in positional form.

Purpose user authority is removed. Up to 12 characters can be


specified.
The Remove Document Library Object Authority
(RMVDLOAUT) command is used to remove an existing
user's authority to documents or folders. Optional Parameters
FLR
The following types of authority can be removed:
Specifies the name of the folder that contains the docu-
Ÿ An existing specific user's authority ment.
Ÿ An existing authorization list's authority to the associated
*NONE: A folder name is not specified. If DLO(name)
document library object
is specified and the object is located in a folder, then
Ÿ An existing object access code associated with the doc-
FLR(*NONE) cannot be specified. If DLO(*ALL) is spec-
ument library object
ified, then FLR(*NONE) cannot be specified.
Restriction: The user of this command must have *ALL folder-name: Specify the user-assigned name of the
authority to the objects, be the owner of the objects, or have folder in which the object specified in the DLO parameter
*ALLOBJ authority. is located. The name can consist of a series of folder
Note: To see the parameter and value descriptions for this names if the folder containing the object is located in
command, refer to the online help text. For more another folder. Up to 63 characters can be specified.
information about printing the help text, refer to USER
“Printing CL Command Descriptions” in Chapter 1. Specifies the name of a user whose specific authority is
removed.
Required Parameters *SAME: The value does not change.
DLO *ALL: Specific user authority for all users is removed.
Specifies the document or folder from which authority is user-profile-name: Specify the name of the user profile
removed. from which specific authority is removed. Up to 50 user
*SYSOBJNAM: The system object name specified in profile names can be specified.
the SYSOBJNAM parameter has user authority
AUTL
removed.
Specifies that the authority specified in the existing
*ALL: All objects in a specified folder have user authorization list for the object named in the OBJ param-
authority removed. If DLO(*ALL) is specified, then the eter is removed.
FLR parameter must be specified.
*SAME: The value does not change.
document-library-object-name: Specify the user-
authorization-list-name: Specify the name of the existing
assigned name of the document or folder from which
authorization list whose authority for the object is
removed.

P3-714 OS/400 CL Reference - Part 2 (Full Version)


RMVDLOAUT

ACC SYSOBJNAM
Specifies the access codes to be removed for the object. Specifies the system object name. This parameter is
valid only when DLO(*SYSOBJNAM) or
*SAME: The value does not change.
DOCL(*SYSOBJNAM) is specified. A full ten characters
*ALL: All access codes for the object are removed. must be specified.
access-code: Specify which currently assigned access
codes (ranging from 0 through 2047) are removed. Up Example
to 50 access codes can be specified. Access code zero
(0) stands for public access of *USE. RMVDLOAUT DLO(DOCA) FLR(MYFLR) AUTL(MYLIST)

This command removes the authority of the authorization list


MYLIST for object DOCA in folder MYFLR.

Chapter 2. OS/400 Command Descriptions P3-715


RMVDSTLE

RMVDSTLE (Remove Distribution List Entry) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──RMVDSTLE──LSTID(──list-identification──list-qualifier──)────────────────────────────────────────────────────────────────────5
┌──
───────────────────────────────────────────────────────┐
5──USRID(───6─(──user-ID──┬────────────────────────────────────┬──)─┴───
(1) ──)────
(P) ──────────────────────────────────────────────────5
│ ┌─\FIRST───────────┐ │
└─user-address──┼──────────────────┼─┘
├─\ALL─────────────┤
└─user-description─┘
5──┬────────────────────────────────────────────────────┬──────────────────────────────────────────────────────────────────────5%
│ ┌─\SYSVAL──────────────────────────┐ │
└─CMDCHRID(──┼─\DEVD────────────────────────────┼──)─┘
└─graphic-character-set──code-page─┘
Notes:
1 A maximum of 300 repetitions

P All parameters preceding this point can be specified in positional form.

Purpose Both the user ID and address must be provided and


must be separated by at least one space. If any lower-
The Remove Distribution List Entry (RMVDSTLE) command case characters are specified, the system translates and
removes entries from an existing distribution list. Up to 300 stores them as uppercase. The description can be
entries can be removed from a list at one time. entered to specify the removal of a specific user ID.

Restriction: The user must have security administrator A list ID and address can be used in place of the user
authority (*SECADM) to remove entries from a distribution list ID and address to identify a remote distribution list that
owned by another user. Users can remove entries from dis- is removed from the distribution list.
tribution lists that they created. Up to 300 sets of user IDs, addresses, and descriptions
Note: To see the parameter and value descriptions for this can be specified. Each valid set is removed from the
command, refer to the online help text. For more distribution list.
information about printing the help text, refer to Element 1: User ID
“Printing CL Command Descriptions” in Chapter 1.
user-ID: Specify the user ID (or the valid list ID for a
remote list entry) of the user for whom the entry is
Required Parameters removed.

LSTID Element 2: User Address


Specifies the two-part list identifier of the distribution list user-address: Specify the user address (or the valid list
that is to have entries removed. address for a remote list entry) of the user for whom the
Element 1: List Identifier entry is removed.

list-ID: Specify the list identifier (ID) of the distribution Element 3: User Description
list. *FIRST: The first description in the specified user ID
Element 2: List Qualifier and address (or list ID and address) is removed. If only
one entry exists, it is the one removed from the list.
list-ID-qualifier: Specify the list ID qualifier of the distri-
bution list. *ALL: All the entries with the specified user ID and
address are removed from the distribution list.
Note: The distribution list identifier has two parts, the
ID and the qualifier, separated by at least one user-description: Specify the description for the user. If
space. If lowercase characters are specified, the a list ID is specified, specify the list description. The
system changes them to uppercase. description can be up to 50 characters in length.

The naming rules for the two-part list ID are iden-


tical to the rules for the user ID and address. A Optional Parameters
complete description of these rules is in the SNA
CMDCHRID
Distribution Services book.
Specifies the character identifier (graphic character set
USRID and code page) for data being specified as parameter
Specifies the user ID, address, and description of the values on this command. This character identifier
users for whom distribution list entries are removed. (CHRID) is related to the display device used to specify

P3-716 OS/400 CL Reference - Part 2 (Full Version)


RMVDSTLE

the command. More information about CHRID pro- Example


cessing is in the Application Display Programming book.
RMVDSTLE LSTID(CHICAGO DLIST)
*SYSVAL: The system determines the graphic char- USRID((HURST PAYROLL 'Manager of Payroll')
acter set and code page values for the command param- (LEE DEPT554 \FIRST)
eters from the QCHRID system values. (BOCA DLIST 'Remote Distribution list for Boca')
(BRYON WAREHSE \ALL))
*DEVD: The system determines the graphic character
set and code page values for the command parameter In this example, four user IDs are removed from the distribu-
from the display device description where the command tion list CHICAGO DLIST. The third user ID is, in fact, a
is entered. This option is valid only when specified from remote distribution list. All entries for BRYON WAREHSE
an interactive job. If this value is specified in an interac- are removed from the list.
tive CL program or a batch job, an error message is
sent.
Element 1: Character Set
Additional Considerations
graphic-character-set: Specify the graphic character set To remove entries from a list ID, the list ID must exist in the
values used to create the command parameters. Valid directory. If the list does not exist, an error message is
values range from 1 through 9999. returned.
Element 2: Code Page Up to 300 sets of user IDs, addresses and user descriptions
code-page: Specify the code page. Valid values range can be entered on this command. Each set of user IDs and
from 1 through 9999. addresses is examined to determine whether it exists in the
directory. If no such entry exists, an error message is
returned. If an entry is found, it is removed from the list.

Chapter 2. OS/400 Command Descriptions P3-717


RMVDSTQ

RMVDSTQ (Remove Distribution Queue) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──RMVDSTQ──DSTQ(──distribution-queue──)──────────────────────────────────────────────────────────────────────────────────────5%

Purpose 3. Messages that report errors about distribution queues


may display or print different characters than the user
The Remove Distribution Queue (RMVDSTQ) command entered for the distribution queue name because of
allows the user to remove a distribution queue entry from the internal system transformations. Similarly (depending on
distribution services queue table. Distribution queues are the language used for the work station), the internal
used to store distributions before they are sent or forwarded value for a distribution queue name may differ from the
to other systems. characters shown on the Work with Distribution Queue
(WRKDSTQ) command. An error may be reported if the
The RMVDSTQ command does not provide interactive character-string value specified for the DSTQ parameter
display support. This is provided by the Configure Distribu- does not match the rules for an internal distribution
tion Services (CFGDSTSRV) command. More information queue value or if it does not match the internal value for
about configuring a distribution network is in the SNA Distri- any defined distribution queue (ignoring case differ-
bution Services book. ences).
Distribution queue names are translated to the graphic char- Note: To see the parameter and value descriptions for this
acter set and code page 930 500, using the job's coded char- command, refer to the online help text. For more
acter set identifier (CCSID). information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1.
Restrictions:
1. This command is shipped with public *EXCLUDE Required Parameter
authority, and the QPGMR and QSYSOPR user profiles
have private authorities to use the command. DSTQ
2. The following distribution queues cannot be removed: Specifies the name of the distribution queue entry to be
Ÿ Queues referred to in the routing table removed.
Ÿ Queues that contain distributions waiting to be sent
Ÿ DLS (document library services) queues that have
Example
remote libraries configured to use them
Ÿ SVDS (SystemView distribution services) queues RMVDSTQ DSTQ(CHICAGO)
when a receiver is active or when distributions have
been received and the sender has not acknowl- This command removes the distribution queue entry named
edged receiving confirmation. CHICAGO.

P3-718 OS/400 CL Reference - Part 2 (Full Version)


RMVDSTRTE

RMVDSTRTE (Remove Distribution Route) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──RMVDSTRTE──SYSNAME(──┬─\ANY────────┬──┬─\ANY──────────────┬──)─────────────────────────────────────────────────────────────5%
└─system-name─┘ └─system-group-name─┘

Purpose the routing table entry used to resolve the route to a dis-
tribution destination that does not match a specific
The Remove Distribution Route (RMVDSTRTE) command system name, but matches a group name. Only one
removes a remote system from the distribution services *ANY is allowed for each group in the routing table.
routing table. Once a system is removed from the table, dis-
system-name: Specify a maximum of 8 characters for
tributions can no longer be sent to that system from the local
the name of the remote system.
system.
Element 2: System Group Name
Interactive display support is provided by the Configure Dis-
*ANY: *ANY is used for the system group name. *ANY
tribution Services (CFGDSTSRV) command. More informa-
can be specified for the group name only if *ANY is also
tion on configuring a distribution network is in the SNA
specified for the system name. When SYSNAME(*ANY
Distribution Services book.
*ANY) is specified, the user removes the routing table
System names and system group names are translated to entry that is used to resolve a distribution destination
the graphic character set and code page 930 500, using the that does not match any other routing table entries.
job's coded character set identifier (CCSID). Only one SYSNAME(*ANY *ANY) entry is allowed in the
routing table.
Restriction: This command is shipped with public system-group-name: Specify a maximum of 8 charac-
*EXCLUDE authority, and the QPGMR and QSYSOPR user ters for the system group name. The system name and
profiles have private authorities to use the command. group name must be separated by at least one blank.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more
Examples
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. Example 1: Removing a System from the Routing Table
RMVDSTRTE SYSNAME(SYSTEMA GROUPA)
Required Parameter
This command removes the routing table entry for the
SYSNAME system named SYSTEMA.
Specifies the system name and group name of the
remote system being removed from the routing table. Example 2: Removing a Generic Routing Table Entry
Element 1: System Name RMVDSTRTE SYSNAME(\ANY GROUPNM1)

*ANY: *ANY is used for the system name. When This command removes a routing table entry that has a
SYSNAME(*ANY group) is specified, the user removes system name of *ANY and a group name of GROUPNM1.

Chapter 2. OS/400 Command Descriptions P3-719


RMVDSTSYSN

RMVDSTSYSN (Remove Distribution Secondary System Name) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──RMVDSTSYSN──SYSNAME(──system-name──system-group──)─────────────────────────────────────────────────────────────────────────5%

Purpose information about printing the help text, refer to


“Printing CL Command Descriptions” in Chapter 1.
The Remove Distribution Secondary System Name
(RMVDSTSYSN) command removes an entry from the distri-
bution services secondary system name table. The table Required Parameter
contains the names of all of the alternate (or alias) systems SYSNAME
for which the local system receives distributions. When an Specifies the alternate system name and system group
alternate system name is removed from the table, the local name being removed from the distribution services sec-
system no longer receives distributions for the alternate ondary system name table.
system.
Element 1: System Name
Interactive display support is provided by the Configure Dis- system-name: Specify the name of the system for which
tribution Services (CFGDSTSRV) command. More informa- this system is no longer to receive distributions.
tion about configuring a distribution network is in the SNA
Distribution Services book. Element 2: System Group Name
system-group: Specify the system group name of the
System names and system group names are translated to system for which this system is no longer to receive dis-
the graphic character set and code page 930 500, using the tributions. The system name and group name must be
job's coded character set identifier (CCSID). separated by at least one blank.
Restriction: This command is shipped with public
*EXCLUDE authority, and the QPGMR or QSYSOPR user Example
profiles have private authorities to the command.
RMVDSTSYSN SYSNAME(SYS2LAJ1 ROCHESTR)
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more This command removes the system named SYS2LAJ1
ROCHESTR from the distribution services secondary system
name table.

P3-720 OS/400 CL Reference - Part 2 (Full Version)


RMVEMLCFGE

RMVEMLCFGE (Remove Emulation Configuration Entry) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──────────────────────────────────────────────────────────────────────5%
55──RMVEMLCFGE──EMLCFGE(──configuration-entry-name──)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Required Parameter


The Remove Emulation Configuration Entry (RMVEMLCFGE) EMLCFGE
command is used to remove a configuration entry for a 3270 Specifies the name of the configuration entry you are
device emulation session from the configuration file. removing.

Restriction: You cannot remove the configuration entry


QEMDFTCFGE, which is the default emulation configuration
Example
entry shipped with the system, with this command. RMVEMLCFGE EMLCFGE(FASBPRINT)
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more This command removes the emulation configuration entry
information about printing the help text, refer to FASBPRINT from the configuration file.
“Printing CL Command Descriptions” in Chapter 1.

Chapter 2. OS/400 Command Descriptions P3-721


RMVEWCBCDE

RMVEWCBCDE (Remove Extended Wireless Controller Bar Code Entry) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──RMVEWCBCDE──BCDGRP(────bar-code-group-name────)──INZMBR(────source-member-name────)─────────────────────────────────────────5
(P) ─────────────────────────────────────────────────────────────────5%
5──┬──────────────────────────────────────────────────────┬───
│ ┌─\LIBL/────────┐ ┌─QEWCSRC──────────┐ │
└─INZFILE(──┼───────────────┼──┴─source-file-name─┴──)─┘
├─\CURLIB/──────┤
└─library-name/─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose INZFILE
Specifies the name of the source physical file that con-
The Remove Extended Wireless Controller Bar Code Entry tains the source file member.
(RMVEWCBCDE) command removes the bar code entry for
The name of the source file can be qualified by one of
the specified bar code group.
the following library values:
Restriction: You must have *IOSYSCFG special authority *LIBL: All libraries in the job's library list are
to use this command. searched until the first match is found.
Note: To see the parameter and value descriptions for this *CURLIB: The current library for the job is
command, refer to the online help text. For more searched. If no library is specified as the current
information about printing the help text, refer to library for the job, the QGPL library is used.
“Printing CL Command Descriptions” in Chapter 1.
library-name: Specify the name of the library to be
searched.
Required Parameters
QEWCSRC: The source file name QEWCSRC is used.
BCDGRP
source-file-name: Specify the name of the source phys-
Specifies the name of the bar code group entry that is
ical file that contains the source member.
being removed.

INZMBR
Example
Specifies the name of the source file member containing
the bar code entry that is being removed. The bar code RMVEWCBCDE BCDGRP(BCDð1) INZMBR(EWCð1)
entry contains the extended wireless controller configura- INZFILE(QGPL/QEWCSRC)
tion data.
This command removes the bar code entry for bar code
group BCD01 in source file member EWC01 in source file
Optional Parameter QEWCSRC in library QGPL.

P3-722 OS/400 CL Reference - Part 2 (Full Version)


RMVEWCPTCE

RMVEWCPTCE (Remove Extended Wireless Controller PTC Entry) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──RMVEWCPTCE──PTCGRP(────ptc-group────)──INZMBR(────source-member-name────)───────────────────────────────────────────────────5
(P) ─────────────────────────────────────────────────────────────────5%
5──┬──────────────────────────────────────────────────────┬───
│ ┌─\LIBL/────────┐ ┌─QEWCSRC──────────┐ │
└─INZFILE(──┼───────────────┼──┴─source-file-name─┴──)─┘
├─\CURLIB/──────┤
└─library-name/─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose INZFILE
Specifies the name of the source physical file that con-
The Remove Extended Wireless Controller PTC Entry tains the source file member.
(RMVEWCPTCE) command removes the Portable Trans-
The name of the source file can be qualified by one of
action Computer (PTC) entry for the specified PTC group.
the following library values:
Restriction: You must have *IOSYSCFG special authority *LIBL: All libraries in the job's library list are
to use this command. searched until the first match is found.
Note: To see the parameter and value descriptions for this *CURLIB: The current library for the job is
command, refer to the online help text. For more searched. If no library is specified as the current
information about printing the help text, refer to library for the job, the QGPL library is used.
“Printing CL Command Descriptions” in Chapter 1.
library-name: Specify the name of the library to be
searched.
Required Parameters
QEWCSRC: The source file name QEWCSRC is used.
PTCGRP
source-file-name: Specify the name of the source phys-
Specifies the PTC group name of the entry being
ical file that contains the source member.
removed.

INZMBR
Example
Specifies the name of the source file member containing
the PTC entry that is being removed. The source file RMVEWCPTCE PTCGRP(PTCð1) INZMBR(EWCð1)
member contains extended wireless controller configura- INZFILE(QGPL/QEWCSRC)
tion data.
This command removes the PTC entry for PTC group PTC01
in source file member EWC01 in source file QEWCSRC in
Optional Parameter library QGPL.

Chapter 2. OS/400 Command Descriptions P3-723


RMVEXITPGM

RMVEXITPGM (Remove Exit Program) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ───────────5%
55──RMVEXITPGM──EXITPNT(──exit-point-name──)──FORMAT(──exit-point-format-name──)──PGMNBR(──┬─program-number─┬──)────
└─\ALL───────────┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose PGMNBR
Specifies the program number of the exit program being
The Remove Exit Program (RMVEXITPGM) command removed.
removes an exit program entry for a specific exit point that is
*ALL: All exit programs for the specified exit point
registered or unregistered. An unregistered exit point is an
format (FORMAT parameter) from the specified exit
exit point that the registration facility created in the absence
point (EXITPNT parameter) are removed.
of an exit point at the time an exit program was added.
program-number: Specify the program number of the
Note: To see the parameter and value descriptions for this
exit program being removed.
command, refer to the online help text. For more
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1.
Example
RMVEXITPGM EXITPNT(USER_EXIT_ONE) FORMAT(EXIT1)
Required Parameters PGMNBR(1)
EXITPNT
This command removes the exit program for exit point
Specifies the name of an existing exit point for which the
USER_EXIT_ONE that was added with program sequence
exit program is being removed.
number 1 for exit point format EXIT1.
FORMAT
Specifies the name of the exit point format of the exit
program that is being removed.

P3-724 OS/400 CL Reference - Part 2 (Full Version)


RMVFNTTBLE

RMVFNTTBLE (Remove Font Table Entry) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─┬──────────────────────────────┬──┬──────────────────────────────┬───────────────────5
55──RMVFNTTBLE──FNTTBL(──┬─\PHFCS─┬──)────
├─\PHCP──┤ └─PHFCS(──┤ PHFCS Details ├──)─┘ └─HPFCS(──┤ HPFCS Details ├──)─┘
├─\HPFCS─┤
└─\HPCP──┘
5──┬────────────────────────────────────────────────────┬──┬──────────────────────────────┬────────────────────────────────────5%
└─PHCP(────graphic-character-set──────code-page────)─┘ └─HPCP(────host-code-page────)─┘
PHFCS details:
┌─\NONE───────┐ ┌─\SYSVAL───────────────┐
├────font-identifier────┬─width───┬──┼─\BOLD───────┼──┴─graphic-character-set─┴──┬─point-size─┬─────────────────────────────────┤
├─\PTSIZE─┤ ├─\ITALIC─────┤ ├─\WIDTH─────┤
└─\NONE───┘ ├─\BOLDITC────┤ └─\NONE──────┘
├─\DBLWIDE────┤
└─\ITCDBLWIDE─┘
HPFCS details:
┌─\RASTER──┐
├────font-character-set────┴─\OUTLINE─┴─────────────────────────────────────────────────────────────────────────────────────────┤
Note:
P All parameters preceding this point can be specified in positional form.

Purpose This table would be used when your application (like


Office Vision/400, DDS, etc) references printer resident
The Remove Font Table Entry (RMVFNTTBLE) command fonts and the printer (3827, 3825, 3820, 3900 Model 1,
removes an entry in the specified font table. This command etc) does not support resident fonts. PSF/400 must map
removes an exiting entry in the user font or code page tables the references from printer resident fonts to host resident
used by PSF/400 that controls: fonts and down load them.
1. Host resident to printer resident font character set *PHCP: The printer resident to host resident code page
mapping mapping table is to be changed (removes an entry).
2. Printer resident to host resident font character set
This table is like the QPHFCS table, in that it is used
mapping
when the application references printer resident code
3. Host resident to printer resident code page mapping
pages and the printer being used does not support
4. Printer resident to host resident code page mapping
printer resident code pages. The printer resident code
The entry must have first been added to the user tables with page must be mapped to a host resident code page and
the ADDFNTTBLE (Add Font Table Entry) command. down loaded to the printer by PSF/400.
*HPFCS: The host resident to printer resident font char-
In performing the font or code page mapping, the user tables acter set table is to be changed (removes an entry).
are searched first for a match. If no match is found, then the
System font or code page tables are searched. This table is used when your application references host
resident fonts (font character sets and code pages) and
Refer to the Printer Device Programming manual for more the printer (4224, 4234, 4230, 64XX,etc) does not
information on font mapping tables. support down loading of host resident fonts. PSF/400
must map the references from host resident fonts to
Restriction: The PSF/400 feature is required to use this printer resident fonts.
command.
*HPCP: The host resident to printer resident code page
Note: To see the parameter and value descriptions for this mapping table is to be changed (removes an entry).
command, refer to the online help text. For more
This table is like the QHPFCS table, in that it is used
information about printing the help text, refer to
when the application references host resident code
“Printing CL Command Descriptions” in Chapter 1.
pages and the printer being used does not support host
resident code pages. The host resident code page must
Required Parameter be mapped to a printer resident code page and down
loaded to the printer by PSF/400.
FNTTBL
Specifies the name of the font table to be changed
(remove an entry). Optional Parameters
*PHFCS: The printer resident to host resident font char-
acter set table is to be changed (removes an entry).

Chapter 2. OS/400 Command Descriptions P3-725


RMVFNTTBLE

PHFCS page. In this example, specify 697 for the graphic char-
Specifies the printer resident font entry to be removed. acter set.
Element 1: Font Identifier Element 5: Point Size
font-identifier: Specify the printer resident font identifier *WIDTH: The font point size is computed from the font
to be mapped to a host resident font. width value specified. When mapping a fixed pitch
raster font (1 - 750, 3840 - 4095), it is recommended
Element 2: Font Width
that a width value should be specified and the point size
*PTSIZE: The width for this font identifier will be calcu- value should be *WIDTH.
lated from the point size specified. When *PTSIZE is
*NONE: No point size is specified for this font identifier.
specified for width, the point size parameter can not be
*NONE should be specified when mapping to an outline
*NONE or *WIDTH. When mapping a typographic raster
font.
font (2304 - 3839, 4096 - 53247, 61440 - 65534), a point
size value should be specified. The width value can be point-size: Specify a point size ranging from 0.1 through
*PTSIZE or a value can be given. 999.9. When mapping a typographic raster font (2304 -
3839, 4096 - 53247, 61440 - 65534), a point size value
*NONE: No width is specified for this font identifier.
should be specified.
*NONE should be specified when mapping to an outline
font. HPFCS
font-width: Specify a width for the font identifier. When Specifies the host resident font entry to be removed.
mapping a fixed pitch raster font (1 - 750, 3840 - 4095), Element 1: Host Font Character Set
a width should be specified. The point size value can be
*WIDTH or a value can be given. See Appendix D in
font-character-set: Specify the font character set.
the Printer Device Programming manual for more infor- Element 2: Font Type
mation on font widths for printer resident fonts.
*RASTER: The host resident font is a raster font.
Element 3: Font Attributes
*OUTLINE: The host resident font is a outline font.
*NONE: No special font attributes are specified on this
PHCP
font.
Specifies the printer resident code page entry to be
*BOLD: The printer resident font is a bold font. removed.
*ITALIC: The printer resident font is an italic font. Element 1: Graphic Character Set
*BOLDITC: The printer resident font is a bold italic font. *SYSVAL: The graphic character set specified in the
*DBLWIDE: The printer resident font is a double wide system value QCHRID is used.
font. graphic-character-set: Specify the graphic character set
*ITCDBLWIDE: The printer resident font is an italic for the printer resident code page. The graphic char-
double wide font. acter set is the first part of the graphic character identi-
fier which consists of the graphic character set and code
Element 4: Graphic Character Set page. For example, for the graphic character identifier
Specifies the graphic character set for the font identifier. 697 500, 697 is the graphic character set and 500 is the
This parameter allows you to map a font identifier to code page. In this example, specify 697 for the graphic
more than one host font character set (based upon character set.
graphic character set). The value specified is mapped to Element 2: Code Page
a superset graphic character set. See the Printer Device
Programming manual for information on superset graphic code-page: Specify the printer resident code page value
character sets.
HPCP
*SYSVAL: The graphic character set specified in the Specifies the host resident code page entry to be
system value QCHRID is used. A change to this system removed.
value will only take effect for the font mapping tables
Element 1: Host Code Page
when the print writer is started. If QCHRID is changed
and a printer is currently active, you must end the print code-page: Specify the name of the host resident code
writer and start it again. page.

graphic-character-set: Specify the graphic character set


for the font identifier. The graphic character set is the Examples
first part of the graphic character identifier which consists
of the graphic character set and code page. For Example 1: Remove Font Entry
example, for the graphic character identifier 697 500, RMVFNTTBLE FNTTBL(\PHFCS)
697 is the graphic character set and 500 is the code PHFCS(254 84 \NONE 2ð39 7.ð)

P3-726 OS/400 CL Reference - Part 2 (Full Version)


RMVFNTTBLE

This command removes an entry from the QPHFCS table RMVFNTTBLE FNTTBL(\PHCP) PHCP(\SYSVAL 38)
(printer resident to host resident font character set table).
This command removes an entry from the QPHCP table
Example 2: Remove Code Page Entry (printer resident to host resident code page table).

Chapter 2. OS/400 Command Descriptions P3-727


RMVFTRACNE

RMVFTRACNE (Remove Filter Action Entry) Command


Job: B,I Pgm: B,I REXX Exec

┌─\LIBL/────────┐
(P) ──────────────────────────────────────5%
55──RMVFTRACNE──FILTER(──┼───────────────┼──filter-name──)──GROUP(────group-name────)────
├─\CURLIB/──────┤
└─library-name/─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *LIBL: All libraries in the job's library list are


searched until the first match is found.
The Remove Filter Action Entry (RMVFTRACNE) command
*CURLIB: The current library for the job is
allows the user to remove an action entry from the specified
searched. If no library is specified as the current
filter object.
library for the job, the QGPL library is used.
Note: To see the parameter and value descriptions for this
library-name: Specify the name of the library to be
command, refer to the online help text. For more
searched.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. filter-name: Specify the name of the filter.
GROUP
Required Parameters Specifies the group that identifies the action entry being
removed.
FILTER
Specifies the qualified name of the filter from which the
action entry is being removed. Example
The name of the filter can be qualified by one of the fol- RMVFTRACNE FILTER(MYLIB/MYFILTER) GROUP(CHICAGO)
lowing library values:
This command removes the action entry identified by the
group CHICAGO in the filter MYFILTER in library MYLIB.

P3-728 OS/400 CL Reference - Part 2 (Full Version)


RMVFTRSLTE

RMVFTRSLTE (Remove Filter Selection Entry) Command


Job: B,I Pgm: B,I REXX Exec

┌─\LIBL/────────┐
(1) ──)────
55──RMVFTRSLTE──FILTER(──┼───────────────┼──filter-name──)──SEQNBR(────sequence-number───── (P) ─────────────────────────────5%
├─\CURLIB/──────┤
└─library-name/─┘
Notes:
1 Range is 1-9999

P All parameters preceding this point can be specified in positional form.

Purpose *CURLIB: The current library for the job is


searched. If no library is specified as the current
The Remove Filter Selection Entry (RMVFTRSLTE) library for the job, the QGPL library is used.
command allows you to remove a selection entry from a filter
library-name: Specify the name of the library to be
object.
searched.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more filter-name: Specify the name of the filter that is used.
information about printing the help text, refer to SEQNBR
“Printing CL Command Descriptions” in Chapter 1. Specifies the sequence number of the selection entry to
be removed. Selection entries in a filter are numbered
Required Parameters in sequence. When a filter is applied, the selection
entries with the lower sequence numbers are evaluated
FILTER first. Specify a number from 1 through 9999.
Specifies the qualified name of the filter from which the
selection entry is being removed.
Example
The name of the filter can be qualified by one of the fol-
RMVFTRSLTE FILTER(MYLIB/MYFILTER) SEQNBR(1ð)
lowing library values:

*LIBL: All libraries in the job's library list are This command removes selection entry 0010 from filter
searched until the first match is found. MYFILTER in library MYLIB.

Chapter 2. OS/400 Command Descriptions P3-729


RMVICFDEVE

RMVICFDEVE (Remove Intersystem Communications Function Program Device Entry)


Command
Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐ ┌──
─────────────────────┐
55──RMVICFDEVE──FILE(──┼───────────────┼──file-name──)──PGMDEV(───6─program-device-name─┴───
(1) ──)────
(P) ─────────────────────────────5%
├─\CURLIB/──────┤
└─library-name/─┘
Notes:
1 A maximum of 50 repetitions

P All parameters preceding this point can be specified in positional form.

Purpose *CURLIB: The current library for the job is


searched. If no library is specified as the current
The Remove Intersystem Communications Function Program library for the job, the QGPL library is used.
Device Entry (RMVICFDEVE) command removes one or
library-name: Specify the name of the library to be
more program device entries from an ICF file.
searched.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more file-name: Specify the name of the icf file from which
information about printing the help text, refer to the device entries are removed.
“Printing CL Command Descriptions” in Chapter 1. PGMDEV
Specifies the names of up to 50 program devices that
Required Parameters are removed from the ICF file.

FILE
Specifies the qualified name of the ICF file from which Example
the device entries are removed. RMVICFDEVE FILE(ICFHIST)
PGMDEV (CHICAGO NEWYORK DENVER)
The name of the ICF file can be qualified by one of the
following library values: This command removes the program devices of CHICAGO,
*LIBL: All libraries in the job's library list are NEWYORK, and DENVER from the ICF file ICFHIST.
searched until the first match is found.

P3-730 OS/400 CL Reference - Part 2 (Full Version)


RMVIPIADR

RMVIPIADR (Remove IP over IPX Address) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P)─────────────────────────────────────────────5%
55──RMVIPIADR──RMTDEST(──remote-destination──)──SUBNETMASK(──┬─\HOST───────┬──)───
└─subnet-mask─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose subnet-mask: Specify the mask of the network and


node address fields of the internet address that defines
The Remove IP over IPX Address (RMVIPIADR) command is a subnetwork. The subnet mask is in the form
used to remove an existing address mapping entry. nnn.nnn.nnn.nnn, where nnn is a decimal number
ranging in value from 0 through 255. The subnet mask
Restriction: You must have *IOSYSCFG special authority must at least mask off all bits of the network class's
to use this command. network ID portion of the internet address. For example,
Note: To see the parameter and value descriptions for this a subnet mask of 255.255.255.0 can define a Class B
command, refer to the online help text. For more subnet consisting of all bits in the third byte of an
information about printing the help text, refer to internet address. Note that the first 2 bytes, which is the
“Printing CL Command Descriptions” in Chapter 1. network portion of the class B IP address, are masked
off.

Required Parameters
Examples
RMTDEST
Specifies the remote destination for the AF_INET Example 1 - Removing an IPX Address Mapping for an IP
sockets over IPX address mapping entry being removed. Subnetwork
The remote destination is an internet address of the
network or host for the remote destination's IP over IPX RMVIPIADR RMTDEST('128.2.ð.ð')
address mapping entry. SUBNETMASK('255.255.255.128')

remote-destination: Specify the internet address associ- This command removes an address mapping entry for a sub-
ated with this address mapping entry. network with remote destination network 128.2 and subnet
mask of 255.255.255.128.
SUBNETMASK
Specifies the subnet mask for the AF_INET sockets over Example 2 - Removing an IPX Address Mapping for an IP
IPX address mapping entry being removed. Host address
*HOST: Specifies the internet address value of the
route destination. The subnetmask value is calculated to RMVIPIADR '128.3.3.3' \HOST
be 255.255.255.255.
This command removes an address mapping for an IP host
address.

Chapter 2. OS/400 Command Descriptions P3-731


RMVIPIIFC

RMVIPIIFC (Remove IP over IPX Interface) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P, K) ────────────────────────────────────────────────────────────────────────────5%
55──RMVIPIIFC──INTNETADR(──internet-address──)─────
Notes:
P All parameters preceding this point can be specified in positional form.

K All parameters preceding this point are key parameters.

Purpose Required Parameter


The Remove IP over IPX Interface (RMVIPIIFC) command is INTNETADR
used to remove AF_INET sockets over IPX interfaces. An Specifies the IP address of the IP over IPX interface
interface is an IP address by which this local host is known being removed.
on the IPX network.

Restriction: You must have *IOSYSCFG special authority


Example
to use this command. RMVIPIIFC '9.5.2.3'
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more This command removes an interface with an IP address of
information about printing the help text, refer to 9.5.2.3 from this local host's IP over IPX configuration.
“Printing CL Command Descriptions” in Chapter 1.

P3-732 OS/400 CL Reference - Part 2 (Full Version)


RMVIPIRTE

RMVIPIRTE (Remove IP over IPX Route) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P)───────────────5%
55──RMVIPIRTE──RTEDEST(──route-destination──)──SUBNETMASK(──┬─\HOST───────┬──)──NEXTHOP(──internet-address──)───
└─subnet-mask─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose a subnetwork. The subnet mask is in the form


nnn.nnn.nnn.nnn, where nnn is a decimal number
The Remove IP over IPX Route (RMVIPIRTE) command is ranging in value from 0 through 255. The subnet mask
used to remove an existing IP over IPX route. must at least mask off all bits of the network class's
network ID portion of the internet address. For example,
Restriction: You must have *IOSYSCFG special authority a subnet mask of 255.255.255.0 can define a Class B
to use this command. subnet consisting of all bits in the third byte of an
Note: To see the parameter and value descriptions for this internet address. Note that the first 2 bytes, which is the
command, refer to the online help text. For more network portion of the class B IP address, are masked
information about printing the help text, refer to off.
“Printing CL Command Descriptions” in Chapter 1.
NEXTHOP
Specifies the internet address of the next system
Required Parameters (gateway) on the route. A route cannot be removed
unless the internet address specified by the NEXTHOP
RTEDEST parameter can be reached directly through a network
Specifies the route destination for the IP over IPX route associated with a previously defined IP over IPX inter-
being removed. face.
SUBNETMASK
Specifies the subnet mask for the IP over IPX route Example
being removed.
RMVIPIRTE RTEDEST('128.2.ð.ð')
*HOST: Specifies the internet address value of the
SUBNETMASK('255.255.255.128')
route destination. The subnetmask value is calculated to
NEXTHOP('129.1.2.3')
be 255.255.255.255.
subnet-mask: Specify the mask of the network and This command removes a network route entry for a subnet-
node address fields of the internet address that defines work with network 128.2 and subnet mask of
255.255.255.128.

Chapter 2. OS/400 Command Descriptions P3-733


RMVIPSIFC

RMVIPSIFC (Remove IP over SNA interface) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─────────────────────────────────────────────────────────────────────────────5%
55──RMVIPSIFC──INTNETADR(──internet-address──)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Required Parameter


The Remove IP over SNA Interface (RMVIPSIFC) command INTNETADR
removes an AF_INET sockets over SNA interface (an IP Specifies the internet address of an interface that had
address by which this local host is known on the SNA trans- previously been added to the SNA configuration with the
port). This command can be used to remove interfaces that Add IP over SNA Interface (ADDIPSIFC) CL command.
have been specified with the Add IP over SNA Interface The internet address is specified in the form
(ADDIPSIFC) CL command. nnn.nnn.nnn.nnn, where nnn is a decimal number
ranging from 0 through 255. An internet address is not
Restrictions: valid if it has a value of all binary ones or all binary
zeros for the network identifier (ID) portion or the host ID
1. The user must have *IOSYSCFG authority to use this
portion of the address. If the internet address is entered
command.
from a command line, the address must be enclosed in
2. The interface cannot be active when you submit this apostrophes.
command. Use the End IP over SNA Interface
(ENDIPSIFC) CL command to deactivate the interface.
internet-address: Specify the internet address associ-
ated with the interface to be removed.
3. There can be no configured routes whose NEXTHOP
internet address can be reached only through the
network associated with the IP over SNA interface to be Example
removed.
RMVIPSIFC '9.5.1.248'
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more This command removes the interface with the IP address
information about printing the help text, refer to 9.5.1.248.
“Printing CL Command Descriptions” in Chapter 1.

P3-734 OS/400 CL Reference - Part 2 (Full Version)


RMVIPSLOC

RMVIPSLOC (Remove IP over SNA Location Entry) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P)───────────────────────────────────────5%
55──RMVIPSLOC──RMTDEST(──remote-route-destination──)──SUBNETMASK(──┬─\HOST───────┬──)───
└─subnet-mask─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose SUBNETMASK
Specifies the subnet mask of the location entry to be
The Remove IP over SNA Location Entry (RMVIPSLOC) removed.
command removes an AF_INET sockets over SNA location
*HOST: Specify this value when the internet address
entry. This command can be used to remove location entries
value specified in the remote route destination field is a
that have been specified with the Add IP over SNA Location
host address.
Entry (ADDIPSLOC) CL command. The location entry to be
removed is identified by its remote route destination subnet-mask: Specify the subnet mask in the form
(RMTDEST) and subnet mask (SUBNETMASK). nnn.nnn.nnn.nnn where nnn is a decimal number
ranging from 0 through 255. If the subnet mask is
Restriction: The user must have *IOSYSCFG authority to entered from a command line, the address must be
use this command. enclosed in apostrophes.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more Examples
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. Example 1: Removing a Location Entry for a Subnet-
work
Required Parameters RMVIPSLOC RMTDEST('128.2.ð.ð')
SUBNETMASK('255.255.255.128')
RMTDEST
Specifies the remote route destination of the location This command removes a location entry for a subnetwork
entry to be removed. The remote route destination is with network 128.2 and subnet mask of 255.255.255.128.
specified in the form nnn.nnn.nnn.nnn where nnn is a
decimal number ranging from 0 through 255. If the Example 2: Removing a Location Entry for a Network
remote route destination address is entered from a RMVIPSLOC RMTDEST(128.3.ð.ð)
command line, the address must be enclosed in apostro- SUBNETMASK('255.255.ð.ð')
phes.
This command removes a location entry for network 128.3.

Chapter 2. OS/400 Command Descriptions P3-735


RMVIPSRTE

RMVIPSRTE (Remove IP over SNA Route) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─NEXTHOP(──internet-address──)───────────────5%
55──RMVIPSRTE──RTEDEST(──route-destination──)──SUBNETMASK(──┬─\HOST───────┬──)────
└─subnet-mask─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose SUBNETMASK
Specifies the subnet mask of the route to be removed.
The Remove IP over SNA Route Entry (RMVIPSRTE)
*HOST: Specify this value when the internet address
command removes an AF_INET sockets over SNA route.
value specified in the route destination field is a host
This command can be used to remove routes that have been
address.
specified with the Add IP over SNA Route (ADDIPSRTE) CL
command. The route to be removed is identified by its route subnet-mask: Specify the subnet mask in the form
destination (RTEDEST), subnet mask (SUBNETMASK), and nnn.nnn.nnn.nnn where nnn is a decimal number
next hop (NEXTHOP). ranging from 0 to 255. If the subnet mask is entered
from a command line, the address must be enclosed in
Restriction: The user must have *IOSYSCFG authority to apostrophes.
use this command.
NEXTHOP
Note: To see the parameter and value descriptions for this Specifies the next hop of the route to be removed. The
command, refer to the online help text. For more next hop is specified in the form nnn.nnn.nnn.nnn where
information about printing the help text, refer to nnn is a decimal number ranging from 0 to 255.
“Printing CL Command Descriptions” in Chapter 1.
If the next hop address is entered from a command line,
the address must be enclosed in apostrophes.
Required Parameters
RTEDEST Example
Specifies the route destination of the route to be RMVIPSRTE RTEDEST('128.2.ð.ð')
removed. The route destination is specified in the form SUBNETMASK('255.255.255.128')
nnn.nnn.nnn.nnn where nnn is a decimal number NEXTHOP ('128.3.4.5')
ranging from 0 to 255.
This command removes a network route entry for a subnet-
If the route destination address is entered from a
work with network 128.2 and subnet mask of
command line, the address must be enclosed in apostro-
255.255.255.128.
phes.

P3-736 OS/400 CL Reference - Part 2 (Full Version)


RMVIPXCCT

RMVIPXCCT (Remove IPX Circuit) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ───────────────────────────────────────────────────────────────────────────5%
55──RMVIPXCCT──CCTNAME(────IPX-circuit-name────)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose information about printing the help text, refer to


“Printing CL Command Descriptions” in Chapter 1.
The Remove IPX Circuit (RMVIPXCCT) command removes
the definition of a circuit from the Internetwork Packet
Exchange (IPX) configuration. Required Parameters
CCTNAME
If an IPX circuit has been started, the user must end the
Specifies the name of the IPX circuit being removed.
circuit before it can be removed with this command. A circuit
This circuit must not be in an active status state. If it is,
can be ended using the End IPX Circuit (ENDIPXCCT)
the circuit can be ended using the End IPX Circuit
command.
(ENDIPXCCT) command or by selecting Option 10 from
A circuit that is required for an existing configured static route the Work with IPX Circuits display.
or service cannot be removed.

Restriction: You must have *IOSYSCFG special authority Example


to use this command.
RMVIPXCCT CCTNAME(CIRCUIT2)
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more This command causes the IPX support to remove the circuit
named CIRCUIT2.

Chapter 2. OS/400 Command Descriptions P3-737


RMVJOBQE

RMVJOBQE (Remove Job Queue Entry) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐ ┌─\LIBL/────────┐
(P) ─────────5%
55──RMVJOBQE──SBSD(──┼───────────────┼──subsystem-description-name──)──JOBQ(──┼───────────────┼──job-queue-name──)────
├─\CURLIB/──────┤ ├─\CURLIB/──────┤
└─library-name/─┘ └─library-name/─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *CURLIB: The current library for the job is


searched. If no library is specified as the current
The Remove Job Queue Entry (RMVJOBQE) command library for the job, the QGPL library is used.
removes a job queue entry from the specified subsystem
library-name: Specify the name of the library to be
description. This command can be used to remove the
searched.
current job queue entry so that a different job queue can be
assigned. Jobs on the queue remain on the queue for pro- subsystem-description-name: Specify the name of the
cessing when the queue is reassigned to a subsystem subsystem description.
description and the subsystem is started.
JOBQ
Restrictions: Specifies the qualified name of the job queue whose job
queue entry is removed from the subsystem description.
1. Users of this command must have object operational
and object management authorities for the specified sub- The name of the job queue can be qualified by one of
system description. the following library values:
2. A job queue entry cannot be removed if any currently *LIBL: All libraries in the job's library list are
active jobs were started from the job queue. searched until the first match is found.
Note: To see the parameter and value descriptions for this *CURLIB: The current library for the job is
command, refer to the online help text. For more searched. If no library is specified as the current
information about printing the help text, refer to library for the job, the QGPL library is used.
“Printing CL Command Descriptions” in Chapter 1.
library-name: Specify the name of the library to be
searched.
Required Parameters job-queue-name: Specify the name of the job queue.
SBSD
Specifies the qualified name of the subsystem
Example
description from which the job queue entry is removed.
RMVJOBQE SBSD(MYLIB/NIGHTRUN) JOBQ(MYLIB/BATCH2)
The name of the subsystem description can be qualified
by one of the following library values: This command removes the job queue entry that refers to the
BATCH2 job queue in MYLIB from the NIGHTRUN sub-
*LIBL: All libraries in the job's library list are
system description stored in library MYLIB.
searched until the first match is found.

P3-738 OS/400 CL Reference - Part 2 (Full Version)


RMVJOBSCDE

RMVJOBSCDE (Remove Job Schedule Entry) Command


Job: B,I Pgm: B,I REXX Exec

┌─\ONLY────────┐
(P) ─ENTRYNBR(──┼─\ALL─────────┼──)──────────────────────────────────────────────5%
55──RMVJOBSCDE──JOB(──┬─job-name──────────┬──)────
└─generic\-job-name─┘ └─entry-number─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose ENTRYNBR
The Remove Job Schedule Entry (RMVJOBSCDE) command Specifies the number of the job schedule entry you want
allows you to remove an entry, entries, or generic entries to remove. The message sent when an entry is suc-
from the job schedule. Each job schedule entry contains the cessfully added contains the entry number. You can
information needed to automatically submit a batch job one also determine the entry number by using the Work with
time, or at regularly scheduled intervals. A message is sent Job Schedule Entries (WRKJOBSCDE) command.
to you and to the message queue specified in the job Press F11 from the Work with Job Schedule Entries
schedule entry when an entry is successfully removed. display to show the entry numbers of the selected
entries.
Restriction: To remove entries, you must have *JOBCTL *ONLY: One entry in the job schedule has the job name
special authority; otherwise you can remove only those specified on the JOB parameter. If *ONLY is specified
entries that you added. and more than one entry has the specified job name, no
Note: To see the parameter and value descriptions for this entries are removed and a message is sent.
command, refer to the online help text. For more *ALL: All entries with the specified job name are
information about printing the help text, refer to removed.
“Printing CL Command Descriptions” in Chapter 1.
entry-number: Specify the number of the job schedule
entry you want to remove.
Required Parameters
JOB Examples
Specifies the name of the job schedule entry.
Example 1: Removing Job Schedule Entries
job-name: Specify the name of the job schedule entry.
RMVJOBSCDE JOB(SAMPLE\) ENTRYNBR(\ALL)
generic*-job-name: Specify a generic name. A generic
name is a character string of one or more characters fol- This command removes all the job schedule entries whose
lowed by an asterisk (*); for example, ABC*. The job names start with SAMPLE.
asterisk substitutes for any valid characters. A generic
name specifies all objects with names that begin with the Example 2: Removing an Individual Job Schedule Entry
generic prefix for which the user has authority. If an RMVJOBSCDE JOB(PAYROLL) ENTRYNBR(\ONLY)
asterisk is not included with the generic (prefix) name,
the system assumes it to be the complete object name. This command removes the job PAYROLL in the job
If the complete object name is specified, and multiple schedule.
libraries are searched, multiple objects can be removed
only if *ALL or *ALLUSR library values can be specified Example 3: Removing a Generic Job Schedule Entry
for the name. For more information on the use of RMVJOBSCDE JOB(PAY\) ENTRYNBR(\ALL)
generic names, refer to “Generic Object Names” in
Chapter 2. If a generic name is specified, This command removes all entries in the job schedule that
ENTRYNBR(*ALL) must also be specified. have the prefix PAY in their names.

Chapter 2. OS/400 Command Descriptions P3-739


RMVJRNCHG

| RMVJRNCHG (Remove Journaled Changes) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
55──RMVJRNCHG──JRN(──┼───────────────┼──journal-name──)─────────────────────────────────────────────────────────────────────────5
├─\CURLIB/──────┤
└─library-name/─┘
┌──
─────────────────────────────────────────────────────────┐
│ ┌─\LIBL/────────┐ ┌─\FIRST──────┐ │
6 (1) ───┬──┼─────────────┼──)─┴───
5──FILE(────(──┼───────────────┼──┬─\ALL─── (2) ──)──┬────────────────────────────────────┬───
(P) ──────────5
├─\CURLIB/──────┤ └─file-name─┘ ├─\ALL────────┤ │ ┌─\CURRENT───────────┐ │
└─library-name/─┘ └─member-name─┘ └─RCVRNG(──┴─┤ RCVRNG Details ├─┴──)─┘
5──┬───────────────────────────────────────────┬──┬───────────────────────────────────────────────────────────────┬─────────────5
│ ┌─\LAST────────────────────┐ │ │ ┌─\FIRST─────────────────┐ │
└─FROMENT(──┼─\LASTSAVE────────────────┼──)─┘ └─┬─TOENT(──┴─ending-sequence-number─┴──)─────────────────────┬─┘
└─starting-sequence-number─┘ └─TOJOBO(────┬─────────────────────────────┬──job-name────)─┘
└─┬─────────────┬──user-name/─┘
└─job-number/─┘
5──┬──────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\NO──┐ │
└─CMTBDY(──┴─\YES─┴──)─┘
RCVRNG Details:
┌─\LIBL/────────┐ ┌─\LIBL/────────┐
├──┼───────────────┼──starting-journal-receiver──┼───────────────┼──ending-journal-receiver─────────────────────────────────────┤
├─\CURLIB/──────┤ ├─\CURLIB/──────┤
└─library-name/─┘ └─library-name/─┘
Notes:
1 If *ALL is specified instead of file-name, the format must be library-name/*ALL.

2 A maximum of 300 repetitions.

P All parameters preceding this point can be specified in positional form.

Purpose members may be only partially updated from the journal


entries. The command ends when a journal entry is found
The Remove Journaled Changes (RMVJRNCHG) command that indicates one of the following has occurred:
removes the changes that have been journaled for a partic-
Ÿ The member is cleared
ular member of a database file. The journaled changes are
removed from the file from the specified starting point to the Ÿ The member is saved and its storage is freed
ending point. The journal entries are processed in reverse of Ÿ The member is reorganized
the order in which they were placed into the journal receiver,
from the most recent to the oldest. The starting point can be Ÿ The member is restored
identified as the last journal entry in the specified journal Ÿ The member has its end-of-data specification changed
receiver range, the point at which a file was last saved, or a
Ÿ Journaling has started for the member
particular entry in the receiver range. The ending point can
be the first journal entry or a particular entry in the specified Ÿ The member is deleted
journal receiver range, or the point at which a file was Ÿ Journal initial program load (IPL) synchronization fails
opened by a specified job. The CMTBDY parameter can be
used for handling changes that are pending in the file. Ÿ The system has already applied or removed the changes
through the Apply Journal Changes (APYJRNCHG)
Note: The Display Journal (DSPJRN) command can be command or the RMVJRNCHG command.
used to help determine the desired starting and
ending points. See the Backup and Recovery book for a complete listing of
the various entries and how they are handled by this
A list of physical files and members may be specified. The command.
journaled changes for all physical file members are removed
in the order that the journal entries are found on the journal The command also ends on illogical conditions. If the
(the reverse of the order that the changes were originally command ends due to illogical conditions and it is logically
made to the physical file members). possible to restart the operation, you can issue the command
again, specifying a new starting sequence number.
If an error is found at any point while the journal entries are
being removed, the operation ends and the file member or Note: If the operation ends for one of the members speci-
fied, it ends for all of the members specified.

P3-740 OS/400 CL Reference - Part 2 (Full Version)


RMVJRNCHG

Journal entry changes can be removed even if the sequence *LIBL: All libraries in the job's library list are
numbers have been reset. The system handles this condi- searched until the first match is found.
tion, sends an informational message, and continues the
*CURLIB: The current library for the job is
removal of journaled changes. If journal receivers are
searched. If no library is specified as the current
attached and detached in pairs (dual receivers), the system
library for the job, the QGPL library is used.
tries to use the first of the two receivers. (The order of the
receivers can be viewed on the Work with Receiver Directory library-name: Specify the name of the library to be
display, which can be accessed using the Work with Journal searched.
Attributes (WRKJRNA) command.) When the first receiver is
journal-name: Specify the name of the journal.
not usable (for example, because it is damaged or not
found), the system tries to use the second receiver of the FILE
pair. If neither receiver is usable, the removal of journaled Specifies a maximum of 300 qualified names of the
changes ends. physical database files whose journal entries are being
removed. The name of the member in the file whose
Restrictions: journal entries are being removed can also be specified.
1. This command is shipped with public *EXCLUDE Note: The maximum number of members that can have
authority and the QPGMR and QSRV user profiles have changes removed with this command is 32,767.
private authorities to use the command. If more than 32,767 members are included in the
2. The files specified on this command must currently be files specified, an error message is sent and no
having their changes journaled, and they must have changes are removed. You can change the
been journaled to the specified journal throughout the values specified on this parameter so that the
period indicated on the command. limit is not exceeded.

3. Before images are required for the files (see the Start Element 1: File Name
Journal Physical File (STRJRNPF) command). The name of the file can be qualified by one of the fol-
4. The files indicated on the command are allocated exclu- lowing library values:
sively while the changes are being removed. If a file
*LIBL: All libraries in the job's library list are
cannot be allocated exclusively, the command ends and
searched until the first match is found.
no journaled changes are removed from the files.
*CURLIB: The current library for the job is
5. If there is no journal entry that represents the entry
searched. If no library is specified as the current
specified on the FROMENT or TOENT parameter the
library for the job, the QGPL library is used.
command ends, and no journaled changes are removed
from the files. library-name: Specify the name of the library to be
searched.
6. If the journal sequence numbers have been reset in the
range of the receivers specified, and a sequence *ALL: All physical files in the specified library whose
number is specified on the FROMENT or TOENT param- changes are being journaled to the specified journal
eter, the first occurrence of the sequence number speci- have their journal entries removed. The library name
fied on either parameter is used. must be specified. If *ALL is specified and you do not
have the required authority to all of the files, an error
7. The TOJOBO parameter cannot be used to specify
message is sent and the command ends.
when the remove journaled changes operation is to end
if one or more journal receivers in the specified receiver file-name: Specify the name of the physical database
range was attached to a journal that had file whose journal entries are being removed.
RCVSIZOPT(*MINFIXLEN) in effect. Element 2: Member Name
| 8. This command cannot be used on or with a remote *FIRST: Journal entries are removed from the first
| journal. member of the file.
Note: To see the parameter and value descriptions for this *ALL: Journal entries are removed from all members in
command, refer to the online help text. For more the file.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. member-name: Specify the name of the member in the
file whose journal entries are removed.

Required Parameters If *ALL is specified for the first part of this parameter, the
value specified for the member name is used for all
JRN applicable files in the library. For example, if *FIRST is
Specifies the qualified name of the journal that contains specified, journal changes are removed from the first
the journal entries being removed. member of all applicable files in the library.
The name of the journal can be qualified by one of the
following library values:

Chapter 2. OS/400 Command Descriptions P3-741


RMVJRNCHG

Optional Parameters ending-journal-receiver: Specify the name of the journal


receiver used as the last (oldest) receiver with the
RCVRNG journal entries being removed. If the end of the receiver
Specifies the qualified name of the starting and ending chain is reached before a receiver of this name is found,
journal receivers used in removing the journal entries. the operation ends.
The system begins the removal operation with the
starting journal receiver (specified by the first value) and FROMENT
proceeds through the chain of receivers until the ending Specifies the entry used as the starting point for
receiver (specified by the last value) is processed. The removing changes that were journaled.
values specified on the parameter represent journal *LAST: Journal entries are removed starting with the
receivers in reverse order from the order in which they last journal entry in the specified receiver range. If
were attached to the journal. FROMENT is not specified, *LAST is assumed.
If dual receivers are used at any time, the first of the *LASTSAVE: Journal entries are removed starting with
receivers is always used when chaining through the set the last journal entry before the last save operation. The
of receivers. If any problem is found in the receiver system determines the actual starting position for each
chain before the removal of journaled changes is com- of the file members specified on the command. The
pleted (such as a damaged receiver or a receiver not parameter value implies that the file was just restored on
found), the system tries to use the second of the dual the system.
receivers. If the second of the receivers is damaged or
The system also verifies that the date and time of the
not found, or if the problem is found during the removal
saved version of the file member that is restored on the
operation, the operation ends.
system is the same as the date and time that the file
Note: The maximum number of receivers that can be member was last saved, as indicated on the journal.
included in a range of receivers is 256. If more
If the dates and times do not match, no entries are
than 256 receivers are included in the range
removed and an inquiry message is sent to the user, or
specified, an error message is sent and no
system operator requesting a cancel or ignore response.
changes are applied. You can change the
If an ignore response is given to the message, the oper-
values specified on this parameter so that the
ation is attempted. A cancel response causes the oper-
limit is not exceeded.
ation to end, and no journal changes are removed.
*CURRENT: The journal receiver that is currently
If the file was last saved with the save-while-active func-
attached when starting to remove journal entries is used.
tion, the saved copy of each file member includes all
Element 1: Starting Journal Receiver record-level changes in the journal entries up to the cor-
The name of the starting journal receiver can be quali- responding 'F SS' start of save journal entry. In this
fied by one of the following library values: case, the system removes changes beginning with the
first journal entry preceding the 'F SS' entry.
*LIBL: All libraries in the job's library list are
If the file was last saved when it was not in use (normal
searched until the first match is found.
save), the saved copy of each member includes all
*CURLIB: The current library for the job is record-level changes in the journal entries up to the cor-
searched. If no library is specified as the current responding 'F MS' member saved journal entry. In this
library for the job, the QGPL library is used. case, the system removes changes beginning with the
library-name: Specify the name of the library to be first journal entry preceding the 'F MS' entry.
searched. starting-sequence-number: Specify the sequence
number of the first journal entry that is processed when
starting-journal-receiver: Specify the name of the journal
removing journal changes from the file member.
receiver used as the first (newest) receiver with journal
entries to be removed. TOENT
Element 2: Ending Journal Receiver Specifies the entry used as the ending point for
removing changes that were journaled.
The name of the ending journal receiver can be qualified
by one of the following library values: *FIRST: Journal entries are removed until the first entry
in the specified receiver range is processed.
*LIBL: All libraries in the job's library list are
ending-sequence-number: Specify the sequence
searched until the first match is found.
number of the last journal entry that is removed from the
*CURLIB: The current library for the job is file member.
searched. If no library is specified as the current
library for the job, the QGPL library is used. TOJOBO
Specifies the job identifier of the job that, when it opens
library-name: Specify the name of the library to be a physical file member (or logical file member defined
searched. over the physical file) included in the files specified on

P3-742 OS/400 CL Reference - Part 2 (Full Version)


RMVJRNCHG

the FILE parameter, becomes the last job in which FROMENT parameter must identify a point that is at a
journal entry changes are removed by this command. commitment boundary.
The specified job could be a job suspected of causing
*YES: The journal entries are removed from the entry
errors when the job opens a file member.
specified on the FROMENT parameter to the entry indi-
This is the ending point for all members specified. This cated on the TO option, honoring commitment bounda-
parameter cannot be used to remove a specific job's ries.
journal entries; all entries for all jobs are removed.
Ÿ If the journal entry specified on the FROMENT
The job identifier has a maximum of three elements. parameter is in the middle of the LUW of which it is
job-name a participant, an error message is sent and the
user-name/job-name operation is not attempted.
job-number/user-name/job-name
Ÿ If the journal entry indicated on the TO option is in
The job name must be specified. The null value (*N) the middle of the LUW of which it is a participant,
may be used in place of the job number or the user the operation stops at the commitment boundary
profile name to maintain the position in the sequence. before that journal entry. A diagnostic message is
For example, 123456/*N/job-name specifies the job sent at the end of the operation.
number, 123456, and the job name, without specifying
the user profile under which the job is run. Note: If a journal entry is encountered that causes the
operation to end before the entry indicated on
CMTBDY the TO option, commitment boundaries might not
Specifies whether commitment boundaries are honored be honored.
when the journal entries from which journaled changes
are to be removed are part of a commitment control
logical unit of work (LUW). More information on the use Example
of commitment control is in the Backup and Recovery
RMVJRNCHG JRN(JRNA) FILE((LIB2/PAYROLL JAN))
book.
RCVRNG(RCV25 RCV22) TOENT(\FIRST)
Note: For purposes of this parameter description, the
TO option is used to describe either the TOENT This command causes the system to remove all journaled
or the TOJOBO parameter, whichever is speci- changes to journal JRNA to member JAN of file PAYROLL in
fied. library LIB2 that are journaled on the journal receiver chain
starting with receiver RCV25 and ending with receiver
*NO: The journal entries are removed from the entry
RCV22. Library search list *LIBL is used to find journal
specified on the FROMENT parameter to the entry indi-
JRNA and receivers RCV25 and RCV22.
cated on the TO option, regardless of commitment
boundaries. Even if a journal entry within this range is a The removal operation begins with the last journaled change
participant of the LUW, the operation is attempted. The on the receiver chain and ends with the first journaled
change.

Chapter 2. OS/400 Command Descriptions P3-743


RMVLANADPI

RMVLANADPI (Remove LAN Adapter Information) Command


Job: B,I Pgm: B,I Exec

(P) ─┬────────────────────────────────┬─────────────────────────────────────────────5%
55──RMVLANADPI──ADPTNAME(──┬─\ADPTADR─────┬────
└─adapter-name─┘ (1) ─adapter-address──)─┘
└─ADPTADR(───
Notes:
P All parameters preceding this point can be specified in positional form.

1 This parameter is valid only if ADPTNAME(*ADPTADR) is specified.

Purpose *ADPTADR: The adapter address is used to identify the


adapter entry being removed.
The Remove Local Area Network Adapter Information
adapter-name: Specify the name of the adapter entry to
(RMVLANADPI) command removes an adapter name entry
remove. The name can be a maximum of 10 characters
from the adapter file.
in length.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more
information about printing the help text, refer to Optional Parameter
“Printing CL Command Descriptions” in Chapter 1. ADPTADR
Specifies the 12-character hexadecimal adapter address.
Required Parameter
ADPTNAME Example
Specifies the name of the entry being removed from the RMVLANADPI ADPTNAME(PAYROLL)
adapter file.
This command removes the adapter PAYROLL from the
adapter file.

P3-744 OS/400 CL Reference - Part 2 (Full Version)


RMVLANADPT

RMVLANADPT (Remove LAN Adapter) Command


Job: B,I Pgm: B,I Exec

(P) ──)──┬────────────────────────────────┬─────────────────────5%
55──RMVLANADPT──LINE(──line-name──)──ADPTNAME(──┬─\ADPTADR─────┬───
└─adapter-name─┘ (1) ─adapter-address──)─┘
└─ADPTADR(───
Notes:
P All parameters preceding this point can be specified in positional form.

1 This parameter is valid only if ADPTNAME(*ADPTADR) is specified.

Purpose information about printing the help text, refer to


“Printing CL Command Descriptions” in Chapter 1.
The Remove Local Area Network Adapter (RMVLANADPT)
command removes an active local area network (LAN)
adapter from a line description that is varied on. Required Parameters
LINE
Restrictions:
Specifies the name of the line description attached to the
1. This command is valid only for users with QSECOFR adapter being removed.
authority.
ADPTNAME
2. This command is valid only for LAN managers with Specifies the name of the adapter being removed.
QSECOFR authority, that are in the controlling mode.
*ADPTADR: The adapter address is used to identify the
Note: The mode (controlling or observing) of the token- adapter.
ring LAN manager is set on the TRNMGRMODE
parameter when the line is created or changed adapter-name: Specify the name of the adapter being
with the Create Line Description (Token-Ring removed. The name can be a maximum of 10 charac-
Network) (CRTLINTRN) or Changed Line ters in length.
Description (Token-Ring Network) (CHGLINTRN)
commands. Optional Parameter
Attention: ADPTADR
Specifies the 12-character hexadecimal adapter address.
Use of this command to remove an active adapter results in
loss of communications with any attached products, such as
workstations or other systems. Example
Note: To see the parameter and value descriptions for this RMVLANADPT LINE(CHGBRANCH) ADPTNAME(\ADPTADR)
command, refer to the online help text. For more ADPTADR(ðððððððð1BFF)

This command removes the adapter with an address of


000000001BFF from the line description, CHGBRANCH.

Chapter 2. OS/400 Command Descriptions P3-745


RMVLIBLE

RMVLIBLE (Remove Library List Entry) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ────────────────────────────────────────────────────────────────────────────────────────5%
55──RMVLIBLE──LIB(──library-name──)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Required Parameters


The Remove Library List Entry (RMVLIBLE) command LIB
removes a library name from the user portion of the library Specifies the name of the library being removed from the
list. user portion of the library list.

Note: To see the parameter and value descriptions for this


command, refer to the online help text. For more Example
information about printing the help text, refer to RMVLIBLE LIB(TESTLIB)
“Printing CL Command Descriptions” in Chapter 1.
This command removes the library TESTLIB from the user
portion of the library list.

P3-746 OS/400 CL Reference - Part 2 (Full Version)


RMVLICKEY

RMVLICKEY (Remove License Key Information) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──RMVLICKEY──┬────────────────────────────────┬──┬──────────────────────────────────────────────┬─────────────────────────────5
│ ┌─\LICKEYFILE─┐ (1) ─┬─\ALL────────────────────────┬──)─┘
│ └─PRDID(───
└─LICKEYINP(──┴─\PROMPT─────┴──)─┘ ├─generic\-product-identifier─┤
└─product-identifier──────────┘
5──┬────────────────────────────────┬──┬────────────────────────────┬─── (P) ──┬──────────────────────────────────────┬──────────────5
│ ┌─\ALL─────────┐ │ │ ┌─\ALL────┐ │ │ ┌─\LOCAL───────────────┐ │
(1) ─┴─license-term─┴──)─┘ └─FEATURE(───
└─LICTRM(─── (1) ─┴─feature─┴──)─┘ └─SERIAL(──┼─\REMOTE──────────────┼──)─┘
├─\ALL─────────────────┤
└─system-serial-number─┘
5──┬───────────────────────────────────────────────────────┬──┬─────────────────────────────────────────┬──────────────────────5%
│ ┌─\LIBL/────────┐ │ │ ┌─\FIRST─────────────┐ │
(2) ─┼───────────────┼──license-key-file──)─┘ └─LICKEYMBR(───
└─LICKEYFILE(─── (2) ─┼─\LAST──────────────┼──)─┘
├─\CURLIB/──────┤ └─license-key-member─┘
└─library-name/─┘
Notes:
1 This parameter is valid only when LICKEYINP(*PROMPT) is specified.

2 This parameter is valid only when LICKEYINP(*LICKEYFILE) is specified.

P All parameters preceding this point can be specified in positional form.

Purpose *ALL: The software license key information for all


product identifiers is removed.
The Remove License Key Information (RMVLICKEY)
generic*-product-identifier: Specify the generic identifier
command can be used to remove software license key infor-
of the products to be removed. A generic product identi-
mation from the license repository for products with keyed
fier is specified in the same manner as a generic name.
compliance. Products with keyed compliance require that
you have a software license key from the software provider A generic name is a character string of one or more
in order to change the usage limit or the expiration date of characters followed by an asterisk (*); for example,
the license information. ABC*. The asterisk substitutes for any valid characters.
A generic name specifies all objects with names that
Removing license information from the repository does not begin with the generic prefix for which the user has
affect installed licenses. Any license that is currently being authority. If an asterisk is not included with the generic
used to access the product on this system remains valid and (prefix) name, the system assumes it to be the complete
usable. object name. For more information on the use of
generic names, refer to “Generic Object Names” in
Restrictions: This command is shipped with public Chapter 2.
*EXCLUDE authority.
product-identifier: Specify the seven-character identifier
Note: To see the parameter and value descriptions for this of the product.
command, refer to the online help text. For more
information about printing the help text, refer to LICTRM
“Printing CL Command Descriptions” in Chapter 1. Specifies the license term for which software license key
information is removed.

Optional Parameters *ALL: The software license key information for all
product identifiers is removed.
LICKEYINP
license-term: Specify the license term in Vx, VxRy, or
Specifies how the software license key information to be
VxRyMz format, where x and y can be a number from 0
removed is supplied by the user.
through 9, and z can be a number from 0 through 9 or a
*LICKEYFILE: The software license key information is letter from A through Z.
taken from the file specified on the LICKEYFILE param-
eter. FEATURE
Specifies the feature of the product specified on the
*PROMPT: The software license key information is PRDID parameter for which the software license key
entered through prompting. information is removed.
PRDID *ALL: The software license key information for all fea-
Specifies the seven-character identifier of the product for tures of the product is removed.
which software license key information is removed.

Chapter 2. OS/400 Command Descriptions P3-747


RMVLICKEY

feature: Specify the number of the feature for which *LIBL: All libraries in the job's library list are
software license key information is removed. searched until the first match is found.

SERIAL *CURLIB: The current library for the job is


Specify the serial number of the system for which soft- searched. If no library is specified as the current
ware license key information is removed. library for the job, the QGPL library is used.

*LOCAL: The software license key information for the library-name: Specify the name of the library to be
local system is removed. searched.

*REMOTE: The software license key information to be license-key-file: Specify the name of the file that con-
removed is for remote systems only and depends on the tains the software license key information.
value specified on the LICKEYINP parameter.
LICKEYMBR
Ÿ If LICKEYINP(*PROMPT) is specified, the software Specifies the name of the member in which the software
license key information for all remote systems is license key information to be removed is located. This
removed. member is in the file specified on the LICKEYFILE
parameter.
Ÿ If LICKEYINP(*LICKEYFILE) is specified, the soft-
ware license key information for the remote systems *FIRST: The oldest member in the file is used.
named in the file specified on the LICKEYFILE
*LAST: The newest member in the file is used.
parameter is removed.
license-key-member: Specify the name of the member
*ALL: The software license key information to be that contains the software license key information.
removed is for all systems and depends on the value
specified on the LICKEYINP parameter.
Examples
Ÿ If LICKEYINP(*PROMPT) is specified, the software
license key information for all systems is removed. Example 1: Removing License Key Information from
Prompt Input
Ÿ If LICKEYINP(*LICKEYFILE) is specified, the soft-
ware license key information for all the remote RMVLICKEY LICKEYINP(\PROMPT) PRDID(1MYPROD)
systems named in the file specified on the LICTRM(V3) FEATURE(5ðð1) SERIAL(1234567)
LICKEYFILE parameter is removed.
This command removes from the license repository the soft-
system-serial-number: Specify the serial number of the ware license key information for the product 1MYPROD, the
system for which software license key information is license term V3, and the feature 5001 for the system with
removed. serial number 1234567.
LICKEYFILE Example 2: Removing License Key Information from File
Specifies the qualified name of the file in which the soft- Input
ware license key information to be removed is located.
RMVLICKEY LICKEYINP(\LICKEYFILE)
This input file must be in the format of
SERIAL(\REMOTE) LICKEYFILE(\LIBL/MYKEYFILE)
QSYS/QALZAKEY, and can be created by using the LICKEYMBR(\LAST)
LICKEYFILE parameter on the Display License Key
Information (DSPLICKEY) command. This command removes from the license repository the soft-
The name of the license key file can be qualified by one ware license key information for all the remote systems found
of the following library values: in the newest created member of the file MYKEYFILE.

P3-748 OS/400 CL Reference - Part 2 (Full Version)


RMVLNK

RMVLNK (Remove Link) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(1) ─'object-link-path-name'──)────
55──RMVLNK──OBJLNK(─── (P) ──────────────────────────────────────────────────────────────────────────5%

Notes:
1 You can specify a pattern for this path name.

P All parameters preceding this point can be specified in positional form.

Purpose in the last part of the path name. An asterisk (*)


matches any number of characters and a question mark
The Remove Link (RMVLNK) command removes the link to (?) matches a single character. If the path name is qual-
the object specified on the OBJLNK parameter. If this is the ified or contains a pattern, it must be enclosed in apos-
only hard link to the object, the object is removed when no trophes. For more information on specifying path
longer in use. The object can be removed even if a symbolic names, refer to Chapter 2, “Path Names (*PNAME).”
link to it exists. The symbolic link remains until it is removed.

This command can also be issued using the following alter- Example
native command names:
RMVLNK OBJLNK('PAY')
Ÿ DEL
Ÿ ERASE This command removes a link named PAY.

For more information about integrated file system commands,


see the Integrated File System Introduction book. Additional Considerations
Restrictions: If you use this command to remove links for an object that is
in QDLS or in QSYS.LIB, additional restrictions may apply.
1. In QOpenSys, you must have write and execute To identify these restrictions, see the description of the other
authority to the directory containing the object. In QDLS, OS/400 command that can be used to delete the type of
you must have *ALL authority to the object and object you are removing.
*CHANGE authority to the parent directory. If a hard link
is being unlinked, you must also have object existence Ÿ For QDLS restrictions, see the DLTDLO (Delete Docu-
authority to the object. ment Library Object) command.

2. You must have execute authority to each directory in the Ÿ For QSYS.LIB restrictions, see the delete command for
path. the object you are removing. In general, the name of
this command is formed using the OS/400 object type
3. A directory cannot be unlinked. value, from which you remove the character * and add
4. The restrictions listed above are for the OS/400 objects the verb DLT to the beginning. For example:
of the types *DDIR, *DSTMF, *SOCKET, *STMF, and To delete an alert table, which has the object type
*SYMLNK. value of *ALRTBL, see the description for the
DLTALRTBL (Delete Alert Table) command for any
More information about restrictions for using this command
additional restrictions.
can be found in the “Additional Considerations” section at the
end of this command description. You can use the table in the "OBJTYPE Parameter"
section of Appendix A to identify the object type values.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more Exceptions:
information about printing the help text, refer to 1. The names of the delete commands for the fol-
“Printing CL Command Descriptions” in Chapter 1. lowing objects are not formed in the general manner
described above, so they are supplied here for your
Required Parameter reference:
Object Type (Value) Command
OBJLNK
Specifies the path name of the object to unlink. Multiple Compiler unit (*MODULE) DLTMOD
links can be removed with a name pattern. File 1 (*FILE) DLTF
The object path name can be either a simple name or a Menu description (*MENU) DLTMNU
name that is qualified with the name of the directory in
which the object is located. A pattern can be specified Server storage space (*SVRSTG)
DLTNWSSTG

Chapter 2. OS/400 Command Descriptions P3-749


RMVLNK

1 See Exception 2. Remove Directory (RMVDIR or alias RMDIR or RD)


command instead.
2. In the QSYS.LIB file system, libraries and database
files cannot be deleted using the Remove Link 3. The following QSYS.LIB object types cannot be
(RMVLNK or alias DEL or ERASE) command. deleted using another OS/400 command: *EXITRG,
However, these objects can be deleted using the *IGCSRT, *JOBSCD, *PRDAVL, *QRYDFN, *RCT.

P3-750 OS/400 CL Reference - Part 2 (Full Version)


RMVM

RMVM (Remove Member) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ───────────────────────────────5%
55──RMVM──FILE(──┼───────────────┼──database-file-name──)──MBR(──┬─\ALL─────────────────┬──)────
├─\CURLIB/──────┤ ├─member-name──────────┤
└─library-name/─┘ └─generic\-member-name─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose MBR
Specifies the name of the physical or logical file member
The Remove Member (RMVM) command removes one or being removed. A specific or generic member name, or
more members from the specified physical or logical file. *ALL, can be requested.
Removing a physical file member deletes all the data in the
*ALL: All members found in the specified file are
member and frees the storage space allocated to that
removed.
member and its access path. Removing a logical file
member deletes its access path to the associated data member-name: Specify the specific name of the
stored in a physical file member. member removed.
generic*-member-name: Specify the generic name of
Restriction: If a member of another file is sharing the data
the member. A generic name is a character string of
of the member being deleted, the dependent member must
one or more characters followed by an asterisk (*); for
be removed first. To remove a member from a file, the user
example, ABC*. The asterisk substitutes for any valid
must have object existence authority for the file.
characters. A generic name specifies all objects with
Note: To see the parameter and value descriptions for this names that begin with the generic prefix for which the
command, refer to the online help text. For more user has authority. If an asterisk is not included with the
information about printing the help text, refer to generic (prefix) name, the system assumes it to be the
“Printing CL Command Descriptions” in Chapter 1. complete object name. If the complete object name is
specified, and multiple libraries are searched, multiple
objects can be removed only if *ALL or *ALLUSR library
Required Parameters values can be specified for the name. For more infor-
FILE mation on the use of generic names, refer to “Generic
Specifies the qualified name of the database file (phys- Object Names” in Chapter 2.
ical or logical) that contains the member being removed.
The name of the file can be qualified by one of the fol- Examples
lowing library values:
Example 1: Removing a File Member
*LIBL: All libraries in the job's library list are
RMVM FILE(JOBHIST1) MBR(JOBHIST1A)
searched until the first match is found.
*CURLIB: The current library for the job is This command removes file member JOBHIST1A from file
searched. If no library is specified as the current JOBHIST1. Library list *LIBL is used to find the file and
library for the job, the QGPL library is used. member. If JOBHIST1 contains other members, they remain
unchanged.
library-name: Specify the name of the library to be
searched. Example 2: Removing Members with Names that Start
database-file-name: Specify the name of the database with SRC
file that contains the member being removed. RMVM FILE(QGPL/JOBHISTL) MBR(SRC\)

This command removes all file members with names that


start with SRC from file JOBHISTL in library QGPL.

Chapter 2. OS/400 Command Descriptions P3-751


RMVMFS

RMVMFS (Remove Mounted File System) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(2) ────┬──)────
55──RMVMFS──TYPE(──┬─\NFS─── (P) ─MNTOVRDIR(──┬─'directory-path-name'─┬──)──MFS(──'file-system-path-name'──)────────────5%
(1) ───┤
├─\UDFS─── (3) ───────────────┘
└─\ALL───
├─\NETWARE─── (2) ┤
└─\ALL───────┘
Notes:
1 If the TYPE parameter is *UDFS, one parameter from the choices MFS or MNTOVRDIR is required.

2 If the TYPE paramter is *NFS or *NETWARE the MNTOVRDIR parameter is required.

3 If *ALL is specified for MNTOVRDIR, *ALL must also be specified for the TYPE parameter.

P All parameters preceding this point can be specified in positional form.

Purpose *NETWARE: The file system being unmounted is a


NetWare file system. When *NETWARE is specified, you
The Remove Mounted File System (RMVMFS) command will must specify a directory for the MNTOVRDIR parameter.
make a previously mounted file system inaccessible within
*ALL: File systems of all types are to be unmounted. If
the integrated file system name space. The file system to be
you specify *ALL, you must specify a value for the
made inaccessible can be a user-defined file system
MNTOVRDIR parameter, and you may choose the value
(*UDFS) on the local system, a remote file system accessed
*ALL for its value.
via a Network File System server (*NFS), or a local or
remote NetWare file system (*NETWARE). If any of the MNTOVRDIR
objects in the file system are in use, the command will return Specifies the path name of the directory that was
an error message to the user. Note that if any part of the file mounted over ('covered') by a previous ADDMFS (Add
system has itself been mounted over, then this file system Mounted File System) or MOUNT command.
cannot be unmounted until it is uncovered.
'directory-path-name': The specified directory that was
This command can also be issued using the following alter- previously mounted over will be uncovered. If
native command name: TYPE(*ALL) was specified, all file systems mounted over
the specified directory will be unmounted. If a specific
Ÿ UNMOUNT file system type was specified for the TYPE parameter,
the file system mounted most recently over the specified
For more information about Network File System commands,
directory will be unmounted only if it matches the speci-
see OS/400 Network File System Support SC41-5714.
fied TYPE value.
Restrictions: *ALL: All directories that were previously mounted over
1. You must have *IOSYSCFG special authority to use this will be uncovered. If you specify *ALL, you must specify
command. *ALL for the TYPE parameter.

Note: To see the parameter and value descriptions for this MFS
command, refer to the online help text. For more Specifies the path name of the file system to be
information about printing the help text, refer to unmounted. This parameter can only be used to
“Printing CL Command Descriptions” in Chapter 1. unmount a Block Special File (*BLKSF), when *UDFS is
specified for the TYPE parameter.

Required Parameters
Examples
TYPE
Specifies the type of file system being unmounted. Example 1: Unmounting a Directory
*NFS: The file system being unmounted is a Network RMVMFS TYPE (\NFS) MNTOVRDIR('/tools')
File System. When *NFS is specified, you must specify a
directory for the MNTOVRDIR parameter. This command unmounts a Network File System that is
accessible on directory /tools.
*UDFS: The file system being unmounted is a user-
defined file system. When *UDFS is specified, you may Example 2: Unmounting an User Defined File System
specify either the MNTOVRDIR or the MFS parameter.
RMVMFS TYPE(\UDFS) MFS('/DEV/QASPð2/CUST1UDFS')

This command unmounts the user defined file system


/dev/qasp02/custudfs.

P3-752 OS/400 CL Reference - Part 2 (Full Version)


RMVMSG

RMVMSG (Remove Message) Command


Pgm: B,I REXX: B,I

55──RMVMSG──┬─────────────────────────────────────────────────────────────────────────────────────────────────────┬─────────────5
│ ┌─\PRV──┐ ┌─\──────────────────────────────────────────────────────────────────────┐ │
├─PGMQ(──┬─┴─\SAME─┴──┼────────────────────────────────────────────────────────────────────────┼─┬──)─┤
│ │ └─program-or-procedure-name──┬─────────────────────────────────────────┬─┘ │ │
│ │ │ ┌─\NONE───────┐ ┌─\NONE──────────────┐ │ │ │
│ │ └─┴─module-name─┴──┼────────────────────┼─┘ │ │
│ │ └─bound-program-name─┘ │ │
│ (1) ┬───────────────────────────────────────────────────────────────────────┘
└─┬─\ALLINACT─── │
│ └─\EXT────────┘ │
└─MSGQ(──┬─\PGMQ─────────────────────────────────┬──)─────────────────────────────────────────────────┘
│ ┌─\LIBL/────────┐ │
└─┼───────────────┼──message-queue-name─┘
├─\CURLIB/──────┤
└─library-name/─┘
5──┬─────────────────────────────────┬──┬─────────────────────────────┬──┬─────────────────────────┬───────────────────────────5%
(2) ─&CL-variable-name──)─┘ │
└─MSGKEY(─── ┌─\BYKEY─────┐ │ │ ┌─\YES─┐ │
(3) ─┼─\ALL───────┼──)─┘ └─RMVEXCP(───
└─CLEAR(─── (4) ─┴─\NO──┴──)─┘
├─\KEEPUNANS─┤
├─\OLD───────┤
└─\NEW───────┘
Notes:
1 If PGMQ(*ALLINACT) is specified, the CLEAR parameter must be *ALL.

2 MSGKEY can be specified only if CLEAR(*BYKEY) is specified.

3 CLEAR(*KEEPUNANS) is valid only if a message queue name is specified for the MSGQ parameter.

CLEAR(*KEEPUNANS) is not valid if *PGMQ is specified for MSGQ.


4 This parameter is valid only when MSGQ(*PGMQ) is specified.

Purpose Element 1: Relationship


Element 1 of this parameter specifies whether the
The Remove Message (RMVMSG) command is used by a
message queue is associated with the program or proce-
program to remove the specified message, or a group of
dure identified by Element 2, or if it is associated with
messages, from the specified message queue. If the speci-
the caller of the program or procedure.
fied message queue is not allocated to the job in which this
command is issued, or to any other job, it is allocated by this *PRV: The message is removed from the message
command for the duration of the command. queue of the program or procedure that called the
program or procedure identified by Element 2.
Restrictions:
Note: If the message queue previous to the one identi-
1. This command is valid only in a compiled CL program. fied by Element 2 is for an ILE program entry
2. To remove a message from the message queue, the procedure (PEP), the message will be removed
user must have *CHANGE authority for the queue and from the message queue immediately previous to
*USE authority for the library in which the queue is the PEP message queue. (Effectively this would
stored. be two message queues previous to the one
Note: To see the parameter and value descriptions for this identified by Element 2).
command, refer to the online help text. For more *SAME: The message is removed from the message
information about printing the help text, refer to queue of the program or procedure identified by Element
“Printing CL Command Descriptions” in Chapter 1. 2.
Element 2: Program or Qualified Procedure
Optional Parameters Element 2 of this parameter has three items. Item 1
PGMQ specifies the program or procedure of the job message
Specifies the call message queue from which the queue. Items 2 and 3 specify the module name and the
message is removed. Messages can be removed from bound program name, which can be used to qualify the
the external queue (*EXT) or from a message queue procedure name.
associated with a call stack entry. Item 1: Program or Procedure Name
Note: If CLEAR(*BYKEY) is specified, the PGMQ *: Identifies the program or procedure running the
parameter is ignored. RMVMSG command.

Chapter 2. OS/400 Command Descriptions P3-753


RMVMSG

program-or-procedure-name: Specify the name of the library-name: Specify the name of the library to be
program or procedure used. searched.
If Item 1 identifies a program, the name specified can be message-queue-name: Specify the name of the
a maximum of 10 characters. If Item 1 identifies a pro- message queue from which one or more messages are
cedure, the name specified can be a maximum of 256 removed.
characters.
MSGKEY
The procedure name alone may not identify the correct
Specifies the name of the CL variable that contains the
procedure. Several different procedures with the same
message reference key of the message being removed.
name can run in a job. To further identify a procedure,
MSGKEY cannot be specified if *ALL, *KEEPUNANS,
the name specified can be qualified by a module name,
*OLD, or *NEW is specified for the CLEAR parameter.
or by both a module name and a bound program name.
CLEAR
Item 2: Module Name
Specifies whether one message, all messages (except
The module name qualifier identifies the module into unanswered inquiry messages), or only old or new mes-
which the procedure was compiled. sages in the specified message queue are removed from
*NONE: No module name is specified. the queue.

module-name: Specify the module name to be used as *BYKEY: The message identified by the CL variable
a qualifier for the specified procedure name (modules named in the MSGKEY parameter is removed from the
are associated only with procedures). The module name message queue.
can be a maximum of 10 characters. *ALL: All messages are removed from the specified
If a module name is not specified but a bound program message queue.
name is, *NONE must be specified in the module name *KEEPUNANS: Messages other than unanswered
position. inquiry messages are removed from the specified
Item 3: Bound Program Name message queue. If CLEAR(*KEEPUNANS) is specified,
MSGQ(*PGMQ) cannot be specified (a message-queue
The bound program name qualifier identifies the program
name must be specified for MSGQ).
to which the procedure was bound.
*OLD: Old messages in the specified message queue
*NONE: No bound program name is specified.
are removed from the queue.
bound-program-name: Specify the bound program name *NEW: New messages in the specified message queue
to be used as a qualifier for the specified procedure
are removed from the queue.
name (and module name if specified). The bound
program name can be a maximum of 10 characters. RMVEXCP
Specifies the action to be taken when an unhandled
Other Single Values
exception message is found. An unhandled exception
*ALLINACT: All messages for all inactive call stack message is an escape, notify, or status message that
entries are removed from the user's job message queue. has been sent to an ILE procedure. When this
If this value is specified for the PGMQ parameter, the command is run, the ILE procedure has not yet taken
value *ALL must be specified on the CLEAR parameter. action to tell the system that the exception is handled.
*EXT: The message is removed from the external One action that the ILE procedure can take is to call a
message queue of the job. CL program that will remove the exception message.
More information on actions that an ILE procedure can
MSGQ take to handle an exception is in &ilec..
Specifies the qualified name of the message queue from
This parameter is valid only when working with a
which one or more messages are removed. If MSGQ is
message queue that is associated with a call stack entry
specified, the PGMQ parameter cannot be specified.
for an ILE procedure. This parameter is ignored when
*PGMQ: The call message queue specified in the working with a message queue associated with a call
PGMQ parameter is the only queue from which the mes- stack entry for a program.
sages are removed. If CLEAR(*KEEPUNANS) is speci-
*YES: The unhandled exception message on the speci-
fied, MSGQ(*PGMQ) cannot be specified.
fied message queue is removed. As a result, the excep-
The name of the message queue can be qualified by tion is handled.
one of the following library values:
*NO: The unhandled exception message on the speci-
*LIBL: All libraries in the job's library list are fied message queue is not removed. The message
searched until the first match is found. remains on the queue as an unhandled exception
message.
*CURLIB: The current library for the job is
searched. If no library is specified as the current
library for the job, the QGPL library is used.

P3-754 OS/400 CL Reference - Part 2 (Full Version)


RMVMSG

Examples This command removes all messages except the unan-


swered inquiry messages from the message queue named
Example 1: Removing a Message SMITH.
RMVMSG MSGQ(SMITH) MSGKEY(&KEY)
Example 3: Removing Messages Using a Partial Proce-
This command removes the message with the reference key dure Name
specified in the CL variable &KEY from the message queue RMVMSG PGMQ(\SAME PROCESS_ORDER>>>) CLEAR(\ALL)
named SMITH.
This command removes all messages from the most recent
Example 2: Keeping Unanswered Messages procedure whose name begins with PROCESS_ORDER.
RMVMSG MSGQ(SMITH) CLEAR(\KEEPUNANS)

Chapter 2. OS/400 Command Descriptions P3-755


RMVMSGD

RMVMSGD (Remove Message Description) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ─────────────────────────────────5%
55──RMVMSGD──MSGID(──message-identifier──)──MSGF(──┼───────────────┼──message-file-name──)────
├─\CURLIB/──────┤
└─library-name/─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose overrides in effect for the job are ignored by this


command; the file specified here is the one from which
The Remove Message Description (RMVMSGD) command the message is removed.
removes a message description from the specified message
The name of the message file can be qualified by one of
file.
the following library values:
Note: A description of how to print a single message
description or a group of message descriptions is in *LIBL: All libraries in the job's library list are
the section entitled “Handling Messages” in the searched until the first match is found.
System Operation book. *CURLIB: The current library for the job is
searched. If no library is specified as the current
Restriction: The user must have use and delete authorities library for the job, the QGPL library is used.
to the message file.
library-name: Specify the name of the library to be
Note: To see the parameter and value descriptions for this searched.
command, refer to the online help text. For more
information about printing the help text, refer to message-file-name: Specify the name of the message
“Printing CL Command Descriptions” in Chapter 1. file to use.

Required Parameters Example


RMVMSGD MSGID(UINð115) MSGF(INV)
MSGID
Specifies the message identifier of the message being This command removes the message description with the
removed from the message file. identifier UIN0115 from the message file named INV. The
MSGF library list is used to find the INV file. Note that if more than
Specifies the qualified name of the message file con- one INV message file exists in the libraries being searched,
taining the message being removed. Any message file the message description will only be removed from the first
INV message file found in the library list.

P3-756 OS/400 CL Reference - Part 2 (Full Version)


RMVNCK

RMVNCK (Remove Nickname) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\PRIVATE─┐
(P) ────────────────────────────────────────────────────────────────────────────────5%
55──RMVNCK──NCK(──nickname──┴─\PUBLIC──┴──)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Required Parameter


The Remove Nickname (RMVNCK) command is used to NCK
remove an existing nickname from the system distribution Specifies the existing nickname that is being removed
directory. When the removed nickname is no longer avail- and the access of the nickname.
able for use, the job issuing this command has ended. Element 1: Nickname

A nickname is a short version of either a directory entry nickname: Specify the nickname you are removing.
name or a distribution list name. More information about Element 2: Nickname Access
nicknames is in the SNA Distribution Services book.
*PRIVATE: The private nickname that you own is being
Restrictions: removed.

1. You must have security administrator (*SECADM) *PUBLIC: The public nickname is being removed.
authority to remove a public nickname that you do not Public nicknames can be removed by a user with secu-
own. No special authority is needed for you to remove a rity administrator (*SECADM) authority or by the owner.
public or private nickname that you own.
2. Only the owner can remove a private nickname. No Example
special authority is needed. RMVNCK NCK(SEC44A \PUBLIC)
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more This command removes the public nickname SEC44A. If the
information about printing the help text, refer to user has proper authority to the nickname, the nickname is
“Printing CL Command Descriptions” in Chapter 1. removed.

Chapter 2. OS/400 Command Descriptions P3-757


RMVNETJOBE

RMVNETJOBE (Remove Network Job Entry) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─────────────────────────────────────────────────────────────────────────────────────5%
55──RMVNETJOBE──FROMUSRID(──user-ID──)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more
The Remove Network Job Entry (RMVNETJOBE) command information about printing the help text, refer to
removes a network job entry from the system. The network “Printing CL Command Descriptions” in Chapter 1.
job entry determines the action taken when an input stream
is sent to a user on this system by using the Submit Network
Job (SBMNETJOB) command. This entry is used to deter- Required Parameter
mine whether the input stream is automatically submitted, FROMUSRID
placed on the queue of received files for a user, or rejected. Specifies the two-part user ID that identifies the network
The entry also specifies the user profile that is used for job entry being removed. Specify the two-part user ID.
checking the authority to the job description referenced in the Both parts of the user ID are required.
batch job. There should be one entry for each user or group
of users who submit jobs to this system. Note: Depending on the work station being used, the
internal value for a new user identifier may differ
If this command is used to remove an entry for a specific from the characters shown by the Display
user, an entry may still exist that is in effect for that user. Network Job Entry (DSPNETJOBE) command. If
For example, if the user removes the entry for user ID, JOE the byte-string value specified for the
PGMRS, and if there is an entry with a user ID, *ANY FROMUSRID parameter does not match the
PGMRS or *ANY *ANY, that entry is used to handle any jobs rules for an internal user identifier value, or if it
submitted by JOE PGMRS. Additional information on the job does not match the internal value for any
entry table is in the SNA Distribution Services book. enrolled user, an error may be reported.

Restrictions:
1. This command is shipped with public *EXCLUDE Example
authority. RMVNETJOBE FROMUSRID(JOE SMITH)
2. The internal value for a node identifier may differ from
This command removes the network job entry that is used to
the characters shown by the RMVNETJOBE command
determine the action that is taken for any input streams
depending on the type of work station (language) being
received from user ID, JOE SMITH. The network job
used. If the byte-string value specified for the
authority for user ID, JOE SMITH, is taken from either the
FROMUSRID command parameter does not match the
network job entry *ANY SMITH, if that entry exists, or from
rules for an internal node identifier value, or if it does not
the network job entry *ANY *ANY, if that entry exists. If
match the internal value for any defined node (ignoring
neither of these entries exist, all jobs received from user ID,
case differences), an error may be reported.
JOE SMITH, are rejected.

P3-758 OS/400 CL Reference - Part 2 (Full Version)


RMVNETTBLE

RMVNETTBLE (Remove Network Table Entry) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─────────────────────────────────────────────────5%
55──RMVNETTBLE──NETWORK(──network-name──)──INTNETADR(──internet-address──)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose NETWORK
Specifies the name of the network entry to be removed.
The Remove Network Table Entry (RMVNETTBLE)
command is used to remove a network entry from the INTNETADR
network table. The network table is used to manage a list of Specifies the Internet address of the network to be
your networks and their associated Internet addresses. removed. Internet addresses are expressed in the
decimal form
Restriction: You must have system configuration nnn.nnn.nnn.nnn
(*IOSYSCFG) special authority to use this command.
where nnn is a number ranging from 0 through 255.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more
information about printing the help text, refer to Example
“Printing CL Command Descriptions” in Chapter 1. RMVNETTBLE NETWORK(NETONE) INTNETADR(9.5.ð.ð)

This command removes the NETONE network entry with


Required Parameters address 9.5.0.0 from the network table.

Chapter 2. OS/400 Command Descriptions P3-759


RMVNODLE

RMVNODLE (Remove Node List Entry) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ─┬──────────────────────────────────────────────────┬──────────5
55──RMVNODLE──NODL(──┼───────────────┼────node-list-name────)────
├─\CURLIB/──────┤ │ ┌─\SNA─┐ │
└─library-name/─┘ (1) ┘
└─RMTLOCNAME(──remote-location-name──┴─\IP──┴──)───
5──┬──────────────────────────────────────────────────────────┬────────────────────────────────────────────────────────────────5%
│ ┌─\RMTLOC────────────────────────────────┐ │
(2) ┘
└─CPNAME(──┴─┬─\NETATR────┬──┬────────────────────┬─┴──)───
└─network-ID─┘ └─control-point-name─┘
Notes:
P All parameters preceding this point can be specified in positional form.

1 When this parameter is used, CPNAME(*RMTLOC) must be specified.

2 The *RMTLOC value is required for this parameter if a value is specified for the RMTLOCNAME parameter.

Purpose network identifier (ID) of the system being removed from


the node list.
The Remove Node List Entry (RMVNODLE) command
Element 1: Name or Address
removes an entry from an existing node list object.
remote-location-name: Specify the remote location
Note: To see the parameter and value descriptions for this
name to remove from the node list.
command, refer to the online help text. For more
information about printing the help text, refer to Element 2: Address Type
“Printing CL Command Descriptions” in Chapter 1. *SNA: The node name has a Systems Network Archi-
tecture (SNA) address type.
Required Parameter *IP: The node name has an Internet Protocol (IP)
address type.
NODL
Specifies the qualified name of the node list object to CPNAME
which the entry is added. Specifies the SNA node name that is being removed
The name of the node list can be qualified by one of the from the node list object. This system is specified as
following library values: two elements: the network ID and the control point
name.
*LIBL: All libraries in the job's library list are
Notes:
searched until the first match is found.
*CURLIB: The current library for the job is 1. The RMTLOCNAME parameter is recommended for
searched. If no library is specified as the current use in specifying the network ID and the control
library for the job, the QGPL library is used. point name.

library-name: Specify the name of the library to be 2. When the RMTLOCNAME parameter is used to
searched. specify the name of a system to remove from the
node list, *RMTLOC must be specified for this
node-list-name: Specify the name of the node list to parameter.
which the entry is added.
*RMTLOC: The network ID and control point name are
specified using the RMTLOCNAME parameter.
Optional Parameters Element 1: Network ID
RMTLOCNAME *NETATR: The local network ID (LCLNETID) network
Specifies the name and address type of the system to attribute is used as the value of the network identifier
remove from the node list object. The name can be an (ID) of the system being removed from the node list.
SNA network ID and control point name, an internet pro-
tocol host name, or an internet address. network-ID: Specify the network ID of the system to
remove from the node list.
An SNA node name is specified using the format
nnnnnnnn.cccccccc, where nnnnnnnn is the network ID Element 2: Control Point Name
and cccccccc is the control point name. If only the control-point-name: Specify the control point name of
control point name is specified, the local network ID the system to remove from the node list.
(LCLNETID) network attribute is used as the value of the

P3-760 OS/400 CL Reference - Part 2 (Full Version)


RMVNODLE

Note: This field is left blank when *RMTLOC is speci- RMVNODLE NODL(MYLIB/NODLð2)
fied as the network ID. RMTLOCNAME(MYSYS.NET1.LOCAL \IP)

This command removes the entry for host name


MYSYS.NET1.LOCAL from the node list NODL02 in library
Examples
MYLIB. The entry has an address type of IP.
Example 1: Removing a System in the Local Network
Example 3: Removing an Internet Address from a Node
from a Node List
List
RMVNODLE NODL(MYLIB/NODLð2)
RMTLOCNAME(AS4ððAð1 \SNA) RMVNODLE NODL(MYLIB/NODLð2)
RMTLOCNAME('9.13.156.8' \IP)
This command removes the entry for system AS400A01,
This command removes the entry for internet address
which is in the local network, from the node list NODL02 in
9.13.156.8 from the node list NODL02 in library MYLIB. The
library MYLIB. The entry has an SNA address type.
entry has an address type of IP.
Example 2: Removing a Host Name from a Node List

Chapter 2. OS/400 Command Descriptions P3-761


RMVNWSSTGL

RMVNWSSTGL (Remove Network Server Storage Link) command


Job: B,I Pgm: B,I REXX: B,I Exec

55──RMVNWSSTGL──NWSSTG(────network-server-storage-name────)──NWSD(────network-server-description-name────)─────────────────────5%

Purpose Required Parameters


The Remove Network Server Storage Link (RMVNWSSTGL) NWSSTG
command is used to remove an existing client storage space Specifies the name of the network server storage space
link from a network server description. to be removed from the network server's link list.

Note: Removing a client storage space link requires NWSD


updating items such as network aliases that refer to Specifies the name of the network server description that
the drive letter at which the storage space is linked. contains the link to be removed.

More information about using this command is in the Com-


munications Configuration book or the OS/2 Warp Server for Example
AS/400 Administration book. RMVNWSSTGL NWSSTG(PAINTS) NWSD(REMODEL)
Note: To see the parameter and value descriptions for this
This command removes the client storage space PAINTS link
command, refer to the online help text. For more
from the network server REMODEL.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1.

P3-762 OS/400 CL Reference - Part 2 (Full Version)


RMVOPTCTG

RMVOPTCTG (Remove Optical Cartridge) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──RMVOPTCTG──VOL(──┬─\IOSTATION────────┬──)──┬───────────────────────────┬───(P) ─────────────────────────────────────────────────5
└─volume-identifier─┘ │ ┌─\REMOVE─┐ │
(1) ─┴─\KEEP───┴──)─┘
└─VOLOPT(───
5──┬─────────────────────────────────────────────────┬──┬──────────────────────────────────┬───────────────────────────────────5%
│ ┌─\NONE──────────────────────┐ (3) ─optical-media-library──)─┘
│ └─MLB(───
(2) ─┴─removed-cartridge-location─┴──)─┘
└─RMVCTGLOC(───
Notes:
1 This parameter is valid only if a volume identifier is specified on the VOL parameter.

2 This parameter is valid only when VOLOPT(*KEEP) is specified.

3 This parameter is valid only when VOL(*IOSTATION) is specified.

P All parameters preceding this point can be specified in positional form.

Purpose VOLOPT
Specifies whether to keep the optical volume description
The Remove Optical Cartridge (RMVOPTCTG) command in the optical index database files.
can be used to:
Note: This parameter is valid only if a volume identifier
Ÿ Remove an optical disk cartridge and its volumes from is specified on the VOL parameter.
an optical media library.
*REMOVE: The volume description is removed from the
Ÿ Remove a cartridge currently in the input/output station
optical index database files.
of an optical media library.
Ÿ Move the input/output station of an optical media library *KEEP: The volume description is kept in the optical
to the out position. index database files. This allows the volume
Ÿ Remove the volume description of an optical volume descriptions of removed volumes to be displayed when
previously removed using this command with using the Work with Optical Volumes (WRKOPTVOL)
VOLOPT(*KEEP) specified. command.

Restriction: You must have *USE authority to use this RMVCTGLOC


command. It is shipped with *EXCLUDE public authority. Specifies the external location of the optical cartridge
after it is removed.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more Note: This parameter is valid only when
information about printing the help text, refer to VOLOPT(*KEEP) is specified.
“Printing CL Command Descriptions” in Chapter 1. *NONE: No external location is specified.
removed-cartridge-location: Specify the location of the
Required Parameter optical cartridge after it is removed. A maximum of 50
characters can be specified.
VOL
Specifies the volume identifier of the optical cartridge MLB
being removed from the optical media library. Although Specifies the name of the optical media library which is
an optical cartridge has two volumes, you need only to have its input/output station moved to the out position.
specify one volume identifier to remove the optical car- Note: This parameter is valid only when
tridge. VOL(*IOSTATION) is specified.
*IOSTATION: The input/output station of an optical
media library is moved to the out position. This allows
any optical cartridge currently in the input/output station Example
to be removed. RMVOPTCTG VOL(VOLð1)
volume-identifier: Specify the volume identifier of the
optical cartridge being removed. This command removes both volumes of an optical cartridge
that contains a volume identifier of VOL01 from the optical
media library. The volume descriptions are removed from
Optional Parameters the optical index database files.

Chapter 2. OS/400 Command Descriptions P3-763


RMVOPTSVR

RMVOPTSVR (Remove Optical Server) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─────────────────5%
55──RMVOPTSVR──CSI(──┬─\ALL───────────────────────────────────────────────┬──)──┬─────────────────────────┬───
│ ┌──
─────────────────────────────────────────────┐ │ │ ┌─\REMOVE─┐ │
6 (1) ─┘
└───communications-side-information-object-name─┴─── └─VOLOPT(──┴─\KEEP───┴──)─┘
Notes:
1 A maximum of 16 repetitions

P All parameters preceding this point can be specified in positional form.

Purpose representing the remote optical server. A maximum of


16 qualified names of servers can be specified.
The Remove Optical Server (RMVOPTSVR) command disa-
bles the ability of hierarchical file system (HFS) APIs to
access remote optical servers. The specified servers are no Optional Parameter
longer accessible to applications using the HFS APIs. VOLOPT
Specifies whether to keep the volume descriptions in the
Restriction: The user must have *USE authority to use this
optical index database files for optical servers being
command. It is shipped with *EXCLUDE public authority.
removed.
Note: To see the parameter and value descriptions for this
*REMOVE: All volume descriptions are removed from
command, refer to the online help text. For more
the optical index data base files.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. *KEEP: All volume descriptions are kept in the optical
index database files. This allows *REMOVED volume
descriptions to be displayed when using the Work with
Required Parameter Optical Volumes (WRKOPTVOL) command.
CSI
Specifies the qualified names of the communications Example
side information objects representing the remote optical
RMVOPTSVR CSI(LANð1)
servers to be removed from the optical configuration.
*ALL: All remote optical servers in the optical configura- This command removes optical LAN server LAN01 from the
tion are removed. optical configuration. All volume descriptions are removed
from the optical index database files.
communications-side-information-object-name: Specify
the name of the communications side information object

P3-764 OS/400 CL Reference - Part 2 (Full Version)


RMVPCLTBLE

RMVPCLTBLE (Remove Protocol Table Entry) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ────────────────────────────────────────────────────────────────────────────────5%
55──RMVPCLTBLE──PROTOCOL(──protocol-name──)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose information about printing the help text, refer to


“Printing CL Command Descriptions” in Chapter 1.
The Remove Protocol Table Entry (RMVPCLTBLE)
command is used to remove a protocol entry from the pro-
tocol table. The protocol table is used to manage a list of Required Parameter
protocols used in the Internet. PROTOCOL
Specifies the name of the protocol entry to be removed.
Restriction: You must have system configuration
(*IOSYSCFG) special authority to use this command.
Note: To see the parameter and value descriptions for this Example
command, refer to the online help text. For more RMVPCLTBLE PROTOCOL(TCP)

This command removes the TCP protocol entry from the pro-
tocol table.

Chapter 2. OS/400 Command Descriptions P3-765


RMVPEXDFN

RMVPEXDFN (Remove Performance Explorer Definition) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ───────────────────────────────────────────────────────────────────────5%
55──RMVPEXDFN──DFN(──┬─definition-name──────────┬──)────
├─generic\-definition-name─┤
└─\ALL─────────────────────┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose generic*-definition-name: Specify the generic name of


the performance explorer definition to be removed. A
The Remove Performance Explorer Definition generic name is a character string of one or more char-
(RMVPEXDFN) command removes one or more performance acters followed by an asterisk (*); for example, ABC*.
explorer definitions from the system. Each definition is The asterisk substitutes for any valid characters. A
stored as a member in the QAPEXDFN file in library generic name specifies all objects with names that begin
QUSRSYS. The member name is the same as the definition with the generic prefix for which the user has authority.
name. If an asterisk is not included with the generic (prefix)
name, the system assumes it to be the complete object
Restriction: The user must have object existence authority name. For more information on the use of generic
for file QAPEXDFN in library QUSRSYS. names, refer to “Generic Object Names” in Chapter 2.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more
Examples
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. Example 1: Removing a Single Definition
RMVPEXDFN DFN(SAMPLE)
Required Parameters
This command removes the member named SAMPLE from
DFN file QAPEXDFN in library QUSRSYS that contains the perfor-
Specifies the name of the performance explorer defi- mance explorer definition named SAMPLE.
nition being removed. A specific or generic definition
name, or *ALL, can be specified. Example 2: Removing All Definitions that Start with SAM
*ALL: All performance explorer definitions are removed. RMVPEXDFN DFN(SAM\)

definition-name: Specify the name of the performance This command removes all definitions with names that start
explorer definition to be removed. with SAM by removing all members that start with SAM from
file QAPEXDFN in library QUSRSYS.

P3-766 OS/400 CL Reference - Part 2 (Full Version)


RMVPFCST

| RMVPFCST (Remove Physical File Constraint) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ─┬───────────────────────┬─────5
55──RMVPFCST──FILE(──┼───────────────┼──physical-file──)──CST(──┬─\ALL───────────────────┬──)────
├─\CURLIB/──────┤ ├─\CHKPND────────────────┤ │ ┌─\ALL────┐ │
└─library-name/─┘ │ ┌──
─────────────────┐ │ └─TYPE(──┼─\REFCST─┼──)─┘
6 (1) ─┘
└───constraint-name─┴─── ├─\UNQCST─┤
├─\PRIKEY─┤
| └─\CHKCST─┘
5──┬─────────────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\RESTRICT─┐ │
(2) ─┼─\REMOVE───┼──)─┘
└─RMVCST(───
└─\KEEP─────┘
Notes:
1 A maximum of 300 repetitions.

| 2 This parameter is not valid when TYPE(*REFCST) or TYPE(*CHKCST) is specified.


P All parameters preceding this point can be specified in positional form.

Purpose physical-file: Specify the name of the physical file.

The Remove Physical File Constraint (RMVPFCST) CST


command can be used to remove one or more constraint Specifies the name of the constraint relationship being
relationships between physical files. The constraint relation- removed.
ships that can be removed with this command are referential *ALL: All of the constraint relationships for the file spec-
constraints, unique constraints, and primary key constraints. ified on the FILE parameter are removed.

Restrictions: *CHKPND: The constraint relationships that have


records that are possibly in violation of the constraints
1. You must have object management or alter authority to (check pending) are removed. A check pending state
the physical file specified on the FILE parameter. occurs when the system has not yet determined that the
2. You must have execute authority to the library qualifier values of a dependent file are all valid in relation to its
of the physical file specified on the FILE parameter. primary key. Only referential constraints can be in check
pending.
3. You cannot remove a constraint relationship from a file
that your user job has open. constraint-name: Specify the name of the constraint.
The case is preserved when lowercase characters are
Note: To see the parameter and value descriptions for this
specified.
command, refer to the online help text. For more
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. Optional Parameters
TYPE
Required Parameters Specifies the type of constraint relationship named on
the CST parameter that is being removed from the phys-
FILE
ical file.
Specifies the physical file from which a constraint is
being removed. For a referential constraint, this file can *ALL: All types of primary key and unique constraints
be a dependent file only. are removed. The following are examples of the CST
parameter dependencies:
The name of the physical-file can be qualified by one of
the following library values: Ÿ CST(*ALL) TYPE(*ALL) - All constraints are
removed
*LIBL: All libraries in the job's library list are
searched until the first match is found. Ÿ CST(*CHKPND) TYPE(*ALL) - All referential con-
straints in check pending are removed
*CURLIB: The current library for the job is
searched. If no library is specified as the current Ÿ CST(ABC) TYPE(*ALL) - The constraint ABC is
library for the job, the QGPL library is used. removed
library-name: Specify the name of the library to be Note: This value is ignored for referential constraints
searched. when the RMVCST parameter is specified.

Chapter 2. OS/400 Command Descriptions P3-767


RMVPFCST

*REFCST: The referential constraints are removed. constraint that is also a parent key is removed from the
The following are examples of the CST parameter parent file of a referential constraint.
dependencies:
Note: This parameter is ignored if the value on the
Ÿ CST(*ALL) TYPE(*REFCST) - All referential con- TYPE parameter is *REFCST.
straints are removed *RESTRICT: The constraint is not removed if the con-
Ÿ CST(*CHKPND) TYPE(*REFCST) - All referential straint is either defined or established between the
constraints in check pending are removed parent file and the dependent file. Neither the foreign
key access path nor the foreign key of the dependent file
Ÿ CST(ABC) TYPE(*REFCST) - The referential con-
is removed.
straint ABC is removed
*REMOVE: The constraint and the constraint definition
*UNQCST: The unique constraints are removed. between the parent file and the dependent file are
Note: If the unique constraint is a primary key, the removed. The corresponding foreign key is removed.
unique constraint is removed, but the primary key The foreign key access path of the dependent file is
definition and the file's access path are not removed only if one exists and is not shared.
removed. *KEEP: The constraint between the parent file and the
The following are examples of the CST parameter dependent file is removed, but the constraint definition is
dependencies: not removed. The corresponding foreign key and the
foreign key access path of the dependent file are not
Ÿ CST(*ALL) TYPE(*UNQCST) - All unique con- removed.
straints (except the primary key constraint) are
removed
Examples
Ÿ CST(*CHKPND) TYPE(*UNQCST) - Not valid;
unique constraints cannot be in check pending In these examples, the unique constraint
Ÿ CST(ABC) TYPE(*UNQCST) - The unique con- UNIQUE_Department_NUMBER and the referential con-
straint ABC is removed (unless it is a primary key straint EMPLOYEE_Department were added to the files by
constraint) issuing the following Add Physical File Constraint
(ADDPFCST) commands:
*PRIKEY: The primary key constraint is removed. The
ADDPFCST FILE(MYLIB/DEPARTMENTS) TYPE(\UNQCST)
following are examples of the CST parameter dependen-
KEY(DEPTNUM) CST(UNIQUE_Department_NUMBER)
cies: ADDPFCST FILE(MYLIB/PERSONNEL) TYPE(\REFCST)
Ÿ CST(*ALL) TYPE(*PRIKEY) - The primary key con- KEY(DEPTNO) CST(EMPLOYEE_Department)
straint is removed
Example 1: Removing a Unique Constraint
Ÿ CST(*CHKPND) TYPE(*PRIKEY) - Not valid; RMVPFCST FILE(MYLIB/DEPARTMENTS) CST(\ALL)
primary key constraints cannot be in check pending TYPE(\ALL)
Ÿ CST(ABC) TYPE(*PRIKEY) - The primary key con-
straint ABC is removed This command removes the unique constraint
UNIQUE_Department_NUMBER from the file DEPART-
| *CHKCST: The check constraints are removed. The MENTS located in the library MYLIB.
| following are examples of the CST parameter dependen-
| cies: Example 2: Removing a Referential Constraint

| Ÿ CST(*ALL) TYPE(*CHKCST) - All check constraints RMVPFCST FILE(MYLIB/PERSONNEL)


CST(EMPLOYEE_Department) TYPE(\REFCST)
| are removed
RMVCST(\RESTRICT)
| Ÿ CST(*CHKPND) TYPE(*CHKCST) - All check con-
| straints in check pending are removed This command removes the referential constraint
EMPLOYEE_Department from the dependent file PER-
| Ÿ CST(XYZ) TYPE(*CHKCST) - The check constraint
SONNEL located in the library MYLIB. Because the parent
| XYZ is removed
file had not yet been established (the PRNFILE had not been
RMVCST specified on the ADDPFCST command) the removal is not
Specifies how much of the constraint relationship on the restricted.
dependent file is removed when a primary key or unique

P3-768 OS/400 CL Reference - Part 2 (Full Version)


RMVPFTRG

RMVPFTRG (Remove Physical File Trigger) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ──5%
55──RMVPFTRG──FILE(──┼─\CURLIB/──────┼──physical-file-name──)──┬──────────────────────────┬──┬───────────────────────────┬───
└─library-name/─┘ │ ┌─\ALL────┐ │ │ ┌─\ALL────┐ │
└─TRGTIME(──┼─\BEFORE─┼──)─┘ └─TRGEVENT(──┼─\INSERT─┼──)─┘
└─\AFTER──┘ ├─\DELETE─┤
└─\UPDATE─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *CURLIB: The current library for the job is


searched. If no library is specified as the current
The Remove Physical File Trigger (RMVPFTRG) command library for the job, the QGPL library is used.
removes the triggers that call trigger programs from a speci-
library-name: Specify the name of the library to be
fied physical file. The triggers to be removed can be speci-
searched.
fied by trigger events and trigger times. A trigger program is
a program that has been added to the specified physical file physical-file-name: Specify the name of the file from
by the Add Physical File Trigger (ADDPFTRG) command. which the trigger is removed.

Once a trigger is removed from the physical file for a speci-


fied trigger time or event, the trigger program is no longer Optional Parameters
called when the trigger event occurs within the file. The
TRGTIME
program continues to exist on the system.
Specifies the trigger to be removed, based on the time
An exclusive-no-read lock is held on the physical file when when the trigger program is called.
removing the trigger from that file. All logical files which are *ALL: All triggers for programs called either before or
built over the physical file are also held with the exclusive after a trigger event are removed.
no-read lock.
*BEFORE: The triggers for programs called before a
Restrictions: trigger event are removed.

1. You must have read authority and alter or object man- *AFTER: The triggers for programs called after a trigger
agement authority to the physical file and execute event are removed.
authority to the file library to use this command. TRGEVENT
2. If the physical file or a dependent logical file or Struc- Specifies the trigger event for which the associated trig-
tured Query Language (SQL) view is opened in this or gers are removed.
another job, the trigger cannot be removed. *ALL: All triggers for insert, delete, and update oper-
3. While this command is running, neither the physical file ations are removed.
nor any dependent logical files can be opened. *INSERT: The triggers for insert operations are
Note: To see the parameter and value descriptions for this removed.
command, refer to the online help text. For more *DELETE: The triggers for delete operations are
information about printing the help text, refer to removed.
“Printing CL Command Descriptions” in Chapter 1.
*UPDATE: The triggers for update operations are
removed.
Required Parameter
FILE Examples
Specifies the qualified name of the physical file from
which this trigger is removed. The file name must exist Example 1: Removing All Triggers for Insert Events
on the system. RMVPFTRG FILE(EMP) TRGEVENT(\INSERT)
The name of the physical file can be qualified by one of
This command removes all triggers for programs called by
the following library values:
insert operations from the physical file named EMP.
*LIBL: All libraries in the job's library list are
searched until the first match is found. Example 2: Removing All Triggers for Programs Called
Before a Trigger Event

Chapter 2. OS/400 Command Descriptions P3-769


RMVPFTRG

RMVPFTRG FILE(EMP) TRGTIME(\BEFORE) Example 3: Removing a Trigger for a Program Called


After an Insert Event
This command removes all triggers for programs called
RMVPFTRG FILE(EMP) TRGTIME(\AFTER) TRGEVENT(\INSERT)
before trigger events from the physical file named EMP.
This command removes the trigger for the program called
after an insert operation from the physical file named EMP.

P3-770 OS/400 CL Reference - Part 2 (Full Version)


RMVPGM

RMVPGM (Remove Program) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ────────────────────────────────────────────────────────────────────────────5%
55──RMVPGM──┬──────────────────────────────────┬───
│ ┌─\DFTPGM─────────────┐ │
└─PGM(──┼─\ALL────────────────┼──)─┘
│ ┌──
──────────────┐ │
└──6─program-name─┴───
(1) ─┘

Notes:
1 A maximum of 20 repetitions

P All parameters preceding this point can be specified in positional form.

Purpose Optional Parameter


The Remove Program (RMVPGM) command removes one or PGM
more programs from the current debugging session. All Specifies which programs are removed from the current
breakpoints and data traces defined in each program are debugging session.
removed, and the programs are returned to their normal *DFTPGM: The program currently specified as the
state. If a program is added again, breakpoints and traces default program in the debugging session is removed.
must be specified again. The debugging session no longer has a default program
unless one is specified later.
Restrictions:
*ALL: All programs currently in the debug mode are
1. This command is valid only in the debug mode. To start
removed.
the debug mode, refer to the STRDBG (Start Debug)
command. program-name: Specify the names of up to 20 programs
2. This command cannot be used to remove bound pro- being removed from the current debugging session.
grams from a debugging session.
Note: To see the parameter and value descriptions for this Example
command, refer to the online help text. For more RMVPGM PGM(PGMX PGMY PGMZ)
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. This command removes the three programs PGMX, PGMY,
and PGMZ from the current debugging session. All break-
points and data traces are removed from the programs.

Chapter 2. OS/400 Command Descriptions P3-771


RMVPJE

RMVPJE (Remove Prestart Job Entry) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ───────────5%
55──RMVPJE──SBSD(──┼───────────────┼──subsystem-description-name──)──┬──────────────────────────────────────────┬───
├─\CURLIB/──────┤ │ ┌─\LIBL/────────┐ │
└─library-name/─┘ └─PGM(──┼───────────────┼──program-name──)─┘
├─\CURLIB/──────┤
└─library-name/─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *CURLIB: The current library for the job is


searched. If no library is specified as the current
The Remove Prestart Job Entry (RMVPJE) command library for the job, the QGPL library is used.
removes a prestart job entry from the specified subsystem
library-name: Specify the name of the library to be
description.
searched.
When removing an entry in which *LIBL is specified for the subsystem-description-name: Specify the name of the
library name, the library list is searched for a program with subsystem description.
the specified name. If a program is found in the library list
but an entry exists with a different library name, which is
found later in the library list, no entry is removed. If a
Optional Parameters
program is not found in the library list but an entry exists, no
entry is removed. PGM
Specifies the qualified name of the program for the pre-
Restrictions: start job entry being removed. Two entries with the
1. This command is restricted to a user with *USE and same program name can exist in a single subsystem
object management authorities for the subsystem description but they must have different library names.
description. The name of the program can be qualified by one of the
2. If the prestart job is active, the End Prestart Jobs following library values:
(ENDPJ) command must be run before this command
*LIBL: All libraries in the job's library list are
can be run.
searched until the first match is found.
Note: To see the parameter and value descriptions for this
*CURLIB: The current library for the job is
command, refer to the online help text. For more
searched. If no library is specified as the current
information about printing the help text, refer to
library for the job, the QGPL library is used.
“Printing CL Command Descriptions” in Chapter 1.
library-name: Specify the name of the library to be
searched.
Required Parameters
program-name: Specify the name of the program.
SBSD
Specifies the qualified name of the subsystem
description that contains the prestart job entry being
Example
removed.
RMVPJE SBSD(QGPL/PJE) PGM(QGPL/PGM1)
The name of the subsystem description can be qualified
by one of the following library values: This command removes the prestart job entry for the PGM1
program (in the QGPL library) from the PJE subsystem
*LIBL: All libraries in the job's library list are
description contained in the QGPL library.
searched until the first match is found.

P3-772 OS/400 CL Reference - Part 2 (Full Version)


RMVPTF

| RMVPTF (Remove Program Temporary Fix) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─┬───────────────────────────────────┬──┬────────────────────┬──────────────────────5
55──RMVPTF──LICPGM(──licensed-program──)────
│ ┌─\ALL──────────────┐ │ │ ┌─\TEMP─┐ │
│ │ ┌──
────────────┐ │ │ └─RMV(──┴─\PERM─┴──)─┘
6
├─SELECT(──┴───PTF-number─┴───(1) ─┴──)─┤
│ ┌──
────────────┐ │
└─OMIT(───6─PTF-number─┴───
(1) ──)───────┘

5──┬───────────────────────┬──┬──────────────────────┬──┬────────────────────────────┬──┬───────────────────────────┬──────────5%
| │ ┌─\NO──┐ │ │ ┌─\YES─┐ │ │ ┌─\ONLY─────────┐ │ │ ┌─\NO──┐ │
| └─DELAYED(──┴─\YES─┴──)─┘ └─IPLRMV(──┴─\NO──┴──)─┘ └─RLS(──┴─release-level─┴──)─┘ └─RMVDEP(─── (2) ─┴─\YES─┴──)──)─┘

Notes:
| 1 A maximum of 300 repetitions

| 2 The RMVDEP parameter is valid only if *ALL is not specified in the SELECT parameter.

P All parameters preceding this point can be specified in positional form.

Purpose are sent to the job log indicating which PTFs are not
removed and the reasons they are not being removed.
The Remove Program Temporary Fix (RMVPTF) command
PTF-number: Specify the PTF identification number of
removes the specified program temporary fixes (PTFs) from
| each PTF being removed. Up to 300 PTF numbers can
the specified product. If the PTFs were temporarily applied,
| be specified.
the original objects that they replaced are returned. The
PTFs can be temporarily removed, in which case they are OMIT
held in the product PTF library and they can be applied later. Specifies that all PTFs are removed except for those
If the PTFs have not been applied, they can be permanently specified in this parameter. Specify the PTF numbers of
removed and moved to the QRPLOBJ library. the PTFs that are omitted (left in the system) when all
| the rest are removed. Up to 300 PTF numbers can be
The RMVPTF command is used to remove immediate PTFs | specified. The OMIT parameter cannot be specified if
at the time the command is processed, or when the user single PTF numbers are specified in the SELECT
wants to request that PTFs be removed during an unat- parameter.
tended initial program load (IPL).
RMV
Restriction: This command is shipped with public Specifies whether the PTFs are removed temporarily or
*EXCLUDE authority and the QPGMR user profile has permanently. Permanently removed PTF objects are
private authority to use the command. moved to QRPLOBJ or deleted. Temporarily removed
Note: To see the parameter and value descriptions for this PTFs are held in the product PTF library for application
command, refer to the online help text. For more at a later time.
information about printing the help text, refer to *TEMP: The PTFs are removed and held in the product
“Printing CL Command Descriptions” in Chapter 1. PTF library so that they can be applied again later, if
desired.
Required Parameter *PERM: The PTFs are permanently removed and
placed in QRPLOBJ.
LICPGM
Specifies the 7-character identifier of the product from DELAYED
which the PTFs are removed. Specifies whether immediate PTFs are removed at the
time the command is run, or whether immediate or
delayed PTFs are removed during the next unattended
Optional Parameters IPL.
SELECT *NO: Immediate PTFs that are identified are removed at
Specifies which of the PTFs to remove from the speci- the time the command is processed. Delayed PTFs are
fied product. The OMIT parameter cannot be specified if ignored during the RMVPTF request and are not
single PTF numbers are specified in the SELECT removed. Delayed PTFs, with a status type of Not
parameter. Applied, are permanently removed at the time the
*ALL: All the PTFs are removed from the product. command is run.
Those that were permanently applied are ignored by this *YES: Both delayed and immediate PTFs that are iden-
command. If all PTFs cannot be removed, messages tified are removed during the next unattended IPL. The

Chapter 2. OS/400 Command Descriptions P3-773


RMVPTF

IPLAPY parameter in the APYPTF command determines | PTFs specified in the SELECT parameter are processed
whether the PTFs are removed during the next unat- | with the PTFs specified in the SELECT parameter list.
tended IPL, or whether a request to remove the PTFs
| *NO: The mutually dependent and dependent PTFs are
during the next unattended IPL is canceled.
| not processed with the SELECT parameter list. No
IPLRMV | PTFs are removed if any PTF specified in the list has
Specifies the action that is done for delayed or imme- | dependent PTFs not also in the list or already applied.
diate PTFs at the next unattended IPL. This parameter | Messages identify the missing dependent PTFs and the
is valid only if DELAYED(*YES) is also specified. | specified PTFs on which they depend.

*YES: The identified PTFs are removed at the next | *YES: The PTFs are removed with the SELECT param-
unattended IPL. The RMV parameter determines | eter list.
whether the remove is temporary or permanent.
*NO: Any previous request to remove the identified Examples
PTFs at the next unattended IPL is canceled.
Example 1: Temporarily Removing PTFs
RLS
RMVPTF LICPGM(5769SS1) DELAYED(\YES)
Specifies the release level of the PTFs being removed.
*ONLY: This value This command temporarily removes all temporarily applied
PTFs from the Operating System/400 product (program iden-
is valid when only one release of the product's base tifier 5769-SS1). At the next IPL the PTFs can be applied
option is installed on the system. PTFs for all installed again, if necessary, through the APYPTF command.
options of the product are removed regardless of the
release-level of the option. Example 2: Permanently Removing PTFs
RMVPTF LICPGM(5769RG1) SELECT(SF1ðððð2 SF1ðððð5)
release-level: Specify the release level in VxRyMz
RMV(\PERM)
format, where Vx is the version number, Ry is the
release number, and Mz is the modification level. The This command permanently removes two PTFs (numbers
variables x and y can be a number from 0 through 9, SF10002 and SF10005) from the ILE RPG/400 product
and the variable z can be a number from 0 through 9 or (5769-RG1). The two PTFs are moved to QRPLOBJ and
a letter from A through Z. must be loaded again using the LODPTF command before
If the release-level specified is the release-level of the they can be applied.
base option of the product, PTFs for all installed options
of the product are removed regardless of the release- | Example 3: Removing PTFs and their mutual depen-
level of the option. | dents
| RMVPTF LICPGM(5769SS1) SELECT(SFðððð3 SFðððð8 SFððð12)
If the release-level specified is not the release-level of
| DELAYED(\YES) RMVDEP(\YES)
the base option of the product, only PTFs for the options
installed at that release-level are removed. | This command temporarily removes PTFs SF00003,
| RMVDEP | SF00008, SF00012, their mutual dependents and their
| Specifies whether mutually dependent PTFs and | dependents within the same product and option from the
| dependent PTFs in the same product and option as the | Operating System/400 product in library QSYS at the next
| IPL.

P3-774 OS/400 CL Reference - Part 2 (Full Version)


RMVRDBDIRE

RMVRDBDIRE (Remove Relational Database Directory Entry) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─────────────────────────────────────────────────────────────5%
55──RMVRDBDIRE──RDB(──┬─\ALLRMT───────────────────────────┬──)────
├─\ALL──────────────────────────────┤
├─generic\-relational-database-name─┤
└─relational-database-name──────────┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose generic*-relational-database-name: Specify the generic


name of the relational database. A generic name is a
The Remove Relational Database Directory Entry character string of one or more characters followed by
(RMVRDBDIRE) command removes a specific entry, generic an asterisk (*); for example, ABC*. The asterisk substi-
entries, all entries, or all remote entries from the relational tutes for any valid characters. A generic name specifies
database directory. all objects with names that begin with the generic prefix
Note: To see the parameter and value descriptions for this for which the user has authority. If an asterisk is not
command, refer to the online help text. For more included with the generic (prefix) name, the system
information about printing the help text, refer to assumes it to be the complete object name. If the com-
“Printing CL Command Descriptions” in Chapter 1. plete object name is specified, and multiple libraries are
searched, multiple objects can be removed only if *ALL
or *ALLUSR library values can be specified for the
Required Parameters name. For more information on the use of generic
names, refer to “Generic Object Names” in Chapter 2.
RDB
Specifies the relational database directory entry being relational-database-name: Specify the name of the rela-
removed. tional database being removed. Up to 18 characters can
be specified.
*ALLRMT: All remote entries are removed from the
relational database directory. The entry that is specified
as RMTLOCNAME(*LOCAL) on the Add Relational Example
Database Directory Entry (ADDRDBDIRE) command is RMVRDBDIRE RDB(YOURRDB)
not removed.
*ALL: All entries in the relational database directory are This command removes the entry YOURRDB from the rela-
removed. tional database directory. The entry is no longer accessible.

Chapter 2. OS/400 Command Descriptions P3-775


RMVREXBUF

RMVREXBUF (Remove REXX Buffer) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ────────────────────────────────────────────────────────────────────────────5%
55──RMVREXBUF──┬───────────────────────────────┬───
│ ┌─\CURRENT──────┐ │
└─BUFFER(──┼─\ALL──────────┼──)─┘
├─variable-name─┤
└─buffer-number─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *CURRENT: Only the current buffer is removed.


*ALL: All buffers and entries are removed from the
The Remove REXX Buffer (RMVREXBUF) command allows
REXX external data queue. This is equivalent to
the user to remove a buffer from the REXX external data
BUFFER(0).
queue.
variable-name: Specify the name of the variable con-
Note: To see the parameter and value descriptions for this
taining the buffer number. The user must specify a
command, refer to the online help text. For more
decimal variable with a minimum length of 11 digits with
information about printing the help text, refer to
no decimal position.
“Printing CL Command Descriptions” in Chapter 1.
buffer-number: Specify the number of the buffer to be
removed.
Optional Parameters
BUFFER Example
Specifies the number of the buffer being removed. The
RMVREXBUF BUFFER(2)
buffer identified by the number and all buffers above it,
in chronological order up to and including the current This command removes buffer number 2 and all buffers with
buffer, are removed. numbers higher than 2 from the REXX external data queue.

P3-776 OS/400 CL Reference - Part 2 (Full Version)


RMVRMTDFN

RMVRMTDFN (Remove Remote Definition) Command


Job: B,I Pgm: B,I Exec

(P) ───────────────────────────────────────────────────────────────────5%
55──RMVRMTDFN──SYSTEM(──┬─\ANY──────────────────────┬──)────
├─\ALL──────────────────────┤
└─system-name──system-group─┘
Note:
P All parameters preceding this point can be specified positionally.

Purpose system-name: Specify the name of the remote system


being removed.
The Remove Remote Definition (RMVRMTDFN) command is
Element 2: System Group
used to remove the definition of attributes for a remote
system. system-group: Specify the group name of the remote
system being removed. The group name is blank if this
Restriction: The user must have *ALLOBJ authority. value is not specified.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more Example
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. Example 1: Removing a Specific Remote Definition
RMVRMTDFN SYSTEM(RCHAS1)
Required Parameters This command removes the definition from remote system
SYSTEM RCHAS1. This system now uses the values for the *ANY
Specifies the system name and system group of the remote definition or the defaults.
remote system being removed.
Example 2: Removing all Remote Definitions
*ANY: Removes the default definition for a remote
system not covered by the other entries. RMVRMTDFN SYSTEM(\ALL)

*ALL: Removes the definitions for all remote systems. This command removes all remote system definitions. All
Element 1: System Name systems now use the default values.

Chapter 2. OS/400 Command Descriptions P3-777


RMVRPYLE

RMVRPYLE (Remove Reply List Entry) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──────────────────────────────────────────────────────────────────────────────5%
55──RMVRPYLE──SEQNBR(──┬─\ALL────────────┬──)────
└─sequence-number─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose SEQNBR
Specifies the sequence number of the reply list entry
The Remove Reply List Entry (RMVRPYLE) command being removed from the system reply list.
removes an entry from the system reply list. The reply list is
*ALL: Specifies that all reply list entries are removed
used as a source for automatic responses to predefined
from the system reply list. Whenever *ALL has been
inquiry messages.
specified, and the reply list object had previously been
The reply list is only used when an inquiry message is sent marked as damaged, the reply list is deleted and recre-
by a job that has the inquiry message reply attribute of the ated. No reply list entries will be present after re-
system reply list specified (INQMSGRPY(*SYSRPLY) is creation. They must be reentered or a reinstall
specified). INQMSGRPY(*SYSRPLY) can be changed with operation must be done.
the CHGJOB command. Note: Specifying the sequence number 0 has the same
behavior as specifying the special value *ALL.
New entries may be added to the reply list with the Add
Reply List Entry (ADDRPYLE) command; entries can be sequence-number: Specify the sequence number of the
changed with the Change Reply List Entry (CHGRPYLE) file. Valid values range from 1 through 9999.
command. The entire list of entries can be shown with the
Work with System Reply List Entries (WRKRPYLE) display. Examples
From the display that is presented the user can add, change,
and remove individual entries. Example 1: Removing All Entries
RMVRPYLE SEQNBR(\ALL)
Restriction: This command is shipped with public
*EXCLUDE authority and the QPGMR user profile has This command removes all entries from the system reply list.
private authority to use the command.
Note: To see the parameter and value descriptions for this Example 2: Removing One Entry
command, refer to the online help text. For more RMVRPYLE SEQNBR(ððð1)
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. This command removes from the system reply list the entry
that has sequence number 0001.

Required Parameters

P3-778 OS/400 CL Reference - Part 2 (Full Version)


RMVRTGE

RMVRTGE (Remove Routing Entry) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ─SEQNBR(──sequence-number──)───────────────────────────5%
55──RMVRTGE──SBSD(──┼───────────────┼──subsystem-description-name──)────
├─\CURLIB/──────┤
└─library-name/─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *LIBL: All libraries in the job's library list are


searched until the first match is found.
The Remove Routing Entry (RMVRTGE) command is used
*CURLIB: The current library for the job is
during system set-up, when work is divided on the system, to
searched. If no library is specified as the current
remove a specified subsystem description routing entry that
library for the job, the QGPL library is used.
controls programs or run attributes for a job. The subsystem
can be active at the time. library-name: Specify the name of the library to be
searched.
Restriction: The user, typically a system operator or system
administrator, must have both object operational and object subsystem-description-name: Specify the name of the
management authorities to change the subsystem subsystem description.
description. SEQNBR
Note: To see the parameter and value descriptions for this Specifies the sequence number of the routing entry
command, refer to the online help text. For more being removed. The sequence numbers on the routing
information about printing the help text, refer to entries indicate the order in which the routing entries will
“Printing CL Command Descriptions” in Chapter 1. be processed when comparing values. When a job
enters the system, the compare value for the job is com-
pared to the compare value for the routing entries in a
Required Parameters subsystem. When the first match is found, the routing
SBSD information for that entry is used for the new job; there-
Specifies the qualified name of the subsystem fore, the sequence numbers indicate the compare order.
description that contains the routing entry being
removed. Example
The name of the subsystem description can be qualified RMVRTGE SBSD(OR/PERT) SEQNBR(9912)
by one of the following library values:
This command removes the routing entry 9912 from sub-
system description PERT in library OR.

Chapter 2. OS/400 Command Descriptions P3-779


RMVSCHIDXE

RMVSCHIDXE (Remove Search Index Entry) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ─────────────────────────────5%
55──RMVSCHIDXE──SCHIDX(──┼───────────────┼──search-index-name──)──PNLGRP(──panel-group-name──)────
├─\CURLIB/──────┤
└─library-name/─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *LIBL: All libraries in the job's library list are


searched until the first match is found.
The Remove Search Index Entry (RMVSCHIDXE) command
*CURLIB: The current library for the job is
is used to remove entries that refer to a specified panel
searched. If no library is specified as the current
group from a search index.
library for the job, the QGPL library is used.
Restriction: The user must have *CHANGE authority for the library-name: Specify the name of the library to be
search index. searched.
Note: To see the parameter and value descriptions for this search-index-name: Specify the name of the search
command, refer to the online help text. For more index.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. PNLGRP
Specifies the name of the panel group for which entries
are being removed.
Required Parameters
SCHIDX Example
Specifies the qualified name of the search index from
RMVSCHIDX SCHIDX(ACCOUNTING) PNLGRP(PAYROLL)
which the entries are being removed.
This command removes panel group PAYROLL from search
The name of the search index can be qualified by one of
index ACCOUNTING.
the following library values:

P3-780 OS/400 CL Reference - Part 2 (Full Version)


RMVSNILOC

RMVSNILOC (Remove SNA over IPX Location) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P, K) ──────────────────────────5%
55──RMVSNILOC──RMTLOCNAME(──remote-location-name──)──RMTNETID(──┬─\NETATR───────────────────┬──)─────
└─remote-network-identifier─┘
Notes:
P All parameters preceding this point can be specified in positional form.

K All parameters preceding this point are key parameters.

Purpose *NETATR: Specifies that the network identifier in the


network attributes for this host is used.
The Remove SNA over IPX Location (RMVSNILOC)
remote-network-identifier: Specify the SNA network
command is used to remove an existing location name
identifier for the remote host.
mapping entry.

Restriction: You must have *IOSYSCFG special authority Examples


to use this command.
Note: To see the parameter and value descriptions for this Example 1 - Removing an SNA over IPX Location Name
command, refer to the online help text. For more Mapping in the Same SNA Network
information about printing the help text, refer to RMVSNILOC LOC2 \NETATR
“Printing CL Command Descriptions” in Chapter 1.
This command removes an SNA over IPX location name
mapping entry for SNA remote location LOC2 in the SNA
Required Parameters
network specified in the network attributes.
RMTLOCNAME
Specifies the remote location name that is associated Example 2 - Removing an SNA over IPX Location Name
with the SNA over IPX location name mapping entry Mapping in the Specified SNA Network
being removed.
RMVSNILOC RMTLOCNAME(LOC3)
remote-location-name: Specify the SNA remote location RMTNETID(NETB)
name for the remote host.
This command removes an SNA over IPX location name
RMTNETID mapping entry for SNA remote location LOC3 in SNA
Specifies the SNA remote network identifier for the network NETB.
remote host.

Chapter 2. OS/400 Command Descriptions P3-781


RMVSOCE

RMVSOCE (Remove Sphere of Control Entry) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌──
──────────────────────────────────────────┐
55──RMVSOCE─── 6─(──┬─\NETATR────┬──control-point-name──)─┴───
(P)─ENTRY(─── (1) ──)──────────────────────────────────────────────────────5%
└─network-ID─┘
Notes:
P All parameters preceding this point can be specified in positional form.

1 A maximum of 50 repetitions

Purpose Element 1: Network ID of the System


*NETATR: The NETID network attribute is used as the
The Remove Sphere of Control Entry (RMVSOCE) command
value of the network ID to be removed from the alert
allows a CL user or program to remove control points from
sphere of control.
the Alert Sphere of Control.
network-ID: Specify the network ID of system to be
Note: To see the parameter and value descriptions for this
removed from the alert sphere of control.
command, refer to the online help text. For more
information about printing the help text, refer to Element 2: Control Point Name of the System
“Printing CL Command Descriptions” in Chapter 1. control-point-name: Specify the control point name of
the system to be removed from the alert sphere of
Required Parameters control.

ENTRY
Specifies the systems to remove from the alert sphere of Example
control. The systems are specified as a list of two ele- RMVSOCE ENTRY((\NETATR RCHSTR1) (\NETATR RCHSTR2))
ments which include the network ID and control point
name. This command removes two systems (RCHSTR1 and
RCHSTR2) from the alert sphere of control.

P3-782 OS/400 CL Reference - Part 2 (Full Version)


RMVSRVTBLE

RMVSRVTBLE (Remove Service Table Entry) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──────────────────────────────5%
55──RMVSRVTBLE──SERVICE(──service-name──)──PORT(──port-number──)──PROTOCOL(──protocol-name──)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose SERVICE
Specifies the name of the service entry to be removed.
The Remove Service Table Entry (RMVSRVTBLE) command
is used to remove a service entry from the service table. PORT
The service table is used to manage the mapping of network Specifies the port number assigned to the service to be
services to ports. You must know the service entry name, removed.
the port, and the protocol to remove the entry. PROTOCOL
Specifies the name of the protocol used by the service
Restriction: You must have system configuration
to be removed.
(*IOSYSCFG) special authority to use this command.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more Example
information about printing the help text, refer to RMVSRVTBLE SERVICE(FTP) PORT(21) PROTOCOL(TCP)
“Printing CL Command Descriptions” in Chapter 1.
This command removes an FTP service entry from the
network service table. The service being removed is
Required Parameters assigned to port 21 and runs the TCP protocol.

Chapter 2. OS/400 Command Descriptions P3-783


RMVSVRAUTE

| RMVSVRAUTE (Remove Server Authentication Entry) Command


| Job: B,I Pgm: B,I REXX: B,I Exec
|
(P) ────────────────────────5%
| 55──RMVSVRAUTE──USRPRF(──┬─\CURRENT──────────┬──)──ALIAS(──┬─\ALL──────────────────────────────┬──)────
| └─user-profile-name─┘ ├─\ANY──────────────────────────────┤
| └─'implementation-definition-alias'─┘
| Note:
| P All parameters preceding this point can be specified in positional form.

| Purpose | *CURRENT: The server authentication entry will be


| removed for the current user.
| The Remove Server Authentication Entry (RMVSVRAUTE)
| user-profile-name: Specify the name of the user to
| command is used to remove server authentication entries
| remove the server authentication entry.
| from the specified user profile. This authentication informa-
| tion is used by clients to connect to Distributed System | ALIAS
| Object Model (DSOM) servers. Once an entry is removed, | Specifies the alias for the DSOM server in the network.
| attempting to make new connections to the DSOM server will
| *ALL: All server authentication entries for this user
| result in either using other server authentication entries or if
| profile will be removed.
| no matches are found, returning an error to the client appli-
| cation. | *ANY: This server authentication entry can apply to any
| DSOM server in the network.
| Restriction:
| 'implementation-alias': Specify the alias for the DSOM
| You must have *SECADM special authority, and *OBJMGT | server in the network.
| and *USE authorities to the user profile from which the
| server authenticatio entry is being removed, to specify this | Example
| command.
| RMVSVRAUTE USRPRF(\CURRENT) ALIAS(MyDSOMServer)

| Required Parameters | This command removes the server authentication entry for
| MyDSOMServer from the current user profile.
| USRPRF
| Specifies the user profile for which the server
| authentication entry will be removed.

P3-784 OS/400 CL Reference - Part 2 (Full Version)


RMVTAPCTG

RMVTAPCTG (Remove Tape Cartridge) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─┬─CTG(──┬─\ALL──────────────────────────┬──)──────┬─────────────────────────────5
55──RMVTAPCTG──DEV(──library-device-name──)────
│ ├─generic\-cartridge-identifier─┤ │
│ │ ┌──
──────────────────────┐ │ │
│ 6 (1) ───┘
└───cartridge-identifier─┴─── │
│ ┌─\CURRENT────┐ │
└─CGY(──┬─┬─\NOSHARE──────┬──┼─────────────┼─┬──)─┘
│ ├─\IPL──────────┤ └─system-name─┘ │
│ ├─\NL───────────┤ │
│ ├─\CNV──────────┤ │
│ └─category-name─┘ │
├─\SHARE4ðð──────────────────────────┤
└─\INSERT────────────────────────────┘
5──┬──────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\DEV─────┐ │
└─STATION──┼─\CNV─────┼──)─┘
└─\HIGHCAP─┘
Notes:
1 A maximum of 40 repetitions.

P All parameters preceding this point can be specified in positional form.

Purpose valid characters. A generic name specifies all objects


with names that begin with the generic prefix for which
The Remove Tape Cartridge (RMVTAPCTG) command the user has authority. If an asterisk is not included with
removes the specified cartridge identifiers from their current the generic (prefix) name, the system assumes it to be
category, or from the category specified, and places them in the complete object name. For more information on the
the eject (*EJECT) category. The eject category is not a use of generic names, refer to “Generic Object Names”
valid category for input/output (I/O) operations; cartridges in in Chapter 2.
the eject category cannot be used in the tape device.
cartridge-identifier: Specify a maximum of 40 cartridge
Note: To see the parameter and value descriptions for this identifiers to remove.
command, refer to the online help text. For more
information about printing the help text, refer to CGY
“Printing CL Command Descriptions” in Chapter 1. Specifies the category from which the tape cartridges
are to be removed.
Note: If this parameter is specified, the CTG parameter
Required Parameters cannot be specified.
DEV Element 1: Category Name
Specifies the name of the library device used. The
device name must have been created previously on the *NOSHARE: The cartridge identifiers assigned to the
system using the Create Device Media Library *NOSHARE category are removed. The cartridge identi-
(CRTDEVMLB) command. fiers in this category cannot be shared with other
systems.
CTG
*IPL: The cartridge identifiers assigned to the *IPL cate-
Specifies the cartridge identifiers that are removed.
gory are removed. The cartridge identifiers in this cate-
Notes: gory can be used for an alternate IPL.
1. The cartridge identifier should be the same as the *NL: The cartridge identifiers assigned to *NL category
external identifier if the library device has a bar code are removed. The cartridge identifiers in this category
scanner to read external identifiers. are used as a non-labeled tape.
2. If this parameter is specified, the CGY parameter *CNV: All cartridge identifiers assigned to the *CNV cat-
cannot be specified. egory are removed. A cartridge in this category would
be automatically removed by OS/400 if the cartridge was
*ALL: All cartridges are removed. loaded and an unload was requested by a user.
generic*-cartridge-identifier: Specify the generic name of category-name: Specify the name of a user-defined cat-
the cartridge identifier. A generic name is a character egory. The cartridge identifiers assigned to the specified
string of one or more characters followed by an asterisk user-defined category are removed.
(*); for example, ABC*. The asterisk substitutes for any
Element 2: Category System

Chapter 2. OS/400 Command Descriptions P3-785


RMVTAPCTG

This element identifies the system to which the category library does not have a convenience I/O station, the car-
belongs. The system name is obtained from the tridges are placed in either the high capacity output
pending system name field of a Display Network Attri- station or a storage slot within the library.
butes (DSPNETA) command. If there is no pending
*CNV: The tape cartridge is ejected into the conven-
system name, the current system attribute is used.
ience I/O station. The convenience I/O station allows
Attention: entry and removal of the tape cartridges from the library
without opening the library door.
If the system name is changed, the categories associ-
ated with all tape cartridges in library devices owned by *HIGHCAP: The tape cartridges either are ejected into
the system are no longer valid. the high capacity output station or are returned to a
storage slot in the library device. Both of these out-
*CURRENT: The category belongs to the system cur-
comes require that the library door be opened to phys-
rently running the command.
ically remove the tape cartridges from the library.
system-name: Specify the name of the system to which
the category belongs.
Examples
Single Values:
*SHARE400: The cartridge identifiers assigned to the Example 1: Removing a Single Cartridge to the *EJECT
*SHARE400 category are removed. The cartridge identi- Category
fiers in this category can be shared with other systems RMVTAPCTG DEV(LIBð1) CTG(VOL4)
attached to the same device. STATION(\HIGHCAP)
*INSERT: The cartridge identifiers assigned to the
This command removes the cartridge identifier VOL4 from its
*INSERT category are removed. The cartridge identi-
current category and places it in the *EJECT category. The
fiers in this category are for cartridges that have been
cartridge is placed in a storage slot or the high capacity
placed in the library device, but whose identifier has not
output station.
been added to the system.
Example 2: Removing All Cartridges from the *IPL Cate-
Optional Parameter gory
RMVTAPCTG DEV(LIBð1) CGY(\IPL)
STATION STATION(\CNV)
Specifies the station to receive the cartridges being
ejected. This command removes all cartridge identifiers in the *IPL
*DEV: If the tape library has a convenience input/output category and places them in the *EJECT category. The car-
(I/O) station, the cartridges are placed in it. If the tape tridges are placed in the convenience I/O station.

P3-786 OS/400 CL Reference - Part 2 (Full Version)


RMVTCPHTE

RMVTCPHTE (Remove TCP/IP Host Table Entry) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─────────────────────────────────────────────────────────────────────────────5%
55──RMVTCPHTE──INTNETADR(──internet-address──)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose You must have *IOSYSCFG special authority to use this


command.
The Remove TCP/IP Host Table Entry (RMVTCPHTE)
Note: To see the parameter and value descriptions for this
command is used to remove an internet address, all of its
command, refer to the online help text. For more
associated host names, and the associated text description
information about printing the help text, refer to
field from the local host table. The local host table is defined
“Printing CL Command Descriptions” in Chapter 1.
to allow one internet address, four host names and one text
description field per entry.
Required Parameter
See also the following host table commands:
INTNETADR
Ÿ Add TCP/IP Host Table Entry (ADDTCPHTE) command
Specifies the internet address that is to be removed from
adds a new entry to the local host table.
the local host table. The internet address is specified in
Ÿ Change TCP/IP Host Table Entry (CHGTCPHTE) the form nnn.nnn.nnn.nnn, where nnn is a decimal
command changes one or more host names or the text number ranging from 0 through 255. An internet
description field address is not valid if it has a value of all binary ones or
Ÿ Merge TCP/IP Host Table (MRGTCPHT) command all binary zeros for the network identifier (ID) portion or
merges host names, internet addresses, and text the host ID portion of the address. If the internet
comment entries from a physical file member into the address is entered from a command line, the address
local host table. A replace option is also provided that must be enclosed in apostrophes.
allows the entire local host table to be replaced by the
host table entries in a user specified physical file Example
member.
RMVTCPHTE INTNETADR('132.28.71.5')
Ÿ Rename TCP/IP Host Table Entry (RNMTCPHTE)
command renames the internet address of a host table This command removes the host table entry with an internet
entry to another internet address address of 132.28.71.5. This includes the internet address,
all associated host names, and the text description field
Restriction: associated with the entry.

Chapter 2. OS/400 Command Descriptions P3-787


RMVTCPIFC

RMVTCPIFC (Remove TCP/IP Interface) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─────────────────────────────────────────────────────────────────────────────5%
55──RMVTCPIFC──INTNETADR(──internet-address──)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Required Parameter


The Remove TCP/IP Interface (RMVTCPIFC) command is INTNETADR
used to remove a Transmission Control Protocol/Internet Pro- Specifies the internet address of an interface that had
tocol (TCP/IP) interface. The interface cannot be active previously been added to the TCP/IP configuration with
when you submit this command. The interface must be the Add TCP/IP Interface (ADDTCPIFC) command. The
ended using the End TCP/IP Interface (ENDTCPIFC) or End internet address is specified in the form
TCP/IP (ENDTCP) commands. nnn.nnn.nnn.nnn, where nnn is a decimal number
ranging from 0 through 255. An internet address is not
An interface that is required for an existing route or remote valid if it has a value of all binary ones or all binary
system information (RSI) entry cannot be removed. zeros for the network identifier (ID) portion or the host ID
portion of the address. If the internet address is entered
This command can be used to remove interfaces that have from a command line, the address must be enclosed in
been specified with the Add TCP/IP Interface (ADDTCPIFC) apostrophes.
command.
internet-address: Specify the internet address associ-
Restriction: ated with the interface to be removed.

You must have *IOSYSCFG special authority to use this


command.
Example
RMVTCPIFC INTNETADR('9.5.11.125')
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more This command removes the interface associated with the
information about printing the help text, refer to internet address 9.5.11.125.
“Printing CL Command Descriptions” in Chapter 1.

P3-788 OS/400 CL Reference - Part 2 (Full Version)


RMVTCPPORT

RMVTCPPORT (Remove TCP/IP Port Restriction) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\ONLY───────┐
(P) ──────────5%
55──RMVTCPPORT──PORT(──┬─lower-value─┬──┴─upper-value─┴──)──PROTOCOL(──┬─\UDP─┬──)──USRPRF(──user-profile-name──)────
└─\ALL────────┘ └─\TCP─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose PROTOCOL
Specifies the transport protocol associated with the port
The Remove TCP/IP Port Restriction (RMVTCPPORT) or range of ports having the user profile removed from
command removes a particular user profile from the list of the list of user profiles that have exclusive use of a port
user profiles that are allowed to use a port or range of ports. or range of ports.
The removal of the user profile takes effect as soon as that
*UDP: The port is a User Datagram Protocol (UDP)
user profile being removed is no longer using the port or any
transport protocol port.
of the ports within the range of ports.
*TCP: The port is a Transmission Control Protocol
There are two independent sets of ports. One set is for TCP (TCP) transport protocol port.
processing and the other is for UDP processing. They are
completely independent sets of ports and have no relation- USRPRF
ship to one another. Specifies the name of the user profile whose profile is to
be removed from the list of user profiles that have exclu-
Restriction: sive use of the port or range of ports.
user-profile-name: Specify the user profile that is to be
You must have *IOSYSCFG special authority to use this
removed.
command.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more Example
information about printing the help text, refer to Example 1: Removing Restriction on a Single User
“Printing CL Command Descriptions” in Chapter 1. Profile
RMVTCPPORT PORT(159ð) PROTOCOL(\UDP)
Required Parameters USRPRF(USER1)
PORT This command removes the restriction for the user profile
Specifies the port number or range of port numbers that named USER1 for UDP port 1590. This user profile is
are having the user profile removed from the list of user removed from the list of user profiles that are allowed to use
profiles that are allowed to use that port or range of port number 1590.
ports. Valid values range from 1 through 65535.
However, ports 1 through 1023 are reserved for use by Example 2: Removing Restriction on a Range of Ports
system-supplied TCP/IP applications. If the user speci- RMVTCPPORT PORT(159ð 2ððð) PROTOCOL(\TCP)
fies ports 1 through 1023, it can affect the operation of USRPRF(USER2)
those applications.
Element 1: Lower Port Value This command removes the restriction for the user profile
named USER2 for TCP ports 1590 through port 2000. This
lower-value: Specify the port value or the lower port user profile is removed from the list of user profiles that are
value (in a range) from which you want the user profile allowed to use ports 1590 though 2000.
removed.
*ALL: The port range values that are removed are Example 3: Removing All Ports
1-65535. RMVTCPPORT PORT(\ALL) PROTOCOL(\TCP)
USRPRF(USER3)
Element 2: Upper Port Value
*ONLY: The port value specified in the lower port value This command removes the restriction for the user profile
is the only port value that has the user profile removed. named USER3 for TCP port 1 through port 65535. The
command will complete successfully even if the user did not
upper-value: Specify the upper port value (in a range)
have a port within this range restricted. This user profile is
from which you want the user profile removed.
removed from the list of user profiles that are allowed to use
any of the TCP ports.

Chapter 2. OS/400 Command Descriptions P3-789


RMVTCPRSI

RMVTCPRSI (Remove TCP/IP Remote System Information) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─────────────────────────────────────────────────────────────────────────────5%
55──RMVTCPRSI──INTNETADR(──internet-address──)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Required Parameter


The Remove TCP/IP Remote System Information INTNETADR
(RMVTCPRSI) command removes a remote system informa- Specifies the internet address of the remote system.
tion entry that associates an internet address with an X.25 The internet address is specified in the form
network address in the TCP/IP configuration. nnn.nnn.nnn.nnn, where nnn is a decimal number
ranging from 0 through 255. An internet address is not
If you attempt to remove a remote system information entry valid if it has a value of all binary ones or all binary
that is associated with an internet address that is active on zeros for the network identifier (ID) portion or the host ID
an X.25 network's SVC or PVC, the remove operation fails. portion of the address. If the internet address is entered
from a command line, the address must be enclosed in
Restriction: apostrophes.

You must have *IOSYSCFG special authority to use this


command. Example
Note: To see the parameter and value descriptions for this RMVTCPRSI INTNETADR('128.1.1.1ð')
command, refer to the online help text. For more
information about printing the help text, refer to This command removes the internet address named
“Printing CL Command Descriptions” in Chapter 1. 128.1.1.10 from the TCP/IP configuration remote system
information data, along with its corresponding X.25 network
address and other data.

P3-790 OS/400 CL Reference - Part 2 (Full Version)


RMVTCPRTE

RMVTCPRTE (Remove TCP/IP Route) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──────────────5
55──RMVTCPRTE──RTEDEST(──┬─\DFTROUTE─────────┬──)──SUBNETMASK(──┬─\NONE───────┬──)──┬─────────────────────────┬───
| ├─\DFTMCAST─────────┤ ├─\HOST───────┤ │ ┌─\NORMAL────┐ │
└─route-destination─┘ └─subnet-mask─┘ └─TOS(──┼─\MINDELAY──┼──)─┘
├─\MAXTHRPUT─┤
├─\MAXRLB────┤
└─\MINCOST───┘
5──NEXTHOP(──internet-address──)───────────────────────────────────────────────────────────────────────────────────────────────5%
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *DFTROUTE: Specifies that a default route entry is


being removed. A default route entry is used by the
The Remove TCP/IP Route (RMVTCPRTE) command system to route data that is being sent to a remote desti-
removes a previously identified route from the Transmission nation that does not have a specific route defined. The
Control Protocol/Internet Protocol (TCP/IP) configuration. system allows a maximum of 8 default route entries.
The default route entries are used based on the avail-
Four parameter values uniquely define a route. These ability of the next hop gateway and the type of service
values are the route destination (RTEDEST) the subnet mask (TOS). If the application requests a specific TOS, the
(SUBNETMASK), the type of service (TOS), and the internet TOS of the default route used must match the TOS
| address of the next system on the route (NEXTHOP). For requested. If no default route is found that matches the
| default routes and default multicast routes (*DFTROUTE and requested TOS, the first available default route with a
| *DFTMCAST), the NEXTHOP and TOS values uniquely TOS of *NORMAL is used.
define the route because the SUBNETMASK is always
*NONE. | *DFTMCAST: Specifies that a default multicast route
| entry is being removed. A default multicast route entry
Note: When a RMVTCPRTE command is entered using | is used by the system to select a local interface when
option 4 of the Work with TCP/IP Routes display, a | sending data to a multicast group. The default multicast
confirmation display is shown. This display warns | entry is used when the application does not specifically
that the removal of a route might affect active TCP | name the local interface over which multicast packets
connections and that unpredictable results might | should be sent. When RTEDEST(*DFTMCAST) is spec-
occur. A confirmation display is not shown when the | ified, SUBNETMASK(*NONE) must be specified and the
RMVTCPRTE CL command is issued directly. | NEXTHOP parameter must be the internet address of an
| interface that had previously been added with the Add
Restrictions:
| TCP/IP Interface (ADDTCPIFC) command.
1. You must have *IOSYSCFG special authority to use this
route-destination: Specify the route destination being
command.
removed. The route destination can be specified in the
2. Attempts to remove a route that is required to reach an form nnn.0.0.0, for Class A, nnn.nnn.0.0 for Class B, and
existing RSI entry will fail. nnn.nnn.nnn.0 for Class C, or nnn.nnn.nnn.nnn for any
Note: To see the parameter and value descriptions for this combination thereof, where nnn is a decimal number
command, refer to the online help text. For more ranging from 0 through 255.
information about printing the help text, refer to Any combination thereof means that you may specify a
“Printing CL Command Descriptions” in Chapter 1. route, such as 9.5.0.0 to the hosts on the 9.5 subnet,
even though all 9.5.x.x addresses are class A network
addresses.
Required Parameter
Exceptions:
RTEDEST
Specifies the route destination being removed. You Ÿ The first byte (octet) must be greater than 0 and
must specify all 4 bytes that make up an internet less than 255.
address though some of the bytes may be equal to 0. Ÿ The last byte (octet) may not equal 255.
For example, a route to all the hosts on the 9.5.11 sub- Ÿ The last byte (octet) may not equal 0 if *HOST is
network is identified by entering 9.5.11.0 for the route specified for the SUBNETMASK value.
destination. Used in combination with a subnetmask, Ÿ Routes to a broadcast address are not allowed.
type of service value, and next hop, the route destination
uniquely identifies a route to a network or system.
Optional Parameters

Chapter 2. OS/400 Command Descriptions P3-791


RMVTCPRTE

SUBNETMASK *MAXRLB: Maximize reliability means that a higher


Specifies a bit mask that identifies to TCP/IP which bits level of effort to ensure delivery is important for data on
of the value specified for the route destination this connection.
(RTEDEST) compose the network and subnet portions
*MINCOST: Minimize monetary cost means that lower
of the internet address. By defining the network portion
cost is important for data on this connection.
and subnetwork portion of the RTEDEST address, the
subnet mask also defines which bits of the RTEDEST The type of service, together with the subnetmask, next
address make up the host portion. The mask is a 32-bit hop, and route destination, uniquely identifies a route to
combination that is logically ANDed with the internet be removed. If this parameter is not specified, a value
address to determine a particular subnetwork. The bits of *NORMAL is used.
of the mask set to the value one (1) determine the
NEXTHOP
network and subnetwork portions of the address. The
Specifies the internet address of the next system
bits set to the value zero (0) determine the host portion
(gateway) on the route.
of the address.
internet-address: Specify the internet address. The
*NONE: There is no subnet mask. If
internet address is specified in the form
| RTEDEST(*DFTROUTE) or RTEDEST(*DFTMCAST) is
nnn.nnn.nnn.nnn, where nnn is a decimal number
specified, then SUBNETMASK(*NONE) must be speci-
ranging from 0 through 255. An internet address is not
| fied. *NONE is valid only for the *DFTROUTE and
valid if it has a value of all binary ones or all binary
| *DFTMCAST route destination values.
zeros for the network identifier (ID) portion or the host ID
*HOST: The internet address value specified in the portion of the address. If the internet address is entered
route destination field is a host address. The from a command line, the address must be enclosed in
subnetmask value is calculated to be 255.255.255.255. apostrophes.
subnet-mask: Specify the mask of the subnet field. The
internet address is in the form nnn.nnn.nnn.nnn, where Examples
nnn is a decimal number ranging from 0 through 255.
The subnetmask network class's network ID part of the Example 1: Removing a Route
destination route's internet address must equal 255. For RMVTCPRTE RTEDEST('132.65.ð.ð')
example, a destination route's internet address value of SUBNETMASK('255.65.ð.ð')
129.35.11.0 is a Class B subnet. The network ID part of TOS(\MINDELAY)
its address is 129.35. The upper 2 bytes must desig- NEXTHOP('9.5.15.1')
nate 255 in the subnetmask. The subnetmask must
appear in the format 255.255.x.x, where x is determined This command removes the route identified as 132.65.0.0
by the user. The portion of the subnetmask that is asso- with a subnetmask of 255.65.0.0, a type of service of
ciated with the network portion of a particular class of *MINDELAY, and a next hop of 9.5.15.1.
address must equal 255.
Example 2: Removing a Default Route
TOS RMVTCPRTE RTEDEST(\DFTROUTE)
Specifies the type of service to be used. The type of SUBNETMASK(\NONE)
service defines how the internet hosts and routers NEXTHOP('186.34.76.92')
should make trade-offs between throughput, delay, reli-
ability, and cost. This command removes a host route identified as a default
*NORMAL: Normal service is used for delivery of data. route (*DFTROUTE). The subnetmask is specified as
*NONE and the type of service defaults to *NORMAL. The
*MINDELAY: Minimize delay means that prompt subnetmask, type of service, and next-hop value differentiate
delivery is important for data on this connection. this *DFTROUTE from the other possible eight *DFTROUTE
*MAXTHRPUT: Maximize throughput means that a high entries.
data rate is important for data on this connection.

P3-792 OS/400 CL Reference - Part 2 (Full Version)


RMVTCPTBL

| RMVTCPTBL (Remove TCP/IP Table) Command


Job: B,I Pgm: B,I REXX: B,I Exec

| 55──RMVTCPTBL──TBL(──┬─\ALL───┬──)─────────────────────────────────────────────────────────────────────────────────────────────5%
| ├─\IPFTR─┤
| └─\IPNAT─┘

| Purpose | *IPFTR: Remove the IP Filter rule table from use. The
| IP Filter feature will no longer be operative.
| The Remove TCP/IP Table (RMVTCPTBL) command is used
| *IPNAT: Remove the IP Network Address Translation
| to remove from use previously loaded IP Filter table or an IP
| table from use. The IP Network Address Translation
| Network Address Translation table. The appropriate table
| feature will no longer be operative.
| type(s) are removed from all TCP/IP interfaces, regardless of
| the status (active or inactive) of the interface. Note that, for
| active interfaces, this may disrupt existing sessions. TCP/IP | Examples
| interfaces that currently have no associated table of the | Example 1: Remove All Tables
| requested type(s) are unaffected by this command.
| RMVTCPTBL TBL(\ALL)

| Required Parameter | This command removes both the IP Filter and IP Network
| Address Translation rule tables from use.
| TBL
| Specifies the rule table that is to be removed from use. | Example 2: Remove the IP Filter Table
| *ALL: Both the IP Filter and the IP Network Address | RMVTCPTBL TBL(\IPFTR)
| Translation rule tables will be removed from use. Both
| features will no longer be operative. | This command removes only the IP Filter rule table from use.

Chapter 2. OS/400 Command Descriptions P3-793


RMVTRC

RMVTRC (Remove Trace) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──RMVTRC──┬────────────────────────────────────────────────────────────────────────────────────────┬──────────────────────────5
│ ┌─\ALL───────────────────────────────────────────────────────────────────┐ │
│ │ ┌──
─────────────────────────────────────────────────────────────────┐ │ │
└─STMT(─── 6
(1) ─┴───(──start-statement-identifier──┬───────────────────────────┬──)─┴───
(2) ─┴──)─┘
└─stop-statement-identifier─┘
(P) ────────────────────────────────────────────────────────────────────────────────────────────5%
5──┬───────────────────────────┬───
│ ┌─\DFTPGM──────┐ │
└─PGM(──┼─\ALL─────────┼──)─┘
└─program-name─┘
Notes:
1 STMT cannot be specified if PGM(*ALL) is specified.

2 A maximum of 5 repetitions

P All parameters preceding this point can be specified in positional form.

Purpose must be specified here that were specified on the


ADDTRC command.
The Remove Trace (RMVTRC) command removes all or part
The method used to specify the trace statements on the
of the traces previously specified in one or more Add Trace
ADDTRC command (that is, HLL statement identifiers
(ADDTRC) commands for use in debugging the programs.
versus machine instruction numbers) must also be used
Any trace data already created by the traces being removed
here to remove them.
is not affected by this command. (This data can be removed
by the Clear Trace Data (CLRTRCDTA) command.) The *ALL: All HLL statements and/or machine instructions in
tracing limits specified in the Change Debug (CHGDBG) the specified programs are no longer traced regardless
command are not changed. of how the trace was defined by the ADDTRC command.
Element 1: Statement Identifier of First Trace State-
On the RMVTRC command, the user specifies the high-level-
ment
language (HLL) statement identifiers or the machine instruc-
tion numbers that correspond to the ranges that the user no start-statement-identifier: Specify the HLL statement
longer wants traced. To remove a trace, exactly the same identifier (or the machine instruction number) of the first
range (as specified on the ADDTRC command) must be trace statement being removed from future tracing. Up
specified. Up to five sets of trace ranges can be specified in to five trace ranges can be specified in the program for
one command. each use of this command.
Element 2: Statement Identifier of Last Trace State-
Restrictions:
ment
1. This command is valid only in debug mode. To start
stop-statement-identifier: Specify, optionally, the HLL
debug mode, refer to the STRDBG (Start Debug)
statement identifier (or the machine instruction number)
command.
of the last statement being removed from future tracing.
2. This command cannot be used if the user is servicing
If the last statement was specified on the ADDTRC
another job, and that job is on a job queue, or is being
command, the last statement must also be specified
held, suspended, or ended.
here. Up to five trace ranges can be specified in the
3. This command cannot be used to remove a trace from a
program for each use of this command.
bound program.
Note: To see the parameter and value descriptions for this PGM
command, refer to the online help text. For more Specifies the program (or all programs) containing the
information about printing the help text, refer to trace statements being removed from future tracing
“Printing CL Command Descriptions” in Chapter 1. operations.
*DFTPGM: The program currently specified as the
default program contains the statements being removed
Optional Parameters from tracing.
STMT *ALL: All programs that currently have trace ranges in
Specifies the HLL statement identifiers or machine them have all of their trace ranges removed; no tracing
instruction numbers of the trace statements that are no can be done in any of the programs in debug mode
longer being traced. Unless *ALL is specified, to remove unless more traces are added by the ADDTRC
a trace from a program, the same statement identifiers

P3-794 OS/400 CL Reference - Part 2 (Full Version)


RMVTRC

command. PGM(*ALL) is valid only if the STMT param- Example


eter is not specified.
RMVTRC
program-name: Specify the name of the program that
has the specified trace statements (or all trace state- This command removes all the trace statements used for
ments) being removed. tracing in the program currently specified as the default
program.

Chapter 2. OS/400 Command Descriptions P3-795


RMVUSFCNNE

RMVUSFCNNE (Remove Ultimedia System Facilities Connection Entry) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\NONE────────────────┐ ┌─\NONE─────────────────────┐
55──RMVUSFCNNE──MMDEV(──device-name──┼──────────────────────┼──┼───────────────────────────┼──)─────────────────────────────────5
└─remote-location-name─┘ └─remote-network-identifier─┘
(P) ───────────────────────────────────────────────────────────────────────────────5%
5──DEVCNN(──device-connector──┬─\INPUT──┬──)────
└─\OUTPUT─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Element 3: Remote Network ID


*NONE: The multimedia device does not have a remote
The Remove Ultimedia System Facilities Connection Entry
network ID.
(RMVUSFCNNE) command can be used to remove an entry
from the multimedia connector table. remote-network-identifier: Specify the network identifier
of the remote system of the PWS that is the multimedia
Note: To see the parameter and value descriptions for this
device.
command, refer to the online help text. For more
information about printing the help text, refer to DEVCNN
“Printing CL Command Descriptions” in Chapter 1. Specifies the connector on the multimedia device to be
removed from the switch.
Required Parameters Element 1: Device Connector

MMDEV device-connector: Specify the identifying number of the


Specifies the multimedia device whose entry is to be multimedia device connector.
removed. The multimedia device is specified by the Element 2: Connector Direction
multimedia device name, the remote location name, and
*INPUT: The connector is used for input.
the remote network identifier (ID).
*OUTPUT: The connector is used for output.
Element 1: Device Name
device-name: Specify the name of the multimedia
device. Example
RMVUSFCNNE MMDEV(VIDEO2) DEVCNN(1 \OUTPUT)
Element 2: Remote Location Name
*NONE: The multimedia device does not have a remote This command removes the entry for the multimedia device
location name. VIDEO2, whose connection uses the output device connector
1.
remote-location-name: Specify the remote location
name of the programmable work station (PWS) that is
the multimedia device.

P3-796 OS/400 CL Reference - Part 2 (Full Version)


RMVUSFDEVE

RMVUSFDEVE (Remove Ultimedia System Facilities Device Entry) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\NONE────────────────┐ ┌─\NONE─────────────────────┐
(P) ────────────────────────────5%
55──RMVUSFDEVE──MMDEV(──device-name──┴─remote-location-name─┴──┴─remote-network-identifier─┴──)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Element 2: Remote Location Name


*NONE: The multimedia device does not have a remote
The Remove Ultimedia System Facilities Device Entry
location name.
(RMVUSFDEVE) command can be used to remove an entry
from multimedia device table. remote-location-name: Specify the remote location
name of the programmable work station (PWS) that is
Note: To see the parameter and value descriptions for this
the multimedia device.
command, refer to the online help text. For more
information about printing the help text, refer to Element 3: Remote Network ID
“Printing CL Command Descriptions” in Chapter 1. *NONE: The multimedia device does not have a remote
network ID.
Required Parameter remote-network-identifier: Specify the network identifier
of the remote system of the PWS that is the multimedia
MMDEV
device.
Specifies the multimedia device for which the entry is to
be removed. The multimedia device is specified by the
multimedia device name, the remote location name, and Example
the remote network identifier (ID). RMVUSFDEVE MMDEV(EASYON)
Element 1: Device Name
This command removes the entry for the multimedia device
device-name: Specify the name of the multimedia EASYON.
device.

Chapter 2. OS/400 Command Descriptions P3-797


RMVUSFSVRE

RMVUSFSVRE (Remove Ultimedia System Facilities Server Entry) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ────────────────────────────────────────────────────────────────────────────────────5%
55──RMVUSFSVRE──SERVER(──server-name──)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose information about printing the help text, refer to


“Printing CL Command Descriptions” in Chapter 1.
The Remove Ultimedia System Facilities Server Entry
(RMVUSFSVRE) command can be used to remove an entry
from the multimedia server device table. The associated Required Parameter
device description, line description, and controller description SERVER
objects are deleted. The program device name is removed Specifies the name of the server to remove from the
from the intersystem communications function file. system.
Restrictions: To run this command, the subsystem server
program must first be ended using the End Ultimedia System Example
Facilities (ENDUSF) command. RMVUSFSVRE SERVER(LOCALSWITCH)
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more This command removes the entry for the multimedia server
device LOCALSWITCH from the multimedia server device
table. The associated device description, line description,
and controller description objects are also removed.

P3-798 OS/400 CL Reference - Part 2 (Full Version)


RMVWSE

RMVWSE (Remove Work Station Entry) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ─┬─WRKSTN(──┬─work-station-name──────────┬──)─┬─────────5%
55──RMVWSE──SBSD(──┼───────────────┼──subsystem-description-name──)────
├─\CURLIB/──────┤ │ └─generic\-work-station-name─┘ │
└─library-name/─┘ └─WRKSTNTYPE(──┬─\ALL──────────────┬──)──────┘
├─\NONASCII─────────┤
├─\ASCII────────────┤
├─\CONS─────────────┤
└─work-station-type─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose WRKSTN
Specifies the device description name of the work station
The Remove Work Station Entry (RMVWSE) command is for which the job entry is being removed.
used, when the system is being set up, to remove a specified
work-station-name: Specify the name of the work station
work station or type of work station from a specified sub-
whose work station entry is removed.
system description.
generic*-work-station-name: Specify the generic name
Restrictions: of the work station. A generic name is a character string
1. The user, typically a system operator or system adminis- of one or more characters followed by an asterisk (*); for
trator, must have operational or object management example, ABC*. The asterisk substitutes for any valid
authority to change the subsystem description. characters. A generic name specifies all objects with
names that begin with the generic prefix for which the
2. Work station entries in the subsystem description of an user has authority. If an asterisk is not included with the
active subsystem may not be removed if there are active generic (prefix) name, the system assumes it to be the
workstations within that subsystem. complete object name. If the complete object name is
3. A *CON or CONS entry may not be removed from the specified, and multiple libraries are searched, multiple
controlling subsystem. objects can be removed only if *ALL or *ALLUSR library
values can be specified for the name. For more infor-
Note: To see the parameter and value descriptions for this
mation on the use of generic names, refer to “Generic
command, refer to the online help text. For more
Object Names” in Chapter 2.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. The WRKSTN parameter and the WRKSTNTYPE
parameter are mutually exclusive. When a generic
name is specified, only the generic name entry is
Required Parameters removed. For more information on the use of generic
SBSD functions, see “Rules for Specifying Names.”
Specifies the qualified name of the subsystem WRKSTNTYPE
description containing the work station job entry that is Specifies the work station device type for which the job
being removed. entry is being removed. The following type codes are
The name of the subsystem description can be qualified valid:
by one of the following library values:
Type Code Device
*LIBL: All libraries in the job's library list are 3179 3179 Display station
searched until the first match is found. 3180 3180 Display Station
3196 3196 Display Station
*CURLIB: The current library for the job is
3197 3197 Display Station
searched. If no library is specified as the current
3277 3277 Display Station
library for the job, the QGPL library is used.
3278 3278 Display Station
library-name: Specify the name of the library to be 3279 3279 Display Station
searched. 3476 3476 Display Station
3477 3477 Display Station
subsystem-description-name: Specify the name of the
3486 3486 Display Station
subsystem description containing the work station entry
3487 3487 Display Station
that is being removed.
5251 5251 Display Station
5291 5291 Display Station

Chapter 2. OS/400 Command Descriptions P3-799


RMVWSE

5292 5292 Color Display Station work-station-type: Specify the work station device type
5555 5555 Display Station (on systems sup- whose work station entry is being removed.
porting DBCS (double-byte character set))
The WRKSTN parameter and the WRKSTNTYPE
*ALL: The work station entry for all valid work station parameter are mutually exclusive.
types is removed.
*NONASCII: The work station entry for all valid work Example
stations that use 5250 data stream is removed. RMVWSE SBSD(LIB2/CHARLES) WRKSTN(B53)
*ASCII: The work station entries for all work stations
that use ASCII data streams are added. This command removes the work station entry for work
station B53 from the subsystem description named
*CONS: This value overrides a device type entry that CHARLES in library LIB2.
specifies the same device type as the device being used
as the console.

P3-800 OS/400 CL Reference - Part 2 (Full Version)


RNM

RNM (Rename) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──────────────────────────────────────────────────────────5%
55──RNM──OBJ(──'object-path-name'──)──NEWOBJ(──new-object-name──)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose apply to objects in the QSYS.LIB and QDLS file


systems.
The Rename (RNM) command changes the name of an
6. In the QSYS.LIB file system, the new name must contain
object in a directory.
the same object type suffix.
This command can also be issued using the following alter- 7. Some objects cannot be renamed. An error is returned
native command name: if an attempt is made to rename these objects.
Ÿ REN Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more
For more information about integrated file system commands, information about printing the help text, refer to
see the Integrated File System Introduction book. “Printing CL Command Descriptions” in Chapter 1.
Restrictions:
1. This command works on only one object. If a pattern is Required Parameters
specified on the OBJ parameter and more than one OBJ
object matches the pattern, you can select the object Specifies the path name of the object to be renamed.
from a list in an interactive job. If this is a batch job, the For more information on specifying path names, refer to
command fails with the error message CPFA08E, "More Chapter 2, “Path Names (*PNAME).”
than one name matches pattern."
NEWOBJ
2. When renaming an object in the root or QOpenSys file
Specifies the new name with which you can refer to the
systems, the user must have *OBJMGT authority to the
object. This name cannot contain any directory qual-
object being renamed, and *WX authority to the directory
ifiers and is in the same directory containing the existing
that contains the object. If the object being renamed is
object.
a directory, the user must also have *W authority to the
directory.
3. The user must have execute authority to each directory Example
in the path. RNM OBJ('DECEMBER-1994-MONTHLY-PAYROLL-FILE')
4. Execute authority is required for all path prefixes in the NEWOBJ(JANUARY-1995-MONTHLY-PAYROLL-FILE)
QOpenSys file system.
This command renames a file named
5. The authority requirements and restrictions from the DECEMBER-1994-MONTHLY-PAYROLL-FILE to a file
existing Rename Object (RNMOBJ) command and named JANUARY-1995-MONTHLY-PAYROLL-FILE.
Rename Document Library Object (RNMDLO) command

Chapter 2. OS/400 Command Descriptions P3-801


RNMCNNLE

RNMCNNLE (Rename Connection List Entry) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─────────────────────────────5%
55──RNMCNNLE──CNNL(────connection-list────)──ENTRY(────entry────)──NEWENTRY(────new-entry────)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose ENTRY
Specifies the name of the entry to be renamed.
The Rename Connection List Entry (RNMCNNLE) command
renames an entry in the specified connection list. NEWENTRY
Specifies the new name for the entry. Each entry in the
Note: To see the parameter and value descriptions for this connection list must have a unique name.
command, refer to the online help text. For more
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. Example
RNMCNNLE CNNL(CHICAGO)
ENTRY(CORPORATE)
Required Parameters NEWENTRY(SERVICE)
CNNL
This command renames entry CORPORATE in the con-
Specifies the name of the connection list.
nection list named CHICAGO. The new name will be
SERVICE, but all other information for the entry remains the
same.

P3-802 OS/400 CL Reference - Part 2 (Full Version)


RNMDIRE

RNMDIRE (Rename Directory Entry) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──RNMDIRE──OLDUSRID(──user-ID──address──)──NEWUSRID(──┬─\BACKOUT─────────┬──)──┬──────────────────────────────────┬───────────5
└─user-ID──address─┘ │ ┌─\NONE────────────┐ │
└─FWDFRM(──┼─\OLDUSRID────────┼──)─┘
└─user-ID──address─┘
5──┬─────────────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\SAME─────┐ │
└─NETUSRID(──┴─\NEWUSRID─┴──)─┘

Purpose them as uppercase characters. More information about


specifying the user ID and address is in the SNA Distri-
The Rename Directory Entry (RNMDIRE) command renames bution Services book.
a local or remote user identifier (ID) and user address to a
Element 1: User ID
new user ID and user address. A rename operation is not
allowed for generic (*ANY) user IDs or default directory user-ID: Specify the current user ID for the directory
entries (QSYS, QDFTOWN, QLPAUTO, QLPINSTL). This entry. A maximum of 8 characters can be specified. If
command renames all occurrences of the specified user ID this value is specified, an address must be specified on
and address in all IBM-supplied files. Element 2.
Element 2: Address
It is recommended that this job be scheduled during low-use
periods using the Submit Job (SBMJOB) command. address: Specify the current address for the directory
Rename is a long-running operation that does not allow entry. A maximum of 8 characters can be specified. If
OfficeVision or calendar activity while it is running. this value is specified, a user ID must be specified on
Element 1.
Only one rename operation can be run on the system at one
time. If the rename is submitted to batch, the job waits for NEWUSRID
an active rename to complete. Specifies the user ID and address to which the old user
ID and address is being renamed. Both elements must
Restrictions: be specified but only one element needs to be different
from the user ID and address specified on the
1. You must have security administrator (*SECADM) or all
OLDUSRID parameter.
object (*ALLOBJ) authority to rename the user ID and
user address. The new user ID and address specified cannot be an
existing user ID and address or exist as a forward-from
2. The following must be ended before an entry can be
value in the directory.
renamed:
If the entry being renamed is in error from a previous
Ÿ OfficeVision
rename request, you can continue with the rename oper-
Ÿ Client Access/400 ation or back out the changes and reset the files to the
Ÿ Hierarchical file support original values. To back out the changes, specify
*BACKOUT on this parameter. To continue with the
Ÿ QSNADS subsystem rename operation, do not change the value of this
Ÿ TCP/IP electronic mail job (QTMSMTP) parameter (if the value is changed this is an error).
Ÿ Automatic cleanup through Operational Assistant* If lowercase characters are specified, the system stores
them as uppercase characters.
If any one of these are in use during the rename
request, the request fails and an error message is sent. *BACKOUT: Back out of the rename directory entry
operation. This value is only allowed on a directory
Note: To see the parameter and value descriptions for this
entry that is in error as the result of a previous rename.
command, refer to the online help text. For more
This value sets the user ID and address in all
information about printing the help text, refer to
IBM-supplied files changed by a previous rename
“Printing CL Command Descriptions” in Chapter 1.
request to the values specified on the OLDUSRID
parameter.
Required Parameters Element 1: User ID
OLDUSRID user-ID: Specify the new user ID for the directory entry.
Specifies the user ID and address of the directory entry A maximum of 8 characters can be specified. If this
being renamed. Both elements must be specified. If value is specified, an address must be specified on
lowercase characters are specified, the system stores Element 2.

Chapter 2. OS/400 Command Descriptions P3-803


RNMDIRE

Element 2: Address specified. If this value is specified, a user ID must be


specified on Element 1.
address: Specify the new address for the directory
entry. A maximum of 8 characters can be specified. If NETUSRID
this value is specified, a user ID must be specified on Specifies whether the current network user ID and
Element 1. address are renamed to the new user ID and address.
Note: Changing the address element does not change The network user ID is used in shadowing to uniquely
the system name of the directory entry. If you identify a user in the network. The default is the user ID
want distributions for the user forwarded to a and address. If you are using directory shadowing with
system other than what is specified by the direc- the user ID and address as the unique value in the
tory entry, you must change the system name for network, you can also change this value to the new user
the directory entry using the Change Directory ID and address specified on the NEWUSRID parameter.
Entry (CHGDIRE) command. *SAME: The value does not change.
*NEWUSRID: The network user ID and address are
changed to the new user ID and address.
Optional Parameters
FWDFRM
Examples
Specifies whether distributions are automatically for-
warded from the old user ID and address or a specified Example 1: Renaming a User ID
user ID and address. This value is valid only for local
RNMDIRE OLDUSRID(HURST PAYROLL)
users.
NEWUSERID(HURST NEWYORK) FWDFRM(\OLDUSRID)
*NONE: Distributions are not forwarded.
This command renames the current user ID HURST
*OLDUSRID: All distributions are forwarded from the
PAYROLL to the new user ID HURST NEWYORK. Distribu-
old user ID and address.
tions sent to the old user ID and address are forwarded.
Element 1: User ID
Example 2: Renaming a User ID and Network User ID
user-ID: Specify the user ID from which distributions are
to be forwarded. A maximum of 8 characters can be RNMDIRE OLDUSRID(HURST PAYROLL)
specified. If this value is specified, an address must be NEWUSERID(HURST NEWYORK) FWDFRM(\OLDUSRID)
NETUSRID(\NEWUSRID)
specified on Element 2.
Element 2: Address This command renames the current user ID HURST
PAYROLL and the current network user ID to the new user
address: Specify the address from which distributions
ID HURST NEWYORK. Distributions sent to the old user ID
are to be forwarded. A maximum of 8 characters can be
and address are forwarded.

P3-804 OS/400 CL Reference - Part 2 (Full Version)


RNMDKT

RNMDKT (Rename Diskette) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──RNMDKT──DEV(──device-name──)──┬────────────────────────────────┬──┬───────────────────────────────────┬─────────────────────5
│ ┌─\MOUNTED──────────┐ │ │ ┌─\SAME─────────────┐ │
└─VOL(──┴─volume-identifier─┴──)─┘ └─NEWVOL(──┴─volume-identifier─┴──)─┘
(P) ───────────────────────────────────────────────────────────────────────────────────5%
5──┬────────────────────────────────────┬───
│ ┌─\SAME────────────┐ │
└─NEWOWNID(──┴─owner-identifier─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose to 6 characters; any combination of letters and numbers


can be used.
The Rename Diskette (RNMDKT) command changes the
If the volume identifiers do not match, a message is sent
name of a diskette or changes the name (or identifier) of its
to the system operator. The operator can either insert
owner. This command can be used to change the contents
the correct diskette and try again, or stop the command.
of the volume identifier field, or the owner identifier field, or
both fields of a single diskette. NEWVOL
Note: When processing a diskette with labels that are not Specifies, if the diskette is being renamed, the new
IBM standard labels, unpredictable results may occur. volume identifier of the diskette.
To initialize the diskette, enter the Initialize Diskette *SAME: The value does not change.
(INZDKT) command with CHECK(*NO) specified.
volume-identifier: Specify up to 6 characters for the
Note: To see the parameter and value descriptions for this volume identifier of the diskettes being renamed; any
command, refer to the online help text. For more combination of letters and numbers can be used.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. NEWOWNID
Specifies the owner identification being written in the
volume label. The owner identification contains up to 14
Required Parameters characters (uppercase letters and/or numbers in any
combination) and is left-justified and padded with blanks
DEV
on the right if fewer than 14 characters are supplied.
Specifies the name of the diskette device containing the
diskette being renamed. *SAME: The value does not change.
owner-identifier: Specify no more than 14 uppercase
Optional Parameters letters and numbers that identify the owner of the
diskette. No lowercase letters, embedded blanks, or
VOL special characters can be included, even if they are
Specifies one or more volume identifiers used by the file. enclosed in apostrophes. If less than 14 characters are
More information on this parameter is in Appendix A, used, the field is left-justified and padded on the right
“Expanded Parameter Descriptions.” with blanks.
*MOUNTED: The volume currently placed in the device
is used. Example
volume-identifier: Specify the volume identifier that is RNMDKT DEV(DKT1) VOL(MASTER) NEWVOL(BACKUP)
being compared with the diskette label volume identifier
field on the diskette that is being renamed. Specify up This command changes the name of the diskette in device
DKT1, if its name is MASTER, to BACKUP. The owner iden-
tification is unchanged (NEWOWNID assumed to be *SAME).

Chapter 2. OS/400 Command Descriptions P3-805


RNMDLO

RNMDLO (Rename Document Library Object) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ───5%
55──RNMDLO──DLO(──document-library-object-name──)──NEWDLO(──document-library-object-name──)──┬──────────────────────────┬───
│ ┌─\NONE───────┐ │
└─FLR(──┴─folder-name─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose DLO
Specifies the name of the document or folder that is
The Rename Document Library Object (RNMDLO) command being renamed.
changes the name of a document or folder. If the document
or folder being renamed is in use when the command is NEWDLO
used, the command is not run and a message is sent to the Specifies the new name of the document or folder.
user who entered the command.
Optional Parameters
Restriction: The user must have *ALL authority to the docu-
ment or folder being renamed, and must have *CHANGE FLR
authority to the folder that contains it. While using this Specifies the name of the folder that contains the docu-
command, the user may encounter an error message indi- ment.
cating that internal objects are locked. This means that
*NONE: The folder being renamed is not located in a
another user is using the document library functions which
folder. *NONE cannot be specified if the object being
cannot run at the same time as the RNMDLO command;
renamed is a document.
therefore, retry this command later.
folder-name: Specify the name of the folder that con-
Note: To see the parameter and value descriptions for this
tains the document or folder that is being renamed.
command, refer to the online help text. For more
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. Example
RNMDLO DLO(A) NEWDLO(B) FLR(FLR1)
Required Parameters This command changes the name of document or folder A
located in folder FLR1, to B.

P3-806 OS/400 CL Reference - Part 2 (Full Version)


RNMDSTL

RNMDSTL (Rename Distribution List) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ───────────────────────────────5%
55──RNMDSTL──LSTID(──list-ID──list-ID-qualifier──)──NEWLSTID(──list-ID──list-ID-qualifier──)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Note: The distribution list identifier has two parts, the
ID and the qualifier, separated by at least one
The Rename Distribution List (RNMDSTL) command space. If lowercase characters are specified, the
renames the list identifier (ID) of an existing distribution list. system changes them to uppercase.

A distribution list is a list of entries from the distribution The naming rules for the two-part list ID are iden-
directory. The distribution list can include entries for local, tical to the rules for the user ID and address. A
remote, indirect, and independent work station users. It also complete description of these rules is in the SNA
can include remote distribution lists, but it cannot include Distribution Services book.
local distribution lists. More information about distribution NEWLSTID
lists is in the SNA Distribution Services book. Specifies the new two-part list identifier of the distribution
list.
When renaming the distribution list, the new list ID must be
unique to all local user IDs and other list IDs in the directory. Element 1: List Identifier
If a new list ID is not unique, the list is not renamed and an list-ID: Specify the list identifier (ID) of the distribution
error message is returned. list.
Restriction: You must have security administrator Element 2: List Qualifier
(*SECADM) authority to rename a distribution list that you do list-ID-qualifier: Specify the list ID qualifier of the distri-
not own. No special authority is needed for you to rename a bution list.
distribution list that you own.
Note: The distribution list identifier has two parts, the
Note: To see the parameter and value descriptions for this ID and the qualifier, separated by at least one
command, refer to the online help text. For more space. If lowercase characters are specified, the
information about printing the help text, refer to system changes them to uppercase.
“Printing CL Command Descriptions” in Chapter 1.
The naming rules for the two-part list ID are iden-
tical to the rules for the user ID and address. A
Required Parameters complete description of these rules is in the SNA
Distribution Services book.
LSTID
Specifies the two-part list identifier of the distribution list
to be renamed.
Example
Element 1: List Identifier
RNMDSTL LSTID(DEPTABC DLIST) NEWLSTID(DEPTXYZ DLIST)
list-ID: Specify the list identifier (ID) of the distribution
list. This command renames a distribution list that contains the
members of Department ABC. The list ID is being changed
Element 2: List Qualifier
to correspond to a new department name, XYZ. If the new
list-ID-qualifier: Specify the list ID qualifier of the distri- list ID is unique, the distribution list is changed.
bution list.

Chapter 2. OS/400 Command Descriptions P3-807


RNMLANADPI

RNMLANADPI (Rename Local Area Network Adapter Information) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──────────────────────────────────────────────────────5%
55──RNMLANADPI──ADPTNAME(──adapter-name──)──NEWNAME(──adapter-name──)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose ADPTNAME
Specifies the name that is currently associated with the
The Rename Local Area Network Adapter Information adapter.
(RNMLANADPI) command is used to change the name asso-
ciated with the LAN adapter information in the adapter file. NEWNAME
Specifies the new name associated with the adapter
Restriction: Adapter names must be unique. information.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more Example
information about printing the help text, refer to RNMLANADPI ADPTNAME(ACCTG3A) NEWNAME(BILLING2)
“Printing CL Command Descriptions” in Chapter 1.
This command changes the name from ACCTG3A to
BILLING2.
Required Parameters

P3-808 OS/400 CL Reference - Part 2 (Full Version)


RNMM

RNMM (Rename Member) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ───────────────5%
55──RNMM──FILE(──┼───────────────┼──database-file-name──)──MBR(──member-name──)──NEWMBR(──new-member-name──)────
├─\CURLIB/──────┤
└─library-name/─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *CURLIB: The current library for the job is


searched. If no library is specified as the current
The Rename Member (RNMM) command changes the name library for the job, the QGPL library is used.
of a specified file member. The member cannot be renamed
library-name: Specify the name of the library to be
while it is in use; other users can read and change records of
searched.
other members in the file that contains the member being
renamed. A member that is opened in the same job cannot database-file-name: Specify the name of the physical or
be renamed. logical database that contains the member being
renamed.
Restriction: To rename a file member, the user must have
*ALL authority to the object being renamed and to the library MBR
in which the object is located. Specifies the name of the physical or logical file member
that is renamed. Specify the name of the member.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more NEWMBR
information about printing the help text, refer to Specifies the new name of the member being renamed.
“Printing CL Command Descriptions” in Chapter 1. The member remains in the same file. Specify the name
of the new member. The new name must be unique in
the file.
Required Parameters
FILE
Example
Specifies the qualified name of the database file (phys-
ical or logical) that contains the member being renamed. RNMM FILE(ELEMENT) MBR(LEAD) NEWMBR(GOLD)

The name of the file can be qualified by one of the fol- This command renames member LEAD in file ELEMENT as
lowing library values: GOLD. The library list (*LIBL) is used to find the file.
*LIBL: All libraries in the job's library list are
searched until the first match is found.

Chapter 2. OS/400 Command Descriptions P3-809


RNMNCK

RNMNCK (Rename Nickname) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\PRIVATE─┐
(P) ──────────────────────────────────────────────────────────5%
55──RNMNCK──NCK(──nickname──┴─\PUBLIC──┴──)──NEWNCK(──nickname──)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Required Parameters


The Rename Nickname (RNMNCK) command is used to NCK
rename an existing nickname in the system distribution direc- Specifies the existing nickname to be renamed and the
tory. The new nickname must be unique if it is a public nick- access of that nickname.
name. The new nickname must be unique only for the Element 1: Nickname
owner if it is a private nickname.
nickname: Specify the nickname you are renaming.
A nickname is a short version of either a directory entry or a Element 2: Nickname Access
distribution list name. You can specify a nickname instead of
*PRIVATE: The private nickname that you own is being
the full directory entry or distribution list name on many
renamed.
OfficeVision displays. More information about nicknames is
in the SNA Distribution Services book. *PUBLIC: The public nickname is being renamed.
Public nicknames can be renamed only by a user with
Restrictions: security administrator (*SECADM) authority or by the
1. You must have security administrator (*SECADM) owner.
authority to rename a public nickname that you do not
NEWNCK
own. No special authority is needed for you to rename a
Specifies the new nickname.
public nickname that you own.
2. Only the owner can rename a private nickname. No
special authority is needed.
Example
RNMNCK NCK(SEC44A \PUBLIC) NEWNCK(SEC44C)
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more This command renames the public nickname SEC44A to
information about printing the help text, refer to SEC44C. If the new nickname is unique, the nickname is
“Printing CL Command Descriptions” in Chapter 1. renamed.

P3-810 OS/400 CL Reference - Part 2 (Full Version)


RNMOBJ

RNMOBJ (Rename Object) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(1) ─object-type──)──NEWOBJ(──new-object-name──)────────────────────5
55──RNMOBJ──OBJ(──┼───────────────┼──object-name──)──OBJTYPE(───
├─\CURLIB/──────┤
└─library-name/─┘
(P) ────────────────────────────────────────────────────────────────────────────────────────────5%
5──┬───────────────────────────┬───
│ ┌─\LCL──────┐ │
└─SYSTEM(──┼─\RMT──────┼──)─┘
└─\FILETYPE─┘
Notes:
1 A list of the valid OS/400 object types for this command is in Appendix A.

P All parameters preceding this point can be specified in positional form.

Purpose Notes:
1. References made to the following items may need to be
The Rename Object (RNMOBJ) command changes the
updated by the user after a rename of a configuration
name of an object in a library. The new name specified for
object:
the object must be unique in the library for the object type. If
the object being renamed is in use when the command is Ÿ Connection lists
entered, the command is not run and a message is sent to Ÿ Work station entries
the user who enters the command. If a library is on an Ÿ Communication entries
active user's library list when the library is renamed, a Ÿ Display files
Display Library List (DSPLIBL) command reflects the new Ÿ Printer files
name. Renaming a library can cause programming errors. Ÿ Tape files
Therefore, it is not recommended. Ÿ Diskette files
Ÿ ICF files
Restrictions: Ÿ User profiles
Ÿ The user must have object management authority for the Ÿ Job descriptions
object that is being renamed and have both update Ÿ System objects
authority and execute authority for the library in which Ÿ CL programs
the object is located. Ÿ QPRTDEV system value
Ÿ Display descriptions referencing this as an auxiliary
Ÿ A PL/I program cannot be renamed after it has been printer
created. Ÿ Communication side information (CSI) objects
Ÿ Configuration objects including controller descriptions, Ÿ Distributed data management files (APPC device
line descriptions, device descriptions, and network inter- name)
face descriptions must all be varied off in order to Ÿ Integrated services digital network (ISDN) controller
rename them. descriptions that refer to a renamed connection list
(CNNL)
Ÿ The following objects cannot be renamed:
Ÿ ISDN line descriptions that refer to a renamed
– The job's temporary library (QTEMP) CNNL
– The system library (QSYS) Ÿ Other configuration objects. For example, lines,
– The system operator message queue (QSYSOPR) controllers, and other devices that refer to the
– All work station user message queues renamed configuration objects.
– The system log (QHST)
2. References made to the renamed object by the following
– The configuration objects (QCTL and QCONSOLE)
items are automatically changed by the system after a
– The configuration lists (QAPPNRMT, QAPPNLCL,
rename operation. The reference changes reflect the
QASYNCLOC, QRTLPASTHR)
changes made to the renamed configuration objects.
– The Electronic Customer Support configuration
objects (QESLIN, QESPAP, QESCTL. QTILINE, Ÿ QCONSOLE system values
QTICTL, QTIDA, QTIDA2, QIADSP, QIAPRT, Ÿ message queues associated with display devices
QQAHOST) Ÿ System/36 environment device tables
Ÿ output queues associated with the old printer device
Ÿ When renaming objects of type *CSI, *GSS, *FNTRSC,
Ÿ local work station controllers associated with a
*FORMDF, *OVL, *PAGDFN, and *PAGSEG, the new
twinaxial data link control (TDLC) line
name for the object cannot exceed 8 characters in
length.

Chapter 2. OS/400 Command Descriptions P3-811


RNMOBJ

Ÿ TDLC lines associated with the local or remote work NEWOBJ


station controller Specifies the new name of the object being renamed.
The object remains in the same library. Enter the new
Note: To see the parameter and value descriptions for this
name that identifies the object to the system.
command, refer to the online help text. For more
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. Optional Parameters
SYSTEM
Required Parameters Specifies whether the file is on the local system (*LCL),
the remote system or systems (*RMT), or on either the
OBJ
local or remote systems (*FILETYPE).
Specifies the current qualified name of the object to be
renamed. If no library qualifier is given, *LIBL is used to *LCL: The rename is for a file on the local system.
find the object. The object name should be qualified to
*RMT: The remote file referred to by the source distrib-
ensure that the right object is renamed.
uted data management (DDM) file is renamed.
The name of the object can be qualified by one of the
Note: If the user wants to rename a remote file, two
following library values:
DDM files must be used. The existing DDM file
*LIBL: All libraries in the job's library list are goes in the OBJ value and the new DDM file
searched until the first match is found. goes in the NEWOBJ value. The new DDM file
must be in the same library as the existing DDM
*CURLIB: The current library for the job is
file. When the remote rename occurs, the
searched. If no library is specified as the current
remote file name in the existing DDM file is given
library for the job, the QGPL library is used.
to the new DDM file.
library-name: Specify the name of the library to be *FILETYPE: If the OBJ name is a DDM file, the
searched.
renaming is remote, but if the OBJ name is not a DDM
object-name: Specify the current name of the object to file, the renaming is local.
be renamed.

OBJTYPE Example
Specifies the type of the object to be renamed. More RNMOBJ OBJ(PAYROLL/FILEX) OBJTYPE(\FILE)
information on this parameter is in Appendix A, NEWOBJ(MSTR)
“Expanded Parameter Descriptions.”
The library named PAYROLL is searched for the file named
Note: Dependent logical files follow the renamed phys-
FILEX. If the file is found, and the user has object opera-
ical file.
tional authority for FILEX and update authority for the
PAYROLL library, FILEX is renamed MSTR.

P3-812 OS/400 CL Reference - Part 2 (Full Version)


RNMTCPHTE

RNMTCPHTE (Rename TCP/IP Host Table Entry) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ───────────────────────────────────────5%
55──RNMTCPHTE──INTNETADR(──internet-address──)──NEWINTNETA(──new-internet-address──)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose information about printing the help text, refer to


“Printing CL Command Descriptions” in Chapter 1.
The Rename TCP/IP Host Table Entry (RNMTCPHTE)
command is used to rename an internet address in the local
host table to another internet address. This has the effect of Required Parameters
associating the host names for the old internet address with INTNETADR
the new internet address. Host names and the text Specifies the internet address associated with the host
description field are not altered with the RNMTCPHTE name that you want to rename. The internet address is
command. specified in the form nnn.nnn.nnn.nnn, where nnn is a
decimal number ranging from 0 through 255. An internet
The local host table is defined to allow 1 internet address, 4
address is not valid if it has a value of all binary ones or
host names and 1 text description field per entry.
all binary zeros for the network identifier (ID) portion or
See also the following host table commands: the host ID portion of the address. If the internet
address is entered from a command line, the address
Ÿ Add TCP/IP Host Table Entry (ADDTCPHTE) command must be enclosed in apostrophes.
adds a new entry in the local host table.
NEWINTNETA
Ÿ Change TCP/IP Host Table Entry (CHGTCPHTE)
Specifies the new internet address that renames the
command changes one or more host names or the text
existing internet address in the local host table. The
description field.
internet address is specified in the form
Ÿ Merge TCP/IP Host Table (MRGTCPHT) command nnn.nnn.nnn.nnn, where nnn is a decimal number
merges host names, internet addresses, and text ranging from 0 through 255. An internet address is not
comment entries from a physical file member into the valid if it has a value of all binary ones or all binary
local host table. A replace option is also provided that zeros for the network identifier (ID) portion or the host ID
allows the entire local host table to be replaced by the portion of the address. If the internet address is entered
physical file member. from a command line, the address must be enclosed in
Ÿ Remove TCP/IP Host Table Entry (RMVTCPHTE) apostrophes.
command removes an entire entry from the local host
table. Example
Restriction: You must have *IOSYSCFG special authority RNMTCPHTE INTNETADR('132.28.71.5')
to use this command. NEWINTNETA('142.48.81.6')

Note: To see the parameter and value descriptions for this This command replaces the host table entry internet address
command, refer to the online help text. For more of 132.28.71.5 with the internet address of 142.48.81.6. All
host names and the text description field associated with the
entry remain the same.

Chapter 2. OS/400 Command Descriptions P3-813


ROLLBACK

ROLLBACK (Rollback) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──ROLLBACK───────────────────────────────────────────────────────────────────────────────────────────────────────────────────5%

Purpose Ÿ All record locks held for files opened under commitment
control for the commitment definition are released.
The Rollback (ROLLBACK) command is used to restart the
Ÿ Locks on object level commitment control resources,
current transaction and reestablish the last commitment
acquired when the resources were created or changed
boundary as the current commitment boundary for the com-
during the transaction, are released.
mitment definition associated with the program issuing the
command. More information on the use of commitment control is in the
Backup and Recovery book.
When the ROLLBACK command is issued:
Ÿ Changes made to database files and other commitment There are no parameters for this command.
resources under commitment control for the commitment
definition since the last commitment boundary was
Example
established are rolled back. Updates, additions, or
deletions made to the database file's data since that ROLLBACK
commitment boundary are rolled back or removed, and
This command reestablishes the last commitment boundary
the original entries are put back in the files. Records
(the point at which a Commit (COMMIT) command or
that were added to the files remain as deleted records.
Rollback (ROLLBACK) command was last issued) for the
The files are repositioned to the last commitment
commitment definition associated with the program issuing
boundary. Changes made to other commitment
the command.
resources are rolled back as well.

P3-814 OS/400 CL Reference - Part 2 (Full Version)


RPCBIND

| RPCBIND (Start RPC Binder Daemon) Command

| Job: B,I Pgm: B,I REXX: B,I Exec


|
(P)─┬─────────────────────────┬─────────────────────────────────────────────────────────────────────────────────────5%
| 55──RPCBIND───
| │ ┌─\NO──┐ │
| └─RTVRPCREG(──┴─\YES─┴──)─┘
| Note:
| P All parameters preceding this point can be specified in positional form.

| Purpose | QNFSRPCD The RPC binder daemon

| The Start RPC Binder Daemon (RPCBIND) command starts | Restrictions:


| the Remote Procedure Call (RPC) binder daemon. The RPC | 1. You must have *IOSYSCFG special authority to use this
| binder daemon job must be running to use and run Network | command.
| File System (NFS) daemons and commands and some of the
| TI-RPC APIs.
| Optional Parameters
| This command can also be issued using the following alter-
| RTVRPCREG
| native command:
| Specifies whether to retrieve previously recorded regis-
| Ÿ STRNFSSVR SERVER(*RPC) | tration information when the RPC daemon is started.

| However, the STRNFSSVR command has the following | If registration information is retrieved, servers do not
| restrictions: | have to re-register with the RPC server.

| 1. You must have *IOSYSCFG special authority to use this


| command. | *NO: Do not retrieve registration information.
| *YES: Retrieve registration information.
| If you attempt to start this daemon and it is already running,
| it will not cause the command to fail. The command will
| issue diagnostic message CPCA1B6 if the daemon is already | Example
| running.
| Example: Start RPC Binder Daemon
| To determine if the RPC server daemon is running, use the | RPCBIND RTVRPCREG(\YES)
| Work with Active Jobs (WRKACTJOB) command and look in
| the subsystem QSYSWRK for existence of the following job: | This command starts the RPC binder daemon job, and
| retrieves previously recorded registration information.

Chapter 2. OS/400 Command Descriptions P3-815


RPCGEN

| RPCGEN (Convert RPC Source) Command


| Job: B,I Pgm: B,I REXX: B,I Exec
|
(P) ─┬──────────────────────────┬──┬───────────────────────────────────┬─────────5
| 55──RPCGEN──FROMFILE(──'from-file-path_name'──)────
| │ ┌─\NOSAMP──┐ (1) ─'to-file-path_name'──)─┘
│ └─TOFILE(───
| └─OPTION(──┼─\ALL─────┼──)─┘
| ├─\XDR─────┤
| ├─\HDR─────┤
| ├─\CLTSTUB─┤
| ├─\SVRSTUB─┤
| ├─\CLTSAMP─┤
| └─\SVRSAMP─┘
| 5──┬─────────────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────5%
| │ ┌──
─────────┐ │
| │ │┌─\NONE─┐│ │
| (2) 6
└─PROTOCOL(─────┼─\TCP──┼┴──)─┘
| └─\UDP──┘
| Notes:
| P All parameters preceding this point can be specified in positional form.
| 1 Valid only if OPTION(*ALL) or OPTION(*NOSAMP) is not specified.
| 2 Valid only if OPTION(*SVRSTUB) is specified.

| RPCGEN Command

| For the description of the RPCGEN command, see the CVTRPCSRC (Convert RPC Source) command description.

P3-816 OS/400 CL Reference - Part 2 (Full Version)


RPLDOC

RPLDOC (Replace Document) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐
(P) ────────────────────────────────5
55──RPLDOC──TODOC(──┬─\DOCID────────┬──)──DOCFILE(──┼───────────────┼──database-file-name──)────
└─document-name─┘ ├─\CURLIB/──────┤
└─library-name/─┘
5──┬────────────────────────────┬──┬─────────────────────────────────────────────────┬──┬─────────────────────────────┬─────────5
│ (1, 2) ──┐
┌─\NONE───── │ │ ┌─\NONE────────────────────────────┐ │ │ ┌─\FIRST──────┐ │
└─TOFLR(──┴─folder-name─┴──)─┘ └─DOCID(──┴─'library-assigned-document-name'─┴──)─┘ └─DOCMBR(──┴─member-name─┴──)─┘
5──┬────────────────────────┬──┬─────────────────────────────────────────┬──┬──────────────────────────────────────┬────────────5
│ ┌─\DOC──┐ │ │ ┌─\DFT─────────────────┐ │ │ ┌─\CURRENT──────────────┐ │
(3) ─┼─\FFT─────────────────┼──)─┘ └─USRID(──┴─user-ID──user-address─┴──)─┘
└─DOCPART(──┼─\IDP──┼──)─┘ └─DOCTYPE(───
└─\BOTH─┘ ├─\RFT─────────────────┤
└─document-type-number─┘
5──┬────────────────────────────────────────────────────┬──┬────────────────────────────────────────────────────┬──────────────5%
│ ┌─\SYSVAL──────────────────────────┐ │ │ ┌─\SYSVAL──────────────────────────┐ │
└─DOCCHRID(──┼─\DEVD────────────────────────────┼──)─┘ └─CMDCHRID(──┼─\DEVD────────────────────────────┼──)─┘
└─graphic-character-set──code-page─┘ └─graphic-character-set──code-page─┘
Notes:
P All parameters preceding this point can be specified in positional form.

1 This value cannot be specified when a document name is specified on the TODOC parameter.

2 This value must be specified when a document is specified on the DOCID parameter.

3 This parameter is ignored if only the IDP is being replaced.

Purpose DOCFILE
Specifies the qualified name of the database file that
The Replace Document (RPLDOC) command is used to contains the document data being filed. The database
replace the document content and the interchange document file can be user-defined or it can be the output file speci-
profile (IDP) of a document that exists in the document fied on the Receive Distribution (RCVDST) or Retrieve
library. Document (RTVDOC) command. Database files that are
used to replace document data are used as is with any
Restrictions: changes. If an output file is specified, only the docu-
1. The document must be checked out with the Retrieve ment data and IDP record format are read from the
Document (RTVDOC) command by the user specified on output file and the prefix is removed from the document
the USRID parameter before using this command. data. More information on defining the format of data-
2. The user must have at least *CHANGE authority for the base files is in the DB2 for AS/400 Database Program-
document, *ALLOBJ authority, or be working on behalf ming book.
of a user who is authorized for the document. The name of the database file can be qualified by one of
3. Authority to work on behalf of another user is granted the following library values:
with the Grant User Permission (GRTUSRPMN)
command. *LIBL: All libraries in the job's library list are
searched until the first match is found.

Required Parameters *CURLIB: The current library for the job is


searched. If no library is specified as the current
TODOC library for the job, the QGPL library is used.
Specifies the name of the document where the data is
library-name: Specify the name of the library to be
being placed, or the DOCID parameter is used to specify
searched.
the library assigned document name where the data is
being replaced. database-file-name: Specify the name of the database
*DOCID: The document being replaced is identified by file.
the library-assigned document name specified on the
DOCID parameter. Optional Parameters
document-name: Specify the name of the document that
TOFLR
is replaced.
Specifies the name of the folder that contains the docu-
ment being replaced.
*NONE: No folder name is specified.

Chapter 2. OS/400 Command Descriptions P3-817


RPLDOC

folder-name: Specify the name of the folder that con- *IPD: Replace only the IDP of the document. If this
tains the document being replaced. A folder name can value is specified, IDP records (record code 500) must
consist of a series of folder names if the document being exist in the specified file or the command fails.
replaced is located in a folder that is contained in
*BOTH: Replace both the document content and the
another folder. Up to 63 characters can be specified.
IDP of the document. If this value is specified, IDP
DOCID records (record code 500) must exist in the specified file
Specifies the library-assigned name of the document or the command fails.
being replaced. This is the name assigned to the docu-
DOCTYPE
ment by the system when it is created. The library-
Specifies the type of replacement document. This identi-
assigned document name can be determined by using
fier is used by the system to determine whether it can
the Query Document Library (QRYDOCLIB) command.
handle the data stream correctly.
The library-assigned name is also returned in a com-
pletion message when using the File Document The system code (SYSCOD on the File Document
(FILDOC) command. (FILDOC) command) cannot be changed when the docu-
ment contents are replaced.
Library-assigned document names are 24 characters in
length with the following format: *DFT: The system creates the appropriate document
YYYYMMDDHHMNSSHSSNSNSNSN where type identifier depending on where the data comes from.
If the document file is an output file created by the
YYYY = year
RCVDST or RTVDOC command, then the document
MM = month
type is taken from this file. If the file does not contain a
DD = day
document type or if the value in this file is document
HH = hour
type 0, then an error message is sent. If the document
MN = minute
file is a user-defined file, then the document type is 223
SS = second
(data file).
HS = hundredths of a second
SNSNSNSN = system name Document Description
Type
*NONE: No library-assigned document name is required
when the document is identified by the TODOC param-
2 Final form text document (FFTDCA)
eter.
3 5520 revisable form text document
'library-assigned-document-name': Specify the library- (RFT5520)
assigned document name to be replaced. More informa- 4 Word processing EBCDIC (EBCDIC)
tion on library-assigned document names is in the SNA 5 Word processing information file
Distribution Services book. (WRDPRCINFF)
Note: When the user is replacing a document and a 6 Image-data subset document (IMAGE)
cancel request is entered, the document may or 7 3730 text data stream (TEXT3730)
may not be replaced. 8 DIA document library descriptor document
(DOCDESCDOC)
DOCMBR 9 3732 display document data stream
Specifies the document database file member that con- (DATAST3732)
tains the data and IDP to replace the current data and 10 DIA display document data stream
IDP in the document. (DOCUNITCTL)
*FIRST: The first member (in order of creation) in the 11 Revisable form text document (RFTDCA)
database file contains the replacement data. 12 1403 compatible data stream with vari-
able length, unblocked records
member-name: Specify the name of the database file (PRT1403)
that contains the replacement data.
13 Digitized ADS audio (AUDIO)
DOCPART 14 IBM PC data file (PCFILE)
Specifies the part of the document to be replaced. 15 Hard copy of document (HARDCOPY)
223 Data file
Note: If you specify DOCPART(*BOTH) and the
32753 List of documents created from search
replacement of one fails, neither is replaced and
(DOCLIST)
the document remains checked out.
32756 Version 2 DIA document, library docu-
*DOC: Replace the document content only. If no docu- ment, descriptor document
ment content records exist in the specified file, the docu- 32768 AS/400 system revisable-form document
ment is replaced but a message is returned to alert the (RFTAS400)
user that no document content was replaced. 32769 AS/400 system final-form document
(FFTAS400)

P3-818 OS/400 CL Reference - Part 2 (Full Version)


RPLDOC

32770 IBM DW4 revisable-form document tive CL program or a batch job, an error message is
(RFTDW4) sent.
32912 ASCII data (ASCIIDATA)
Element 1: Character Set
65262 IBM S/38 revisable document (RFTS38)
graphic-character-set: Specify the graphic character set
*FFT: The document is Final Form Text. This type of used to create the data being filed.
document is intended to be shown and printed and not
Element 2: Code Page
edited by the receiver.
*RFT: The document is Revisable Form Text. This type
code-page: Specify the code page value used to create
the command parameters. Valid values range from 1
of document can be shown, printed, and edited by the
through 999.
receiver.
document-type-number: Specify a number from 2 CMDCHRID
through 65535. The numbers from 2 through 32767 are Specifies the character identifier (graphic character set
controlled by registering them with the IBM Document and code page) for data being specified as parameter
Interchange Architecture and are used for IBM-defined values on this command. This character identifier
document types. The numbers 32768 through 65535 (CHRID) is related to the display device used to specify
are not registered with IBM and can be used for the command. More information about CHRID pro-
non-IBM defined document types. cessing is in the Application Display Programming book.
Note: This value translates the USRID parameter to the
USRID
character set and code page of '930 500'. The SNA Dis-
Specifies the user ID and address of the user for whom
this request is made. The current user of this command
tribution Services book contains the character set and
code page table for '930 500'.
must have the authority to work on behalf of the named
user ID. Authority to work on behalf of another user is *SYSVAL: The system determines the graphic char-
given with the Grant User Permission (GRTUSRPMN) acter set and code page values for the command param-
command. eters from the QCHRID system values.
*CURRENT: The user profile that is currently running is *DEVD: The system determines the graphic character
used. set and code page values for the command parameter
from the display device description where the command
Element 1: User ID
is entered. This option is valid only when specified from
user-ID: Specify the user ID of the user whose the doc- an interactive job. If this value is specified in an interac-
ument is replaced. tive CL program or a batch job, an error message is
Element 2: User Address sent.

user-address: Specify the user address of the user for Element 1: Character Set
whom the document is replaced. graphic-character-set: Specify the graphic character set
values used to create the command parameter. Valid
DOCCHRID
values range from 1 through 999.
Specifies the character identifier (graphic character set
and code page) for the data being filed. The character Element 2: Code Page
identifier is related to the display station that was used to
code-page: Specify the code page value used to create
create the data being filed. More information about
the command parameters. Valid values range from 1
CHRID processing is in the DB2 for AS/400 Database
through 999.
Programming book.
*SYSVAL: The system determines the graphic char-
acter set and code page values for the command param-
Example
eters from the QCHRID system values. RPLDOC TODOC(\DOCID) DOCFILE(\LIBL/MYFILE)
DOCPART(\BOTH) DOCID('1987ð6ð71ð1ð2ð53SYSTEM1')
*DEVD: The system determines the graphic character DOCTYPE(\FFT)
set and code page values for the command parameter
from the display device description where the command This command replaces the document data and IDP with
is entered. This option is valid only when specified from data in the file MYFILE. The data is placed in the document
an interactive job. If this value is specified in an interac- identified by the document identifier
'1987060710102053SYSTEM1'. The document type is
changed to Final Form Text.

Chapter 2. OS/400 Command Descriptions P3-819


RQSORDAST

RQSORDAST (Request Order Assistance) Command


Job: I Pgm: I

55──RQSORDAST──────────────────────────────────────────────────────────────────────────────────────────────────────────────────5%

Purpose Ÿ Software configuration information (installed IBM


program products)
The Request Order Assistance (RQSORDAST) command
sends a request to IBM for order assistance. You can The order information file is sent with all requests.
request assistance in ordering services and products
including: Restrictions:

Ÿ Software upgrades 1. This command is shipped with public *EXCLUDE


authority.
Ÿ Hardware upgrades 2. You must have *ALLOBJ authority or be signed on as
Ÿ AS/400 publications QSYSOPR or QSRV to use the command.
Ÿ Service offerings There are no parameters for this command.
Ÿ General help (for example, network planning)

When the RQSORDAST command is successfully pro- Example


cessed, a file containing the order information is created and RQSORDAST
sent along with the order assistance request. This file con-
tains: This command displays the Request Order Assistance entry
panel.
Ÿ Hardware configuration information (vital product data
(VPD) and topology data)

P3-820 OS/400 CL Reference - Part 2 (Full Version)


RRTJOB

RRTJOB (Reroute Job) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──────────────────────────────────────────5%
55──RRTJOB──┬────────────────────────────────┬──┬────────────────────────────────┬───
│ ┌─QCMDI──────────┐ │ │ ┌─\NONE──────────┐ │
└─RTGDTA(──┼─\RQSDTA────────┼──)─┘ └─RQSDTA(──┼─\RTGDTA────────┼──)─┘
└─'routing-data'─┘ └─'request-data'─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose IBM-supplied control language processor, QCMD, in the


QSYS library.
The Reroute Job (RRTJOB) command starts a new routing
*RQSDTA: The first 80 characters of the request data
step for a job in the current subsystem. For example, the job
specified in the RQSDTA parameter of this command is
may need rerouting so that it runs under a different class or
also used as the routing data for the next routing step.
in a different storage pool. The rerouting requires changes in
the routing data for the job, and calls a different program 'routing-data': Specify the character string used as the
used with the new routing step. routing data for starting the next routing step. Up to 80
characters can be entered, enclosed in apostrophes if
When this command is used, objects allocated in the pre- necessary.
vious routing step are deallocated and open files are closed.
If the objects or files are needed in the new routing step, RQSDTA
they must be allocated or opened again. Specifies the request data that is added on the end of
the job's message queue for use by the new routing
Note: Running of this command in a batch job causes loss step. For example, if RTGDTA (QCMDB) is specified,
of spooled inline files because they cannot be the IBM-supplied batch subsystem QBATCH is being
accessed in the new routing step. Also, if the used, and a CL command is supplied, it becomes a
RRTJOB command is run while the system is ending message that is read by the control language processor,
(by running of a End System (ENDSBS) command, QCMD (if the submitted job is routed to QCMD).
End System (ENDSYS) command, or the Power
Down System (PWRDWNSYS) command), a new *NONE: Request data is not placed in the job's
routing step is not started and the job is ended. message queue.

Restriction: The job must not be a group job. *RTGDTA: Routing data specified in the RTGDTA
parameter is also placed at the end of the job's message
Note: To see the parameter and value descriptions for this queue.
command, refer to the online help text. For more
information about printing the help text, refer to 'request-data': Specify the character string placed at the
“Printing CL Command Descriptions” in Chapter 1. end of the job's message queue for use by the new
routing step or some subsequent routing step in the job.
Up to 256 characters can be entered, enclosed in apos-
Optional Parameters trophes if necessary. When a CL command is entered,
it must be enclosed in single apostrophes, and where
RTGDTA
apostrophes would normally be used inside the
Specifies the routing data used with this job description
command, double apostrophes must be used.
to start jobs. The routing data is used to determine the
routing entry (in the subsystem description) that identi-
fies the program in which the job runs. Example
QCMDI: This routing data matches a routing entry in RRTJOB RTGDTA(INQUIRY)
the IBM-supplied subsystem description (QINTER),
which indicates a routing step that is processed by the This command reroutes the job in which the command is
issued by starting a new routing step with the routing data
INQUIRY. The job remains in the same subsystem.

Chapter 2. OS/400 Command Descriptions P3-821


RSMBKP

RSMBKP (Resume Breakpoint) Command


Job: I Pgm: I REXX: I Exec

55──RSMBKP─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────5%

Purpose Restriction: This command is valid only for programs in the


debug mode and only when the program is stopped at a
The Resume Breakpoint (RSMBKP) command causes a user-defined breakpoint. That is, this command is not valid
program to continue processing after it has been stopped at at a breakpoint caused by an unmonitored message. To
a breakpoint. The program that continues is the one that start the debug mode, use the STRDBG (Start Debug)
most recently stopped at a breakpoint. When more than one command.
program in the job is stopped at a breakpoint, the End
Request (ENDRQS) command can be used to return to the There are no parameters for this command.
Command Entry Display for a previous program call that is
also stopped at a breakpoint.
Example
If you are servicing another job, and it has not ended, this RSMBKP
command resumes that job from the breakpoint. It also
returns the servicing job to the point immediately preceding Assuming that the program having control is stopped at a
where the breakpoint display was shown. breakpoint, this command causes the program to continue
processing, starting from the breakpoint location.

P3-822 OS/400 CL Reference - Part 2 (Full Version)


RSMCTLRCY

RSMCTLRCY (Resume Controller Recovery) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ────────────────────────────────────────────────────────────────────────────────────5%
55──RSMCTLRCY──CTL(──controller-name──)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose CTL
Specifies the controller whose recovery is started again.
The Resume Controller Recovery (RSMCTLRCY) command Valid types of controllers are:
resumes error recovery procedures for a specific controller.
The error recovery procedures can be ended by the End CTL Value Controller
Controller Recovery (ENDCTLRCY) command or by 5251 Display station
responding to a failure-related inquiry message with a cancel *PU2 Physical unit (type 2); SDLCs for basic BSC
option. and RJE
*BSC BSC device (basic BSC and RJE)
The RSMCTLRCY command allows the user to resume auto- *BSCT BSC device (Multipoint tributary and 3270
matic error recovery procedures after they have been Device Emulation)
stopped, and to reactivate a controller after it has been can- *APPC Advanced program-to-program communica-
celed (if the C response was entered to the inquiry message tions
associated with a controller failure). When the controller is *WSC Local work station
canceled with the C response, all jobs are ended; once the *WSCE Local work station (extended)
controller is repaired and the RSMCTLRCY command is
Specify the name of the controller (as specified in the
entered, jobs are allowed to start using the controller again.
controller description) for which error recovery proce-
Restriction: To use this command, the user must have dures are to resume.
object operational authority for the controller.
Note: To see the parameter and value descriptions for this Example
command, refer to the online help text. For more RSMCTLRCY CTL(TROLL3)
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. This command resumes error recovery procedures for the
controller TROLL3.

Required Parameters

Chapter 2. OS/400 Command Descriptions P3-823


RSMDEVRCY

RSMDEVRCY (Resume Device Recovery) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ────────────────────────────────────────────────────────────────────────────────────────5%
55──RSMDEVRCY──DEV(──device-name──)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose DEV
Specifies the device whose recovery is started again.
The Resume Device Recovery (RSMDEVRCY) command Valid types of devices are:
resumes error recovery procedures for a specific device.
The error recovery procedures are ended by the DEV Type Device
ENDDEVRCY command or by responding to a failure-related 5219 Printer (work station)
inquiry message with a cancel option. 5224 Printer (work station)
5225 Printer (work station)
The RSMDEVRCY command allows you to resume auto- 5251 Display station
matic error recovery procedures after they have been 5252 Dual display station
stopped, and to reactivate a device after it has been can- 5256 Printer (work station)
celed (if you entered the C response to the inquiry message 5291 Display station
associated with a device failure). When the device is can- 5292 Display station
celed with the C response, all jobs are ended; once the *PLU1 Physical unit (type 1)
device is repaired and the RSMDEVRCY command is *BSC BSC device
entered, jobs are allowed to start using the device again. *BSCT BSC multipoint tributary
*APPC Advanced program-to-program communica-
Restriction: To use this command, you must have object tions
operational authority for the device.
Specify the name of the device (as specified in the
Note: To see the parameter and value descriptions for this device description) for which error recovery procedures
command, refer to the online help text. For more are to resume.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1.
Example
RSMDEVRCY DEV(WSPRð3)
Required Parameters
This command resumes error recovery procedures for the
device WSPR03 to resume.

P3-824 OS/400 CL Reference - Part 2 (Full Version)


RSMLINRCY

RSMLINRCY (Resume Line Recovery) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─────────────────────────────────────────────────────────────────────────────────────────5%
55──RSMLINRCY──LINE(──line-name──)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Restriction: To use this command, the user must have


object operational authority for the line.
The Resume Line Recovery (RSMLINRCY) command
Note: To see the parameter and value descriptions for this
resumes error recovery procedures for a specific line. The
command, refer to the online help text. For more
error recovery procedures are ended by the End Line
information about printing the help text, refer to
Recovery (ENDLINRCY) command or by responding to a
“Printing CL Command Descriptions” in Chapter 1.
failure-related inquiry message with a cancel option.

The RSMLINRCY command allows the user to resume auto- Required Parameters
matic error recovery procedures after they stop, and to reac-
tivate a line after it is canceled (if the C response was LINE
entered to the inquiry message associated with a line failure). Specifies the line whose recovery is started again.
When the line is canceled with the C response, all jobs are
ended; once the line is repaired and the RSMLINRCY
Example
command is entered, jobs are allowed to start using the line
again. RSMLINRCY LINE(NYC2)

This command resumes error recovery procedures for the


line NYC2 to resume.

Chapter 2. OS/400 Command Descriptions P3-825


RSMNWIRCY

RSMNWIRCY (Resume Network Interface Recovery) Command


Job: B,I Pgm: B,I Exec

(P) ────────────────────────────────────────────────────────────5%
55──RSMNWIRCY──NWID(────network-interface-description-name────)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose information about printing the help text, refer to


“Printing CL Command Descriptions” in Chapter 1.
The Resume Network Interface Recovery (RSMNWIRCY)
command is used to resume error recovery procedures for a
network interface description. Error recovery procedures are Required Parameters
ended by the End Network Interface Recovery NWID
(ENDNWIRCY) command or by responding to a failure- Specifies the name of the network interface description
related inquiry message with a cancel option. This command whose automatic error recovery is restarted.
is used to resume automatic error recovery procedures after
they stop, and to reactivate a network interface description
(and jobs using that description) after it is canceled. Example
Note: To see the parameter and value descriptions for this RSMNWIRCY NWID(ISDNNET)
command, refer to the online help text. For more
This command resumes error recovery procedures for the
network interface description named ISDNNET.

P3-826 OS/400 CL Reference - Part 2 (Full Version)


RST

RST (Restore) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──RST──DEV(──┬─'save-file-path-name'─────────────────┬──)─────────────────────────────────────────────────────────────────────5
├─'diskette-device-path-name'───────────┤
├─'optical-device-path-name'────────────┤
├─'tape-media-library-device-path-name'─┤
│ ┌──
───────────────────────────┐ │
└──6──'tape-device-path-name'──┴───
(1) ──────┘

(P) ──┬────────────────────────┬─────────5
5──┬───────────────────────────────────────────────────────────────────────────────────┬───
│ ┌──
───────────────────────────────────────────────────────────────────┐ │ │ ┌─\ALL──┐ │
│ │ ┌─'\'──────────────────┐ ┌─\INCLUDE─┐ ┌─\SAME───────────┐ │ │ └─SUBTREE(──┼─\DIR──┼──)─┘
6 (2) (3)
└─OBJ(────(──┴─'object-path-name'───┴──┼──────────┼──┼─────────────────┼──)─┴─────)─┘ ├─\NONE─┤
└─\OMIT────┘ └─'new-path-name'─┘ └─\OBJ──┘
5──┬──────────────────────┬──┬──────────────────────────────┬──┬──────────────────────────────┬──┬──────────────────────┬───────5
│ ┌─\LCL─┐ │ └─SAVDATE(──date-when-saved──)─┘ └─SAVTIME(──time-when-saved──)─┘ │ ┌─\ALL─┐ │
└─SYSTEM(──┼─\RMT─┼──)─┘ └─OPTION(──┼─\NEW─┼──)─┘
└─\ALL─┘ └─\OLD─┘
5──┬────────────────────────────────────┬──┬───────────────────────────────────┬──┬──────────────────────────┬──────────────────5
│ ┌─\NONE───────────┐ │ │ ┌─\SYSVAL────────┐ │ │ ┌─\SAVED─┐ │
└─ALWOBJDIF(──┼─\ALL────────────┼──)─┘ └─FRCOBJCVN(──┼─\NO────────────┼──)─┘ └─SOMOBJID(──┴─\SYS───┴──)─┘
│ ┌──
──────────┐ │ │ ┌─\RQD─┐ │
└──6┬─\OWNER─┬┴───
(4) ─┘ └─\YES──┴─\ALL─┴─┘
└─\AUTL──┘
5──┬─────────────────────────────────────────┬──┬─────────────────────────────────────────┬─────────────────────────────────────5
│ (5) ────────────────┐
┌─\MOUNTED─── │ │ ┌─\SEARCH──────────────────┐ │
│ │ ┌──
─────────────────────┐ │ │ └─LABEL(──┼─diskette-file-identifier─┼──)─┘
6 (6)
└─VOL(──┴────volume-identifier──┴────┴──)─┘ └─tape-file-identifier─────┘
5──┬─────────────────────────────────┬──┬─────────────────────────┬──┬─────────────────────────────────────────┬────────────────5
│ ┌─\SEARCH─────────┐ │ │ ┌─\REWIND─┐ (7) ─'optical-file-path-name'──)─┘
│ └─OPTFILE(───
└─SEQNBR(──┴─sequence-number─┴──)─┘ └─ENDOPT(──┼─\LEAVE──┼──)─┘
└─\UNLOAD─┘
5──┬─────────────────────────────────────────┬──┬───────────────────────────┬──────────────────────────────────────────────────5%
│ ┌─\NONE───────────────────┐ │ │ ┌─\ALL─────┐ │
└─OUTPUT(──┼─\PRINT──────────────────┼──)─┘ └─INFTYPE(──┼─\ERR─────┼──)─┘
├─'user-space-path-name'──┤ └─\SUMMARY─┘
└─'stream-file-path-name'─┘
Notes:
1 A maximum of 4 repetitions.

2 You can specify a pattern for this path name.

3 A maximum of 300 repetitions.

4 A maximum of 2 repetitions.

5 This value cannot be specified when using an optical media library device.

6 A maximum of 75 repetitions.

7 This parameter is required when an optical device name is specified.

P All parameters preceding this point can be specified in positional form.

Purpose Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more
The Restore (RST) command restores a copy of one or more information about printing the help text, refer to
objects that can be used in the integrated file system. “Printing CL Command Descriptions” in Chapter 1.

For more information about integrated file system commands,


see the Integrated File System Introduction book. Required Parameter
Restrictions: This command is shipped with public DEV
*EXCLUDE authority. Specifies the path name of the device from which the
objects are restored. For more information on specifying
For detailed restrictions on using this command to restore path names, refer to Chapter 2, “Path Names
objects in libraries or to restore document library objects, see (*PNAME).”
the Backup and Recovery book. 'save-file-path-name': Specify the path name of the save
file used to restore the objects.

Chapter 2. OS/400 Command Descriptions P3-827


RST

'diskette-device-path-name': Specify the path name of *SAME: The objects are to be restored with the same
the diskette device used to restore the objects. names they had when they were saved.
'optical-device-path-name': Specify the path name of the 'new-path-name': Specify the path name with which to
optical device used to restore the objects. restore the object. If a pattern is specified in element 1,
the new name must be an existing directory into which
'tape-media-library-device-path-name': Specify the path
to restore any objects that match the pattern. If an
name of the tape media library device used to restore
object name is specified in element 1, each component
the objects.
in the new path name must exist with the exception of
'tape-device-path-name': Specify the path name of the the last component. If the object described in the last
tape device used to restore the objects. A maximum of component doesn't exist, it will be restored as new.
four tape devices can be specified.
SUBTREE
Specifies whether directory subtrees are included in the
Optional Parameters restore operation.
OBJ *ALL: The entire subtree of each directory that matches
Specifies the path name of the object to restore. You the object name pattern is processed. The subtree
can specify a pattern for this path name. A maximum of includes all subdirectories and the objects within those
300 path names can be specified. For more information subdirectories.
on specifying path names, refer to Chapter 2, “Path
*DIR: The objects in the first level of each directory that
Names (*PNAME).”
matches the object name pattern are processed. The
Additional information about name patterns is in the Inte- subdirectories of each matching directory are included,
grated File System Introduction book. but the objects in the subdirectories are not included.
Element 1: Object Name *NONE: No subtrees are included in the restore opera-
The first element specifies the path names of the objects tion. If a directory matches the object name pattern
saved on the media. Directory abbreviations (for specified, the objects in the directory are included. If the
example, the current directory) are expanded with their directory has subdirectories, neither the subdirectories
current values, not with the values they had at the time nor the objects in the subdirectories are included.
of the save operation. *OBJ: Only the objects that match the object name
'*': The objects in the current directory are restored. pattern are processed. If the object name pattern speci-
fies a directory, objects in the directory are not included.
'object-path-name': Specify an object path name or a
pattern that can match many names. If the default is SYSTEM
specified in element 3, each component in the path Specifies whether to process objects that exist on the
name must exist with the exception of the last compo- local system or remote systems.
nent. The object name in the last component is restored *LCL: Only local objects are processed.
as new if it doesn't exist.
*RMT: Only remote objects are processed.
Element 2: Include or Omit
*ALL: Both local and remote objects are processed.
The second element specifies whether names that
match the pattern should be included or omitted from the SAVDATE
operation. Note that in determining whether a name Specifies the date the objects were saved. If the most
matches a pattern, relative name patterns are always recently saved version is not the one being restored, or
treated as relative to the current working directory. if multiple saved versions reside on the media, specify
the date that identifies which version of the objects to
Note: The SUBTREE parameter determines whether
restore. If this parameter is not specified, the restored
the subtrees are included or omitted.
version of the objects is the first version found.
*INCLUDE: The objects that match the object name
The date must be specified in the job date format. If
pattern are restored, unless overridden by an *OMIT
separators, specified by the system value QDATSEP,
specification.
are used, the value must be enclosed in apostrophes.
*OMIT: The objects that match the object name pattern
are not restored. This overrides an *INCLUDE specifica- SAVTIME
tion and is intended to be used to omit a subset of a Specifies the time the objects were saved. If this param-
previously selected pattern. eter is not specified, the version of the objects to be
restored is the first version found on the volume.
Element 3: New Path Name
The time is specified in 24-hour format with or without a
The third element specifies the new path name of the time separator as follows:
object.
Ÿ With a time separator, specify a string of 5 or 8
digits, where the time separator for the job sepa-

P3-828 OS/400 CL Reference - Part 2 (Full Version)


RST

rates the hours, minutes, and seconds. If you issue *AUTL: The system of an object with an authorization
this command from the command line, the string list can be different. The new object, which is being
must be enclosed in apostrophes. If a time sepa- restored to a system that is different from which it was
rator other than the separator specified for your job saved, is restored and linked to its authorization list. If
is used, this command fails. the system of an object with an authorization list cannot
be different, the object is restored but not linked to an
Ÿ Without a time separator, specify a string of 4 or 6
authorization list.
digits (hhmm or hhmmss) where hh = hours, mm =
minutes, and ss = seconds. Valid values for hh FRCOBJCVN
range from 00 through 23. Valid values for mm and Specifies whether to convert user objects to the format
ss range from 00 through 59. required for use in the current version of the operating
system when the objects are restored.
Notes:
Notes:
1. This parameter is valid only if the SAVDATE param-
1. This parameter applies only to user objects of the
eter is specified.
*MODULE, *PGM, *SRVPGM, and *SQLPKG object
2. This parameter is ignored when the SEQNBR types.
parameter is specified.
2. An object must be observable (have the required
OPTION observable information) in order to be converted.
Specifies whether to restore objects that already exist on
3. If an object needs to be converted (because it is for-
the system or objects that do not already exist on the
matted for an earlier version of the operating
system.
system), but is not converted during this restore
*ALL: All of the specified objects are restored, whether operation, the object is automatically converted the
they already exist on the system or not. first time it is used.
*NEW: Objects are restored only if they do not already Element 1: Force Conversion
exist on the system.
*SYSVAL: The objects are converted based on the
*OLD: Objects are restored only if they already exist on value of the QFRCCVNRST system value.
the system.
Note: If this value is specified and the system value
ALWOBJDIF QFRCCVNRST has a value of "1," the restore
Specifies whether differences are allowed between the operation proceeds as if FRCOBJCVN(*YES
saved object and the restored object. The differences *RQD) is specified. If QFRCCVNRST has a
include: value of "0", the restore operation proceeds as if
FRCOBJCVN(*NO) is specified.
Ÿ Ownership: The owner of an object on the system
is different than the owner of an object from the *NO: The objects are not converted during the restore
save operation. operation.

Ÿ Authorization list linking: The system on which an *YES: The objects are converted during the restore
object with an authorization list is being restored is operation.
different from the system on which it was saved. Note: Specifying this value increases the time of the
restore operation, but avoids the need to convert
*NONE: No differences are allowed between the saved
the objects when they are first used.
object and the restored object. If the owner is different,
the object is not restored. If the system is different for Element 2: Objects to Convert
an object with an authorization list, the object is restored,
*RQD: The objects are converted only if they require
but the object is not linked to its authorization list.
conversion to be used by the current operating system.
*ALL: All differences are allowed between the saved If the objects are not observable, the objects are
object and the restored object. If the owner is different, restored but are not converted.
the object is restored with the owner of the system on
*ALL: All objects are converted regardless of their
which it is restored. If the system is different for an
current format. Even the objects are in the current
object with an authorization list, the object is restored
format, they are converted again. However, if the
and linked to its authorization list.
objects are not observable, the objects are not restored.
*OWNER: The object owner can be different. If an
SOMOBJID
object already exists on the system with a different
Specifies whether the SOM object ID of the restored
owner than the saved object, the object is restored with
object will be the SOM object ID of the object from the
the owner of the object on the system. If owner differ-
save media, the SOM object ID of the object that exists
ences are not allowed, the object is not restored.
on the system prior to the restore, or a new SOM object

Chapter 2. OS/400 Command Descriptions P3-829


RST

ID generated by the system if the object does not exist ENDOPT


on the system prior to the restore. Specifies the operation that is automatically performed
on the tape volume after the operation ends. If more
*SAVED: The restored object will have the SOM object
than one volume is included, this parameter applies only
ID it had when it was saved.
to the last tape volume used; all other tape volumes are
*SYS: The restored object may have a new SOM object rewound and unloaded when the end of the tape is
ID generated by the system. If the object is being reached.
restored as a new object, a new SOM object ID will be
*REWIND: The tape is automatically rewound, but not
given to the restored object. If an object with the same
unloaded, after the operation has ended.
name as the object from the media already exists on the
system, the SOM object ID of the restored object will be *LEAVE: The tape does not rewind or unload after the
the same as the SOM object ID of the object on the operation ends. It remains at the current position on the
system before the restore. tape drive.

VOL *UNLOAD: The tape is automatically rewound and


Specifies the volume identifiers of the media from which unloaded after the operation ends.
the objects are restored. The volumes must be in the
OPTFILE
same order as they were when the data was saved. A
Specifies the path name of the optical file that is used
maximum of 75 volume identifiers can be specified.
for the restore operation, beginning with the root direc-
After all specified volumes are used, the restore opera-
tory of the volume. For more information on specifying
tion continues on whatever volumes are placed in the
path names, refer to Chapter 2, “Path Names
device. More information on this parameter is in
(*PNAME).”
Appendix A, “Expanded Parameter Descriptions.”
Note: This parameter is required when using an optical
Note: The version of the object that is restored is the
device.
first version found in the specified location,
unless a specific version is identified by the OUTPUT
values on the SAVDATE and SAVTIME parame- Specifies whether a list of information about the restored
ters. objects is created. The information can be directed to a
spooled file, a stream file, or a user space.
*MOUNTED: The objects are restored from the volumes
placed in the device specified on the DEV parameter. A stream file or user space is specified as a path name.
For a media library device, the volume to be used is the For more information on specifying path names, refer to
next cartridge in the category mounted by the Set Tape Chapter 2, “Path Names (*PNAME).”
Category (SETTAPCGY) command.
*NONE: No output is created.
Note: This value cannot be specified when using an
*PRINT: Output information about the restore will be
optical media library device.
printed.
volume-identifier: Specify the identifiers of one or more 'stream-file-path-name': Specify the path name of the
volumes used to restore the objects.
existing stream file to which the output of the command
LABEL is directed.
Specifies the file identifier of the media to be used for 'user-space-path-name': Specify the path name of the
the restore operation. existing user space to which the output of the command
*SEARCH: The file label for which to search is deter- is directed.
mined by the system.
INFTYPE
diskette-file-identifier: Specify the identifier (up to 17 Specifies the type of information which is directed to the
characters) of the diskette file used for the restore oper- spooled file, stream file, or user space.
ation.
*ALL: The file will contain information about the
tape-file-identifier: Specify the identifier (up to 17 char- command, an entry for each directory, an entry for each
acters) of the tape file used for the restore operation. object that was successfully restored, and an entry for
each object that was not successfully restored.
SEQNBR
Specifies the tape file sequence number to be used. *ERR: The file will contain information about the
command, an entry for each directory, and an entry for
*SEARCH: The tape volume is searched for the next
each object that was not successfully restored.
file that contains any of the specified objects.
*SUMMARY: The file will contain information about the
| sequence-number: Specify the sequence number of the command, and an entry for each directory.
| file. Valid values range from 1 through 16777215.

P3-830 OS/400 CL Reference - Part 2 (Full Version)


RST

Examples Example 6: Omitting Objects


RST DEV('/QSYS.LIB/TAPð1.DEVD')
Example 1: Restoring All Data Not in Libraries or Docu- OBJ(('\') ('\\.BACKUP' \OMIT) ('\\.TEMP' \OMIT))
ment Library Objects
RST DEV('/QSYS.LIB/TAPð1.DEVD') This command restores all objects in the current directory
OBJ(('/\') ('/QSYS.LIB' \OMIT) ('/QDLS' \OMIT)) except those with extensions of .BACKUP and .TEMP (the
entire subtrees of directories with these extensions are
This command restores all objects that are not in libraries omitted).
and are not document library objects.
Example 7: Renaming or Moving Objects
Example 2: Restoring a Library RST DEV('/QSYS.LIB/TAPð1.DEVD')
RST DEV('/QSYS.LIB/TAPð1.DEVD') OBJ(('MYDIR/X.PGM' \INCLUDE 'YOURDIR/Y.PGM'))
OBJ('/QSYS.LIB/A.LIB')
This command restores the program X from the directory
This command restores the library A from the tape device MYDIR as the program Y in the directory YOURDIR.
named TAP01. RST DEV('/QSYS.LIB/TAPð1.DEVD')
OBJ(('MYDIR/\.PGM' \INCLUDE 'YOURDIR'))
Example 3: Restoring All Files in MYLIB SUBTREE(\OBJ)
RST DEV('/QSYS.LIB/TAPð1.DEVD')
OBJ('/QSYS.LIB/MYLIB.LIB/\.FILE') This command restores all programs in the directory MYDIR
to the directory YOURDIR.
This command restores all files in the library MYLIB from the
tape device named TAP01. Example 8: Restoring From a Save File
RST DEV('/QSYS.LIB/MYLIB.LIB/MYSAVF.FILE')
Example 4: Restoring Everything Saved from the Home OBJ(MYDIR)
Directory
RST DEV('/QSYS.LIB/TAPð1.DEVD') OBJ('˜') This command restores the directory MYDIR from a save file
named MYSAVF in a library named MYLIB.
This command restores everything saved in the user's home
directory from the tape device named TAP01. Example 9: Using Symbolic Links

Example 5: Restoring All Objects in the Current Direc- Assume the current directory contains the following symbolic
tory links.
RST DEV('/QSYS.LIB/TAPð1.DEVD') DevLink = /QSYS.LIB/TAP01.DEVD
DirLink = /SomeDirectory
This command uses the default value on the OBJ parameter FileLink = /SomeDirectory/SomeFile
to restore all objects in the current directory and its subdirec-
tories. Symbolic links can be used to specify the device and output
file. When symbolic links are restored, only the names of the
RST DEV('/QSYS.LIB/TAPð1.DEVD') OBJ('\')
SUBTREE(\NONE) associated objects are restored, not the content of the asso-
ciated objects. A symbolic link to a directory can be used to
This command restores all objects in the current directory but restore objects in the directory. Additional information about
not in subdirectories. symbolic link is in the Integrated File System Introduction
book. To restore the names associated with DirLink and
RST DEV('/QSYS.LIB/TAPð1.DEVD') OBJ('.')
SUBTREE(\DIR) FileLink from device TAP01:
RST DEV('DevLink') OBJ(('DirLink') ('FileLink'))
This command restores the current directory and all of the
To restore the objects in SomeDirectory from device TAP01:
objects in the current directory. It does not restore objects in
the subdirectories of the current directory. RST DEV('DevLink') OBJ(('DirLink/\'))

Chapter 2. OS/400 Command Descriptions P3-831


RSTAUT

RSTAUT (Restore Authority) Command


Job: I Pgm: I REXX: I Exec

55──RSTAUT──┬───────────────────────────────────────────────────────┬─── (P) ───────────────────────────────────────────────────────5%


│ ┌─\ALL──────────────────────────────────┐ │
│ │ ┌──
────────────────────────────────┐ │ │
└─USRPRF(──┴──6─┬─generic\-user-profile-name─┬─┴───
(1) ─┴──)─┘
└─user-profile-name──────────┘
Notes:
1 A maximum of 50 repetitions

P All parameters preceding this point can be specified in positional form.

Purpose Note: Steps 2 through 7 can be done more than once. For
example, after the user profiles are restored (step 2),
The Restore Authority (RSTAUT) command restores the the user can restore only critical application libraries
private authorities to user profiles. This command restores (step 3), followed by a restore of object authority
the same object use authority to specified objects in the user (step 7). This supplies an operational system limited
profile that each user profile had when all the profiles were to using only the critical libraries. Later, the
saved by the Save System (SAVSYS) or Save Security Data remaining user profiles can be restored, followed by
(SAVSECDTA) commands. It allows existing authorities, the operations to restore the libraries and object
given after the save, to remain. Authority is not restored to authority.
the user profiles until the profiles are first restored to the
system by the Restore User Profiles (RSTUSRPRF) If authorities for a user profile are restored using the
command and all the objects (for which authority is being RSTAUT command, the user profile must be restored
given) are restored to the same libraries where they are again before other authorities for it can be restored.
saved. The objects can be restored with the Restore Library
(RSTLIB) or Restore Object (RSTOBJ), Restore Document If one user profile is being restored, the following sequence
Library Object (RSTDLO), Restore Configuration (RSTCFG), must be followed. Using the RSTAUT command must be the
or Restore Objects in Directories (RST) commands. last step.
1. Restore the specified user profile to the system by using
If the whole system is being restored, the following sequence the RSTUSRPRF command.
must be followed. Using the RSTAUT command must be the
last step in the sequence. 2. Restore all the device configuration and SRM objects to
the system by using the RSTCFG command.
1. Restore the operating system. This is an alternative
method to load the program. This restores the QSYS 3. Restore the specified user libraries to the system by
library and ensures that the IBM-supplied user profiles using the RSTLIB command or the RSTOBJ command.
are there. If the user profile is being restored because the current
profile on the system is damaged, then the needed
2. Restore all the saved user profiles to the system (*ALL libraries already exist on the system and restoring of the
is the default for the USRPRF parameter) by using the libraries is not necessary.
RSTUSRPRF command.
4. Restore all document library objects to the system using
3. Restore all the configuration and system resource man- the RSTDLO command.
agement (SRM) objects to the system by using the
RSTCFG command. 5. Restore all objects in directories using the RST
command.
4. Restore all the user libraries (including the other
IBM-supplied libraries) by using the RSTLIB command. 6. Restore the object authority to the user profile by using
Unless saved with the *IBM or *ALLUSR parameter, the RSTAUT command. The specified profile may have
*NONSYS must be specified on the SAVLIB parameter been restored using the RSTUSRPRF command.
to restore all user libraries in one operation.
Restrictions:
5. Restore all document library objects to the system by
1. This command is shipped with public *EXCLUDE
using the RSTDLO command.
authority.
6. Restore all objects in directories using the RST
2. You must have *SAVSYS special authority to use this
command.
command.
7. Restore the object authority to user profiles by using the
3. Only one RSTAUT command can be run on a system at
RSTAUT command.
one time.

P3-832 OS/400 CL Reference - Part 2 (Full Version)


RSTAUT

Note: To see the parameter and value descriptions for this RSTUSRPRF USRPRF(USER1 USER2 USER3 USER4)
command, refer to the online help text. For more
information about printing the help text, refer to RSTLIB SAVLIB(USERLIB)
“Printing CL Command Descriptions” in Chapter 1.
RSTAUT USRPRF(USER1 USER2 USER3)

Optional Parameter To each specified user profile that was successfully restored,
this command restores the authority to use each object that
USRPRF the profile had at the time the system was saved. The user
Specifies the names of one or more user profiles whose profiles and the libraries and their objects must be restored
private authorities are being restored. The specified before the RSTAUT command is sent. Because USER4 was
user profiles must first be restored using the not specified in the RSTAUT command, its authorities are
RSTUSRPRF command. still available and may be restored at a later date.
*ALL: Private authorities are being restored for all of
the user profiles that are restored but do not have their Example 3
private authorities restored. This includes user profiles RSTUSRPRF USRPRF(\ALL)
that were restored using multiple RSTUSRPRF com-
mands. RSTLIB SAVLIB(USERLIBA)
generic*-user-profile-name: Specify the generic name of RSTLIB SAVLIB(USERLIBB)
the user profile. A generic name is a character string of
one or more characters followed by an asterisk (*); for RSTLIB SAVLIB(USERLIBC)
example, ABC*. The asterisk (*) substitutes for any valid
characters. For more information on the use of generic RSTAUT USRPRF(\ALL)
functions, refer to “Rules for Specifying Names.”
This command restores private authorities for all restored
user-profile-name: Specify one or more names of spe-
user profiles on the system. This includes authorities for all
cific user profiles. Both generic names and specific
user profiles restored by the RSTUSRPRF command. Other
names can be specified in the same command.
user profiles on the system that did not have their authorities
restored before these commands were specified are also
Examples restored by the RSTAUT(*ALL) command.

Example 1 Example 4
RSTAUT RSTUSRPRF USRPRF(USER1 USER2)

This command restores to each user profile the authority to RSTLIB SAVLIB(USERLIBA)
use each object that the profile had at the time when the
system was saved. The user profiles and the libraries and RSTUSRPRF USRPRF(USER1 USER3)
their objects must be restored before the RSTAUT command
is sent. RSTLIB SAVLIB(USERLIBB)

Example 2 RSTAUT USRPRF(\ALL)

This command restores private authorities for USER2 and


USER3 and for the most recent version of USER1. Because
the user profiles have the same name, the second
RSTUSRPRF command overlays the first version of USER1.

Chapter 2. OS/400 Command Descriptions P3-833


RSTCFG

RSTCFG (Restore Configuration) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──RSTCFG──OBJ(──┬─\ALL────────────────────────────┬──)──DEV(──┬─\SAVF──────────────────────────┬──)───────────────────────────5
├─\SRM────────────────────────────┤ ├─tape-media-library-device-name─┤
│ ┌──
──────────────────────────┐ │ │ ┌──
────────────────────┐ │
6 (1) ─┘
└───┬─generic\-object-name─┬─┴─── └──6─tape-device-name───
(2) ┴─────────┘
└─object-name──────────┘
5──┬───────────────────────────────────┬──┬───────────────────────────────────────┬─── (P) ──────────────────────────────────────────5
│ ┌─\ALL─────────────┐ │ │ ┌─\MOUNTED─────────────────┐ │
│ │ ┌──
───────────┐ │ │ │ │ ┌──
───────────────────┐ │ │
└─OBJTYPE(──┴──6─┬─\CFGL─┬─┴─── 6─volume-identifier─┴───
(3) ─┴──)─┘ └─VOL(──┴── (4) ─┴──)─┘
├─\CNNL─┤
├─\COSD─┤
├─\CTLD─┤
├─\DEVD─┤
├─\IPXD─┤
├─\LIND─┤
├─\MODD─┤
├─\NTBD─┤
├─\NWID─┤
└─\NWSD─┘
5──┬──────────────────────────────────────┬──┬─────────────────────────┬──┬────────────────────────────────────────────┬────────5
│ ┌─\SEARCH──────────────┐ │ │ ┌─\REWIND─┐ │ │ ┌─\LIBL────────┐ │
└─SEQNBR(──┴─file-sequence-number─┴──)─┘ └─ENDOPT(──┼─\LEAVE──┼──)─┘ └─SAVF(──┼──────────────┼──save-file-name──)─┘
└─\UNLOAD─┘ ├─\CURLIB──────┤
└─library-name─┘
5──┬────────────────────┬──┬──────────────────────────┬──┬──────────────────────────┬───────────────────────────────────────────5
│ ┌─\ALL──┐ │ │ ┌─\NONE─┐ │ │ ┌─\NONE────┐ │
└─SRM(──┼─\NONE─┼──)─┘ └─ALWOBJDIF(──┴─\ALL──┴──)─┘ └─OUTPUT(──┼─\PRINT───┼──)─┘
├─\HDW──┤ └─\OUTFILE─┘
└─\TRA──┘
5──┬──────────────────────────────────────────────────────┬──┬─────────────────────────────────────────────┬───────────────────5%
│ ┌─\LIBL/────────┐ │ │ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │
(5) ─┼───────────────┼──database-file-name──)─┘ └─OUTMBR(───
└─OUTFILE(─── (5) ─┴─member-name─┴──┼──────────┼──)─┘
├─\CURLIB/──────┤ └─\ADD─────┘
└─library-name/─┘
Notes:
1 A maximum of 300 repetitions

2 A maximum of 4 repetitions

3 A maximum of 8 repetitions

4 A maximum of 75 repetitions

5 This parameter is valid only if OUTPUT(*OUTFILE) is specified.

P All parameters preceding this point can be specified in positional form.

Purpose Restrictions:
1. To use this command, the user must have *SAVSYS
The Restore Configuration (RSTCFG) command restores to
authority, or object existence authority for (or be the
the system a configuration object that was saved by the
owner of) each object specified if the object already
Save System (SAVSYS) or Save Configuration (SAVCFG)
exists on the system.
command. The types of objects that can be restored by this
command are listed in the OBJTYPE parameter. 2. This command is shipped with public *EXCLUDE
authority.
The user profile of the system default owner (QDFTOWN)
3. The device configuration object must be varied off when
becomes the default owner of any objects being restored on
it is being restored. To vary off a device configuration
the system when the profile of the owner is not known to the
object, use the Vary Configuration (VRYCFG) command.
system.
4. With the exception of overrides for the output listing file,
If an object already exists, in the library to which the object is this command ignores all file overrides currently in effect
restored, the public and private authorities of the existing for the job.
object are kept. If the object does not exist in the library, all
5. System resource management (SRM) objects are not
public authorities are restored, but any private authorities
restored if the RSTCFG command is run using media
must be granted again.
that was created prior to V2R2M0.

P3-834 OS/400 CL Reference - Part 2 (Full Version)


RSTCFG

6. If the RSTCFG command and the SAVSYS or SAVCFG tape-media-library-device-name: Specify the name of
commands are not run on the same system, the config- the tape media library device used for the restore opera-
uration objects may not match the physical hardware on tion.
the target system.
tape-device-name: Specify the names of one or more
7. If you restore system resource management objects on tape devices used for the restore operation. If you are
a system other than the one on which the SAVSYS or using more than one tape device (up to a maximum of
SAVCFG command was saved, the system then treats four), specify the names of the devices in the order in
the target system hardware as new and creates all new which they are used.
resource names, making the existing configuration
The device name must already be known on the system
descriptions useless. If this occurs, you need to restore
by a device description. If using more than one tape
the correct system resource management database from
drive (up to four), specify the names of the drives in the
the most current SAVSYS or SAVCFG command for that
order they are used. If the objects are on more than
command. If neither of these is available, you must
one tape volume, the user may want to use more than
change existing configuration descriptions to reflect the
one tape drive, so that one tape volume can be rewound
new resource names.
and unloaded while another tape drive processes the
Note: To see the parameter and value descriptions for this next volume.
command, refer to the online help text. For more
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1.
Optional Parameters
OBJTYPE
Specifies the types of OS/400 system objects that are
Required Parameters
restored.
OBJ
*ALL: All device configuration object types that are
Specifies the names of one or more configuration
specified by name are restored. If *ALL is also specified
objects being restored.
on the OBJ parameter, all of the saved device configura-
System resource management (SRM) objects cannot be tion objects are restored.
restored individually or by specifying a generic name.
object-type: Specify the value for each of the types of
To restore only SRM objects, specify *SRM on the OBJ
objects that are being restored. The following types can
parameter and a value on the SRM parameter.
be specified:
*ALL: All the device configuration objects are restored,
*CFGL Configuration list
depending on the values specified for the OBJTYPE
*CNNL Connection list
parameter.
*COSD Class-of-service description
*SRM: The device configuration objects are not *CTLD Controller description
restored, but system resource management (SRM) *DEVD Device description
objects are restored based on the SRM parameter value. *IPXD Internet Packet Exchange description
generic*-object-name: Specify the generic name of the *LIND Line description
object. A generic name is a character string of one or *MODD Mode description
more characters followed by an asterisk (*); for example, *NTBD NetBIOS description
ABC*. The asterisk substitutes for any valid characters. *NWID Network interface description
A generic name specifies all objects with names that *NWSD Network server description
begin with the generic prefix, for which the user has
The object types shown are the ones saved in the
authority. If an asterisk is not included with the generic
device configuration media file by using the Save
(prefix) name, the system assumes it to be the complete
System (SAVSYS) or Save Configuration (SAVCFG)
object name. For more information on the use of
command.
generic functions, refer to “Rules for Specifying Names.”
Note: *SRMSPC are also saved, but not restored as an
object-name: Specify one or more names of specific object type. Specify *SRM on the OBJ param-
objects being restored. Both generic names and specific
eter to restore SRM data.
names can be specified in the same command. A
maximum of 300 object names can be specified. VOL
Specifies the volume identifiers of the tape volumes from
DEV
which the objects are being restored. The volumes must
Specifies the name of the tape device used to restore
be placed in the tape device in the same order as they
the objects.
were when the objects were saved. The volume that
*SAVF: The save file specified on the SAVF parameter contains the beginning of the file to be restored should
is used for the restore operation. be placed in the tape unit. More information on this
parameter is in Appendix A, “Expanded Parameter
Descriptions.”

Chapter 2. OS/400 Command Descriptions P3-835


RSTCFG

Note: The version of the objects that is restored is the *CURLIB: The current library for the job is
first version found in the specified location. searched. If no library is specified as the current
library for the job, the QGPL library is used.
*MOUNTED: The objects are restored from the volumes
placed in the device specified on the DEV parameter. library-name: Specify the name of the library to be
For a media library device, the volume to be used is the searched.
next cartridge in the category mounted by the Set Tape
Category (SETTAPCGY) command.
save-file-name: Specify the name of the save file.

Note: This value cannot be specified when using an SRM


optical media library device. Specifies the type of system resource management
(SRM) information to be restored. This parameter is
volume-identifier: Specify the identifiers of one or more valid only when *ALL or *SRM is specified on the OBJ
volumes in the order in which they are put on the device
parameter.
and used. Each volume identifier contains a maximum
of 6 alphanumeric characters. A blank is used as a sep- Attention:
arator character when listing multiple identifiers. You must specify SRM(*NONE), unless the system you
are restoring to has exactly the same hardware config-
SEQNBR
uration as the system that the original configuration was
Specifies which sequence number is used for the restore
saved on, to prevent the restore of the SRM information.
operation.
If the SRM information is restored on a system with a
*SEARCH: The volume placed in a device is searched different hardware configuration, the configuration
for a data file containing the saved device configuration objects may become unusable.
objects. When a match is found, the configuration
*ALL: All SRM information is restored.
objects are restored. If the last operation on the device
specifies ENDOPT(*LEAVE), the tape remains posi- *NONE: No SRM information is restored.
tioned at the location where the last operation ended.
*HDW: All hardware information is restored.
The file search starts with the first data file beyond the
current tape position. If ENDOPT(*LEAVE) was not *TRA: All token-ring adapter information is restored.
used for the last operation, or if the tape was manually
ALWOBJDIF
rewound after an ENDOPT(*LEAVE) operation, the
Specifies whether certain differences encountered during
search starts with the first data file on the volume.
a restore operation are allowed. There are two differ-
| file-sequence-number: Specify the sequence number of ences that apply to the RSTCFG command:
| the file. Valid values range from 1 through 16777215.
Ÿ The owner of the object on the system is not the
ENDOPT owner of the object from the save operation.
Specifies the operation that is automatically performed
Ÿ The object is secured by an authorization list and is
on the tape volume after the operation ends. If more
being restored to a system other than the one on
than one volume is included, this parameter applies only
which it was saved.
to the last tape volume used; all other tape volumes are
rewound and unloaded when the end of the tape is
Note: The user of this parameter must have *ALLOBJ
reached.
authority.
*REWIND: The tape is automatically rewound, but not
*NONE: The differences described above are not
unloaded, after the operation has ended.
allowed for the restore operation. For an ownership dif-
*LEAVE: The tape does not rewind or unload after the ference, the object is not restored. For an authorization
operation ends. It remains at the current position on the list difference, the object is restored, but the object is not
tape drive. linked to the authorization list, and public authority is set
to *EXCLUDE.
*UNLOAD: The tape is automatically rewound and
unloaded after the operation ends. *ALL: The differences described above are allowed for
the restore operation. The object is restored.
SAVF
Specifies the qualified name of the save file used to Notes:
restore the save data.
1. If the owners of the object do not match, the object
The name of the save file can be qualified by one of the is restored, but it retains the ownership and authori-
following library values: ties it had before the restore operation.

*LIBL: All libraries in the job's library list are 2. The informational message causes a diagnostic
searched until the first match is found. message to be sent indicating that security or integ-
rity changes occurred during the restore operation.
This results in an escape message for the restore
operation.

P3-836 OS/400 CL Reference - Part 2 (Full Version)


RSTCFG

3. If the user is restoring objects to a system other OUTMBR


than the one on which they were saved and the Specifies the name of the database file member to which
objects are secured by an authorization list, speci- the output is directed when OUTPUT(*OUTFILE) is
fying *ALL automatically relinks the objects to the specified.
authorization list. If the authorization list does not
Element 1: Member to Receive Output
exist on the new system, a message that includes
the name of the missing list is issued. *FIRST: The first member in the file receives the output.
If OUTMBR(*FIRST) is specified and the member does
OUTPUT not exist, the system creates a member with the name of
Specifies whether a listing that shows information about the file specified on the OUTFILE parameter.
the status of the object is created and directed to an
output file. The listing shows the restore information and
member-name: Specify the name of the file member
that receives the output. If OUTMBR(member-name) is
shows all objects, restored, not restored, and excluded.
specified and the member does not exist, the system
Information about each object's security is listed for the
creates it. If the member exists, the user can add
restored objects. More information on this parameter is
records to the end of the existing member or clear the
in Appendix A, “Expanded Parameter Descriptions.”
existing member and add the records.
*NONE: No output is created.
Element 2: Operation to Perform on Member
*PRINT: The output is printed with the job's spooled
*REPLACE: The existing records in the specified data-
output.
base file member are replaced by the new records.
*OUTFILE: The output is directed to the database file
*ADD: The new records are added to the existing infor-
specified on the OUTFILE parameter.
mation in the specified database file member.
Note: You must specify the database file name on the
OUTFILE parameter when OUTPUT(*OUTFILE)
is specified. Examples
OUTFILE Example 1: Restoring All Objects
Specifies the qualified name of the database file to RSTCFG OBJ(\ALL) DEV(TAPð1) OBJTYPE(\ALL)
which the information about the object is directed when
*OUTFILE is specified on the OUTPUT parameter. If This command restores all of the device configuration and
the file does not exist, this command creates a database SRM objects from the tape on the TAP01 drive.
file in the specified library. If a new file is created, the
system uses QASRRSTO in QSYS with the format name Example 2: Restoring a Device Description
QSRRST as a model. RSTCFG OBJ(PRTð1) DEV(TAPð1) OBJTYPE(\DEVD)
The name of the database file can be qualified by one of VOL(ABCD)
the following library values:
The device description for PRT01 that was saved on tape
*LIBL: All libraries in the job's library list are volume ABCD is restored to the system. If device
searched until the first match is found. description PRT01 already exists on the system, it must be
varied off before it can be restored.
*CURLIB: The current library for the job is
searched. If no library is specified as the current Example 3: Restoring a Network Server Description
library for the job, the QGPL library is used.
RSTCFG OBJ(SERVER1) DEV(TAPð1) OBJTYPE(\NWSD)
library-name: Specify the name of the library to be VOL(SAV1)
searched.
The network server description SERVER1 that was saved on
database-file-name: Specify the name of the database tape volume SAV1 is restored to the system. If the network
file to which the output of the command is directed. server description SERVER1 already exists on the system, it
must be varied off before it can be restored.

Chapter 2. OS/400 Command Descriptions P3-837


RSTDLO

RSTDLO (Restore Document Library Object) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ──────────────────────────────────5
55──RSTDLO──DLO(──┬─\ALL─────────────────┬──)──DEV(──┬─\SAVF──────────────────────────┬──)────
├─\MAIL────────────────┤ ├─diskette-device-name───────────┤
├─\SYSOBJNAM───────────┤ ├─optical-device-name────────────┤
│ ┌──
───────────────┐ │ ├─tape-media-library-device-name─┤
6 (1) ─┘
└───document-name─┴─── │ ┌──
──────────────────┐ │
└──6─tape-device-name─┴───
(2) ────────┘

5──┬──────────────────────────────────────────┬──┬──────────────────────────────────────────┬───────────────────────────────────5
│ ┌─\ANY─────────────────────┐ │ │ ┌─\SAME────────────────────┐ │
(3) ─────────────────┼──)─┘ │
└─SAVFLR(──┼─\NONE─── │ ┌──
───────────────────┐ │ │
│ ┌──
───────────────────┐ │ 6 (1)
└─RENAME(──┴───new-document-name─┴────┴──)─┘
└──6─saved-folder-name─┴───(1) ─┘

5──┬───────────────────────────────────────┬──┬──────────────────────────────────────────────┬──────────────────────────────────5
│ ┌─\SAME─────────────────┐ │ │ ┌─\NONE─────────────────────┐ │
(4) ┴──)─┘ │
└─RSTFLR(──┴─restore-folder-name─── │ ┌──
────────────────────┐ │ │
6 (1)
└─SYSOBJNAM(──┴───system-object-name─┴────┴──)─┘
5──┬───────────────────────────────────────┬──┬───────────────────────────────────────────────────────────────────────────┬─────5
│ (5) ──────────────┐
┌─\MOUNTED─── │ │ ┌─\SEARCH───────────────────────────────────────────────┐ │
│ │ ┌──
───────────────────┐ │ │ │ │ ┌─\ONLY──────────────────┐ │ │
└─VOL(──┴──6─volume-identifier─┴───(6) ─┴──)─┘ └─SEQNBR(─────
(7, 8) ─┴─beginning-sequence-number──┼────────────────────────┼─┴──)─┘
└─ending-sequence-number─┘
5──┬───────────────────────────┬──┬─────────────────────────────────────┬──┬─────────────────────────────────────────────┬──────5
│ ┌─\REWIND─┐ │ │ ┌─\GEN─────────────────┐ │ │ ┌─\LIBL/────────┐ │
(8) ─┼─\LEAVE──┼──)─┘ └─LABEL(──┴─data-file-identifier─┴──)─┘ └─SAVF(──┼───────────────┼──save-file-name──)─┘
└─ENDOPT(───
└─\UNLOAD─┘ ├─\CURLIB/──────┤
└─library-name/─┘
5──┬───────────────────────┬──┬──────────────────────────────┬──┬──────────────────────────────┬────────────────────────────────5
│ ┌─\SAME─┐ │ └─SAVDATE(──date-when-saved──)─┘ └─SAVTIME(──time-when-saved──)─┘
└─NEWOBJ(──┴─\NEW──┴──)─┘
5──┬──────────────────────────┬──┬──────────────────────────┬──┬────────────────────────────┬──┬──────────────────────────┬─────5
│ ┌─\NONE─┐ │ │ ┌─\ANY─────┐ │ │ (10) ┐
┌─\SAVASP──── │ │ ┌─\NONE────┐ │
(9) ┴──)─┘ └─RSTASP(──┴─ASP-ID─────┴──)─┘ └─OUTPUT(──┼─\PRINT───┼──)─┘
└─ALWOBJDIF(──┴─\ALL──┴──)─┘ └─SAVASP(──┴─ASP-ID───
└─\OUTFILE─┘
5──┬───────────────────────────────────────────────────────┬──┬──────────────────────────────────────────────┬──────────────────5
│ ┌─\LIBL/────────┐ │ │ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │
(11) ─┼───────────────┼──database-file-name──)─┘ └─OUTMBR(────
└─OUTFILE(──── (11) ─┴─member-name─┴──┼──────────┼──)─┘
├─\CURLIB/──────┤ └─\ADD─────┘
└─library-name/─┘
5──┬──────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────5%
(12) ─'optical-file-path-name'──)─┘
└─OPTFILE(────
Notes:
1 A maximum of 300 repetitions

2 A maximum of 4 repetitions

3 *NONE is valid only when DLO(*ALL) is specified.

4 This value is not valid when DLO(*SYSOBJNAM) is specified.

5 This value cannot be specified when using an optical media library device.

6 A maximum of 75 repetitions

7 For restore from diskette, or if SEQNBR(*SEARCH) is used to restore from tape, only the first file on diskette or tape that

contains saved documents is restored.


8 Applies to tape devices only

9 This value is not valid when a user-defined value is specified on the LABEL parameter.

10 This value is required when DLO(*MAIL) is specified.

11 This parameter is valid only when OUTPUT(*OUTFILE) is specified.

12 This parameter is required when an optical device name is specified.

P All parameters preceding this point can be specified in positional form.

P3-838 OS/400 CL Reference - Part 2 (Full Version)


RSTDLO

Purpose most of those objects from the system; however, unknown


mail objects are not cleaned up with the RCLSTG command.
The Restore Document Library Object (RSTDLO) command
restores documents, folders, and distribution objects (mail). When a set of documents and folders are restored, all docu-
ments and folders in the set must exist in the same diskette,
This command can be used to restore the documents and tape, optical volume, or save file.
folders if the document was or was not freed by the Save
Document Library Object (SAVDLO) command, or to restore If a document exists in more than one tape or diskette file,
documents and folders that were deleted by the Delete Doc- the user can control which document is restored by speci-
ument Library Object (DLTDLO) command. fying the media file using the sequence number (tape) or
label (tape or diskette) parameter. If more than one version
Restoring a document either replaces the existing document of the document exists, the SAVDATE and SAVTIME param-
content and control information if the document exists on the eters can also be used to select the correct document.
system, or it adds new document content and control infor-
mation if the document does not exist. When text search services are on the system and the user
restores a document library object, the text search index for
For a filed document (electronic mail or a document stored in the object is restored.
the document library), the document and folder name of the
document object on the media must be the same as the doc- Restrictions:
ument name and folder name of the document on the 1. This command is shipped with public *EXCLUDE
system, unless the document is renamed and put in a dif- authority.
ferent folder during the restore operation.
2. To use this command, you must have *SAVSYS or
Note: Folder names must match exactly for restored *ALLOBJ special authority or be enrolled in the system
folders. All objects that are not in use are restored distribution directory.
from the folder on the media or in the save file to the
| 3. This command cannot be run when RCLDLO DLO(*ALL)
existing folder. Restoring a folder creates a new
is running because RCLDLO requires exclusive use of
folder object if the folder does not exist and adds to
internal objects.
this new folder all objects saved with the folder on the
media or in the save file. If the folder exists, any 4. When saving or restoring to an existing database file
document or folder objects that do not exist within it using the OUTFILE parameter, the user must have
are created. The existing documents are replaced execute authority to the output file library.
with the version from the media. Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more
For a filed document restored on the system whose owner is
information about printing the help text, refer to
not known to the system or is not enrolled in the system dis-
“Printing CL Command Descriptions” in Chapter 1.
tribution directory, the user profile of the default owner
(QDFTOWN) becomes the owner of the document or folder.
Required Parameters
The creation date of a document does not change if the doc-
ument exists. If the document does not exist, the creation DLO
date is set to the date on which the document is created. Specifies the document library objects to be restored.
*ALL: All documents, folders, and distribution objects
The security does not change if a document or folder exists
(mail) that are saved on the media and meet the values
on the system where it is to be restored. If the document or
specified on the SAVFLR parameter are restored.
folder does not exist, public authority, authorization list, and
personal status are restored; however, all other private docu- *MAIL: All distribution objects and documents that were
ment and folder authorities are not restored. These authori- referred to by a mail log are restored.
ties must be established again by the owner. *SYSOBJNAM: The documents with the system object
names specified in the SYSOBJNAM parameter are
If a document is restored that had a mail log entry when it
restored.
was saved, the mail log entry is restored if the distribution
tracking object exists on the system. If the distribution document-name: Specify the user-assigned names of
tracking object does not exist on the system, a message is the documents to be restored. Up to 12 characters can
sent saying that the document was restored without a mail be specified for the name; up to 300 document names
log entry. can be specified. All documents named must be in the
folder specified on the SAVFLR parameter.
If this command ends abnormally, objects are left on the
system in an unknown state and cannot be found in a library. DEV
This can happen if a power failure occurs when this Specifies the name of the device to be used to restore
command is run. The Reclaim Storage (RCLSTG) command the document library objects. The device name must be
can be used to clean up the auxiliary storage and delete known on the system by a device description.

Chapter 2. OS/400 Command Descriptions P3-839


RSTDLO

*SAVF: The document library objects are restored from specified and the media contains the folder specified on
a save file. the SAVFLR parameter.
diskette-device-name: Specify the name of the diskette *SAME: The documents to be restored are placed into
device to be used to restore the document library the same folder from which they were saved.
objects.
restore-folder-name: Specify the name of the folder in
optical-device-name: Specify the name of the optical which the restored documents and folders are to be
device used for the restore operation. placed.
tape-media-library-device-name: Specify the name of SYSOBJNAM
the tape media library device used for the restore opera- Specifies the system object name of the documents to
tion. be restored. This parameter is valid only when
tape-device-name: Specify the names of one or more DLO(*SYSOBJNAM) is specified.
tape devices used for the restore operation. If more *NONE: A system object name is not specified.
than one tape device is used, specify the names of the
devices in the order in which they are used. Using more
system-object-name: Specify the 10-character system
object names of the documents to be restored. A
than one tape device permits one tape volume to be
maximum of 300 names can be specified.
rewound and unloaded while another tape device pro-
cesses the next tape volume. VOL
Specifies the volume identifiers of the tape, diskette, or
Optional Parameters optical volumes, or the cartridge identifier of a tape
media library device, from which the objects are being
SAVFLR restored. The volumes must be in the same order as
Specifies the name of the folder on the media from they were when the objects were saved. The volume
which the documents and folders are restored. that contains the beginning of the file to be restored
*ANY: All document library objects that meet the values should be placed in the tape or diskette unit. More infor-
specified on the DLO parameter are restored, regardless mation on this parameter is in Appendix A, “Expanded
of the folders (if any) from which they were saved. This Parameter Descriptions.”
value is valid only if *ALL, *MAIL, or *SYSOBJNAM is *MOUNTED: The objects are restored from the volumes
specified on the DLO parameter. placed in the device specified on the DEV parameter.
*NONE: The documents to be restored were saved as For a media library device, the volume to be used is the
documents without folders. next cartridge in the category mounted by the Set Tape
Category (SETTAPCGY) command.
Note: *NONE is valid only when DLO(*ALL) is speci-
fied. Note: This value cannot be specified when using an
optical media library device.
saved-folder-name: Specify the name of the saved
folder from which documents or folders are to be volume-identifier: Specify the identifiers of one or more
restored. Up to 63 characters can be specified for the volumes in the order they are placed in the device and
folder name. When DLO(*ALL) is specified, up to 300 used to restore the libraries.
folder names can be specified. The name of a saved SEQNBR
folder must be specified when DLO(document-name) is Specifies the tape sequence numbers used for the
specified. restore operation. This parameter is valid for tape only.
RENAME *SEARCH: The tape is searched for the first data file
Specifies the new user-assigned name for the restored with an identifier matching the LABEL parameter value
document. and with contents of a minimum of one of the specified
*SAME: The documents being restored have the same document library objects. If the last operation on the
user-assigned names that they have on the media. device specified ENDOPT(*LEAVE) (that is, the tape is
positioned at the location at which the last operation
new-document-name: Specify the new document names ended), the file search begins with the first data file
that the documents have after they are restored. Up to beyond the current tape position. If ENDOPT(*LEAVE)
300 user-assigned names can be specified for docu- was not specified on the last operation (or if the tape
ments being restored. has been rewound since an ENDOPT(*LEAVE) opera-
RSTFLR tion), the search begins with the first data file on the
Specifies the name of the folder in which the folders and volume.
documents to be restored will be placed. The name can Note: If a folder is contained in more than one file or
be any fully-qualified folder name up to 63 characters. on more than one tape, a message is sent indi-
The folder named is not required to exist if DLO(*ALL) is cating that the folder may not have been fully
restored. To restore the rest of the folder, run

P3-840 OS/400 CL Reference - Part 2 (Full Version)


RSTDLO

the RSTDLO command again specifying the next *SAME: The library-assigned name is restored to the
sequence number. name used when the document library objects were
saved.
Element 1: Beginning Sequence Number
*NEW: A new library-assigned name is created for each
Specifies the sequence number of the first file to be
document or folder being restored. If *NEW is specified
used for the restore operation.
on this parameter, then ALWOBJDIF(*ALL) cannot be
Element 2: Ending Sequence Number specified.
*ONLY: The ending sequence number is the same as SAVDATE
the beginning sequence number.
Specifies the date on which the document library objects
ending-sequence-number: Specify the sequence were saved. If more than one version of the document
number of the last file used for the restore operation. library objects exist on the media, use this parameter to
| Valid values range from 1 through 16777215. identify which version of the document library objects to
restore. The date must be expressed in the job date
ENDOPT
format; if separators are used, the value must be
Specifies the operation that is automatically performed
enclosed in apostrophes. If the SAVDATE parameter is
on the tape volume after the operation ends. If more
not specified, the version of the documents and folders
than one volume is included, this parameter applies only
to be restored will be the first version found on the
to the last tape volume used; all other tape volumes are
volume or the version found with the specified file label.
rewound and unloaded when the end of the tape is
reached. SAVTIME
Specifies the time when the document library objects
*REWIND: The tape is automatically rewound, but not
were saved. If more than one version of the document
unloaded, after the operation has ended.
library objects exist on the media with the same value
*LEAVE: The tape does not rewind or unload after the for the date saved, use this parameter to identify which
operation ends. It remains at the current position on the version of the document library objects to restore.
tape drive. Express the time as a 6-digit value, in the format hours,
*UNLOAD: The tape is automatically rewound and minutes, seconds (hhmmss). If separators are used, the
unloaded after the operation ends. value must be enclosed in apostrophes ('hh:mm:ss'). If
a volume identifier is specified, but SAVTIME is not
LABEL specified, the version of the document library objects to
Specifies the file label that is used to find the file that be restored will be the first version found on the volume
was written to the media during the save operation. or the version found with the specified file label.
*GEN: The system generates the default name of the This parameter is valid only if SAVDATE is also speci-
file label for which to search. fied.
data-file-identifier: Specify the media data file identifier, ALWOBJDIF
which includes up to 17 alphanumeric characters, of the
Specifies whether the following differences encountered
file that contains the documents and folders to be
during the RSTDLO operation are allowed:
restored.
Ÿ The owner of the object on the system is different
SAVF
than the owner of the object from the save.
Specifies the qualified name of the save file that con-
tains the saved document library objects to be restored. Ÿ The system object name on the system does not
match the system object name on the tape or
The name of the save file can be qualified by one of the
diskette being restored.
following library values:
Ÿ The object is secured by an authorization list and is
*LIBL: All libraries in the job's library list are being restored to a system other than the one on
searched until the first match is found. which it was saved.
*CURLIB: The current library for the job is
The ALWOBJDIF parameter can be used to allow an
searched. If no library is specified as the current
object to be restored whose owner or object name on
library for the job, the QGPL library is used.
the system is different than on the media used for the
library-name: Specify the name of the library to be restore operation. By specifying the *ALL special value,
searched. an object with a different name is restored to the name
on the media, while an object with a different owner
save-file-name: Specify the name of the save file from keeps the owner name from the system instead of the
which to restore DLOs.
media.
NEWOBJ Note: In order to use this parameter, *ALLOBJ
Specifies whether a new library-assigned name is authority is required.
created for the folder or document being restored.

Chapter 2. OS/400 Command Descriptions P3-841


RSTDLO

*NONE: The differences described above are not *PRINT: The output is printed with the job's spooled
allowed on the restore operation. For authorization list output.
cases, the object is restored, but the object is not linked
*OUTFILE: The output is directed to the database file
to the authorization list, and public authority is set to
specified on the OUTFILE parameter.
*EXCLUDE. For other cases, a diagnostic message is
sent for the object, and the object is not restored. Note: You must specify the database file name on the
OUTFILE parameter when OUTPUT(*OUTFILE)
*ALL: All the differences described above are allowed
is specified.
for the restore operation. The object is restored.
OUTFILE
Notes:
Specifies the qualified name of the database file to
Ÿ If the owners of the object do not match, the object which the information about the object is directed when
is restored, but it keeps the ownership and authori- *OUTFILE is specified on the OUTPUT parameter. If
ties of the object on the system before the restore the file does not exist, this command creates a database
operation. file in the specified library. If a new file is created, the
system uses QAOJRSTO in QSYS with the format name
Ÿ The informational message flags a diagnostic
QOJRST as a model.
message to be sent indicating that security or integ-
rity changes occurred during the restore operation. The name of the database file can be qualified by one of
This results in an escape for the restore function. the following library values:
Ÿ If *ALL is specified on this parameter, then *LIBL: All libraries in the job's library list are
NEWOBJ(*NEW) cannot be specified. searched until the first match is found.
Ÿ If the user is restoring objects to a system different *CURLIB: The current library for the job is
from the one on which they were saved and the searched. If no library is specified as the current
objects are secured by an authorization list, speci- library for the job, the QGPL library is used.
fying *ALL automatically links the objects to the
authorization list. If the authorization list does not
library-name: Specify the name of the library to be
searched.
exist on the new system, a message that includes
the name of the missing list is issued. database-file-name: Specify the name of the database
file to which the output of the command is directed.
SAVASP
Specifies the identifier (ID) of the auxiliary storage pool OUTMBR
(ASP) on media from which saved documents and Specifies the name of the database file member to which
folders are to be restored. the output is directed. If a member already exists, the
*ANY: The documents and folders saved in any ASP system uses the second element of this parameter to
are restored. determine whether the member is cleared before the
new records are added. If the member does not exist
ASP-ID: Specify a value ranging from 1 through 16, and a member name is not specified, the system creates
which is the ID of the ASP from which documents and
a member with the name of the output file specified on
folders are restored.
the OUTFILE parameter. If an output file member name
RSTASP is specified, but the member does not exist, the system
Specifies the identifier (ID) of the auxiliary storage pool creates it.
(ASP) on media in which restored documents and Element 1: Member to Receive Output
folders are to be placed.
*FIRST: The first member in the file receives the output.
*SAVASP: The documents and folders are placed in If OUTMBR(*FIRST) is specified and the member does
the same ASP from which they were saved. not exist, the system creates a member with the name of
ASP-ID: Specify a value ranging from 1 through 16, the file specified on the OUTFILE parameter.
which is the ID of the ASP in which restored documents member-name: Specify the name of the file member
and folders are placed. that receives the output. If OUTMBR(member-name) is
specified and the member does not exist, the system
OUTPUT
creates it. If the member exists, the user can add
Specifies whether a listing that shows information about
records to the end of the existing member or clear the
the status of the object is created and directed to an
existing member and add the records.
output file. The listing shows the restore information and
shows all objects, restored, not restored, and excluded. Element 2: Operation to Perform on Member
Information about each object's security is listed for the
*REPLACE: The existing records in the specified data-
restored objects. More information on this parameter is
base file member are replaced by the new records.
in Appendix A, “Expanded Parameter Descriptions.”
*ADD: The new records are added to the existing infor-
*NONE: No output is created.
mation in the specified database file member.

P3-842 OS/400 CL Reference - Part 2 (Full Version)


RSTDLO

OPTFILE RSTDLO DLO(\SYSOBJNAM) DEV(TAPð1)


Specifies the path name of the optical file that is used SYSOBJNAM(HZ83B55219) NEWOBJ (\NEW)
for the restore operation, beginning with the root direc-
tory of the volume. For more information on specifying This command restores document HZ83B55219 from tape
path names, refer to Chapter 2, “Path Names unit TAP01 and gives it a new library-assigned name and a
(*PNAME).” new system object name.

Note: This parameter is required when using an optical Example 6: Renaming Documents
device.
RSTDLO DLO(A B) DEV(TAPð1) SAVFLR(C) RENAME(Y Z)
RSTFLR(X)

Examples This command restores documents A and B from within


folder C. Document A is renamed to Y and document B is
Example 1: Restoring Documents with System Object renamed to Z. The command then puts them in folder X.
Names
RSTDLO DLO(\SYSOBJNAM) DEV(TAPð1) Example 7: Specifying Sequence Numbers
SYSOBJNAM(HZ83B55219) RSTDLO DLO(\ALL) DEV(tape-device-name) SAVFLR(A)
SEQNBR(1 3) LABEL(\GEN)
This command restores the document named HZ83B55219
from the tape unit TAP01. This command restores all of folder A from tape files with the
sequence numbers 1, 2, and 3, and the label QDOC or the
Example 2: Restoring Documents from a Save Folder label for a user ASP, which is a value from QDOC0002
RSTDLO DLO(A) DEV(diskette-device-name) SAVFLR(X) through QDOC0016.

This command restores the document named A from folder Example 8: Specifying Allowed Differences
X. RSTDLO DLO(A) DEV(TAPð1) SAVFLR(X)
ALWOBJDIF(\ALL)
Example 3: Restoring All Documents
RSTDLO DLO(\ALL) DEV(TAPð1) This command restores document A from folder X. If docu-
ment A in folder X exists on the system and the owner of the
This command restores all documents and folders that are document on the system does not match the owner of the
on the first tape file on tape unit TAP01. document being restored, the document is restored and the
owner of the document on the system remains unchanged.
Example 4: Restoring a Folder Saved from the System
ASP to a User ASP Example 9: Reporting Information about Objects
RSTDLO DLO(\ALL) FLR(Y) SAVASP(1) RSTASP(2) Restored and Not Restored
RSTDLO DLO(\ALL) DEV(TAPð1) OUTPUT(\OUTFILE)
This command restores folder Y, which was saved from ASP OUTFILE(INFO92) OUTMBR(FOURQT \ADD)
1, to user ASP 2. Folder Y must be deleted from ASP 1
before it can be restored to ASP 2. This command restores all documents and folders from the
tape device TAP01. A list reporting information about objects
Example 5: Creating New Library-Assigned Name restored and objects not restored is directed to the output file
INFO92. The output is received in the member FOURQT as
an addition to existing information in the member.

Chapter 2. OS/400 Command Descriptions P3-843


RSTLIB

RSTLIB (Restore Library) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──RSTLIB──SAVLIB(──┬─\NONSYS──────┬──)──DEV(──┬─\SAVF──────────────────────────┬──)───────────────────────────────────────────5
├─\ALLUSR──────┤ ├─diskette-device-name───────────┤
├─\IBM─────────┤ ├─optical-device-name────────────┤
└─library-name─┘ ├─tape-media-library-device-name─┤
│ ┌──
──────────────────┐ │
└──6─tape-device-name─┴───
(1) ────────┘

5──┬───────────────────────────────────────┬──┬────────────────────────────────────────┬───(P) ─────────────────────────────────────5
│ (2) ──────────────┐
┌─\MOUNTED─── │ │ ┌─\SEARCH──────────────┐ │
(4) ─┴─file-sequence-number─┴──)─┘
└─VOL(──┼─\SAVVOL──────────────────┼──)─┘ └─SEQNBR(───
│ ┌──
───────────────────┐ │
└──6─volume-identifier─┴───(3) ─┘

5──┬─────────────────────────────────────┬──┬───────────────────────────┬──┬────────────────────────────────┬───────────────────5
│ ┌─\SAVLIB──────────────┐ │ │ ┌─\REWIND─┐ │ │ ┌─\FIRST───────┐ │
(4) ─┼─\LEAVE──┼──)─┘ └─STRLIB(───
└─LABEL(──┴─data-file-identifier─┴──)─┘ └─ENDOPT(─── (5) ─┴─library-name─┴──)─┘
└─\UNLOAD─┘
5──┬────────────────────────────────────────┬──┬─────────────────────────────────────────────┬──┬───────────────────────┬───────5
│ ┌─\NONE───────────────┐ │ │ ┌─\LIBL/────────┐ │ │ ┌─\ALL──┐ │
│ │ ┌──
──────────────┐ │ │ └─SAVF(──┼───────────────┼──save-file-name──)─┘ └─OPTION(──┼─\NEW──┼──)─┘
└─OMITLIB(─── 6─library-name─┴───
(5) ─┴── (6) ─┴──)─┘ ├─\CURLIB/──────┤ ├─\OLD──┤
└─library-name/─┘ └─\FREE─┘
5──┬────────────────────────┬──┬──────────────────────────────┬──┬──────────────────────────────┬───────────────────────────────5
│ ┌─\MATCH─┐ │ └─SAVDATE(──date-when-saved──)─┘ └─SAVTIME(──time-when-saved──)─┘
└─MBROPT(──┼─\ALL───┼──)─┘
├─\NEW───┤
└─\OLD───┘
5──┬───────────────────────────┬──┬───────────────────────────────────┬──┬────────────────────────────────┬─────────────────────5
│ ┌─\NONE──┐ │ │ ┌─\SYSVAL────────┐ │ │ ┌─\SAVLIB────────┐ │
(7) ┴──)─┘ └─FRCOBJCVN(──┼─\NO────────────┼──)─┘ └─RSTLIB(──┴─library-name───
└─ALWOBJDIF(──┴─\ALL─── (8) ┴──)─┘
│ ┌─\RQD─┐ │
└─\YES──┴─\ALL─┴─┘
5──┬────────────────────────────────┬──┬──────────────────────────┬─────────────────────────────────────────────────────────────5
│ ┌─\SAVASP────────┐ │ │ ┌─\NONE────┐ │
└─RSTASP(──┴─asp-identifier─┴──)─┘ └─OUTPUT(──┼─\PRINT───┼──)─┘
└─\OUTFILE─┘
5──┬──────────────────────────────────────────────────────┬──┬─────────────────────────────────────────────┬────────────────────5
│ ┌─\LIBL/────────┐ │ │ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │
(9) ─┼───────────────┼──database-file-name──)─┘ └─OUTMBR(───
└─OUTFILE(─── (9) ─┴─member-name─┴──┼──────────┼──)─┘
├─\CURLIB/──────┤ └─\ADD─────┘
└─library-name/─┘
5──┬─────────────────────────┬──┬──────────────────────────────────────────┬───────────────────────────────────────────────────5%
│ ┌─\OBJ─┐ (10) ─'optical-file-path-name'──)─┘
│ └─OPTFILE(────
(9) ─┴─\MBR─┴──)─┘
└─INFTYPE(───
Notes:
1 A maximum of 4 repetitions

2 This value cannot be specified when using an optical media library device.

3 A maximum of 75 repetitions

4 Applies to tape devices only

5 Valid only if SAVLIB(*NONSYS), SAVLIB(*ALLUSR), or SAVLIB(*IBM) is specified.

6 A maximum of 300 repetitions

7 When using ALWOBJDIF(*ALL), the MBROPT(*MATCH) parameter cannot be specified.

8 If an SQL database is restored to a library other than the one in which it was saved, the journals are not restored.

9 This parameter is valid only if OUTPUT(*OUTFILE) is specified.

10 This parameter is required when an optical device name is specified.

P All parameters preceding this point can be specified in positional form.

P3-844 OS/400 CL Reference - Part 2 (Full Version)


RSTLIB

Purpose Notes:
1. To restore a save file to a library where it does not
The Restore Library (RSTLIB) command restores to the already exist, a user must have authority to the Create
system one or a group of libraries saved on diskette or tape Save File (CRTSAVF) command.
or it restores a user library saved on an optical volume or in
a save file. Any library that was saved by the Save Library 2. The RSTLIB command ignores all file overrides currently
(SAVLIB) command can be restored by this command. The in effect for the job, except the overrides for the restore
RSTLIB command restores the whole library, which includes output file.
the library description, object descriptions, and contents of
Restrictions:
the objects in the library.
1. This command is shipped with public *EXCLUDE
For job queues, message queues, output queues, data authority.
queues, and logical files, only the object descriptions are
2. The user of this command must have *SAVSYS
restored, because only the definitions are saved. Also,
authority specified in the user profile by the SPCAUT
logical file access paths may be restored if they were saved.
parameter, or must have all of the following:
More information on restoring access paths is in the DB2 for
AS/400 Database Programming book. a. Read and add authority for, or be the owner of,
each library specified.
This command can be used to restore libraries whose
b. Object existence authority for, or be the owner of,
objects had their storage freed by the corresponding SAVLIB
each object in the library if the object already exists
command of the restore operation, or libraries deleted by the
in the library on the system. Object existence and
Delete Library (DLTLIB) command. If the data portions of
use authority are required for message queue
the objects in the saved libraries were not freed, each library
objects. If the object does not exist, the user must
is copied into the same area of storage that it previously
have add authority for the user profiles that own
occupied. If the storage was freed, the system finds the
each object being restored. If the user does not
needed storage to store the library contents (the object
have the correct authority for all the libraries and
description and data portion of every file, module, program,
objects specified, only those for which the authority
service program, Structured Query Language (SQL)
has been given are restored.
package, and journal receiver in the library). If the library
does not exist on the system because it has been deleted or c. If VOL(*SAVVOL) is specified, use authority to the
is being restored on a different system, the system must find saved-from library.
the storage for everything that is in the library, including the d. Use authority for the save file is required when
library description. restoring libraries from a save file. Use authority for
the device description and the device file are
When the owner profile does not exist on the system, the
required when restoring libraries from a tape, a
user profile of the system default owner (QDFTOWN)
diskette, or an optical device.
becomes the default owner of any object being restored in
the system. 3. The current versions of programs on the system should
not be run while the library that contains those programs
If an object already exists in the library in which it is being is being restored. If any program is running while it is
restored, the public and private authorities of the existing being restored, the program will not be restored.
object are retained. If the object does not exist in the library,
4. When saving or restoring to an existing database file
all public authorities are restored, but private authorities must
using the OUTFILE parameter, the user must have
be granted again. For an existing output queue object that is
execute authority to the output file library.
actively spooling during the restore operation, or a data
queue that already exists in the library, the object is not Note: To see the parameter and value descriptions for this
restored, and a diagnostic message is sent. command, refer to the online help text. For more
information about printing the help text, refer to
If an object is being restored over an existing object on the “Printing CL Command Descriptions” in Chapter 1.
system, the object auditing value of the existing object is
kept. If the object is being restored as new to the system,
the object auditing value is restored from the media. Addi- Required Parameters
tionally, if the object is a library, the default auditing value for SAVLIB
each object created in the library is restored if the library is Specifies the name of the library, or the *NONSYS,
being restored as new; otherwise, the default auditing value *ALLUSR, or *IBM group of libraries, to be restored on
is restored from the media. the system. You cannot specify *NONSYS, *ALLUSR,
or *IBM if RSTLIB(*SAVLIB) is not specified.
Note: For values *NONSYS and *IBM, all other oper-
ations on the system must be ended before this
option is specified. This requires ending all sub-

Chapter 2. OS/400 Command Descriptions P3-845


RSTLIB

systems through the End Subsystem *SAVF: The restore operation is done by using the save
(ENDSBS(*ALL)) command or End System file specified on the SAVF parameter.
(ENDSYS) command.
diskette-device-name: Specify the name of the diskette
*NONSYS: Libraries saved by the Save Library device that is used for the restore operation.
(SAVLIB) command with LIB(*NONSYS) specified are
optical-device-name: Specify the name of the optical
restored.
device used for the restore operation.
You can do a RSTLIB SAVLIB(*IBM) and a RSTLIB
tape-media-library-device-name: Specify the name of
SAVLIB(*ALLUSR) from a SAVLIB LIB(*NONSYS).
the tape media library device used for the restore opera-
*ALLUSR: All user libraries are restored. All libraries tion.
with names that do not begin with the letter Q are
tape-device-name: Specify the names of one or more
restored except for the following:
tape devices used for the restore operation. If more
#CGULIB #DSULIB #SEULIB than one tape device is used, specify the names of the
#COBLIB #RPGLIB devices in the order in which they are used. Using more
#DFULIB #SDALIB than one tape device permits one tape volume to be
Although the following Qxxx libraries are provided by rewound and unloaded while another tape device pro-
IBM, they typically contain user data that changes fre- cesses the next tape volume.
quently. Therefore, these libraries are considered "user
libraries", and are also restored:
Optional Parameters
| QDSNX QPFRDATA QUSRBRM QUSRSYS
| QGPL QRCL QUSRIJS QUSRVxRxMx VOL
| QGPL38 QS36F QUSRINFSKR Specifies the volume identifiers of the tape, diskette, or
| QMQMDATA QUSER38 QUSRNOTES optical volumes, or the cartridge identifier of a tape
| QMQMPROC QUSRADSM QUSRRDARS media library device, from which the objects are being
*IBM: Restores all system (IBM) libraries except for the restored. The volumes must be in the same order as
following: they were when the library was saved. If the library was
known to the system before the restore operation, the
| QDOC QINSYS QSPL QUSRBRM system can verify whether the volumes put on tape
| QDOCxxxx QMQMDATA QSRV QUSRIJS contain the current version of the library. The volume
| QDSNX QMQMPROC QSYS QUSRINFSKR
that contains the beginning of the file to be restored
| QGPL QPFRDATA QS36F QUSRNOTES
should be placed in the tape or diskette unit. More infor-
| QGPL38 QRCL QTEMP QUSRRDARS
| QINMEDIA QRECOVERY QUSER38 QUSRSYS mation on this parameter is in Appendix A, “Expanded
| QINPRIOR QRPLOBJ QUSRADSM QUSRVxRxMx Parameter Descriptions.”

Note: A different library name, in the format *MOUNTED: The library is restored from the volumes
QUSRVxRxMx, can be created by the user for that are currently placed in the device specified on the
each previous release supported by IBM to DEV parameter. For a media library device, the volume
contain any user commands to be compiled in a to be used is the next cartridge in the category mounted
CL program for the previous release. For the by the Set Tape Category (SETTAPCGY) command.
QUSRVxRxMx user library, VxRxMx is the The first version of the saved library that is found on the
version, release, and modification level of a pre- media is restored, unless a specific version is identified
vious release that IBM continues to support. by the SAVDATE parameter and SAVTIME parameter,
or for tape, the SEQNBR parameter.
The following libraries with names that do not begin with
the letter Q are also restored: Note: This value cannot be specified when using an
optical media library device.
#CGULIB #DSULIB #SEULIB
#COBLIB #RPGLIB *SAVVOL: The system, by using the save or restore
#DFULIB #SDALIB history information, determines which volumes contain
the most recently saved version of the library. If the
library-name: Specify the name of the library to restore.
device type specified in the DEV parameter does not
The library name must be the same name that was used
match the device type of the most recently saved
when the library was saved. The names QSYS, QSRV,
version of the library, an error message is sent to the
QTEMP, QSPL, QDOC, QDOC0002-QDOC0016,
user, and the function is ended. If *SAVVOL is speci-
QRPLOBJ, and QRECOVERY cannot be specified.
fied, the parameters SAVDATE and SAVTIME cannot be
DEV specified. IF *SAVVOL is specified, *SEARCH must be
Specifies the name of the device used for the restore specified on the SEQNBR parameter.
operation. The device name must already be known on volume-identifier: Specify the identifiers of one or more
the system by a device description. volumes in the order they are placed in the device and
used to restore the libraries.

P3-846 OS/400 CL Reference - Part 2 (Full Version)


RSTLIB

SEQNBR Note: In the recovery steps that follow, *NONSYS is


Specifies, only when tape is used, which sequence specified on the SAVLIB parameter. If you are
number is used for the restore operation. restoring IBM-supplied libraries or all user-
created libraries and IBM-supplied libraries,
*SEARCH: The tape is searched for a data file with an
specify *IBM or *ALLUSR instead.
identifier that matches the LABEL parameter value;
when a match is found, the data file is restored. If the The basic recovery steps for a restore operation are:
last operation on the device specified
1. Look at the job log to determine the library where
ENDOPT(*LEAVE), the tape is positioned at the location
the previous restore library (RSTLIB
where the last operation ended, and the file search
SAVLIB(*NONSYS)) command failed. Find the last
starts with the first data file beyond the current tape
library restored, which is indicated by a successful
position. If ENDOPT(*LEAVE) was not used for the last
restore completion message.
operation, or if the tape was manually rewound after an
ENDOPT(*LEAVE) operation, the search starts with the 2. Load the first tape of the SAVLIB LIB(*NONSYS)
first data file on the volume. media.
| file-sequence-number: Specify the sequence number of 3. Issue the following command:
| the file. Valid values range from 1 through 16777215. RSTLIB SAVLIB(\NONSYS) DEV(tape-name)
If *NONSYS, *ALLUSR, or *IBM is specified on the ENDOPT(\LEAVE) STRLIB(library-name)
SAVLIB parameter, the sequence number specifies the OMITLIB(library-name)
location of the file QFILE. The QFILE file is at the where the library-name for the STRLIB and
beginning of the *NONSYS, *ALLUSR, or *IBM save OMITLIB parameters is the library where the
operation. The QFILE file contains the list of libraries RSTLIB failed. This starts the restore operation on
saved. the library after the library where the restore opera-
tion failed.
LABEL
Specifies the name that identifies the data file on the 4. When you are prompted, load the volume containing
tape or diskette used for the restore operation. This the starting library.
must be the label specified on the save command. 5. After the restore operation is complete, restore the
*SAVLIB: The file label is the name of the library speci- library where the restore operation failed using the
fied on the SAVLIB parameter. media from a previous save operation.
data-file-identifier: Specify the data file identifier (up to Note: Consider removing the tape with the media
17 characters) of the data file used for the restore opera- error from the next save rotation cycle to
tion. This option is valid only for single library restore avoid another tape error.
operations.
*FIRST: The restore operation begins with the first
ENDOPT library saved.
Specifies, when tape is used, what positioning operation library-name: Specify the name of the library where the
is automatically done on the tape volume after the restore operation begins.
restore operation ends. If more than one volume is
included, this parameter applies only to the last volume OMITLIB
used; all other tape volumes are rewound and unloaded Specifies a list of libraries to be excluded from the
when the end of the tape is reached. restore operation.
*REWIND: The tape is automatically rewound, but not Note: This parameter is valid only when *NONSYS,
unloaded, after the operation has ended. *IBM, or *ALLUSR is specified on the SAVLIB
parameter.
*LEAVE: The tape does not rewind or unload after the
operation ends. It remains at the current position on the *NONE: No libraries are excluded from the restore
tape drive. operation.
*UNLOAD: The tape is automatically rewound and library-name: Specify the names of the libraries to be
unloaded after the operation ends. excluded from the restore operation.

STRLIB SAVF
Specifies the name of the starting library for a Specifies the qualified name of the save file used to
*NONSYS, *IBM, or *ALLUSR restore operation. restore the save data.
If an irrecoverable media error occurs during the restore The name of the save file can be qualified by one of the
operation, this parameter can be used to restart the following library values:
operation.
*LIBL: All libraries in the job's library list are
This parameter is valid only when *NONSYS, *IBM, or searched until the first match is found.
*ALLUSR is specified for the restore operation.

Chapter 2. OS/400 Command Descriptions P3-847


RSTLIB

*CURLIB: The current library for the job is objects being restored. If verification fails, the
searched. If no library is specified as the current file is not restored.
library for the job, the QGPL library is used.
*MATCH: The saved members are restored if the lists
library-name: Specify the name of the library to be of the members where they exist match, member for
searched. member, the lists of the current system version.
*MATCH cannot be specified if *ALL is specified on the
save-file-name: Specify the name of the file from which ALWOBJDIF parameter.
to perform the restore operation.
*ALL: All members in the saved file are restored.
OPTION
*NEW: Only new members (members not known to the
Specifies how to handle restoring each object.
system) are restored.
*ALL: All the objects in the saved library are restored to
*OLD: Only members already known to the system are
the library. Old objects on diskette, tape, or in a save
restored.
file replace the current versions in the library on the
system, and the objects not having a current version are SAVDATE
added to the library on the system. Objects presently in Specifies the date the library was saved. If the most
the library but not on the media, remain in the library. recently saved version is not restored, or if more than
*NEW: Only the objects in the saved library that do not one saved version is on the volumes, enter the date that
exist in the current version of the library on the system specifies which version of the library is restored. The
are added to the library. Only objects not known to the date must be entered in the job date format. If separa-
library on the system are restored; known objects are tors (specified by the system value QDATSEP) are used,
not restored. This option restores objects that were the value must be enclosed in apostrophes. If a volume
deleted after they were saved or that are new to this identifier or VOL(*MOUNTED) is specified, but
library. If any saved objects have a version already in SAVDATE is not, the first version of the library found is
the library on the system, they are not restored, an infor- restored. This parameter is valid only if a volume identi-
mational message is sent for each object, and the fier is specified, VOL(*MOUNTED) is specified, or if a
restore operation continues. save file (SAVF parameter) is specified. Specify the
date when the file was saved.
*OLD: Only the objects in the library having a saved
version are restored; that is, the version of each object SAVTIME
currently in the library is replaced by the saved version. Specifies the time when the library was saved, if the
Only objects known to the library are restored. If any current version is not restored. The time can be speci-
saved objects are no longer part of the online version of fied with or without a time separator:
the library, they are not added to the library and an infor-
Ÿ Without a time separator, specify a string of 4 or 6
mational message is sent for each object, but the restore
digits (hhmm or hhmmss) where hh = hours, mm =
operation continues.
minutes, and ss = seconds.
*FREE: The saved objects are restored only if they
Ÿ With a time separator, specify a string of 5 or 8
exist in the library on the system with their space freed.
digits where the time separator specified for your job
The saved version of each object is restored on the
is used to separate the hours, minutes, and
system in its previously freed space. This option
seconds. If you enter this command from the
restores objects that had their space freed when they
command line, the string must be enclosed in apos-
were saved. If any saved objects are no longer part of
trophes. If a time separator other than the sepa-
the current version of the library, or if the space is not
rator specified for your job is used, this command
free for any object, the object is not restored and an
will fail.
informational message is sent for each object. The
restore operation continues, and all of the freed objects If a volume identifier or *MOUNTED is specified on the
are correctly restored. VOL parameter, but this parameter is not, the first
version of the library found on the volume is restored.
MBROPT
This parameter is valid only if the SAVDATE parameter
Specifies, for database files currently on the system,
is also specified.
which file members are restored.
This parameter is valid only if SAVDATE is also speci-
Note: If MBROPT(*MATCH) is used, the member list in
fied.
the saved file must match, member for member,
the current version in the system. All members ALWOBJDIF
are restored for files that do not exist. Before Specifies whether certain differences encountered during
restoring a file, the system verifies whether the a restore operation are allowed. The differences
file and member creation dates of the known include:
system objects match the creation dates of the

P3-848 OS/400 CL Reference - Part 2 (Full Version)


RSTLIB

Ÿ Ownership: The owner of an object on the system 2. For programs that do have a validation value
is different than the owner of an object from the stored on the media and the system fails to
save operation. recreate the program, the original version of the
program is restored and an entry is logged in
Ÿ File creation date: The creation date of the data-
the security journal and job log.
base file on the system does not match the creation
date of the file that was saved. Ÿ The informational message causes a diagnostic
message to be sent indicating that security or integ-
Ÿ Member creation date: The creation date of the
rity changes occurred during the restore operation.
database file on the system does not match the cre-
This results in sending an escape message for the
ation date of the member that was saved.
restore operation.
Ÿ Validation value verification: The validation value
Ÿ If the user is restoring objects to a system different
created at the time an object was created does not
from the one on which they were saved and the
match the validation value created during the
objects are secured by an authorization list, speci-
restore operation of an object on a system with a
fying *ALL automatically links the objects to the
QSECURITY level of 40 or higher.
authorization list again. If the authorization list does
Ÿ Authorization list linking: The object is being not exist on the new system, a message that
restored to a system different from the one on which includes the name of the missing list is issued and
it was saved. the public authority is set to *EXCLUDE.

Note: The user of this parameter must have *ALLOBJ FRCOBJCVN


authority. If *ALL is specified, *MATCH cannot Specifies whether to convert user objects to the format
be specified on the MBROPT parameter. required for use in the current version of the operating
system when the objects are restored.
*NONE: None of the differences described above are
allowed on the restore operation. For validation value Notes:
verification failure cases, the object is restored but own-
1. This parameter applies only to user objects of the
ership is transferred to QDFTOWN and all authorities
*MODULE, *PGM, *SRVPGM, and *SQLPKG object
are revoked. For authorization list cases, the object is
types.
restored, but the object is not linked to the authorization
list, and public authority is set to *EXCLUDE. For all 2. An object must be observable (have the required
other cases, a diagnostic message is sent for the object, observable information) in order to be converted.
and the object is not restored. 3. If an object needs to be converted (because it is for-
*ALL: All of the differences listed above are allowed for matted for an earlier version of the operating
the restore operation. An informational message is sent, system), but is not converted during this restore
except for validation value verification and authorization operation, the object is automatically converted the
list cases, and then the object is restored. The following first time it is used.
facts should be noted:
Element 1: Force Conversion
Ÿ If the owners of the object do not match, the object *SYSVAL: The objects are converted based on the
is restored, but the ownership and authorities it had value of the QFRCCVNRST system value.
before the restore operation are retained.
Note: If this value is specified and the system value
Ÿ Either the file itself or members of the file are QFRCCVNRST has a value of "1," the restore
restored based on the following facts: operation proceeds as if FRCOBJCVN(*YES
1. If there is a file-level mismatch and *RQD) is specified. If QFRCCVNRST has a
ALWOBJDIF(*ALL) has been specified, the value of "0", the restore operation proceeds as if
existing version of the file is renamed and the FRCOBJCVN(*NO) is specified.
saved version of the file is restored. *NO: The objects are not converted during the restore
2. If there is a member-level mismatch, the operation.
existing version of the member is renamed and *YES: The objects are converted during the restore
the saved version of the member is restored. operation.
Ÿ Validation value verification: Note: Specifying this value increases the time of the
1. For programs with no validation value stored on restore operation, but avoids the need to convert
the media (in reference to program data saved the objects when they are first used.
on an OS/400 system prior to version 1 release Element 2: Objects to Convert
3.0), the program is restored and the system
*RQD: The objects are converted only if they require
does not attempt to recreate it. Nothing is
conversion to be used by the current operating system.
logged in the security journal and no informa-
tional messages are sent.

Chapter 2. OS/400 Command Descriptions P3-849


RSTLIB

If the objects are not observable, the objects are restored objects. More information on this parameter is
restored but are not converted. in Appendix A, “Expanded Parameter Descriptions.”
*ALL: All objects are converted regardless of their *NONE: No output listing is created.
current format. Even if the objects are in the current
*PRINT: The output is printed with the job's spooled
format, they are converted again. However, if the
output.
objects are not observable, the objects are not restored.
*OUTFILE: The output is directed to the database file
RSTLIB specified on the OUTFILE parameter.
Specifies whether the library contents are restored to the
Note: You must specify a database file name on the
same library in which they were saved, or to a different
OUTFILE parameter when OUTPUT(*OUTFILE)
library. If a different library is specified, the user cannot
is specified.
specify *NONSYS, *ALLUSR, or *IBM on the SAVLIB
parameter. OUTFILE
*SAVLIB: The library contents are restored to the same Specifies the qualified name of the database file to
library or libraries in which they were saved. which the information is directed when *OUTFILE is
specified on the OUTPUT parameter. If the file does not
library-name: Specify the name of the library where the exist, this command creates a database file in the speci-
saved library contents are being restored. If *NONSYS,
fied library. If a new file is created, the system uses
*ALLUSR, or *IBM is specified on the SAVLIB param-
QASRRSTO in QSYS with the format name QSRRST as
eter, a library name cannot be specified on this param-
a model.
eter.
The name of the database file can be qualified by one of
Note: If an SQL database is restored to a library other
the following library values:
than the one in which it was saved, the journals
are not restored. *LIBL: All libraries in the job's library list are
searched until the first match is found.
RSTASP
Specifies whether the libraries and objects are restored *CURLIB: The current library for the job is
to the same auxiliary storage pool (ASP) from which searched. If no library is specified as the current
they were saved or to another specific ASP. ASP 1 is library for the job, the QGPL library is used.
the system ASP. User ASPs can be configured as library-name: Specify the name of the library to be
ASPs 2 through 16. searched.
A user ASP can contain either:
database-file-name: Specify the name of the database
Ÿ Libraries and all objects in the libraries. file to which output from the command is directed. If this
file does not exist, it is created in the specified library.
Ÿ Journals, journal receivers, and save files for
More information on defining the format of database files
libraries in the system ASP.
as output files is in the DB2 for AS/400 Database Pro-
This parameter applies to all libraries that are specified. gramming book.
More information about user ASPs is in the Backup and
OUTMBR
Recovery book. Specifies the name of the database file member to which
Attention: the output is directed. This parameter is valid only if
OUTPUT(*OUTFILE) is specified.
System or product libraries (libraries that begin with a Q
or #) must not be created in or restored to a user ASP. Element 1: Member to Receive Output
Doing so can cause unpredictable results.
*FIRST: The first member in the file receives the output.
*SAVASP: The objects are restored to the same auxil- If OUTMBR(*FIRST) is specified and the member does
iary storage pools from which they were saved. not exist, the system creates a member with the name of
the file specified on the OUTFILE parameter.
asp-identifier: Specify the ASP identifier. When the
specified ASP is 1, the objects are restored to the member-name: Specify the file member that receives
system ASP, and when the specified ASP is 2 through the output. If OUTMBR(member-name) is specified and
16, the objects are restored to the user-defined ASP the member does not exist, the system creates it.
specified by the identifying number.
If the member exists, the user can add records to the
OUTPUT end of the existing member or clear the existing member
Specifies whether a listing that shows information about and add the records.
the status of the object is created and directed to an Element 2: Operation to Perform on Member
output file. The listing shows the restore information and
*REPLACE: The existing records in the specified data-
shows all objects, restored, not restored, and excluded.
base file member are replaced by the new records.
Information about each object's security is listed for the

P3-850 OS/400 CL Reference - Part 2 (Full Version)


RSTLIB

*ADD: The new records are added to the existing infor- save must be loaded. An inquiry message instructs the user
mation in the specified database file member. to load the tape containing MIKESLIB. If necessary, the
same message is sent until the tape containing MIKESLIB is
INFTYPE
found.
Specifies the type of information directed to the data-
base file. This parameter is valid only if Example 4: Restoring a Version From a Specific Date
OUTPUT(*OUTFILE) is specified. and Time
*OBJ: The list contains an entry for each object RSTLIB SAVLIB(PAYROLL) DEV(TAPð1) SAVDATE(ð6ð193)
requested to be restored. SAVTIME(1ð3214) RSTLIB(OLDPAY) VOL(PAY)
*MBR: The list contains an entry for each object or, for
This command restores the version of the PAYROLL library
database files, each member requested to be restored.
from the device TAP01, whose volume identifier is PAY. The
OPTFILE version to be restored was saved at 10:32:14 on the date
Specifies the path name of the optical file that is used 06/01/93. All of the objects in the saved PAYROLL library
for the restore operation, beginning with the root direc- are restored to the library OLDPAY. All new files are
tory of the volume. For more information on specifying restored. Old files are restored only if the member lists of
path names, refer to Chapter 2, “Path Names the files on the tape match the member lists of the files on
(*PNAME).” the system.
Note: This parameter is required when using an optical Example 5: Restoring From Multiple Tape Volumes
device.
RSTLIB SAVLIB(QGPL) DEV(TAPð1) VOL(QGPL QGPL)

This command restores the QGPL library from two tape


Examples volumes both named QGPL. Even though the volume identi-
fiers are the same, they must both be specified.
Example 1: Restoring New Objects
RSTLIB SAVLIB(JOE) DEV(TAPð1) OPTION(\NEW) Example 6: Restoring From Multiple Tape Devices
RSTLIB SAVLIB(USRLIB) DEV(TAPð1 TAPð2 TAPð3)
This command restores the saved version of library JOE VOL(USRA USRB USRC USRD) ENDOPT(\UNLOAD)
from tape device TAP01. The only objects that are restored
in the library are new objects (ones that were in the library This command restores library USRLIB from four volumes on
when they were saved and later deleted). three tape devices. Volume USRA is put on tape device
TAP01, volume USRB on TAP02, volume USRC on TAP03,
Example 2: Printing Output and volume USRD on TAP01. The operator removes
RSTLIB SAVLIB(\NONSYS) DEV(TAPð1) OUTPUT(\PRINT) volume USRA from TAP01, so that TAP01 can be used by
volume USRD. If the tape volumes are put in the wrong
This command restores all the saved user-created libraries, order, an error message is sent to the system operator
the QGPL library, and the licensed program libraries (such as message queue.
QRPG and QIDU) to the system from tape. The contents of
the libraries are restored exactly as they were saved. New Example 7: Restoring a Specific Version
objects (on tape) are added to the system; old objects in the RSTLIB SAVLIB(LIB1) DEV(TAPð1) MBROPT(\ALL)
system are overlaid by the version of the old objects on tape. SAVDATE(ð82392) SAVTIME(123251)
Because OUTPUT(*PRINT) is specified, a printout of all RSTLIB(LIB2) OUTPUT(\PRINT)
objects (restored and not restored) for each library, is sent to
the printer with the job's spooled output. Each library after This command restores the version of library LIB1 from the
the first library starts on a new page. After each library, a device TAP01. The version to be restored was saved at
completion message states how many objects were restored 12:32:51 on the date 08/23/92. All of the objects in the
and how many were not restored. At the end of a list, a final saved library LIB1 are restored to library LIB2. A list of
completion message states how many libraries were restored restored objects and those not restored is given. All files and
and how many were not restored. file members are restored.

Example 3: Specifying Where the Restore Operation Example 8: Restoring a Library From a Save File
Begins RSTLIB SAVLIB(LIB1) DEV(\SAVF) SAVF(SAVF1)
RSTLIB SAVLIB(\NONSYS) DEV(TAPð1) STRLIB(MIKESLIB)
This command restores library LIB1 from the save file
This command restores the saved nonsystem libraries begin- SAVF1.
ning with library MIKESLIB from the tape device, TAP01.
The nonsystem libraries are saved in alphabetic order. Example 9: Restoring to a User-Defined ASP
Therefore, all libraries beginning with and following the name RSTLIB SAVLIB(LIB1) DEV(\SAVF) SAVF(SAVF1)
MIKESLIB are restored. The first tape of the nonsystem RSTASP(2)

Chapter 2. OS/400 Command Descriptions P3-851


RSTLIB

This command restores the library named LIB1 from the save Ÿ ASP 2 does not exist on the system.
file named SAVF1. The library and all objects in the saved
Ÿ There are object types in the library which cannot be
version of LIB1 are restored to ASP 2 unless:
restored to user ASPs. These objects will not be
Ÿ The library already exists in a different ASP. restored.
Ÿ ASP 2 contains a journal, journal receiver, or SAVF
which is part of a library in the system ASP.

P3-852 OS/400 CL Reference - Part 2 (Full Version)


RSTLICPGM

RSTLICPGM (Restore Licensed Program) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ────────────────────────────────────5
55──RSTLICPGM──LICPGM(──licensed-program──)──DEV(──┬─\SAVF──────────────────────────┬──)────
├─optical-device-name────────────┤
├─tape-media-library-device-name─┤
│ ┌──
──────────────────┐ │
└──6─tape-device-name─┴───
(1) ────────┘

5──┬───────────────────────────────────────────┬──┬───────────────────────────────────────────────────┬─────────────────────────5
│ (6) ──────────────┐
┌─\MOUNTED─── │ │ ┌─\BASE─────────────────────────────┐ │
│ │ ┌──
───────────────────┐ │ │ └─OPTION(──┴─number-of-licensed-program-option─┴──)─┘
(2, 7) 6 (3)
└─VOL(──────┴───volume-identifier─┴────┴──)─┘
5──┬──────────────────────┬──┬───────────────────────────┬──┬──────────────────────────────────────────┬────────────────────────5
│ ┌─\ALL─┐ │ │ ┌─\PRIMARY─────┐ │ │ ┌─\SEARCH──────────────┐ │
(2, 7) ─┴─file-sequence-number─┴──)─┘
└─RSTOBJ(──┼─\PGM─┼──)─┘ └─LNG(──┼─\SAVVOL──────┼──)─┘ └─SEQNBR(─────
└─\LNG─┘ └─feature-code─┘
5──┬─────────────────────────────┬──┬───────────────────────────────────────────────┬──┬────────────────────────┬───────────────5
│ ┌─\REWIND─┐ │ │ ┌─\LIBL/────────┐ │ │ ┌─\NONE──┐ │
(2, 7) ─┼─\LEAVE──┼──)─┘ └─SAVF(───
└─ENDOPT(───── (4) ─┼─\CURLIB/──────┼──save-file-name──)─┘ └─OUTPUT(──┴─\PRINT─┴──)─┘
└─\UNLOAD─┘ └─library-name/─┘
5──┬────────────────────────────┬──┬───────────────────────────────────┬──┬──────────────────────────────────┬──────────────────5
│ ┌─\FIRST────────┐ │ │ ┌─\ONLY─────────┐ │ │ ┌─\SAME───────────────┐ │
└─RLS(──┴─release-level─┴──)─┘ └─REPLACERLS(──┼─\NO───────────┼──)─┘ │ │ ┌──
──────────────┐ │ │
└─release-level─┘ 6 (5)
└─LIB(──┴───library-name─┴────┴──)─┘
5──┬──────────────────────────────┬──┬──────────────────────────┬───────────────────────────────────────────────────────────────5
│ ┌─\SAME────────┐ │ │ ┌─\SAME───────┐ │
└─LNGLIB(──┴─library-name─┴──)─┘ └─FLR(──┴─folder-name─┴──)─┘
5──┬───────────────────────────────────────────────────────────────┬────────────────────────────────────────────────────────────5
| │ ┌──
─────────────────────────────────┐ │
| │ │┌─\SAME─────────────────────────┐│ │
| └─CODHOMEDIR(──── 6
(10) ─┬──┴─code-home-directory-path-name─┴┴───
(8) ─┬──)─┘
| └─\PROMPT────────────────────────────────┘
5──┬──────────────────────────────────────────────────────────────────┬──┬───────────────────────────────────┬─────────────────5%
| │ ┌──
─────────────────────────────────────┐ │ │ ┌─\SYSVAL────────┐ │
| │ │┌─\SAME─────────────────────────────┐│ │ └─FRCOBJCVN(──┼─\NO────────────┼──)─┘
| (9) 6 (8)
└─LNGHOMEDIR(────┬──┴─language-home-directory-path-name─┴┴────┬──)─┘ │ ┌─\RQD─┐ │
| └─\PROMPT────────────────────────────────────┘ └─\YES──┴─\ALL─┴─┘
Notes:
1 A maximum of 4 repetitions for tape device names.

2 This parameter is ignored when DEV(*SAVF) is used.

3 A maximum of 50 repetitions.

4 This parameter is required if DEV(*SAVF) is specified.

5 A maximum of 11 repetitions

6 This value cannot be specified when using an optical media library device.

7 This parameter is ignored when using an optical device.

8 A maximum of 300 repetitions.

9 This parameter is ignored when RSTOBJ(*PGM).

10 This parameter is ignored when RSTOBJ(*LNG).

P All parameters preceding this point can be specified in positional form.

Purpose 3. If this command is used to restore a program in the


licensed program, the copy of the program currently in
The Restore Licensed Program (RSTLICPGM) command the system should not be running while the program is
loads or restores a licensed program, either for initial installa- being restored. If this occurs, the processing program is
tion or new-release installation. ended abnormally.

Restrictions: 4. If other objects of the licensed program are in use, they


are not restored.
1. This command is shipped with public *EXCLUDE
authority. 5. With the exception of overrides for the restore operation
printing OUTPUT(*PRINT), this command ignores all file
2. To use this command, the user must have *SECADM overrides currently in effect for the job.
and *ALLOBJ authority.

Chapter 2. OS/400 Command Descriptions P3-853


RSTLICPGM

6. Some licensed programs can only be restored if the user to be used is the next cartridge in the category mounted
is enrolled in the system distribution directory. See the by the Set Tape Category (SETTAPCGY) command.
publication for each licensed program for a description of
volume-identifier: Specify the identifiers of one or more
this restriction.
volumes in the order they are mounted on the device
7. This command does not restore code and language and used to restore the licensed program.
objects for the base OS/400 system.
OPTION
8. This command does not support the use of other ASPs Specifies which licensed program option to restore.
(auxiliary storage pools). All objects supplied by a
*BASE: Only the base part of the licensed program is
licensed program must remain in the system ASP.
restored.
number-of-licensed-program-option: Specify the number
Required Parameters associated with the optional part of the listed licensed
LICPGM program being restored.
Specifies the 7-character identifier of the licensed
RSTOBJ
program being restored. A list of IBM-supplied licensed
Specifies the type of licensed program objects being
programs is in the Software Installation book.
restored.
DEV *ALL: All objects of the licensed program are restored.
Specifies the name of the device from which the This includes both the program objects and the language
licensed program objects are restored. The device objects.
name must be known by a device description on the
system. If multiple devices are specified, they must If a tape device is specified on the DEV parameter, then
have compatible media formats. the RSTOBJ(*ALL) value is used when the saving of the
licensed program has been done with the SAVLICPGM
Up to four device names can be specified. Use the command such that the language objects immediately
Work with Device Descriptions (WRKDEVD) command follow the program objects on the tape media. If the lan-
to display the names of the tape devices available on guage objects (*LNG) and programming objects (*PGM)
this system. Only one save file name can be specified. are not in consecutive order on the distribution tape,
*SAVF: The restore operation is done using the save *ALL cannot be used in most cases. Instead, the
file name specified on the SAVF parameter. program and language objects must be restored sepa-
rately. The DSPTAP command can be used to deter-
optical-device-name: Specify the name of the optical
mine the order of the objects on the tape. An example
device that supports the CD-ROM media class used for
of how to restore language and program objects sepa-
the restore operation.
rately is in the "Examples" section at the end of this
tape-media-library-device-name: Specify the name of command.
the media library device used for the restore operation.
If *SAVF is specified on the DEV parameter, then the
tape-device-name: Specify the names of one or more RSTOBJ(*ALL) value can be used when the saving of
tape devices used for the restore operation. If multiple the licensed program has been done with the
tape devices are used, they must have compatible SAVLICPGM command using OBJTYPE(*ALL).
media formats and their names must be specified in the
*PGM: Only the program objects for the licensed
order in which they are used. Using more than one tape
program are restored. This value is used when restoring
device permits one tape volume to be rewound and
the program objects from the distribution media where
unloaded while another tape device processes the next
the program objects and the selected language objects
tape volume.
are not on the same distribution media or are not in con-
secutive order.
Optional Parameters *LNG: The objects associated with the language identi-
VOL fied by the language feature indicated on the LNG
Specifies the volume identifiers of the tape volumes from parameter are restored.
which the licensed program is restored. The volumes LNG
must be installed on the device in the same order they Specifies the language to be used for restoring the
were in when the licensed program was saved. The licensed program. If the language feature of the
volume that contains the beginning of the file to be licensed program on the save media matches the
restored should be mounted on the device. A maximum system language feature, the language objects are
of 50 entries can be specified. restored to the licensed program's libraries. If the lan-
*MOUNTED: The licensed program is restored from the guage features do not match, the language objects are
volumes that are mounted on the device specified on the restored into the multilingual library for that language
DEV parameter. For a media library device, the volume feature.

P3-854 OS/400 CL Reference - Part 2 (Full Version)


RSTLICPGM

*PRIMARY: The language feature of the operating shows all objects, restored, not restored, and excluded.
system is restored for the specified product. Information about each object's security is listed for the
restored objects. More information on this parameter is
Note: Use the GO LICPGM function with option 20 to
in Appendix A, “Expanded Parameter Descriptions.”
display the primary language of the operating
system. *NONE: No output is created.
*SAVVOL: The language file on the mounted volume is *PRINT: The output is printed with the job's spooled
to be restored for the licensed program specified by the output.
user. This option is not valid with DEV(*SAVF).
RLS
feature-code: Specify the language feature identifier for Specifies the version, release, and modification level of
the language file that is to be restored for the licensed the product being restored.
program specified by the user. More information on
*FIRST: The first version, release, and modification
feature identifications and a list of the IBM-supplied
level found on the distribution media is restored.
feature codes is in the &sftinst..
release-level: Specify the release level in VxRyMz
SEQNBR
format, where Vx is the version number, Ry is the
Specifies which sequence number to use for the restore
release number, and Mz is the modification level. The
operation.
variables x and y can be a number from 0 through 9,
*SEARCH: The volume on the device is searched for a and the variable z can be a number from 0 through 9 or
data file for the licensed program; when a match is a letter from A through Z.
found, the objects are restored.
REPLACERLS
| file-sequence-number: Specify the sequence number of Specifies the version, release, and modification level of
| the file. Valid values range from 1 through 16777215. the product being replaced.
ENDOPT *ONLY: Replace only the version, release, and modifi-
Specifies the operation that is automatically done in the cation level of the product currently installed.
tape volume after the restore operation ends. If more
*NO: The product currently installed on the system is
than one reel is included, this parameter applies only to
not replaced. The product being restored must be a dif-
the last reel used; all other reels are rewound and
ferent release than the product currently installed. If the
unloaded when the end of tape is reached.
product being restored exists in the same libraries as the
*REWIND: The tape is automatically rewound, but not installed product, then an override parameter must be
unloaded, after the operation has ended. specified indicating to which libraries the product is
restored.
*LEAVE: The tape is not rewound. Another restore
operation can start at the current position on the tape. release-level: Specify the release level in VxRyMz
format, where Vx is the version number, Ry is the
*UNLOAD: The tape is automatically rewound and
release number, and Mz is the modification level. The
unloaded after the restore operation has ended.
variables x and y can be a number from 0 through 9,
SAVF and the variable z can be a number from 0 through 9 or
Specifies the qualified name of the save file containing a letter from A through Z.
the product.
LIB
The name of the save file can be qualified by one of the Specifies the libraries into which the product is being
following library values: restored. This function is not supported by all products.
*LIBL: All libraries in the job's library list are *SAME: The product is restored into the library speci-
searched until the first match is found. fied by the vendor.
*CURLIB: The current library for the job is library-name: Specify the name of the library into which
searched. If no library is specified as the current the product is being restored.
library for the job, the QGPL library is used.
LNGLIB
library-name: Specify the name of the library to be Specifies the secondary language library into which the
searched. product is being restored. This function is not supported
by all products.
save-file-name: Specify the name of the save file.
*SAME: The product is restored into the secondary lan-
OUTPUT
guage library specified by the vendor.
Specifies whether a listing that shows information about
the status of the object is created and directed to an library-name: Specify the name of the secondary lan-
output file. The listing shows the restore information and guage library into which the product is restored.

Chapter 2. OS/400 Command Descriptions P3-855


RSTLICPGM

FLR Notes:
Specifies the name of the root folder into which the
1. This parameter applies only to user objects of the
product is being restored. This function is not supported
*MODULE, *PGM, *SRVPGM, and *SQLPKG object
by all products.
types.
*SAME: The root folder specified by the vendor is used.
2. An object must be observable (have the required
folder-name: Specify the name of the root folder. observable information) in order to be converted.
| CODHOMEDIR 3. If an object needs to be converted (because it is for-
| Specifies the directories into which the code part of the matted for an earlier version of the operating
| product is being restored. This function is not supported system), but is not converted during this restore
| by all products. operation, the object is automatically converted the
first time it is used.
| Note: This parameter is mutually exclusive with the
| FLR parameter. Element 1: Force Conversion
| *SAME: The code part of the product is restored into *SYSVAL: The objects are converted based on the
| the directories specified when packaged or already value of the QFRCCVNRST system value.
| installed. *SAME may be specified as the only param-
Note: If this value is specified or defaulted and the
| eter value or within a list of directories. If used within a
system value QFRCCVNRST has a value of "1,"
| list, *SAME specifies that a particular directory is
the restore operation proceeds as if
| unchanged, though other directories may be different
FRCOBJCVN(*YES *RQD) is specified.
| than when the product was packaged or previously
| installed. *NO: The objects are not converted during the restore
operation.
| *PROMPT: The code directories to be used are dis-
| played. If the product is not currently installed, the direc- *YES: The objects are converted during the restore
| tory names can be changed. operation.
| path-name: Specify the home path directory name into Note: Specifying this value increases the time of the
| which the code part of the product is being restored. Up restore operation, but avoids the need to convert
| to 300 directories may be specified. For directory name the objects when they are first used.
| entries which are unchanged, *SAME can be specified
Element 2: Objects to Convert
| for the path name.
*RQD: The objects are converted only if they require
| LNGHOMEDIR conversion to be used by the current operating system.
| Specifies the directories into which the language part of If the objects are not observable, the objects are
| the product is being restored. This function is not sup- restored but are not converted.
| ported by all products.
*ALL: All objects are converted regardless of their
| Note: This parameter is mutually exclusive with the current format. Even if the objects are in the current
| FLR parameter. format, they are converted again. However, if the
| *SAME: The language part of the product is restored objects are not observable, the objects are not restored.
| into the directories specified when packaged or already
RSTLICPGM Examples
| installed. *SAME may be specified as the only param-
| eter value or within a list of directories. If used within a
Example 1: Restoring Program Using Defaults
| list, *SAME specifies that a particular directory is
| unchanged, though other directories may be different RSTLICPGM LICPGM(5716CD1) DEV(TAPð1)
| than when the product was packaged or previously
This command restores the CoOperative Development
| installed.
Environment/400 (CODE/400) licensed program to the
| *PROMPT: The language directories to be used are dis- system. The tape containing the licensed program objects
| played. If the product is not currently installed, the direc- must be put on the TAP01 tape drive. Because no other
| tory names can be changed. parameters are specified, the defaults are used for the
| path-name: Specify the home path directory name into command.
| which the language part of the product is being restored.
Example 2: Restoring a Third Version of a Product
| Up to 300 directories may be specified. For directory
| name entries which are unchanged, *SAME can be RSTLICPGM LICPGM(1MYPROD) OPTION(\BASE) DEV(TAPð1)
| specified for the path name. RLS(V3R6Mð) REPLACERLS(\NO) LIB(A B C)

FRCOBJCVN This command restores the base part of the V3R6M0


Specifies whether to convert user objects to the format 1MYPROD product to the system if the base of the V3R6M0
required for use in the current version of the operating 1MYPROD product is not currently installed on the system.
system when the objects are restored.

P3-856 OS/400 CL Reference - Part 2 (Full Version)


RSTLICPGM

Example 3: Restoring One Version of a Product Over This command restores the CODE/400 licensed program to
Another Version the system from the save file MYSAVF in MYLIB. Because
RSTLICPGM LICPGM(2MYPROD) OPTION(\BASE) DEV(TAPð1) no other parameters are specified, the defaults are used for
RLS(\FIRST) REPLACERLS(\ONLY) the command.

This command restores the first version release modification Example 5: Restoring a Third Version of a Product From
level of the base part of the 2MYPROD product that is found a Save File
on the tape in the TAP01 drive. It does not matter if the RSTLICPGM LICPGM(1MYPROD) OPTION(\BASE) DEV(\SAVF)
version release modification level of the base of the product RLS(V3R6Mð) REPLACERLS(\NO) LIB(A B C)
on the tape matches the version release modification level of SAVF(MYLIB/MYSAVF)
the base of the product on the system.
This command restores the base part of the V3R6M0
Example 4: Restoring Product From Save File 1MYPROD product to the system from save file MYSAVF in
RSTLICPGM LICPGM(5716CD1) DEV(\SAVF) MYLIB if the base of the V3R6M0 1MYPROD product is not
SAVF(MYLIB/MYSAVF) currently installed on the system.

Chapter 2. OS/400 Command Descriptions P3-857


RSTOBJ

RSTOBJ (Restore Object) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──RSTOBJ──OBJ(──┬─\ALL────────────────────────────┬──)──SAVLIB(──library-name──)──────────────────────────────────────────────5
│ ┌──
──────────────────────────┐ │
└──6─┬─generic\-object-name─┬─┴───
(1) ─┘
└─object-name──────────┘
5──DEV(──┬─\SAVF──────────────────────────┬──)──┬────────────────────────────────────┬──────────────────────────────────────────5
├─diskette-device-name───────────┤ │ ┌─\ALL────────────┐ │
├─optical-device-name────────────┤ │ │ ┌──
─────────────┐ │ │
├─tape-media-library-device-name─┤ (3) 6
└─OBJTYPE(────┴───object-type─┴─┴──)─┘
│ ┌──
──────────────────┐ │
└──6─tape-device-name─┴───
(2) ────────┘

5──┬───────────────────────────────────────┬──┬─────────────────────────────────────┬─── (P) ────────────────────────────────────────5


│ (4) ──────────────┐
┌─\MOUNTED─── │ │ ┌─\SEARCH─────────┐ │
(6, 7) ─┴─sequence-number─┴──)─┘
└─VOL(──┼─\SAVVOL──────────────────┼──)─┘ └─SEQNBR(─────
│ ┌──
───────────────────┐ │
└──6─volume-identifier─┴───(5) ─┘

5──┬───────────────────────────────────────┬──┬───────────────────────────┬──┬─────────────────────────────────────────────┬────5
│ ┌─\SAVLIB──────────────┐ │ │ ┌─\REWIND─┐ │ │ ┌─\LIBL/────────┐ │
(8) ─┴─data-file-identifier─┴──)─┘ └─ENDOPT(───
└─LABEL(─── (7) ─┼─\LEAVE──┼──)─┘ └─SAVF(──┼───────────────┼──save-file-name──)─┘
└─\UNLOAD─┘ ├─\CURLIB/──────┤
└─library-name/─┘
5──┬────────────────────────┬───────────────────────────────────────────────────────────────────────────────────────────────────5
│ ┌─\ALL───┐ │
(9) ┼──)─┘
└─OPTION(──┼─\NEW───
├─\OLD───┤
└─\FREE──┘
5──┬────────────────────────────────────────────────────────────────────────────────────────────────┬───────────────────────────5
│ ┌──
────────────────────────────────────────────────────────────────────────┐ │
│ │ ┌─\ALL───────────────┐ ┌─\ALL─────────────────────────────────┐ │ │
└─FILEMBR(──── 6
(10) ───(──┴─database-file-name─┴──┼──────────────────────────────────────┼──)─┴────
(11) ──)─┘
├─\NONE────────────────────────────────┤
│ ┌──
────────────────────────┐ │
└─(───6┬─generic\-member-name─┬┴────
(11) ──)─┘
└─member-name──────────┘
5──┬────────────────────────┬──┬─────────────────────────────────┬──┬─────────────────────────────────┬─────────────────────────5
│ ┌─\MATCH─┐ (12) ─date-when-saved──)─┘ └─SAVTIME(────
│ └─SAVDATE(──── (12) ─time-when-saved──)─┘
└─MBROPT(──┼─\ALL───┼──)─┘
├─\NEW───┤
└─\OLD───┘
5──┬────────────────────────────┬──┬───────────────────────────────────┬──┬──────────────────────────────┬──────────────────────5
│ ┌─\NONE───┐ │ │ ┌─\SYSVAL────────┐ │ │ ┌─\SAVLIB──────┐ │
(13) ┴──)─┘ └─FRCOBJCVN(──┼─\NO────────────┼──)─┘ └─RSTLIB(──┴─library-name─┴──)─┘
└─ALWOBJDIF(──┴─\ALL────
│ ┌─\RQD─┐ │
└─\YES──┴─\ALL─┴─┘
5──┬────────────────────────────────┬──┬──────────────────────────┬─────────────────────────────────────────────────────────────5
│ ┌─\SAVASP────────┐ │ │ ┌─\NONE────┐ │
└─RSTASP(──┴─asp-identifier─┴──)─┘ └─OUTPUT(──┼─\PRINT───┼──)─┘
└─\OUTFILE─┘
5──┬───────────────────────────────────────────────────────┬──┬──────────────────────────────────────────────┬──────────────────5
│ ┌─\LIBL/────────┐ │ │ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │
(14) ─┼───────────────┼──database-file-name──)─┘ └─OUTMBR(────
└─OUTFILE(──── (14) ─┴─member-name─┴──┼──────────┼──)─┘
├─\CURLIB/──────┤ └─\ADD─────┘
└─library-name/─┘
5──┬──────────────────────────┬──┬──────────────────────────────────────────┬──────────────────────────────────────────────────5%
│ ┌─\OBJ─┐ (15) ─'optical-file-path-name'──)─┘
│ └─OPTFILE(────
(14) ─┴─\MBR─┴──)─┘
└─INFTYPE(────
Notes:
1 A maximum of 300 repetitions

2 A maximum of 4 repetitions

3 A list of the valid OS/400 object types for this command is in Appendix A.

4 This value cannot be specified when using an optical media library device.

5 A maximum of 75 repetitions

6 If VOL(*SAVVOL) is specified, only SEQNBR(*SEARCH) can be specified on this parameter.

7 Applies to tape devices only

8 If VOL(*SAVVOL) is specified, only LABEL(*SAVLIB) can be specified on this parameter.

P3-858 OS/400 CL Reference - Part 2 (Full Version)


RSTOBJ

9 If VOL(*SAVVOL) and RSTLIB(*SAVLIB) are specified, OPTION(*NEW) cannot be specified.


10 If the FILEMBR parameter or ALWOBJDIF(*ALL) is specified, MBROPT(*MATCH) cannot be specified.
11 A maximum of 50 repetitions
12 If VOL(*SAVVOL) is specified, SAVDATE and SAVTIME cannot be specified.
13 If the FILEMBR parameter or ALWOBJDIF(*ALL) is specified, MBROPT(*MATCH) cannot be specified.
14 This parameter is valid only if OUTPUT(*OUTFILE) is specified.
15 This parameter is required when an optical device name is specified.
P All parameters preceding this point can be specified in positional form.

Purpose do not exist on the system because they were deleted or


they are being restored in a different system, the system
The Restore Object (RSTOBJ) command restores to the must find the storage to store everything (the description and
system a single object, or a group of objects, in a single the data portion) about each unknown object.
library, that were saved on diskette, tape, optical volume, or
in a save file by using a single command. The types of The user profile of the system default owner (QDFTOWN)
objects that can be restored by this command are listed in becomes the default owner of objects restored in the system
the OBJTYPE parameter. They can be saved either as sep- whose owner is not known to the system.
arate objects or as part of the library save operation. The
RSTOBJ command restores the object description and con- If an object already exists in the library to which it is restored,
tents of each object specified in the command. the public and private authorities of the existing object are
kept. If the object does not exist in the library, all public
For job queues, output queues, user-defined message authorities are restored, but any private authorities must be
queues, logical files, and data queues, only the object granted again. For an existing output queue object that is
descriptions are restored; the contents of those objects are actively spooling during the restore operation, or a data
not restored. However, logical file access paths can be queue that already exists in the library, none of the attributes
saved by a save command with ACCPTH(*YES) specified; if are restored, and a diagnostic message is issued.
this is done, the access paths can be restored. More infor-
mation on restoring access paths is in the DB2 for AS/400 If an object is being restored over an existing object on the
Database Programming book. system, the object auditing value of the existing object is
kept. If the object is being restored as new to the system,
The command can be used to restore the objects even if the the object auditing value is restored from the media.
object storage was freed by the Save Object (SAVOBJ)
command or Save Library (SAVLIB) command, or if the Attention:
objects were deleted by the associated delete command for
Do not use the Restore Object (RSTOBJ) command to
that object type. If the storage was not freed, each object is
restore licensed programs into library QSYS. Unpredictable
restored in the same area of storage that it previously occu-
results can occur.
pied. If the version of the object being restored is larger than
the version in the system (for example, data records that Restrictions:
were deleted from the system still exist in the saved version
of a file), the additional storage needed for the object is 1. This command is shipped with public *EXCLUDE
acquired. If the saved version of the object is smaller (for authority.
example, data records that are added to the system), the 2. The user must have use authority for the Create Save
space that was acquired for the object remains assigned to File (CRTSAVF) command when restoring a save file
that object and available for use by that object. that does not currently exist on the system.

If logical file access paths were saved (ACCPTH(*YES) was 3. When saving or restoring to an existing database file
specified when the objects were saved), the access paths using the OUTFILE parameter, the user must have
are restored if (1) all based-on physical files are also being execute authority to the output file library.
restored by the same restore command, (2) the logical file is 4. With the exception of overrides for the restore listing file
also being restored by the same restore command, or the and database files specified on the OUTFILE parameter,
logical file already exists on the system (the same file exists, this command ignores all file overrides that are currently
not a re-created version), and (3) MAINT(*IMMED or *DLY) in effect for the job.
is in effect for the logical file if it still exists on the system.
5. To use this command, the user must have the special
If the storage was freed, the system finds the storage space authority *SAVSYS, specified in the user profile
needed to store the contents (only the data portion) of each (SPCAUT parameter), or the following:
file, module, program, service program, journal receiver, and Ÿ Add and execute authority for the specified library
Structured Query Language (SQL) package. If the objects and save file library.

Chapter 2. OS/400 Command Descriptions P3-859


RSTOBJ

Ÿ Object existence authority for, or be the owner of, *ALL: All the objects saved from the specified library
each object specified if the object already exists in are restored, depending on the values specified for the
the library on the system. Object existence OBJTYPE and OPTION parameters.
authority and use authority are required for message
generic*-object-name: Specify the generic name of the
queue objects. If the object does not already exist
object. A generic name is a character string of one or
in the library on the system, the user must have add
more characters followed by an asterisk (*); for example,
authority for the user profiles that own each object
ABC*. The asterisk (*) substitutes for any valid charac-
being restored.
ters. A generic name specifies all objects with names
Ÿ If VOL(*SAVVOL) is specified, use authority to the that begin with the generic prefix, for which the user has
saved-from library. authority. If an asterisk is not included with the generic
(prefix) name, the system assumes it to be the complete
6. The RSTOBJ command does not restore the library's
object name. For more information on the use of
data dictionary or its associated database files. To do
generic functions, refer to “Rules for Specifying Names.”
this, the RSTLIB command must be used.
7. The user must have use authority for the save file to
object-name: Specify one or more names of specific
objects to restore. Both generic names and specific
restore from the save file. In addition, the user must
names can be specified in the same command.
have use authority for the device description when
restoring from tape, diskette, or optical device. SAVLIB
8. If this command is used to restore a program, the copy Specifies the name of the library from which the objects
of that program that is currently in the system must not were saved. If RSTLIB is not specified, this is also the
be running while the program is being restored. If this name of the library to which the objects are restored.
occurs, the running program will not be restored. DEV
9. Objects saved by separate commands must also be Specifies the name of the device used to restore the
restored by separate commands. If a single command is objects. The device name must already be known on
used, some of the objects are not restored. the system by a device description.
10. If the user domain object user space (*USRSPC), user *SAVF: The restore operation is done using the save
index (*USRIDX), or user queue (*USRQ) is restored to file specified on the save file (SAVF) parameter.
a library that is not permitted in the system value diskette-device-name: Specify the name of the diskette
QALWUSRDMN (allow user domain objects in libraries), device used to restore objects.
the object is converted to the system domain.
optical-device-name: Specify the name of the optical
Note: To see the parameter and value descriptions for this device used for the restore operation.
command, refer to the online help text. For more
information about printing the help text, refer to tape-media-library-device-name: Specify the name of
“Printing CL Command Descriptions” in Chapter 1. the tape media library device used for the restore opera-
tion.

Required Parameters tape-device-name: Specify the names of one or more


tape devices used for the restore operation. If more
OBJ than one tape device is used, specify the names of the
Specifies the names of one or more objects to restore. devices in the order in which they are used. Using more
The objects specified are restored from the first file that than one tape device permits one tape volume to be
meets the search criteria and contains any of the rewound and unloaded while another tape device pro-
objects. If a tape or diskette contains multiple files for cesses the next tape volume.
the same library, specify the tape file sequence number
or the diskette file label to ensure that all of the correct
objects are restored.
Optional Parameters
If the file does not contain all of the objects specified, OBJTYPE
diagnostic messages are issued for the objects not Specifies the types of OS/400 system objects that are
found. The completion message contains a count of restored. More information on this parameter is in
objects restored and objects not restored. Appendix A, “Expanded Parameter Descriptions.”

If the OBJTYPE parameter is not specified when the *ALL: All object types that are specified by name and
command is run, all of the object types listed in the that were saved from the specified library are restored.
description of the OBJTYPE parameter are restored, if If *ALL is also specified for the OBJ parameter, then all
they are in the specified library on the media or in the objects saved for that library are restored.
save file and have the specified names. object-type: Specify the value for each of the types of
objects that are restored (such as command (*CMD), file
(*FILE), or program (*PGM)). This value can be

P3-860 OS/400 CL Reference - Part 2 (Full Version)


RSTOBJ

repeated; the maximum repetitions varies depending on Ÿ If the characteristics of the device specified in the
the environment. DEV parameter do not match the device and
location of the most recently saved version of the
The object types that can be restored also can be saved
library, an error message is sent to the user, and
and restored by the Save Library (SAVLIB), Save
the function is ended.
Change Object (SAVCHGOBJ), Save Object (SAVOBJ),
Restore Library (RSTLIB), and Restore Licensed Ÿ If the wrong volume is placed in a device in the
Program (RSTLICPGM) commands. Data dictionaries location specified by the command, a message is
(*DTADCT) are only restored with the RSTLIB sent to the system operator that identifies the first
command. Other object types can be saved only by the volume that must be placed in the device before the
Save System (SAVSYS) command and restored by the objects can be restored.
OS/400 system restore operation, or saved by the Save
Ÿ When OBJ(*ALL) and OBJTYPE(*ALL) is specified,
Document Library Object (SAVDLO) command and
the objects are considered in the order they would
restored by the Restore Document Library Object
appear in a display produced by the Display Library
(RSTDLO) command.
(DSPLIB) command. The object names and types
Note: *CFGL object types can be restored using the specified in the RSTOBJ command are used to
RSTOBJ command only from objects saved on determine which file of saved objects is used in the
releases prior to V2R2M0. *CFGL object types restore operation. One file is produced for each
saved on V2R2M0 and newer releases are SAVLIB or SAVOBJ command run. The file chosen
restored using the Restore Configuration is the one in which the first considered object was
(RSTCFG) command. last saved. Objects that were not saved in the file
chosen to be processed, or that were more recently
VOL
saved, are not restored; an error message is sent to
Specifies the volume identifiers of the tape, diskette, or
the user for each unrestored object.
optical volumes, from which the objects are being
restored. The volumes must be in the same order as Ÿ If *SAVVOL is specified, the SAVDATE and
they were when the library was saved. If the library was SAVTIME parameters cannot be specified.
known to the system before the restore operation, the Ÿ If *SAVVOL is specified and the RSTLIB value is
system can verify whether the volumes put on tape equal to the SAVLIB value, OPTION(*NEW) cannot
contain the current version of the library. The volume be specified.
that contains the beginning of the file to be restored
Ÿ If *SAVVOL is specified, SEQNBR(*SEARCH) and
should be placed in the tape or diskette unit. More infor-
LABEL(*SAVLIB) must be specified.
mation on this parameter is in Appendix A, “Expanded
Parameter Descriptions.” volume-identifier: Specify the identifiers of one or more
Note: The version of the objects that is restored is the volumes in the order in which they are placed in a
first version found in the specified location, device and used to restore the objects.
unless a specific version is identified on the
SEQNBR
SAVDATE and SAVTIME parameters.
Specifies, only when tape is used, the sequence number
*MOUNTED: The objects are restored from the volumes used for the restore operation.
placed in the device specified on the DEV parameter.
*SEARCH: The volume on a tape device is searched
For a media library device, the volume to be used is the
for a data file with an identifier that is a match for the
next cartridge in the category mounted by the Set Tape
SAVLIB parameter value; when a match is found, the
Category (SETTAPCGY) command.
object is restored. If the last operation on the device
Note: This value cannot be specified when using an specifies ENDOPT(*LEAVE) (that is, the tape is posi-
optical media library device. tioned at the location where the last operation ended),
the file search starts with the first data file beyond the
*SAVVOL: The system, using the save/restore history
current tape position. If ENDOPT(*LEAVE) was not
information, determines which volumes contain the most
used for the last operation (or if the tape was manually
recently saved version of the objects.
rewound after an ENDOPT(*LEAVE) operation), the
Note: If this is a restore from an optical device, only the search starts with the first data file on the volume.
first 6 characters of the volume name are avail-
able. If the volume name of the optical media
| sequence-number: Specify the sequence number of the
| file. Valid values range from 1 through 16777215.
exceeds 6 characters, the volume may not be
found. You should specify the complete volume LABEL
or file name on the command instead of using Specifies the name that identifies the data file on the
VOL(*SAVVOL) when the name of the optical tape or diskette used for the restore operation. This
media exceeds 6 characters. label must have been specified on the save command.
When *SAVVOL is specified, the following operational
characteristics and restrictions apply:

Chapter 2. OS/400 Command Descriptions P3-861


RSTOBJ

*SAVLIB: The file label is the name of the library speci- *OLD: Only objects in the library that have a saved
fied on the SAVLIB parameter. version are restored; the current version of each object
is replaced by the saved version. Only objects known to
data-file-identifier: Specify the data file identifier (up to
the library are restored. If any saved objects are no
17 characters) of the data file used for the restore opera-
longer part of the current version of the library, they are
tion. This option is valid only for a single library restore.
not added to the library; an informational message is
ENDOPT sent for each object, but the restore operation continues.
Specifies, when tape is used, what positioning operation
*FREE: The saved objects are restored only if they
is automatically done on the tape volume after the
exist in the library in the system with their space freed.
restore operation ends. If more than one volume is
The saved version of each object is restored in the
included, this parameter applies only to the last tape
system in its previously freed space. This option
volume used; all other tape volumes are rewound and
restores objects that had their space freed when they
unloaded when the end of the tape is reached.
were saved. If any saved objects are no longer part of
*REWIND: The tape is automatically rewound, but not the current version of the library, or if the space is not
unloaded, after the operation has ended. free for any object, the object is not restored and an
informational message is sent for each object. The
*LEAVE: The tape does not rewind or unload after the
restore operation continues and all of the freed objects
operation ends. It remains at the current position on the
are correctly restored.
tape drive.
*UNLOAD: The tape is automatically rewound and FILEMBR
unloaded after the operation ends. Specifies the database file members to restore. This
parameter is made up of two parts: the file name and
SAVF the member name. This parameter cannot be specified
Specifies the qualified name of the save file that con- if MBROPT(*MATCH) is specified.
tains the save data for the objects that are restored.
Notes:
The name of the save file can be qualified by one of the
following library values: 1. Each database file specified on the FILEMBR
parameter must also be specified on the OBJ
*LIBL: All libraries in the job's library list are parameter by either its complete name, a generic
searched until the first match is found. name, or *ALL.
*CURLIB: The current library for the job is 2. The OBJTYPE parameter value must be *ALL, or it
searched. If no library is specified as the current must include the *FILE value.
library for the job, the QGPL library is used.
3. Generic names are not valid for the database file
library-name: Specify the name of the library to be name, but are allowed for the member name.
searched.
4. Duplicate file names are not allowed.
save-file-name: Specify the name of the save file from
Element 1: Database File Names
which to perform the restore.
*ALL: The member list following this value applies to all
OPTION
files specified on the OBJ parameter.
Specifies how to handle restoring each object.
database-file-name: Specify the name of the database
*ALL: All the objects in the saved library are restored to
file that contains the members to be restored. Up to 50
the library. All objects in the saved library are restored
of the file/member combinations can be specified for a
to the library on the system. Objects in the saved library
single command.
replace the objects in the library on the system. Saved
objects not on the system are added to the library on the Element 2: Member Names
system. Objects in the system library but not in the *ALL: All members are restored from the specified file.
saved library remain in the library.
*NONE: No members are restored from the specified
*NEW: Only the objects in the saved library that do not file. Only the file description is restored.
exist in the current version of the library in the system
are added to the library. Only objects not known to the
generic*-member-name: Specify the generic name of
the members to be restored from the specified file. A
library in the system are restored; known objects are not
generic name is a character string of one or more char-
restored. This option adds objects that were deleted
acters followed by an asterisk (*); for example, ABC*.
after they were saved or that are new to this library. If
The asterisk substitutes for any valid characters. A
any saved objects have a current version in the library in
generic name specifies all objects with names that begin
the system, they are not restored; an informational
with the generic prefix, for which the user has authority.
message is sent for each object, but the restore opera-
If an asterisk is not included with the generic (prefix)
tion continues.
name, the system assumes it to be the complete object

P3-862 OS/400 CL Reference - Part 2 (Full Version)


RSTOBJ

name. For more information on the use of generic func- QDATSEP, are used, the value must be enclosed in
tions, refer to “Rules for Specifying Names.” apostrophes. If a volume identifier or VOL(*MOUNTED)
is specified, but SAVDATE is not, the restored version of
member-name: Specify the name of the member to be
the objects is the first version found on the volume. This
restored from the specified file.
parameter is valid only if a volume identifier or
Notes: VOL(*MOUNTED) is specified, or if a save file (SAVF
parameter) is specified. Specify the date when the
1. If the nongeneric member names are specified, all
objects were saved.
specified members must exist in the file in order for
any part of the file to be restored. SAVTIME
2. If generic member names are specified, the file is Specifies the time that the objects were saved.
not restored if it does not contain any members that The time can be specified with or without a time sepa-
match the generic names. For example, if the user rator:
specifies PAY* as a generic member name, and the
system is unable to find any members whose Ÿ Without a time separator, specify a string of 4 or 6
names start with PAY, the file is not restored. If no digits (hhmm or hhmmss) where hh = hours, mm =
files specified by the FILEMBR parameter are minutes, and ss = seconds.
restored because no members with the specific Ÿ With a time separator, specify a string of 5 or 8
generic name can be found, a diagnostic message digits where the time separator specified for your job
is sent, the restore operation ends, and an escape is used to separate the hours, minutes, and
message is sent specifying the number of files not seconds. If you enter this command from the
restored. If at least one of the files processed for command line, the string must be enclosed in apos-
the FILEMBR parameter is restored, the diagnostic trophes. If a time separator other than the sepa-
message is not sent, and the number of files not rator specified for your job is used, this command
restored is shown on the final completion message. fails.
3. The members are first checked by using the
If a volume identifier or *MOUNTED is specified on the
MBROPT parameter. If a match is found, the
VOL parameter, but this parameter is not specified, the
members are checked against the list of the
version of the objects to be restored is the first version
FILEMBR parameter.
found on the volume. This parameter is ignored when
MBROPT the SEQNBR parameter is specified.
Specifies, for database files currently on the system, This parameter is valid only if the SAVDATE parameter
which file members are restored. is also specified.
If MBROPT(*MATCH) is used, the member list in the
ALWOBJDIF
saved file must match, member for member, the current
Specifies whether certain differences encountered during
version on the system.
a restore operation are allowed. The differences
Note: Before restoring a file, the system verifies that include:
the file and member creation dates of the known
Ÿ Ownership: The owner of an object on the system
system objects match the creation dates of the
is different than the owner of an object from the
objects to be restored. If this check fails, the file
save operation.
is not restored.
Ÿ File creation date: The file creation date of the
*MATCH: The saved members are restored if the lists
database file on the system does not match the cre-
of the files where they reside match, member for
ation date of the file that was saved.
member, the lists of the current system version.
Ÿ Member creation date: The file creation date of the
*ALL: All members in the saved file are restored.
database file on the system does not match the cre-
*NEW: Only new members (members not existing on ation date of the member that was saved. The
the system) are restored. member creation date on the system does not
*OLD: Only members already existing on the system match the creation date from the save operation.
are restored. Ÿ Validation value verification: The validation value
created at the time an object was created does not
SAVDATE
match the validation value created during the
Specifies the date the objects were saved. If the most
restore operation of an object on a system with a
recently saved version is not the one being restored, or
QSECURITY level of 40 or higher.
if multiple saved versions reside on the media volume,
specify the date that identifies which version of the Ÿ Authorization list linking: The object is being
objects to restore. The date must be specified in the job restored to a system different from the one on which
date format. If separators, specified by the system value it was saved.

Chapter 2. OS/400 Command Descriptions P3-863


RSTOBJ

Notes: not exist on the new system, a message that


includes the name of the missing list is issued and
1. The user of this parameter must have *ALLOBJ
the public authority is set to *EXCLUDE.
special authority.
2. If *ALL is specified, *MATCH cannot be specified on FRCOBJCVN
the MBROPT parameter. Specifies whether to convert user objects to the format
required for use in the current version of the operating
*NONE: None of the differences described above are system when the objects are restored.
allowed on the restore operation. For validation value
Notes:
verification failure cases, the object is restored but own-
ership is transferred to QDFTOWN and all authorities 1. This parameter applies only to user objects of the
are revoked. For authorization list cases, the object is *MODULE, *PGM, *SRVPGM, and *SQLPKG object
restored, but the object is not linked to the authorization types.
list, and public authority is set to *EXCLUDE. For all
2. An object must be observable (have the required
other cases, a diagnostic message is sent for the object,
observable information) in order to be converted.
and the object is not restored.
3. If an object needs to be converted (because it is for-
*ALL: All of the differences listed above are allowed for
matted for an earlier version of the operating
the restore operation. An informational message is sent,
system), but is not converted during this restore
except for valid value verification and authorization list
operation, the object is automatically converted the
linking cases, and the object is restored. The following
first time it is used.
facts must be noted:
Element 1: Force Conversion
Ÿ If the owners of the object do not match, the object
is restored, but the ownership and authorities it had *SYSVAL: The objects are converted based on the
before the restore operation are retained. value of the QFRCCVNRST system value.

Ÿ Either the file itself or members of the file are Note: If this value is specified or defaulted and the
restored based on the following facts: system value QFRCCVNRST has a value of "1,"
the restore operation proceeds as if
1. If there is a file level mismatch and
FRCOBJCVN(*YES *RQD) is specified.
ALWOBJDIF(*ALL) has been specified, the
existing version of the file is renamed and the *NO: The objects are not converted during the restore
saved version of the file is restored. operation.

2. If there is a member level mismatch, the *YES: The objects are converted during the restore
existing version of the member is renamed and operation.
the saved version of the member is restored. Note: Specifying this value increases the time of the
Ÿ Validation value verification: restore operation, but avoids the need to convert
the objects when they are first used.
1. For programs with no validation value stored on
the media (in reference to program data saved Element 2: Objects to Convert
on an OS/400 system prior to version 1, release *RQD: The objects are converted only if they require
3.0), the program is restored and the system conversion to be used by the current operating system.
does not attempt to recreate it. Nothing is If the objects are not observable, the objects are
logged in the security journal and no informa- restored but are not converted.
tional messages are sent.
*ALL: All objects are converted regardless of their
2. For programs that do have a validation value current format. Even if the objects are in the current
stored on the media and the system fails to format, they are converted again. However, if the
recreate the program, the original version of the objects are not observable, the objects are not restored.
program is restored and an entry is logged in
the security journal and job log. RSTLIB
Specifies whether the objects are restored to a different
Ÿ The informational message causes a diagnostic library or to the same library where they were saved.
message to be sent indicating that security or integ-
rity changes occurred during the restore operation. *SAVLIB: The objects are restored to the same library
This results in sending an escape message for the from which they were saved.
restore operation. library-name: Specify the name of the library to which
Ÿ If the user is restoring objects to a system different the saved objects are restored.
from the one on which they were saved and the RSTASP
objects are secured by an authorization list, speci- Specifies whether the objects are restored to the same
fying *ALL automatically links the objects to the auxiliary storage pool (ASP) from which they were saved
authorization list again. If the authorization list does

P3-864 OS/400 CL Reference - Part 2 (Full Version)


RSTOBJ

or to another specific ASP. This parameter affects only *CURLIB: The current library for the job is
object types, journals, journal receivers, save files, and searched. If no library is specified as the current
libraries. All other object types are restored to the ASP library for the job, the QGPL library is used.
of the library unless the library is in a user ASP and the
library-name: Specify the name of the library to be
object type is not one of the valid user ASP object types.
searched.
A list of the valid user ASP object types and additional
information about user ASPs are in the Backup and database-file-name: Specify the name of the database
Recovery book. file to which the output of the command is directed.
Journals, journal receivers, and save files can be OUTMBR
restored to a user ASP with the library in the system Specifies the name of the database file member to which
ASP if the objects do not already exist in a different the output is directed when OUTPUT(*OUTFILE) is
ASP, and if the ASP to which they are being restored specified.
contains no libraries.
Element 1: Member to Receive Output
User ASPs that contain one or more libraries cannot
*FIRST: The first member in the file receives the output.
contain valid ASP object types, journals, journal
If OUTMBR(*FIRST) is specified and the member does
receivers, and save files in libraries on the system ASP.
not exist, the system creates a member with the name of
*SAVASP: The objects are restored to the same auxil- the file specified on the OUTFILE parameter.
iary storage pools from which they were saved.
member-name: Specify the name of the file member
asp-identifier: Specify the ASP identifier. When the that receives the output. If OUTMBR(member-name) is
specified ASP is 1, the objects are restored to the specified and the member does not exist, the system
system ASP, and when the ASP is 2 through 16, the creates it. If the member exists, the user can add
objects are restored to the user ASP specified. records to the end of the existing member or clear the
Note: System libraries (QSYS, QUSRSYS, and QDOC) existing member and add the records.
must not be created in or restored to user ASPs Element 2: Operation to Perform on Member
(2 through 16). Doing so can cause unpredict-
*REPLACE: The existing records in the specified data-
able results.
base file member are replaced by the new records.
OUTPUT
*ADD: The new records are added to the existing infor-
Specifies whether a listing that shows information about
mation in the specified database file member.
the status of the object is created and directed to an
output file. The listing shows the restore information and INFTYPE
shows all objects, restored, not restored, and excluded. Specifies the type of information directed to the data-
Information about each object's security is listed for the base file. This parameter is valid only when
restored objects. More information on this parameter is OUTPUT(*OUTFILE) is specified.
in Appendix A, “Expanded Parameter Descriptions.”
*OBJ: The list contains an entry for each object
*NONE: No output is created. requested to be restored.
*PRINT: The output is printed with the job's spooled *MBR: The list contains an entry for each object or, for
output. database files, each member requested to be restored.
*OUTFILE: The output is directed to the database file OPTFILE
specified on the OUTFILE parameter. Specifies the path name of the optical file that is used
Note: You must specify the database file name on the for the restore operation, beginning with the root direc-
OUTFILE parameter when OUTPUT(*OUTFILE) tory of the volume. For more information on specifying
is specified. path names, refer to Chapter 2, “Path Names
(*PNAME).”
OUTFILE
Note: This parameter is required when using an optical
Specifies the qualified name of the database file to
device.
which the information about the object is directed when
*OUTFILE is specified on the OUTPUT parameter. If
the file does not exist, this command creates a database
file in the specified library. If a new file is created, the Examples
system uses QASRRSTO in QSYS with the format name
Example 1: Restoring Most Recently Saved Version
QSRRST as a model.
RSTOBJ OBJ(PAYROLL) SAVLIB(LIBX) DEV(TAPð1)
The name of the database file can be qualified by one of OBJTYPE(\PGM) VOL(\SAVVOL)
the following library values:
This command restores to LIBX the program named
*LIBL: All libraries in the job's library list are
PAYROLL that was saved from LIBX. The tape drive named
searched until the first match is found.

Chapter 2. OS/400 Command Descriptions P3-865


RSTOBJ

TAP01 is used to restore the most recently saved version of Example 4: Printing An Output List
the program. RSTOBJ OBJ(\ALL) SAVLIB(LIB) DEV(TAPð1) OBJTYPE(\PGM)
VOL(SVOL) SEQNBR(2) SAVDATE(ð82392)
Example 2: Specifying Save Date and Time SAVTIME(143ððð) OUTPUT(\PRINT)
RSTOBJ OBJ(PAY\) SAVLIB(LIBX) DEV(DKTð1) VOL(ABCD)
OPTION(\OLD) SAVDATE(1ð2292) All programs that were saved from the library named LIB that
SAVTIME(143ððð) RSTLIB(LIBY) exist in the saved version on the tape volume named SVOL,
sequence number 2, saved at 14:30:00 on 08/23/92, are
All objects whose names start with PAY and that were saved restored to the library named LIB. An output list of all
from the library named LIBX on diskette volume ABCD at objects restored as well as objects not restored is provided.
14:30:00 on 10/22/92 are restored to LIBY. Volume ABCD
must be put on the diskette device named DKT01. Because Example 5: Restoring Journal Receivers
OPTION(*OLD) is specified, the only objects restored are RSTOBJ OBJ(\ALL) SAVLIB(BACKUP) DEV(\SAVF)
those having the same object name and type both in LIBY on OBJTYPE(\JRNRCV) SAVF(SAVEJ) RSTASP(3)
the system and in LIBX on diskette.
All journal receivers that were saved from the library named
Example 3: Adding a New Program to the QGPL Library BACKUP into the save file named SAVEJ are restored to the
RSTOBJ OBJ(NEWPROG) SAVLIB(QGPL) DEV(DKTð1) library named BACKUP. The journal receivers are restored
OBJTYPE(\PGM) VOL(PGMS) OPTION(\NEW) to ASP 3 (unless they already exist in the library named
BACKUP and are in a different ASP or ASP 3 contains a
A new program named NEWPROG is added to the general library).
purpose library, QGPL. It is restored from a volume labeled
PGMS that is inserted in the diskette device named DKT01.

P3-866 OS/400 CL Reference - Part 2 (Full Version)


RSTSHF

RSTSHF (Restore Bookshelf) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌──
──────────────────┐
55──RSTSHF──SHELF(──┬──6─bookshelf-name───(1) ┴─┬──)──DEV(──┬─device-name─┬──)────
(P) ─┬─────────────────────────────────┬───────────────5
├─\ALL─────────────────┤ └─\SAVF───────┘ │ ┌─\SYSTEM─────────┐ │
(2) ─────────────┤
├─\LIST─── └─SAVDIR(──┴─saved-directory─┴──)─┘
└─\PRODUCT─────────────┘
5──┬───────────────────────────────────┬──┬──────────────────────────────────┬──┬───────────────────────────┬───────────────────5
│ ┌─\SAVDIR───────────┐ │ │ ┌─\MOUNTED──────────┐ │ │ ┌─\REWIND─┐ │
(3) ─┴─volume-identifier─┴──)─┘ └─ENDOPT(───
└─RSTDIR(──┴─restore-directory─┴──)─┘ └─VOL(─── (3) ─┼─\LEAVE──┼──)─┘
└─\UNLOAD─┘
5──┬───────────────────────────────────────────────┬───────────────────────────────────────────────────────────────────────────5%
│ ┌─\LIBL/────────┐ │
(4) ─┼───────────────┼──save-file-name──)─┘
└─SAVF(───
├─\CURLIB/──────┤
└─library-name/─┘
Notes:
1 A maximum of 300 repetitions.

2 Only valid for interactive entry.

3 Applies to tape devices only.

4 Applies to save file only, specify DEV(*SAVF).

P All parameters preceding this point can be specified in positional form.

Purpose use of internal objects may have been obtained by these


commands.
The Restore Bookshelf (RSTSHF) command restores
4. The directory into which the bookshelves are restored
bookshelves, the books contained in the bookshelves, and
(specified on the RSTDIR parameter) must exist on the
the bookshelf indexes that are on the AS/400 Softcopy
system.
Library tape or that were saved using the Save Shelf
(SAVSHF) command. Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more
Restoring a bookshelf either replaces the existing bookshelf information about printing the help text, refer to
and its associated books and bookshelf index if they exist on “Printing CL Command Descriptions” in Chapter 1.
the system, or adds them to the system. If they exist, they
are first deleted, then restored.
Required Parameters
RSTSHF does not require a dedicated system; however, indi-
SHELF
vidual objects in use when the restore command is issued
Specifies the bookshelf being restored.
cannot be replaced and, therefore, halt the RSTSHF opera-
tion. bookshelf-name: Specify the user-assigned name of the
bookshelf being restored. Up to 8 characters can be
All objects that are not in use, are restored from the directory specified for the name; up to 300 names can be speci-
on the media to the specified directory. If the directory to fied. All bookshelves named must be in the directory
restore to does not exist, the directory is created and the specified on the SAVDIR parameter.
restore is processed.
*ALL: All bookshelves that are saved on the media and
More information on restoring bookshelves can be found in meet the values specified on the SAVDIR parameter are
the Software Installation book and the InfoSeeker Use book. restored. All items in the directory specified by the
RSTDIR parameter are deleted before the new informa-
Restrictions: tion is installed.
1. This command is shipped with public *EXCLUDE *LIST: All bookshelves that are saved on the media are
authority. listed for the user to select from. The selected
bookshelves are restored.
2. To use this command, you must have *SAVSYS or
*ALLOBJ special authority or be enrolled in the system *PRODUCT: For each IBM product currently installed,
distribution directory. the corresponding bookshelves that are found on the
media are restored. All items in the directory specified
3. This command cannot be used while another job is
by the RSTDIR parameter are deleted before the new
running commands such as RSTSHF, SAVSHF,
information is installed.
RCLDLO, SAVDLO, and RSTDLO because exclusive

Chapter 2. OS/400 Command Descriptions P3-867


RSTSHF

DEV *REWIND: The tape is automatically rewound, but not


Specifies the name of the device to be used to restore unloaded, after the operation has ended.
the bookshelves. The device name must be identified
*LEAVE: The tape does not rewind or unload after the
on the system by a device description.
operation ends. It remains at the current position on the
*SAVF: The bookshelves are restored from a save file. tape drive.
device-name: Specify the device name used for the *UNLOAD: The tape is automatically rewound and
restore operation. unloaded after the operation ends.

SAVF
Optional Parameters Specifies the qualified name of the save file that con-
tains the saved bookshelves to be restored.
SAVDIR
Specifies the name of the directory on the media from The name of the save file can be qualified by one of the
which the bookshelves are restored. following library values:
*SYSTEM: The bookshelves are restored from the *LIBL: All libraries in the job's library list are
system bookshelf directory, searched until the first match is found.
'/QDLS/QBKBOOKS/BOOKS'.
*CURLIB: The current library for the job is
saved-directory: Specify the name of the saved direc- searched. If no library is specified as the current
tory from which bookshelves are restored. Up to 63 library for the job, the QGPL library is used.
characters can be specified for the directory name. The
library-name: Specify the name of the library to be
directory name must be enclosed in apostrophes (').
searched.
RSTDIR
save-file-name: Specify the name of the save file from
Specifies the name of the directory in which the
which to restore bookshelves.
bookshelves being restored are placed. The name can
be any directory name up to 63 characters.
*SAVDIR: The bookshelves being restored are placed
Examples
into the same directory from which they were saved. Example 1: Restoring All Bookshelves from Tape

restore-directory-name: Specify the name of the direc- RSTSHF SHELF(\ALL) DEV(TAPð1)


tory in which the restored bookshelves are placed. The
directory name must be enclosed in apostrophes ('). This command restores all bookshelves and their books and
bookshelf indexes found on the tape mounted on tape drive
VOL TAP01.
Specifies the volume identifier of the media volume from
which the objects are being restored. The volume that Example 2: Restoring A Single Bookshelf from Tape
contains the set of bookshelves being restored should
be placed in the device (tape or diskette). RSTSHF SHELF(QBKADAðð) DEV(TAPð1)
RSTDIR('/QDLS/MARCIA')
*MOUNTED: The objects are restored from the volumes
placed in the device specified on the DEV parameter. This command restores the QBKADA00 bookshelf, index,
This value is only valid when the device is a tape device. and books from tape drive TAP01 into the directory
For a media library device, the volume to be used is the /QDLS/MARCIA.
next cartridge in the category mounted by the Set Tape
Category (SETTAPCGY) command. Example 3: Restoring Books for Installed Products from
Tape
volume-identifier: Specify the volume identifier of the
media volume that the data is to be restored from. RSTSHF SHELF(\PRODUCT) DEV(TAPð1)
ENDOPT
This command determines the products installed on the
Specifies the operation that is automatically performed
system and restores the books for those products from tape
on the tape volume after the operation ends.
drive TAP01 into the system directory.

P3-868 OS/400 CL Reference - Part 2 (Full Version)


RSTS36F

RSTS36F (Restore System/36 File) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(1) ─┬─\PHYFILE───────────┬──)────
55──RSTS36F──TOFILE(──┬─\SET──────┬──)──TOLIB(──library-name──)──DEV(─── (P) ──────────────────────────5
└─file-name─┘ │ ┌──
─────────────┐ │
6 (2) ─┘
└───device-name─┴───
5──┬─────────────────────────────┬──┬──────────────────────┬──┬───────────────────────────┬─────────────────────────────────────5
│ ┌─#SAVE──────────┐ │ │ ┌─\NO──┐ │ └─FROMLABEL(──file-label──)─┘
└─SET(──┴─set-identifier─┴──)─┘ └─IGCDTA(──┴─\YES─┴──)─┘
5──┬─────────────────────────────────┬──┬───────────────────────┬──┬──────────────────────────────────────┬─────────────────────5
└─CRTDATE(──file-creation-date──)─┘ │ ┌─\NO──┐ │ │ ┌─\SEARCH──────────────┐ │
└─DATDIFF(──┴─\YES─┴──)─┘ └─SEQNBR(──┴─file-sequence-number─┴──)─┘
5──┬───────────────────────────────────────┬──┬─────────────────────────┬──┬─────────────────────────────────────────────┬──────5
│ ┌─\MOUNTED─────────────────┐ │ │ ┌─\REWIND─┐ │ │ ┌─\LIBL/────────┐ │
│ │ ┌──
───────────────────┐ │ (4) ─┼───────────────┼──file-name──)─┘
│ └─ENDOPT(──┼─\LEAVE──┼──)─┘ └─PHYFILE(───
6 (3) ─┴──)─┘
└─VOL(──┴───volume-identifier─┴─── └─\UNLOAD─┘ ├─\CURLIB/──────┤
└─library-name/─┘
5──┬────────────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\NOREPLACE─┐ │
└─MBROPT(──┴─\REPLACE───┴──)─┘
Notes:
1 Up to 4 devices may be specified if more than one tape device is being used. (Only one device is allowed with diskette.)

2 A maximum of 4 repetitions

P All parameters preceding this point can be specified in positional form.

3 A maximum of 50 repetitions

4 PHYFILE required if DEV(*PHYFILE) is specified.

Purpose more information about AS/400 system naming conventions,


see Chapter 2, “Control Language Syntax.”
The Restore System/36 File (RSTS36F) command reads a
file, creates a database physical or logical file (if it does not If TOFILE(*SET) is specified, the files that are restored may
already exist), and copies any data into the file. This have names that contain characters not allowed in an
command restores to the system a single file or a group of AS/400 simple object name. In this case, the file name is
files that are saved together using the System/36 save pro- changed to an AS/400 system extended name and the file is
cedure. The input file can be a diskette file, tape file, or a restored.
database physical file on the AS/400 system. The file must
have been created either on a System/36 using the SAVE If the name contains a blank, a single quotation mark, a
system OCL procedure (or the equivalent OCL call of the double quotation mark, an asterisk, a question mark, or a
$COPY SSP utility), or on the AS/400 system using the device control character (hexadecimal 00 through 3F or
SAVS36F CL command. hexadecimal FF), the invalid characters are replaced with
underlines. The file is then restored using the resulting
The RSTS36F command accepts a diskette file created on a simple or extended name; for example, A*_? would become
System/36, System/34, or System/32 using the $COPY "A___"). If a file already exists with this new name, it is
utility. The RSTS36F command accepts tape files created handled like any other name (see the MBROPT parameter).
on a System/36. System/34 or System/32 diskette offline
multiple-volume files are not accepted by this command. If a file name is changed because of invalid characters, an
informational message (CPF 2C1F) is sent to the recursion
The RSTS36F command accepts a diskette file created as a level above the program that is running this command. If the
compressed file. name is changed from a simple name to an extended name,
no message is sent.
If the file being restored does not exist in the library specified
on the TOLIB parameter, it is created. A physical file If the restore function creates the file and the file was not
member is added using the name syntax 'Myymmdd', which previously secured, the new file is owned by the user issuing
identifies the original creation date of the file. This naming the RSTS36F command and the file is created with a default
convention is needed by the System/36 environment in order authority of *ALL (that is the same as AUT(*ALL)).
to support date-differentiated files.
If the file was saved from the S/36 where the attributes were
If a file name is specified for the TOFILE parameter, the an extend value of zero or no value was specified, a default
name must meet the AS/400 system naming standards. For value of 32,767 divided by the record length is assigned. If
an extend value of zero is required, use the Change Physical

Chapter 2. OS/400 Command Descriptions P3-869


RSTS36F

File (CHGPF) command (after the restore operation is com- where 'yymmdd' represents the original creation date (in
pleted) to set SIZE(*EXTEND) to zero. If the file was saved year/month/day format) of the file.
from the AS/400 system, the file is restored and the extend
Because all members of a physical file share the same
value does not change.
file attributes (for example, record length and key infor-
This function is intended only for exchanging files with a mation), date-differentiated files with the same name that
System/36. are restored to the same library are required to have the
same file attributes. If an attribute mismatch is present,
Restrictions: the files are not restored.

1. This command is shipped with public *EXCLUDE 6. Object-level and record-level functions, including read
authority. operations, should not be used for a file being restored
by the RSTS36F command. If another operation is
2. The following authorities are required when running on a
being done at the same time on the file (for example,
system using resource security:
moving the file or reading or adding records), the restore
Ÿ *USE, *SECADM, and *ALLOBJ authorities for this operation stops if it cannot allocate the file.
command
Note: To see the parameter and value descriptions for this
Ÿ *USE authority for the library specified in the TOLIB
command, refer to the online help text. For more
parameter
information about printing the help text, refer to
Ÿ *CHANGE authority for the library specified in the
“Printing CL Command Descriptions” in Chapter 1.
TOLIB parameter when restoring a file that does not
already exist on the system
Ÿ *CHANGE and *OBJMGMT authority for the existing Required Parameters
file (needed to add a new member) when restoring
TOFILE
a date-differentiated physical file and a file by the
Specifies the name of a single file that is restored to the
same name but with a different creation date
system or that a group of files that are all saved at the
Ÿ *ALL authority for the file when restoring to an
same time using the System/36 SAVE procedure (a
existing physical file with the same creation date
Save All Set) are to be restored to the system.
and MBROPT(*REPLACE) specified
Ÿ *CHANGE authority for the based-on physical file *SET: A group of files from a Save All Set are restored
(this physical file was referred to as the parent file to the system.
on System/36) if the file being restored is a file-name: Specify the file name given to a single file
System/36 alternative index file (that is, a logical when the file is restored to the system.
file)
Ÿ *USE authority for the diskette device description TOLIB
object and *USE authority for device file QSYSDKT Specifies the library that will contain the file being
in library QSYS, when restoring from diskette restored from the input file.
Ÿ *USE authority for the tape device description object
DEV
and *USE authority for device file QSYSTAP in
Specifies the names of the devices used for the restore
library QSYS, when restoring from tape
operation. Each device name must already be known on
Ÿ *USE authority for the file and *USE authority for the
the system by a device description.
library that contains the file (PHYFILE parameter) if
restoring from a database physical file *PHYFILE: The input file is the database physical file
Ÿ If the file doesn't exist on the system but a file specified by the PHYFILE parameter.
authorization holder object by the same name does device-name: Specify the name of the diskette device,
exist, *ALL authority or ownership for the authori- the media library device, or the names of tape devices
zation holder object that are used for the operation. If more than one tape
3. There is no replace function supported when restoring device is used, specify the names of the devices in the
System/36 alternative index files (logical files). If order in which they are used. When more than one tape
restoring an alternative index file, no file object by the volume is used, using more than one tape device
same name can already exist in the specified library. permits one tape volume to be rewound or unloaded
while another tape device processes the next tape
4. If restoring a logical file, the based-on physical file must
volume. More information on device names is in the
already exist in the library specified for the TOLIB
APPC Programming book.
parameter.
5. The AS/400 system files that are the same as the
System/36 date-differentiated files are multiple-member Optional Parameters
physical files. Date-differentiated alternative index files SET
are not supported. The data for a physical file is stored Specifies the name used to identify the Save All Set files
in a member that is named using the syntax 'Myymmdd' saved on the diskette or tape by the SAVE procedure or

P3-870 OS/400 CL Reference - Part 2 (Full Version)


RSTS36F

the $COPY utility on the System/36, System/34, or For tapes from System/36 or AS/400 system, there can
System/32. be multiple files on a tape with the same name. The
user can use the CRTDATE parameter or SEQNBR
#SAVE: The files are restored from a Save All Set with
parameter to choose the correct file. If a numeric
a set identifier of #SAVE.
SEQNBR parameter and the CRTDATE parameter are
set-identifier: Specify the set identifier of the Save All specified, the SEQNBR parameter takes precedence (if
Set that is restored. Valid values range from 1 through the file at the specified sequence number has a different
8 characters. The first character must be alphabetic (A creation date, the restore operation ends).
through Z, #, $, or @). The remaining characters can be
Specify the creation date of the tape or diskette file used
any combination of characters (numeric, alphabetic, and
for the restore operation. The date specified is changed
special) except a comma (,), an apostrophe ('), or a
to Julian format (cyyddd) for tape files and international
blank.
format (yymmdd) for diskette files.
IGCDTA
If no value is specified, the diskette file or tape file cre-
Specifies whether the file being restored can contain
ation date is not used to select the input file. For
double-byte character set (DBCS) data.
diskette, take the first file in the diskette volume table of
*NO: The file being restored cannot contain DBCS data. contents (VTOC) with the name specified on the
If a file already exists by the name specified on the FROMLABEL parameter. For tape, take the first file on
TOFILE parameter in the specified library and the file the tape with the name specified on the FROMLABEL
allows DBCS data, an informational message is sent and parameter. If the previous tape operation had specified
the restore operation continues. The resulting file allows ENDOPT(*LEAVE), the search for a matching file does
DBCS data (the file's IGC attributes are not changed by not start at the beginning of the tape reel.
the restore operation).
DATDIFF
*YES: The file processes DBCS data. Specifies whether the restore operation should allow
date-differentiated files (that is, multiple files with the
FROMLABEL
same name but different file creation dates).
Specifies the label of the diskette or tape file that con-
tains the file being copied to the AS/400 system (it iden- *NO: Date-differentiated files are not allowed.
tifies the input file for the restore operation). Up to 8
If a file already exists by the name specified on the
characters can be used to label the diskette or tape file.
TOFILE parameter in the specified library, and the file
For a group restore operation, this parameter can be contains a member with a different creation date (as
used to specify the diskette or tape file label with a save determined by the member name), an error message is
all set where the restore operation is to begin. If no sent and the file is not restored.
value is specified, the restore operation begins with the
If a file already exists by the name specified on the
first file in the set.
TOFILE parameter in the specified library, and the file
If no value is specified, the value of the TOFILE param- contains a member with the same creation date (as
eter is used as the diskette or tape label. If the TOFILE determined by the member name), either the data in that
parameter is an extended name, the characters between member is replaced (if MBROPT(*REPLACE) is speci-
the quotation marks are used as the label. For example, fied) or an error message is sent (if
specifying TOFILE("MIKE&BOB") and no FROMLABEL MBROPT(*NOREPLACE) is specified).
parameter would be the same as specifying
If no file exists by the name specified on the TOFILE
FROMLABEL('MIKE&BOB').
parameter in the specified library, the file is restored
CRTDATE normally.
Specifies the creation date of the object. *YES: Date-differentiated files are allowed.
The date must be entered in the job date format If a file already exists by the name specified on the
(DATFMT); if separators, specified by the job date sepa- TOFILE parameter in the specified library, and the file
rator character (DATSEP), are used, the value must be contains a member with a different creation date (as
enclosed in apostrophes. The CRTDATE parameter determined by the member name), a member is added
cannot be specified if the FROMLABEL parameter is not to the file (only if the file attributes match), and the file's
specified. data is restored into the new member.
For diskettes coming from a System/36, there may be If a file already exists by the name specified on the
multiple files on one diskette with the same name and TOFILE parameter in the specified library, and the file
different creation dates. Specifying a value for the contains a member with the same creation date (as
CRTDATE parameter is the only way of choosing which determined by the member name), either the data in that
diskette file to use. member is replaced (if MBROPT(*REPLACE) is speci-
fied) or an error message is sent (if
MBROPT(*NOREPLACE) is specified).

Chapter 2. OS/400 Command Descriptions P3-871


RSTS36F

If no file exists by the name specified on the TOFILE *UNLOAD: The tape is automatically rewound and
parameter in the specified library, the file is restored unloaded after the operation ends.
normally.
PHYFILE
SEQNBR Specifies the qualified name of the database physical file
Specifies, only when tape is used, which sequence that is used as the input file for the restore operation.
number is used for the restore operation.
The file must have a record length of 256 bytes.
*SEARCH: The volume in the device is searched for a
If the specified file does not exist or is not a physical file,
data file with an identifier that matches the FROMLABEL
the file is not restored. If the physical file contains mul-
parameter value; when a match is found, the data file is
tiple members, the first member of the file is used.
restored. If the last operation on the tape device speci-
fied ENDOPT(*LEAVE), the file search starts with the The name of the physical file can be qualified by one of
data file at the current tape position. Otherwise, the the following library values:
search starts with the first data file on the tape volume.
*LIBL: All libraries in the job's library list are
The header label name from the file found by the
searched until the first match is found.
SEQNBR parameter is compared to the name specified
for the FROMLABEL parameter. If the names are the *CURLIB: The current library for the job is
same, the restore operation can continue. If the names searched. If no library is specified as the current
are different, the restore operation ends. library for the job, the QGPL library is used.

file-sequence-number: Specify the sequence number of library-name: Specify the name of the library to be
the file that is used. Valid values range from 1 through searched.
9999.
file-name: Specify the name of the database file that is
VOL used as the input file for the restore operation.
Specifies the volume identifiers of the tape volumes or
MBROPT
diskette volumes from which the objects are being
Specifies whether the new records replace or are added
restored. The volumes must be in the same order as
to the existing records.
they were when the library was saved. If the library was
known to the system before the restore operation, the *NOREPLACE: If a file already exists by the name
system can verify whether the volumes put on tape specified on the TOFILE parameter in the specified
contain the current version of the library. The volume library, and the file contains a member with the same
that contains the beginning of the file to be restored creation date (as determined by the member name), an
should be placed in the tape or diskette unit. More infor- error message is sent and the data in that member is
mation on this parameter is in Appendix A, “Expanded not replaced.
Parameter Descriptions.” *REPLACE: If a file already exists by the name speci-
*MOUNTED: The objects are restored from the volumes fied on the TOFILE parameter in the specified library,
placed in the device specified on the DEV parameter. and the file contains a member with the same creation
date as the file being restored, the data in that member
volume-identifier: Specify the volume identifiers of the of the file is replaced.
tapes or diskettes to be used for restoring the file. For
each tape or diskette volume name, up to 6 characters
can be specified using any combination of letters and Examples
digits. Up to 50 volume names can be specified.
Example 1: Restoring From Diskette
ENDOPT
RSTS36F TOFILE(ACCTRCV) TOLIB(QS36F) DEV(I1)
Specifies the operation that is automatically performed CRTDATE('ð1/22/85') VOL(SAVE1)
on the tape volume after the operation ends. If more
than one volume is included, this parameter applies only This command restores the file ACCTRCV into library
to the last tape volume used; all other tape volumes are QS36F. Assuming that I1 is the name of a diskette device
rewound and unloaded when the end of the tape is description object, the file is restored from the diskette placed
reached. in the diskette device. The diskette must have a volume
name of SAVE1. The diskette file used for the restore must
Note: This parameter is ignored if a diskette device is have a file label of ACCTRCV and a creation date of January
specified in the DEV parameter. 22, 1985 (assuming the job date format is *MDY and the
*REWIND: The tape is automatically rewound, but not date separator is a '/').
unloaded, after the operation has ended.
Example 2: Restoring From Tape
*LEAVE: The tape does not rewind or unload after the
operation ends. It remains at the current position on the RSTS36F TOFILE(PAY.VIEW) TOLIB(PAYLIB) DEV(T1)
tape drive. FROMLABEL('P\V') ENDOPT(\LEAVE)

P3-872 OS/400 CL Reference - Part 2 (Full Version)


RSTS36F

The file P*V is restored from device T1 as a file named RSTS36F TOFILE(\SET) TOLIB(QS36F) DEV(T1 T2)
PAY.VIEW in library PAYLIB. Assuming T1 is a tape device, SET(PAYFILES) FROMLABEL(FILE1ð) MBROPT(\REPLACE)
the file is copied from one or more tapes that are on device DATDIFF(\YES) SEQNBR(\SEARCH) VOL(\MOUNTED)
T1. No check is made on the tape volume name. When the ENDOPT(\REWIND)
restore operation ends, the tape is left positioned at the end
This command restores a subset of the files in the save all
of tape file P*V.
set called PAYFILES to library QS36F from tape. The
Example 3: Restoring from a Physical File restore operation begins with a tape file whose label is file
10. If one of the files being restored already exists in library
RSTS36F TOFILE(ACCTPAY) TOLIB(QS36F) DEV(\PHYFILE)
QS36F with the same creation date as the saved file, the file
PHYFILE(NETLIB/SENDFILE)
is replaced. If a file already exists in library QS36F with a
This command restores the file ACCTPAY in library QS36F different creation date, a new date-differentiated number is
from physical file SENDFILE in library NETLIB. added to the file. The restore operation uses the tape
volumes that are placed in tape drives T1 and T2. After the
Example 4: Specifying Sequence Numbers restore operation is complete, the last tape volume is
rewound to the beginning of the tape.

Chapter 2. OS/400 Command Descriptions P3-873


RSTS36FLR

RSTS36FLR (Restore System/36 Folder) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(P) ─┬────────────────────────────────┬─────────────────5
55──RSTS36FLR──FROMFLR(──folder-name──)──DEV(──┬─\PHYFILE───────────┬──)────
│ ┌──
─────────────┐ │ │ ┌─\FROMFLR────┐ │
6 (1) ─┘
└───device-name─┴─── ├─TOFLR(──┴─folder-name─┴──)─────┤
│ ┌─\FROMFLR─────┐ │
└─TODTADCT(──┴─library-name─┴──)─┘
5──┬─────────────────────────────────────────────┬──┬──────────────────────────┬──┬────────────────────────────┬────────────────5
│ ┌─\LIBL/────────┐ │ │ ┌─\FIRST──────┐ │ └─CRTDATE(──creation-date──)─┘
(2) ─┼───────────────┼──file-name──)─┘ └─MBR(──┴─member-name─┴──)─┘
└─PHYFILE(───
├─\CURLIB/──────┤
└─library-name/─┘
5──┬───────────────────────────────────────┬──┬─────────────────────────────────┬──┬─────────────────────────┬──────────────────5
│ ┌─\MOUNTED─────────────────┐ │ │ ┌─\SEARCH─────────┐ │ │ ┌─\REWIND─┐ │
│ │ ┌──
───────────────────┐ │ │ └─SEQNBR(──┴─sequence-number─┴──)─┘ └─ENDOPT(──┼─\LEAVE──┼──)─┘
6 (3)
└─VOL(──┴───volume-identifier─┴────┴──)─┘ └─\UNLOAD─┘
5──┬───────────────────────────────────────────┬──┬──────────────────────────┬─────────────────────────────────────────────────5%
│ ┌─\SYSVAL──────────────────┐ │ │ ┌─\RENAME──┐ │
└─KBDTYPE(──┼─\MULTI───────────────────┼──)─┘ └─DUPDOC(──┴─\REPLACE─┴──)─┘
└─character-set-identifier─┘
Notes:
1 A maximum of 4 repetitions

P All parameters preceding this point can be specified in positional form.

2 PHYFILE required if DEV(*PHYFILE) is specified.

3 A maximum of 50 repetitions

Purpose Notes:
1. When restoring a folder from the System/36, the user
The Restore System/36 Folder (RSTS36FLR) command
that issues the restore command becomes the owner
reads a diskette, tape, or database file that was prepared by
and the one authorized to the folder.
the System/36 SAVEFLDR command. The data is converted
so that it can be used by the AS/400 system. Both com- 2. When restoring a folder from the System/36 that con-
pressed and uncompressed data is supported when restoring tains an invalid name for the AS/400 system, the name
data from a diskette. is automatically changed to a different name generated
by the system.
Two types of System/36 folders are supported as input: doc-
ument folders and interactive data definition utility (IDDU) Restrictions:
folders. 1. This command is shipped with public *EXCLUDE
Ÿ Document folders are converted to AS/400 system authority.
folders, and the documents contained in them are con- 2. The user must have *USE authority to the from-folder,
verted to AS/400 system documents. If a System/36 *CHG authority to the to-folder, and *USE authority to
document is in the process of being edited when the the device file or device description.
SAVEFLDR is done, there are two existing versions of 3. If the source folder is a document folder, the user must
the document: an unchanged original, and one con- be enrolled in the system distribution directory and have
taining modifications. When this folder is restored on the either operational and data authorities to the folder or
AS/400 system, the unchanged original and the modifi- *ALLOBJ special authority. If replacing a document, the
cation version are created. If the editing is completed by user must have *ALL authority to the document.
using OfficeVision on the AS/400 system, the modifica- Note: To see the parameter and value descriptions for this
tion version is removed. command, refer to the online help text. For more
Ÿ System/36 IDDU folders do not create folders on the information about printing the help text, refer to
AS/400 system. Instead, a library is created and the “Printing CL Command Descriptions” in Chapter 1.
data dictionary is converted to an AS/400 system data
dictionary.
Required Parameters
FROMFLR
Specifies the name of the folder that is being restored.
Specify the name of the folder.

P3-874 OS/400 CL Reference - Part 2 (Full Version)


RSTS36FLR

DEV library-name: Specify the name of the library to be


Specifies the name of the device from which to restore searched.
the specified folder. The device name must be known to
the system by a device description. file-name: Specify the name of the database file that
contains the System/36 folder.
*PHYFILE: The folder is in a physical database file. If
DEV(*PHYFILE) is specified, then the PHYFILE param- MBR
eter must be specified. Specifies the name of the file member being restored.
device-name: Specify the name of the diskette device, *FIRST: The first member in the database file is used.
the media library device, or the names of tape devices
that are used for the operation. If more than one tape
member-name: Specify the name of the file member
that contains the restored System/36 folder.
device is used, specify the names of the devices in the
order in which they are used. When more than one tape CRTDATE
volume is used, using more than one tape device Specifies the creation date of the object.
permits one tape volume to be rewound or unloaded
The date must be entered in the job date format
while another tape device processes the next tape
(DATFMT); if separators, specified by the job date sepa-
volume. More information on device names is in the
rator character (DATSEP), are used, the value is
APPC Programming book.
enclosed in apostrophes.
Diskettes from a System/36 may contain several files
Optional Parameters with identical names and different creation dates. Speci-
TOFLR fying a value for the CRTDATE parameter is the only
Specifies the name of the folder in which to put the way to choose which diskette file to use.
restored folder's contents. This parameter is used only Tapes from a System/36 or AS/400 system may contain
for document folders. An error message is sent if this several files with identical names and different creation
parameter is specified for any other type of folder. dates. The user can use the CRTDATE or SEQNBR
*FROMFLR: The old name of the folder specified in the parameter to choose the correct file. If both a numeric
FROMFLR parameter is used for the name of the SEQNBR parameter and the CRTDATE parameter are
restored folder. specified, the SEQNBR parameter takes precedence. If
the file at the specified sequence number has a different
folder-name: Specify the new name for the folder being
creation date, the restore operation ends.
restored.
Specify the creation date of the tape or diskette file used
TODTADCT for the restore operations. The date specified is
Specifies the name of the library where an IDDU dic- changed to Julian format (cyyddd) for tape files and
tionary (folder) is restored. This parameter is used only international format (yymmdd) for diskette files.
for IDDU dictionaries. An error message is sent if this
parameter is specified for any other type of folder. VOL
When this parameter is specified, a library is created Specifies the volume identifiers of the tape volumes or
and a data dictionary is created in the new library. An diskette volumes from which the objects are being
error message is sent if a library with the specified name restored. The volumes must be in the same order as
already exists. they were when the library was saved. If the library was
known to the system before the restore operation, the
*FROMFLR: The old name of the folder specified in the
system can verify whether the volumes put on tape
FROMFLR parameter is used for the name of the
contain the current version of the library. The volume
restored library.
that contains the beginning of the file to be restored
library-name: Specify the name of the library where the should be placed in the tape or diskette unit. More infor-
restored folder is placed. mation on this parameter is in Appendix A, “Expanded
Parameter Descriptions.”
PHYFILE
Specifies the qualified name of the database file that *MOUNTED: The objects are restored from the volumes
contains the System/36 folder. placed in the device specified on the DEV parameter.
The name of the file can be qualified by one of the fol- volume-identifier: Specify the identifier of one or more
lowing library values: volumes in the order in which they are used. Up to 6
characters identify each volume.
*LIBL: All libraries in the job's library list are
searched until the first match is found. SEQNBR
Specifies the sequence number of the file being
*CURLIB: The current library for the job is
restored.
searched. If no library is specified as the current
library for the job, the QGPL library is used. *SEARCH: The tape is searched for the first sequence
number that contains the specified folder.

Chapter 2. OS/400 Command Descriptions P3-875


RSTS36FLR

sequence-number: Specify the sequence number of the Table 33 (Page 1 of 2). Keyboard Mapping
file. Valid values range from 1 through 9999. Language/Country Iden- ASCII
tifier Device
ENDOPT Group
Specifies the operation that is automatically performed Denmark DMB B
on the tape volume after the operation ends. If more Denmark Multinational DMI B
than one volume is included, this parameter applies only Estonia ESB
Finland/Sweden FNB B
to the last tape volume used; all other tape volumes are
Finland/Sweden Multinational FNI B
rewound and unloaded when the end of the tape is
France (Azerty) FAB A, B
reached. France (Azerty) Multinational FAI A, B
Note: This parameter is ignored if a diskette device is France (Qwerty) FQB
specified in the DEV parameter. France (Qwerty) Multinational FQI
Greece 1 GNB 1
*REWIND: The tape is automatically rewound, but not Hebrew NCB D
unloaded, after the operation has ended. Hungary HNB
Iceland ICB
*LEAVE: The tape does not rewind or unload after the Iceland Multinational ICI
operation ends. It remains at the current position on the International INB
tape drive. International Multinational INI
Iran (Farsi) IRB
*UNLOAD: The tape is automatically rewound and
Italy ITB A, B
unloaded after the operation ends. Italy Multinational ITI A, B
KBDTYPE Japan English JEB
Japan English Multinational JEI
Specifies the character set and code page of the
Japan Kanji JKB
System/36 that created the data in the folder. (for PS/55 and 5295
*SYSVAL: The System/36, from which the folder was display stations)
saved, uses the same character set and code page as Japan Latin Extended JPB
Japan United States Basic JUB
the AS/400 system.
Japan Katakana KAB
*MULTI: The System/36, from which the folder was (for 5251, 5291, 5292,
saved, is configured as a multinational system. and 3180 Katakana
display stations)
character-set-identifier: Specify one of the identifiers Korea KOB
from the Keyboard Mapping table if the System/36 is a | Lao People's LAB
non-multinational system and the AS/400 system is not | Democratic Republic
using the same character set and code page as the Latin-2/ROECE ROB
System/36. On the System/36, a list of language or Latvia LVB
country names is presented from which to make a Lithuania LTB
FYR Macedonia MKB
selection. If multinational is chosen, the System/36
(Former Yugoslav Republic)
maps it into a single code regardless of language. For Netherlands NEB
example, if Denmark is chosen and not multinational, Netherlands Multinational NEI
use DMB with RSTS36FLR. If Denmark is chosen with Norway NWB B
multinational on the System/36, use *MULTI with Norway Multinational NWI B
RSTS36FLR. Poland PLB
Portugal PRB B
Table 33 (Page 1 of 2). Keyboard Mapping Portugal Multinational PRI B
Language/Country Iden- ASCII Romania RMB
tifier Device Russia RUB
Group Serbia (Cyrillic) SQB
Albania ALI Serbia (Latin) YGI
Arabic X/Basic CLB D Slovakia SKB
Austria/Germany AGB A, B Slovenia YGI
Austria/Germany Multinational AGI A, B Spain SPB B
Belgium Multinational BLI B Spain Multinational SPI B
Brazilian Portuguese BRB Spanish Speaking SSB B
Bulgaria BGB Spanish Speaking Multinational SSI B
Canadian French CAB A, B Sweden SWB B
Canadian French Multinational CAI A, B Sweden Multinational SWI B
| Catalan SPB Switzerland/French SFI B
Chinese (Simplified) RCB Multinational
Chinese (Traditional) TAB Switzerland/German SGI B
Croatia YGI Multinational
Cyrillic CYB Thai THB
Czech Republic CSB Turkey (Qwerty) TKB

P3-876 OS/400 CL Reference - Part 2 (Full Version)


RSTS36FLR

Table 33 (Page 2 of 2). Keyboard Mapping Examples


Language/Country Iden- ASCII
tifier Device Example 1: Restoring From Diskette
Group
Turkey (F) TRB RSTS36FLR FROMFLR(TXTDRA) DEV(DKTð1)
Ukraine UAB CRTDATE('ð1/16/88') VOL(SAVE1)
United Kingdom UKB A, B
United Kingdom Multinational UKI A, B This command restores the folder TXTDRA. Assuming that
United States/Canada USB A, B, C DKT01 is the name of a diskette device description, the
United States/Canada USI A, B, C folder is restored from the diskette placed in the diskette
Multinational device. The diskette must have a volume name of SAVE1
Urdu PKB and the folder must have a creation date of January 16,
Vietnam VNB
1988.
Languages of the former YGI
Yugoslavia
Example 2: Restoring From Tape
Note:
1 The GNB code is the current identifier for Greece. The
RSTS36FLR FROMFLR(TXTMEL) DEV(TAP1)
GKB code was used prior to V2R1, and continues to be TOFLR(TXTNEW) SEQNBR(7)
supported, but provides fewer characters than the recom- ENDOPT(\UNLOAD)
mended GNB code.
This command restores the folder TXTMEL to a folder
DUPDOC named TXTNEW. Assuming TAP1 is a tape device, the
Specifies whether existing documents are renamed or folder is restored from one or more tapes that are on device
replaced. This parameter is ignored when restoring a TAP1. The folder must have a sequence number of 7. The
data dictionary. tape is unloaded from the device at the end of processing.

*RENAME: If a folder already exists with the name Example 3: Restoring to a Data Dictionary
specified in the TOFLR parameter and a document in
RSTS36FLR FROMFLR(DONDCT) DEV(\PHYFILE)
that folder exists with the same name as an incoming
TODTADCT(NEWDCT) PHYFILE(MYLIB/MYFILE)
document, the incoming document is created in the MBR(THISONE)
folder with a new system-generated name. All other
documents are created in the specified folder. This command restores the folder DONDCT to a data dic-
*REPLACE: If a folder already exists by the name tionary named NEWDCT. Assuming that MYFILE is a phys-
specified in the TOFLR parameter, and a document in ical file located in library MYLIB and contains the member
that folder exists with the same name as an incoming THISONE, the folder is restored from member THISONE.
document, the existing document is replaced. All other
documents are created in the specified folder.

Chapter 2. OS/400 Command Descriptions P3-877


RSTS36LIBM

RSTS36LIBM (Restore System/36 Library Members) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(1) ─┬─\PHYFILE───────────┬──)────
55──RSTS36LIBM──TOMBR(──┬─\ALL─────────────────┬──)──TOLIB(──library-name──)──DEV(─── (P) ─────────────5
├─member-name──────────┤ │ ┌──
─────────────┐ │
└─generic\-member-name─┘ 6 (2) ─┘
└───device-name─┴───
5──┬────────────────────────┬──┬────────────────────────┬──┬──────────────────────┬──┬──────────────────────┬───────────────────5
│ ┌─\ALL──┐ │ │ ┌─\NONE─┐ │ │ ┌─\NEW─┐ │ │ ┌─\NO──┐ │
└─SRCMBRS(──┼─\SRC──┼──)─┘ └─OBJMBRS(──┼─\SBR──┼──)─┘ └─MBROPT(──┼─\OLD─┼──)─┘ └─IGCDTA(──┴─\YES─┴──)─┘
├─\PRC──┤ ├─\LOD──┤ └─\ALL─┘
└─\NONE─┘ └─\ALL──┘
5──┬─────────────────────────────┬──┬─────────────────────────────────┬──┬──────────────────────────────────────┬───────────────5
(3) ─file-label──)─┘ └─CRTDATE(──file-creation-date──)─┘ │
└─FROMLABEL(─── ┌─\SEARCH──────────────┐ │
└─SEQNBR(──┴─file-sequence-number─┴──)─┘
5──┬───────────────────────────────────────┬──┬─────────────────────────┬──┬─────────────────────────────────────────────┬─────5%
│ ┌─\MOUNTED─────────────────┐ │ │ ┌─\REWIND─┐ │ │ ┌─\LIBL/────────┐ │
│ │ ┌──
───────────────────┐ │ (5) ─┼───────────────┼──file-name──)─┘
│ └─ENDOPT(──┼─\LEAVE──┼──)─┘ └─PHYFILE(───
6 (4) ─┴──)─┘
└─VOL(──┴───volume-identifier─┴─── └─\UNLOAD─┘ ├─\CURLIB/──────┤
└─library-name/─┘
Notes:
1 Up to four devices may be specified if more than one tape device is being used. (Only one device is allowed with diskette.)

2 A maximum of 4 repetitions

P All parameters preceding this point can be specified in positional form.

3 FROMLABEL required if tape or diskette devices on DEV parmeter.

4 A maximum of 50 repetitions

5 PHYFILE required if DEV(PHYFILE) is specified.

Purpose the library is created with a default authority of *ALL (that is,
the same as AUT(*ALL)).
The Restore System/36 Library Members (RSTS36LIBM)
command reads a file containing library members, creates If a sector-mode FROMLIBR file or a SAVELIBR file created
database source or data file members on the AS/400 system, on a System/36 is being restored, data files QS36LOD and
and copies the member data from the file into each restored QS36SBR may also be created to hold restored load and
member. The input file can be a diskette file, tape file, or subroutine members. Restored load and subroutine
database physical file on the AS/400 system. The file could members are not converted on the current system.
have been created on a System/36, a System/34, or a
System/32 using either the FROMLIBR or SAVELIBR system Restrictions:
OCL procedure (or the equivalent call of $MAINT), or on an Ÿ The following authorities are required when running on a
AS/400 system using the SAVS36LIBM CL command. system using resource security:

Diskette files created on a System/34 using the BACKUP 1. *SECADM and *ALLOBJ authorities
procedure or $BACK utility are not accepted by this 2. *USE authority for this command and *USE
command. Compressed SAVELIBR diskette files (used by authority for the Create Library (CRTLIB) command
IBM to distribute system libraries for System/36 after release if the library needs to be created
5.0) are not accepted by this command. 3. *USE authority for the CRTSRCPF command if
QS36SRC or QS36PRC must be created
In System/36 terms, the input file format could be a 4. *USE authority for the CRTPF command if
SAVELIBR diskette file or tape file, a record-mode LIBRFILE QS36LOD or QS36SBR must be created
diskette file, tape file, or physical file, or a sector-mode 5. *CHANGE authority for the library specified in the
LIBRFILE diskette file, tape file, or physical file. In other TOLIB parameter
words, the input file can be any diskette file, tape file, or 6. *CHANGE and *OBJMGMT authority for file
physical file created by the System/36 $MAINT SSP utility. QS36SRC in the specified library if restoring source
library members
If the library identified by the TOLIB parameter value does 7. *CHANGE and *OBJMGMT authority for file
not exist, it is created. Also, the source files QS36SRC and QS36PRC in the specified library if restoring proce-
QS36PRC are created if they do not exist in the restore-to dure library members
library. 8. *CHANGE and *OBJMGMT authority for file
QS36LOD in the specified library if restoring load
If the restore operation creates the library, the new library is library members
owned by the user running the RSTS36LIBM command and

P3-878 OS/400 CL Reference - Part 2 (Full Version)


RSTS36LIBM

9. *CHANGE and *OBJMGMT authority for file lowed by an asterisk (*); for example, ABC*. The
QS36SBR in the specified library if restoring subrou- asterisk substitutes for any valid characters. A generic
tine library members name specifies all objects with names that begin with the
10. *USE authority for the diskette device description generic prefix for which the user has authority. If an
object, *USE authority for device file QSYSDKT in asterisk is not included with the generic (prefix) name,
library QSYS if restoring from diskette the system assumes it to be the complete object name.
11. *USE authority for the tape device description object If the complete object name is specified, and multiple
and *USE authority for device file QSYSTAP in libraries are searched, multiple objects can be restored
library QSYS, if restoring from tape only if *ALL or *ALLUSR library values can be specified
12. *USE authority for the file and *USE authority for the for the name. For more information on the use of
library that contains the file (PHYFILE parameter) if generic names, refer to “Generic Object Names” in
restoring from a database physical file Chapter 2.
Ÿ No object-level or record-level operations should be TOLIB
active for files QS36SRC, QS36PRC, QS36SBR, and Specifies the library that will contain the members to
QS36LOD while members are being restored by restore from the input file.
RSTS36LIBM. If the necessary files cannot be allocated
exclusively, no members are restored. DEV
Specifies the names of the devices to use for the restore
Ÿ The member name or generic member name specified
operation. Each device name must already be known on
(TOMBR parameter) must meet AS/400 system naming
the system by a device description.
standards.
*PHYFILE: The input file is the database physical file
If a generic member name or *ALL is specified, a
specified by the PHYFILE parameter.
member may be selected to be restored that has a
name containing characters not allowed in an AS/400 device-name: Specify the name of the diskette device,
system simple object name. In this case, the member the media library device, or the names of tape devices
name is restored using the AS/400 system extended that are used for the operation. If more than one tape
name syntax (for example, A!B would become 'A!B'). device is used, specify the names of the devices in the
order in which they are used. When more than one tape
If the name contains a blank, a single quotation mark (') a volume is used, using more than one tape device
double quotation mark ("), an asterisk (*), a question mark permits one tape volume to be rewound or unloaded
(?), or a device control character (hexadecimal '00'-'3F' or while another tape device processes the next tape
hexadecimal 'FF'), these characters are replaced by under- volume. More information on device names is in the
lines and the member is restored using the resulting simple APPC Programming book.
or extended name (for example, A*/? would become A_/_
and A? would become A_).
Optional Parameters
An informational message is sent each time invalid charac- SRCMBRS
ters are replaced to get a valid name. An additional informa- Specifies which source member types (source and pro-
tional message is sent if the resulting name change caused a cedure members on System/36) are restored.
member to be replaced. No message is sent if a member is
restored using the extended name syntax without replacing *ALL: All source and procedure members in the input
invalid characters. file that match the member name specified (TOMBR
parameter) are restored. For example, if TOMBR(PAY*)
Note: To see the parameter and value descriptions for this and SRCMBRS(*ALL) is specified, all source and proce-
command, refer to the online help text. For more dure members that start with the letters 'PAY' are
information about printing the help text, refer to restored.
“Printing CL Command Descriptions” in Chapter 1.
*SRC: Only System/36 source members (to file
QS36SRC) that match the member name specified
Required Parameters (TOMBR parameter) are restored.
TOMBR *PRC: Only System/36 OCL procedure members (to file
Specifies the names of the members to restore. QS36PRC) that match the member name specified
(TOMBR parameter) are restored.
*ALL: All members of the specified member types are
restored. *NONE: No source or procedure library members are
restored.
member-name: The members that have the specified
member name are restored. OBJMBRS
generic*-member-name: All members that have the Specifies which object member types (load and subrou-
specified generic member name are restored. A generic tine members on System/36) are restored. Because the
name is a character string of one or more characters fol- System/36 and the AS/400 system are not object com-

Chapter 2. OS/400 Command Descriptions P3-879


RSTS36LIBM

patible, any restored members are not immediately CRTDATE


useable after the restore operation. IBM-supplied com- Specifies the creation date of the object.
mands or user-written operations must be run to convert
The date must be entered in the job date format
the object member to a useable AS/400 system object.
(DATFMT); if separators are used, specified by the job
*NONE: No System/36 object members are restored. date separator character (DATSEP), the value must be
enclosed in apostrophes.
*SBR: Only System/36 subroutine members (to file
QS36SBR), which match the member name specified For diskettes coming from a System/36, there may be
(TOMBR parameter), are restored. several files on one diskette with the same name and
different creation dates. Specifying a value for the
*LOD: Only System/36 load members (to file
CRTDATE parameter is the only way of choosing which
QS36LOD), which match the member name specified
diskette file to use.
(TOMBR parameter), are restored.
For tapes from System/36 or the AS/400 system, there
*ALL: All load and subroutine members in the input file
can be several files on a tape with the same name. The
which match the member name specified (TOMBR
user can use the CRTDATE or SEQNBR parameter to
parameter), are restored. For example, if
choose the correct file. If a numeric SEQNBR param-
TOMBR(CONF1) and OBJMBRS(*ALL) are specified,
eter and the CRTDATE parameter are specified, the
load and subroutine members with the member name
SEQNBR parameter takes precedence. If the file at the
'CONF1' are restored.
specified sequence number has a different creation date,
MBROPT the restore operation ends.
Specifies, for database files currently on the system,
Specify the creation date of the tape file or diskette file
which file members are restored.
to use for the restore operation. The date specified is
*NEW: Only new members (members that do not changed to Julian format (cyyddd) for tape files and
already exist in the appropriate source or data file) are international format (yymmdd) for diskette files.
restored.
If no value is specified, the diskette file or tape file cre-
*OLD: Only old members (members that already exist ation date is not used to select the input file. For
in the appropriate file) are restored. The existing diskette files, take the first file in the diskette VTOC with
member is replaced by the copy of the member restored the name specified on the FROMLABEL parameter. For
from the file. tape files, take the first file on the tape with the name
specified on the FROMLABEL parameter. If the pre-
*ALL: All members are restored, even if they already
vious tape operation had specified ENDOPT(*LEAVE),
exist in an AS/400 system source or data file. Members
the search for a matching file does not start at the begin-
that do not already exist are created, and members that
ning of the tape reel.
do exist are replaced.
SEQNBR
IGCDTA
Specifies, only when tape is used, which sequence
Specifies whether the source and procedure members
number is used for the restore operation.
being restored can contain double-byte character set
(DBCS) data. *SEARCH: The volume that is placed in the device is
searched for a data file with an identifier that matches
Note: This attribute is used if the restore operation
the FROMLABEL parameter value; when a match is
needs to create source files QS36SRC and
found, the data file is restored. If the last operation on
QS36PRC to hold the restored library members.
the tape device specified ENDOPT(*LEAVE), the file
If the QS36SRC or QS36PRC source file already
search begins with the data file at the current tape posi-
exists in the library specified on the TOLIB
tion. Otherwise, the search begins with the first data file
parameter and the file's DBCS capability does
on the tape volume. The header label name from the
not match the parameter, an error message is
file found by the SEQNBR parameter is compared to the
sent and no member is restored.
name specified for the FROMLABEL parameter. If the
*NO: The file does not process DBCS data. names are the same, the restore operation can continue.
*YES: The file processes DBCS data. If the names are different, the restore operation ends.

FROMLABEL
file-sequence-number: Specify the sequence number of
the file that is used. Valid values range from 1 through
Specifies the label (8 characters maximum) of the
9999.
diskette file or tape file that contains the members to
copy to the AS/400 system (it identifies the input file for VOL
the restore operation). If the DEV parameter value is Specifies the volume identifiers of the tape volumes or
not *PHYFILE, a FROMLABEL value must be specified. diskette volumes from which the objects are being
restored. The volumes must be in the same order as
they were when the library was saved. If the library was
known to the system before the restore operation, the

P3-880 OS/400 CL Reference - Part 2 (Full Version)


RSTS36LIBM

system can verify whether the volumes put on tape If the specified file does not exist or is not a physical file,
contain the current version of the library. The volume no library members are restored. If the physical file con-
that contains the beginning of the file to be restored tains several members, the first member of the file is
should be placed in the tape or diskette unit. More infor- used.
mation on this parameter is in Appendix A, “Expanded
The name of the physical file can be qualified by one of
Parameter Descriptions.”
the following library values:
*MOUNTED: The objects are restored from the volumes
*LIBL: All libraries in the job's library list are
placed in the device specified on the DEV parameter.
searched until the first match is found.
volume-identifier: Specify the volume identifiers of the
*CURLIB: The current library for the job is
tapes or diskettes to be used for restoring the file. For
searched. If no library is specified as the current
each tape or diskette volume name, up to 6 characters
library for the job, the QGPL library is used.
can be specified using any combination of letters and
digits. Up to 50 volume identifiers can be specified. library-name: Specify the name of the library to be
searched.
ENDOPT
Specifies the operation that is automatically performed file-name: Specify the name of the database physical
on the tape volume after the operation ends. If more file that is used as the input file for the restore operation.
than one volume is included, this parameter applies only
to the last tape volume used; all other tape volumes are
rewound and unloaded when the end of the tape is
Examples
reached. Example 1: Restoring All Members
Note: This parameter is ignored if a diskette device is RSTS36LIBM TOMBR(XYZ1) TOLIB(JOHNSON) DEV(I1)
specified in the DEV parameter. SRCMBRS(\PRC) MBROPT(\ALL) FROMLABEL('XYZ1')
*REWIND: The tape is automatically rewound, but not The single OCL procedure member XYZ1 is restored as a
unloaded, after the operation has ended. member of source file QS36PRC in library JOHNSON.
*LEAVE: The tape does not rewind or unload after the Assuming I1 refers to a diskette device, the input diskette file
operation ends. It remains at the current position on the must have the label XYZ1.
tape drive.
Example 2: Specifying a Generic Member Name
*UNLOAD: The tape is automatically rewound and
RSTS36LIBM TOMBR(X\) TOLIB(ORDER) DEV(\PHYFILE)
unloaded after the operation ends.
PHYFILE(NETLIB/S36SRC)
PHYFILE All source and procedure members with names starting with
Specifies the qualified name of the database physical file the character 'X' and that do not already exist as members of
that is used as the input file for the restore operation. QS36SRC and QS36PRC in library ORDER are restored.
The file must have a record length of between 40 and The members are restored from file S36SRC in library
120 bytes if it contains members saved in record mode. NETLIB.
The record length must be 256 if it contains members
saved on a System/36 in sector mode.

Chapter 2. OS/400 Command Descriptions P3-881


RSTUSFCNR

RSTUSFCNR (Restore Ultimedia System Facilities Container) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──RSTUSFCNR──SAVCNR(──container-identifier──)──RSTCNR(──┬─\SAVCNR──────────────┬──)───────────────────────────────────────────5
└─container-identifier─┘
5──DEV(──┬─\SAVF──────────────────────────┬──)──┬─────────────────────────────────────────┬─────────────────────────────────────5
├─tape-media-library-device-name─┤ │ ┌─\MOUNTED─────────────────┐ │
│ ┌──
──────────────────┐ │ │ │ ┌──
───────────────────┐ │ │
└──6─tape-device-name─┴───
(1) ────────┘ 6─volume-identifier─┴───
(2) ─┴──
└─VOL(─── (3) ─┴──)─┘

5──┬────────────────────────────────────────┬──┬───────────────────────────────────────┬──┬───────────────────────────┬─────────5
│ ┌─\SEARCH──────────────┐ │ │ ┌─\SAVCNR──────────────┐ │ │ ┌─\REWIND─┐ │
(2) ─┴─file-sequence-number─┴──)─┘ └─LABEL(───
└─SEQNBR(─── (2) ─┴─data-file-identifier─┴──)─┘ └─ENDOPT(───
(2) ─┼─\LEAVE──┼──)─┘
└─\UNLOAD─┘
5──┬───────────────────────────────────────────────┬──┬──────────────────────────────┬──┬────────────────────────────────┬──────5
│ ┌─\LIBL/────────┐ (5) ─time-when-saved──)─┘
│ └─SAVDATE(──date-when-saved──)─┘ └─SAVTIME(───
(4) ─┼───────────────┼──save-file-name──)─┘
└─SAVF(───
├─\CURLIB/──────┤
└─library-name/─┘
5──┬──────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\NONE─┐ │
└─ALWOBJDIF(──┴─\ALL──┴──)─┘
Notes:
1 A maximum of 4 repetitions.

2 This parameter is valid only for tape devices.

3 A maximum of 75 repetitions.

4 This parameter is required and valid only when DEV(*SAVF) is specified.

5 This value is valid only when the SAVDATE parameter is specified.

Purpose SAVCNR
Specifies the identifier of the multimedia container object
The Restore Ultimedia System Facilities Container that is to be restored. This is the identifier of the con-
(RSTUSFCNR) command restores to the system the multi- tainer object saved with the SAVUSFCNR command.
media objects that have been saved using the Save
Ultimedia System Facilities Container (SAVUSFCNR) RSTCNR
command. The multimedia objects that can be restored Specifies the identifier of the multimedia container object
using this command are the following: to which the saved container is to be restored.

Ÿ Multimedia objects that have been copied to a shared *SAVCNR: The container objects are restored to the
folder container container with the same identifier as the container in
which they were saved. If a container with this identifier
Ÿ Document library objects (DLOs) that hold the Ultimedia does not exist on the target system, the container is
Facilities data stream files. created as a first level container under the QUMBREPO
folder.
For more information on the Ultimedia* Facilities function,
see the Ultimedia System Facilities User Guide book. container-identifier: Specify the identifier of the container
to which the saved container objects are to be restored
Restriction: Only those objects that have been placed in an from tape. If the container specified does not exist, an
Ultimedia Facilities container and whose data stream files are error message is sent to the job log and processing
in the Ultimedia Facilities repository when they were saved ends for this command.
are restored. If the data stream file was not in the Ultimedia
Facilities repository at the time of the save, only the object's DEV
DLO is restored. Specifies the name of the device from which the multi-
media objects are to be restored.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more *SAVF: The objects are restored from the save file
information about printing the help text, refer to specified on the SAVF parameter.
“Printing CL Command Descriptions” in Chapter 1. tape-media-library-device-name: Specify the name of
the tape media library device used for the restore opera-
tion.
Required Parameters
tape-device-name: Specify the names of one or more
tape devices used for the restore operation. If multiple

P3-882 OS/400 CL Reference - Part 2 (Full Version)


RSTUSFCNR

tape devices are used, they must have compatible ENDOPT


media formats and their names must be specified in the Specifies the operation that is automatically performed
order in which they are used. Using more than one tape on the tape volume after the operation ends. If more
device permits one tape volume to be rewound and than one volume is included, this parameter applies only
unloaded while another tape device processes the next to the last tape volume used; all other tape volumes are
tape volume. You can specify a maximum of four tape rewound and unloaded when the end of the tape is
devices. reached.
*REWIND: The tape is automatically rewound, but not
Optional Parameters unloaded, after the operation has ended.

VOL *LEAVE: The tape does not rewind or unload after the
Specifies the volume identifier of the tape from which the operation ends. It remains at the current position on the
multimedia objects are to be restored. tape drive.

*MOUNTED: The objects are restored from the volumes *UNLOAD: The tape is automatically rewound and
placed in the device specified on the DEV parameter. unloaded after the operation ends.
For a media library device, the volume to be used is the SAVF
next cartridge in the category mounted by the Set Tape Specifies the qualified name of file that contains the
Category (SETTAPCGY) command. multimedia objects that are being restored.
volume-identifier: Specify the identifiers of one or more The name of the save file can be qualified by one of the
volumes in the order in which they are put on the device following library values:
and used. Each volume identifier contains a maximum
of 6 alphanumeric characters. A blank is used as a sep- *LIBL: All libraries in the job's library list are
arator character when listing multiple identifiers. You searched until the first match is found.
can specify a maximum of 75 volumes. *CURLIB: The current library for the job is
SEQNBR searched. If no library is specified as the current
Specifies the starting sequence number of the files on library for the job, the QGPL library is used.
the tape used for the restore operation. library-name: Specify the name of the library to be
*SEARCH: The volume on the device is searched for a searched.
data file containing the multimedia objects to be save-file-name: Specify the name of the save file to
restored; when a match is found, the data file is restore.
searched for the multimedia objects to be restored. If
the specified multimedia objects are not found in that SAVDATE
data file, the search continues for the next data file that Specifies the date on which the container was saved. If
matches the value specified on the LABEL parameter. more than one version of the container exists on the
media, this parameter identifies which version of the
Note: If the last operation on the device specified the
container to restore. If this parameter is not specified,
same volume and ENDOPT(*LEAVE) (that is, the
the version of the multimedia objects being restored is
specified tape is positioned at the location at
the first version found on the volume or, if the LABEL
which the last operation ended), the search oper-
parameter is specified, the version found with the speci-
ation starts with the first data file beyond the
fied label.
current tape position. The files located in front of
the current tape position are not searched. The date must be specified in the system date format
specified by the system value QDATFMT; if the separa-
sequence-number: Specify the sequence number of the
tors specified by the system value QDATSEP are used,
file to be used as the starting point for the restore opera-
the value must be enclosed in apostrophes.
tion.
SAVTIME
LABEL
Specifies the time when the container was saved. If
Specifies the label of the container object that is used to
more than one version of the container exists on the
find the file that was written to tape during the save
media, this parameter identifies which version of the
operation.
container is restored. If this parameter is not specified,
*SAVCNR: The container label is the same as the last the version of the multimedia objects being restored is
17 characters of the Ultimedia Facilities container identi- the first version found on the volume or, if the LABEL
fier specified on the SAVCNR parameter. parameter is specified, the version found with the speci-
data-file-identifier: Specify the data file identifier which is fied file label.
the label of the data file that contains the multimedia The time must be specified as a 6-digit value, in the
data to be restored. format hours, minutes, and seconds (hhmmss). If colons

Chapter 2. OS/400 Command Descriptions P3-883


RSTUSFCNR

are used as separators, the value must be enclosed in For more information on multimedia objects, see the
apostrophes. Ultimedia System Facilities User Guide book.
Note: This parameter is valid only if SAVDATE is spec- *ALL: The differences listed are allowed for the restore
ified. operation. An informational message is sent and the
multimedia object is restored.
ALWOBJDIF
Specifies whether the following differences that may be *NONE: The differences listed are not allowed on the
encountered during a restore operation are allowed. restore operation. A diagnostic message is sent for the
multimedia object, and the multimedia object is not
Ÿ The byte stream for a multimedia object resides restored.
within the Ultimedia Facilities repository on the
target system but is not on the tape.
Examples
Ÿ The byte stream for a multimedia object is on the
tape but is not stored within the Ultimedia Facilities RSTUSFCNR SAVCNR(SEMINARVIDEOSPOTððð4)
object repository on the target system. RSTCNR(\SAVCNR) DEV(TAPð1)
Ÿ The members of a multimedia key object on the
This command restores the multimedia container object with
tape are different than those on the target system.
the container identifier SEMINARVIDEOSPOT0004 to the
Ÿ The members of a multimedia sequence object on multimedia container object with the same container identi-
the tape are different than those on the target fier. The container is restored from the tape unit TAP01.
system.

P3-884 OS/400 CL Reference - Part 2 (Full Version)


RSTUSRPRF

RSTUSRPRF (Restore User Profiles) Command


Job: I Pgm: I REXX: I Exec

55──RSTUSRPRF──DEV(──┬─\SAVF──────────────────────────┬──)──┬───────────────────────────────────────────────────────┬───────────5
├─diskette-device-name───────────┤ │ ┌─\ALL──────────────────────────────────┐ │
├─tape-media-library-device-name─┤ │ │ ┌──
────────────────────────────────┐ │ │
│ ┌──
──────────────────┐ │ 6 (2) ─┴──)─┘
└─USRPRF(──┴───┬─generic\-user-profile-name─┬─┴───
6 (1) ────────┘
└───tape-device-name─┴─── └─user-profile-name──────────┘
(P) ──┬───────────────────────────────────┬──┬───────────────────────────┬───────────5
5──┬───────────────────────────────────────┬───
│ ┌─\MOUNTED─────────────────┐ │ │ ┌─\SEARCH─────────┐ │ │ ┌─\REWIND─┐ │
│ │ ┌──
───────────────────┐ │ │ (4) ─┴─sequence-number─┴──)─┘ └─ENDOPT(───
└─SEQNBR(─── (4) ─┼─\LEAVE──┼──)─┘
6 (3)
└─VOL(──┴───volume-identifier─┴────┴──)─┘ └─\UNLOAD─┘
5──┬────────────────────────────────────────────┬──┬────────────────────┬──┬──────────────────────────┬─────────────────────────5
│ ┌─\LIBL/───────┐ │ │ ┌─\NO──┐ │ │ ┌─\NONE─┐ │
└─SAVF(──┼──────────────┼──save-file-name──)─┘ └─MAIL(──┴─\YES─┴──)─┘ └─ALWOBJDIF(──┴─\ALL──┴──)─┘
├─\CURLIB/─────┤
└─library-name─┘
5──┬──────────────────────────┬──┬──────────────────────────────────────────────────────┬───────────────────────────────────────5
│ ┌─\NONE────┐ │ │ ┌─\LIBL/────────┐ │
(5) ─┼───────────────┼──database-file-name──)─┘
└─OUTPUT(──┴─\OUTFILE─┴──)─┘ └─OUTFILE(───
├─\CURLIB/──────┤
└─library-name/─┘
5──┬─────────────────────────────────────────────┬─────────────────────────────────────────────────────────────────────────────5%
│ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │
(5) ─┴─member-name─┴──┼──────────┼──)─┘
└─OUTMBR(───
└─\ADD─────┘
Notes:
1 A maximum of 4 repetitions

2 A maximum of 50 repetitions

3 A maximum of 75 repetitions

4 Applies to tape device only

5 This parameter is valid only if OUTPUT(*OUTFILE) is specified.

P All parameters preceding this point can be specified in positional form.

Purpose command. At the completion of the command, either


message CPF3775 or message CPC3705 is sent to QHST.
The Restore User Profiles (RSTUSRPRF) command restores More information on restoring the system is in the Backup
the basic parts of a user profile or a set of user profiles and Recovery book.
saved by the Save System (SAVSYS) or the Save Security
Data (SAVSECDTA) commands. The RSTUSRPRF The following situations may apply to user profiles being
command restores only the special authority given in the restored by the RSTUSRPRF command:
Create User Profile (CRTUSRPRF) command; it does not Ÿ If a user profile exists on the system, but not on the
restore the authority for the named objects owned by other media, the system profile remains.
users. To do that, the Restore Authority (RSTAUT)
command must be used after the profiles, libraries, and Ÿ If a user profile exists on the media, but not on the
objects are restored. If all user profiles are restored, the system, a new user profile is created.
authorization lists and authority holders that existed when the Ÿ If the user profile exists on both the media and the
SAVSYS command or SAVSECDTA command was run are system, the media user profile is restored.
also restored.
Ÿ If the user profile exists on the media and is being
Before this command is specified, all other operations on the restored individually, the new user profile is created
system must be stopped. This requires ending all subsys- without its password or group connection.
tems through the End Subsystem (ENDSBS(*ALL)) Ÿ If the user profile exists on both the media and the
command or End System (ENDSYS) command or specifying system, and it is being restored individually, the media
this command when the operating system is started. The user profile is restored. However, the password and
RSTUSRPRF command is normally used after the restore of group connection on the system remains unchanged.
the operating system but before the user libraries are
Ÿ If all user profiles are being restored, the passwords and
restored. The user profiles must be restored before any
group connections are also restored from the media.
libraries or objects belonging to them can be restored. After
the libraries and their objects are restored, the authority for Ÿ If user profiles exist on the system, there are no
the objects is restored to the user profiles by the RSTAUT changes to the existing object authorities.

Chapter 2. OS/400 Command Descriptions P3-885


RSTUSRPRF

Note: This command ignores all file overrides that are cur- generic*-user-profile-name: Specify one or more generic
rently in effect for the job. names of sets of user profiles to restore. A generic
name is a character string of one or more characters fol-
Restrictions: lowed by an asterisk (*); for example, ABC*. The
1. This command is shipped with public *EXCLUDE asterisk (*) substitutes for any valid characters. A
authority. generic name specifies all objects with names that begin
with the generic prefix, for which the user has authority.
2. The user of this command must have *SAVSYS
If an asterisk is not included with the generic (prefix)
authority in the user profile, specified by
name, the system assumes it to be the complete object
SPCAUT(*SAVSYS).
name. For more information on the use of generic func-
3. Before this command is specified, all other operations on tions, refer to “Rules for Specifying Names.”
the system must be ended. The End System (ENDSYS)
user-profile-name: Specify one or more names of spe-
or End Subsystem (ENDSBS) command can be used to
cific user profiles that are restored. Both generic names
end these operations. You must have *JOBCTL
and specific names can be specified in the same
authority to use the ENDSYS or ENDSBS command.
command.
4. To restore authorization lists and authority holders,
VOL
USRPRF(*ALL) must be specified.
Specifies the volume identifiers of the tape volumes or
Note: To see the parameter and value descriptions for this diskette volumes from which the objects are being
command, refer to the online help text. For more restored. The volumes must be in the same order as
information about printing the help text, refer to they were when the library was saved. The volume that
“Printing CL Command Descriptions” in Chapter 1. contains the beginning of the file to be restored should
be placed in the tape or diskette unit. More information
Required Parameter on this parameter is in Appendix A, “Expanded Param-
eter Descriptions.”
DEV
Note: For tape, the user profiles are restored from the
Specifies the name of the diskette device, tape device,
volumes placed on the tape devices, in the order
or save file used to restore the user profiles. The device
that those devices were specified. This opera-
names must already be known on the system by a
tion is normally performed immediately after a
device description. Up to four tape devices may be
restore of the system is performed and the user
specified.
profiles are on the same volume.
*SAVF: The save file specified on the SAVF parameter
*MOUNTED: The objects are restored from the volumes
is used for the restore operation.
placed in the device specified on the DEV parameter.
diskette-device-name: Specify the name of the diskette For a media library device, the volume to be used is the
device used to restore the user profiles. next cartridge in the category mounted by the Set Tape
tape-media-library-device-name: Specify the name of Category (SETTAPCGY) command.
the tape media library device used to restore the user volume-identifier: Specify the identifiers of up to 75
profiles. volumes in the order in which they are placed in the
tape-device-name: Specify the names of one or more devices and used to restore the user profiles.
tape devices used for the restore operation. If more SEQNBR
than one tape device is used, specify the names of the Specifies the sequence number of the tape file used for
devices in the order in which they are used. Using more the restore process.
than one tape device permits one tape volume to be
rewound and unloaded while another tape device pro- *SEARCH: The volume placed in the device is
cesses the next tape volume. searched for a file containing the saved user profiles;
when a match is found, the user profiles are restored. If
a match is not found, you must load another tape and try
Optional Parameters the command again. If the last operation on the device
specified ENDOPT(*LEAVE) (the tape is positioned at
USRPRF
the location where the last operation ended), the file
search starts with the first file beyond the current tape
Specifies the names of one or more user profiles to
position. If ENDOPT(*LEAVE) was not used for the last
restore. To be restored, the user profiles must exist on
operation (or if the tape was manually rewound since an
the media from the Save System (SAVSYS) or Save
ENDOPT(*LEAVE) operation), the search begins with
Security Data (SAVSECDTA) commands.
the first file on the volume.
*ALL: All of the user profiles, authorization lists, and
| sequence-number: Specify the sequence number of the
authority holders saved by the SAVSYS or SAVSECDTA
| file. Valid values range from 1 through 16777215.
commands are restored.

P3-886 OS/400 CL Reference - Part 2 (Full Version)


RSTUSRPRF

ENDOPT Note: In order to use this parameter, *ALLOBJ


Specifies, when tape is used, what positioning operation authority is required.
is automatically done on the tape volume after the
*NONE: The differences described above are not
restore operation ends. If more than one tape volume is
allowed for the restore operation. For an ownership dif-
included, this parameter applies only to the last tape
ference, the object is not restored. For an authorization
volume used; all other tape volumes are rewound and
list difference, the object is restored, but the object is not
unloaded when the end of the tape is reached.
linked to the authorization list, and public authority is set
*REWIND: The tape is automatically rewound, but not to *EXCLUDE.
unloaded, after the operation has ended.
*ALL: The differences previously described are allowed
*LEAVE: The tape does not rewind or unload after the for the restore operation. The object is restored. The
operation ends. It remains at the current position on the following should be noted:
tape drive.
Ÿ If the owners of the object do not match, the object
*UNLOAD: The tape is automatically rewound and will be restored, but the ownership and authorities it
unloaded after the operation ends. had before the restore operation are retained.
SAVF Ÿ The informational message causes a diagnostic
Specifies the save file that contains the data from which message to be sent indicating that security or integ-
to restore objects. rity changes occurred during the restore. This
results in an escape message for the restore func-
The name of the save file can be qualified by one of the
tion.
following library values:
Ÿ If the user is restoring objects to a system different
*LIBL: All libraries in the job's library list are
from the one on which they were saved and the
searched until the first match is found.
objects are secured by an authorization list, speci-
*CURLIB: The current library for the job is fying *ALL automatically links the objects to the
searched. If no library is specified as the current authorization list again. If the authorization list does
library for the job, the QGPL library is used. not exist on the new system, a message that
includes the name of the missing list is issued.
library-name: Specify the name of the library to be
searched. OUTPUT
Specifies whether a listing that shows information about
save-file-name: Specify the name of the file used to
the status of the object is created and directed to an
restore user profiles.
output file. The listing shows the restore information and
MAIL shows all objects, restored, not restored, and excluded.
Specifies whether the OfficeVision distribution objects Information about each object's security is listed for the
saved from a release before V2R2M0 are restored. restored objects. More information on this parameter is
in Appendix A, “Expanded Parameter Descriptions.”
Note: You can specify *YES on this parameter only if
you specify *ALL on the USRPRF parameter. *NONE: No output is created.
*NO: Distribution objects that are part of your mail are *OUTFILE: The output is directed to the database file
not restored with the user profile. specified on the OUTFILE parameter.
*YES: Distribution objects that are part of your mail are Note: You must specify the database file name on the
restored with the user profile if the save data was OUTFILE parameter when OUTPUT(*OUTFILE)
created before release V2R2M0. Otherwise, no distribu- is specified.
tion objects are restored. For saved distribution objects
OUTFILE
created on V2R2M0 or later, specify DLO(*MAIL) on the
Specifies the qualified name of the database file to
Restore Document Library Objects (RSTDLO) command
which the information about the object is directed when
to restore your mail.
*OUTFILE is specified on the OUTPUT parameter. If
ALWOBJDIF the file does not exist, this command creates a database
Specifies whether certain differences encountered during file in the specified library. If a new file is created, the
a restore are allowed. There are two differences for this system uses QASRRSTO in QSYS with the format name
command: QSRRST as a model.

Ÿ The owner of the object on the system is different The name of the database file can be qualified by one of
than the owner of the object from the save. the following library values:

Ÿ The object is secured by an authorization list and is *LIBL: All libraries in the job's library list are
being restored to a system other than the one on searched until the first match is found.
which it was saved.

Chapter 2. OS/400 Command Descriptions P3-887


RSTUSRPRF

*CURLIB: The current library for the job is *ADD: The new records are added to the existing infor-
searched. If no library is specified as the current mation in the specified database file member.
library for the job, the QGPL library is used.
library-name: Specify the name of the library to be Examples
searched.
Example 1: Restoring All Profiles
database-file-name: Specify the name of the database
file to which the output of the command is directed. RSTUSRPRF DEV(TAPð1) SEQNBR(\SEARCH) ENDOPT(\REWIND)

OUTMBR The saved version of all user profiles contained on the tape
Specifies the name of the database file member to which currently put on the tape drive named TAP01 is restored to
the output is directed. If a member already exists, the the system. The tape is searched for the file, and the tape is
system uses the second element of this parameter to rewound on completion or at the end of restore.
determine whether the member is cleared before the
new records are added. If the member does not exist Example 2: Restoring Specific User Profiles
and a member name is not specified, the system creates RSTUSRPRF DEV(TAPð1) USRPRF(USRA USRB USRC USER\)
a member with the name of the output file specified on
the OUTFILE parameter. If an output file member name The saved version of all the user profiles must exist on the
is specified, but the member does not exist, the system tape placed on tape drive TAP01. User profiles USRA,
creates it. USRB, and USRC, along with all the user profiles whose
names start with USER, are restored to the system.
Element 1: Member to Receive Output
*FIRST: The first member in the file receives the output. Example 3: Restoring User Profiles from a Save File
If OUTMBR(*FIRST) is specified and the member does RSTUSRPRF DEV(\SAVF) USRPRF(USRX USRY)
not exist, the system creates a member with the name of SAVF(QGPL/SAVESEC)
the file specified on the OUTFILE parameter.
This command restores user profiles USRX and USRY to the
member-name: Specify the name of the file member system from the save file SAVESEC in library QGPL.
that receives the output. If OUTMBR(member-name) is
specified and the member does not exist, the system Example 4: Reporting Information about User Profiles
creates it. If the member exists, the user can add Restored and Not Restored
records to the end of the existing member or clear the
RSTUSRPRF DEV(TAPð1) USRPRF(\ALL) OUTPUT(\OUTFILE)
existing member and add the records.
OUTFILE(PRFS92) OUTMBR(FOURQT \ADD)
Element 2: Operation to Perform on Member
This command restores all user profiles from the tape device
*REPLACE: The existing records in the specified data-
TAP01. A list reporting information about user profiles
base file member are replaced by the new records.
restored and not restored is directed to the output file
PRFS92. The output is received in the member FOURQT as
an addition to existing information in the member.

P3-888 OS/400 CL Reference - Part 2 (Full Version)


RTVAUTLE

RTVAUTLE (Retrieve Authorization List Entry) Command


Pgm: B,I REXX: B,I

(P) ─┬────────────────────────────┬───────────────────────5
55──RTVAUTLE──AUTL(──authorization-list-name──)──USER(──┬─\PUBLIC─┬──)────
└─user-ID─┘ └─ALL(──&CL-variable-name──)─┘
5──┬───────────────────────────────┬──┬────────────────────────────┬──┬────────────────────────────────┬────────────────────────5
└─CHANGE(──&CL-variable-name──)─┘ └─USE(──&CL-variable-name──)─┘ └─EXCLUDE(──&CL-variable-name──)─┘
5──┬─────────────────────────────────┬──┬─────────────────────────────────┬──┬───────────────────────────────┬──────────────────5
└─OBJALTER(──&CL-variable-name──)─┘ └─OBJEXIST(──&CL-variable-name──)─┘ └─OBJMGT(──&CL-variable-name──)─┘
5──┬───────────────────────────────┬──┬───────────────────────────────┬──┬─────────────────────────────┬────────────────────────5
└─OBJOPR(──&CL-variable-name──)─┘ └─OBJREF(──&CL-variable-name──)─┘ └─READ(──&CL-variable-name──)─┘
5──┬────────────────────────────┬──┬───────────────────────────────┬──┬───────────────────────────────┬─────────────────────────5
└─ADD(──&CL-variable-name──)─┘ └─UPDATE(──&CL-variable-name──)─┘ └─DELETE(──&CL-variable-name──)─┘
5──┬────────────────────────────────┬──┬────────────────────────────────┬──────────────────────────────────────────────────────5%
└─EXECUTE(──&CL-variable-name──)─┘ └─AUTLMGT(──&CL-variable-name──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Keyword Value


OBJREF *OBJREF
The Retrieve Authorization List Entry (RTVAUTLE) command
READ *READ
is used in a CL program or REXX procedure to retrieve the
authorities that a user has on the authorization list. It can be UPDATE *UPD
used with the Change Authorization List Entry command to USE *USE
change the user's authorities to include new authorities in
addition to the existing authorities for the user. Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more
The authorization list name and user name must be speci- information about printing the help text, refer to
fied. The variables for each of the authorities the user might “Printing CL Command Descriptions” in Chapter 1.
have are returned blank if the user does not have the
authority; they are returned with the correct value for the The CL prompt for this command lists the minimum length for
Change Authorization List Entry (CHGAUTLE) command if the variables next to the appropriate parameters to be
the user has the authority. The values are returned in the retrieved. For character variables, a single number is shown.
specified variables for the specified user.

Users who have *AUTLMGT authority or who own the Required Parameters
authorization list can retrieve authority for any user on the
AUTL
list. Other users can retrieve their own authorities or the
Specifies the name of the authorization list that specifies
authority of *PUBLIC.
the user's authorities.
The following values are returned if the user has the USER
authority specified by the keyword: Specifies the name of the user whose information is
being retrieved. If a variable is specified, it must be 10
Keyword Value characters in length and contain a user name or the
ADD *ADD value *PUBLIC.
ALL *ALL
*PUBLIC: The information returned in the specified
AUTLMGT *AUTLMGT parameter is for the users who do not have any specific
CHANGE *CHANGE authority to the authorization list, and whose user groups
DELETE *DLT do not have any specific authority to the authorization
list.
EXCLUDE *EXCLUDE
EXECUTE *EXECUTE user profile name: Specify the user profile name of the
user whose information is being retrieved.
OBJALTER *OBJALTER
OBJEXIST *OBJEXIST
OBJMGT *OBJMGT
Optional Parameters
OBJOPR *OBJOPR

Chapter 2. OS/400 Command Descriptions P3-889


RTVAUTLE

ALL READ
Specifies the name of a variable that is used to return Specifies the name of a variable that is used to return
*ALL if the user has *ALL authority. In CL programs, the *READ if the user has *READ authority. In CL pro-
variable has a length of 10 characters. Blanks are grams, the variable has a length of 10 characters.
returned in the variable if the user does not have *ALL Blanks are returned in the variable if the user does not
authority. have *READ authority.

CHANGE ADD
Specifies the name of a variable that is used to return Specifies the name of a variable that is used to return
*CHANGE if the user has *CHANGE authority. In CL *ADD if the user has *ADD authority. In CL programs,
programs, the variable has a length of 10 characters. the variable has a length of 10 characters. Blanks are
Blanks are returned in the variable if the user does not returned in the variable if the user does not have *ADD
have *CHANGE authority. authority.

USE UPDATE
Specifies the name of a variable that is used to return Specifies the name of a variable that is used to return
*USE if the user has *USE authority. In CL programs, *UPD if the user has *UPD authority. In CL programs,
the variable has a length of 10 characters. Blanks are the variable has a length of 10 characters. Blanks are
returned in the variable if the user does not have *USE returned in the variable if the user does not have *UPD
authority. authority.

EXCLUDE DELETE
Specifies the name of a variable that is used to return Specifies the name of a variable that is used to return
*EXCLUDE if the user has *EXCLUDE authority. In CL *DLT if the user has *DLT authority. In CL programs,
programs, the variable has a length of 10 characters. the variable has a length of 10 characters. Blanks are
Blanks are returned in the variable if the user does not returned in the variable if the user does not have *DLT
have *EXCLUDE authority. authority.

OBJALTER EXECUTE
Specifies the name of a variable that is used to return Specifies the name of a variable that is used to return
*OBJALTER if the user has *OBJALTER authority. In *EXECUTE if the user has *EXECUTE authority. In CL
CL programs, the variable has a length of 10 characters. programs, the variable has a length of 10 characters.
Blanks are returned in the variable if the user does not Blanks are returned in the variable if the user does not
have *OBJALTER authority. have *EXECUTE authority.

OBJEXIST AUTLMGT
Specifies the name of a variable that is used to return Specifies the name of a variable that is used to return
*OBJEXIST if the user has *OBJEXIST authority. In CL *AUTLMGT if the user has *AUTLMGT authority. In CL
programs, the variable has a length of 10 characters. programs, the variable has a length of 10 characters.
Blanks are returned in the variable if the user does not Blanks are returned in the variable if the user does not
have *OBJEXIST authority. have *AUTLMGT authority.

OBJMGT
Specifies the name of a variable that is used to return Example
*OBJMGT if the user has *OBJMGT authority. In CL ADDAUTLE AUTL(PAYROLL) USER(TOM)
programs, the variable has a length of 10 characters. AUT(\OBJOPR \READ \UPD \AUTLMGT)
Blanks are returned in the variable if the user does not
have *OBJMGT authority. When user Smith calls a CL program containing the fol-
lowing:
OBJOPR
Specifies the name of a variable that is used to return DCL &CHG \CHAR 1ð
*OBJOPR if the user has *OBJOPR authority. In CL DCL &ALL \CHAR 1ð
DCL &USE \CHAR 1ð
programs, the variable has a length of 10 characters.
DCL &EXCL \CHAR 1ð
Blanks are returned in the variable if the user does not
DCL &OBJOP \CHAR 1ð
have *OBJOPR authority. DCL &ALTER \CHAR 1ð
OBJREF DCL &REFER \CHAR 1ð
Specifies the name of a variable that is used to return DCL &READ \CHAR 1ð
DCL &ADD \CHAR 1ð
*OBJREF if the user has *OBJREF authority. In CL pro-
DCL &UPD \CHAR 1ð
grams, the variable has a length of 10 characters.
DCL &DLT \CHAR 1ð
Blanks are returned in the variable if the user does not DCL &EXEC \CHAR 1ð
have *OBJREF authority. DCL &AUTLM \CHAR 1ð

P3-890 OS/400 CL Reference - Part 2 (Full Version)


RTVAUTLE

RTVAUTLE AUTL(PAYROLL) USER(TOM) USE(&USE) This command retrieves the following authorities from the
OBJOPR(&OBJOP) AUTLMGT(&AUTLM) authorization list PAYROLL for user TOM: *USE, *OBJOPR,
and *AUTLMGT. If TOM does not have the authority, blanks
are returned.

Chapter 2. OS/400 Command Descriptions P3-891


RTVBCKUP

RTVBCKUP (Retrieve Backup) Command


Pgm: B,I REXX: B,I

(P)─┬────────────────────────────┬──┬───────────────────────────────┬───────────────────5
55──RTVBCKUP──BCKUPOPT(──┬─\DAILY───┬──)───
├─\WEEKLY──┤ └─DEV(──&CL-variable-name──)─┘ └─TAPSET(──&CL-variable-name──)─┘
└─\MONTHLY─┘
5──┬───────────────────────────────┬──┬───────────────────────────────┬──┬────────────────────────────────┬─────────────────────5
└─CLRTAP(──&CL-variable-name──)─┘ └─SBMJOB(──&CL-variable-name──)─┘ └─CHGONLY(──&CL-variable-name──)─┘
5──┬───────────────────────────────┬──┬────────────────────────────┬──┬────────────────────────────┬────────────────────────────5
└─PRTRPT(──&CL-variable-name──)─┘ └─LIB(──&CL-variable-name──)─┘ └─FLR(──&CL-variable-name──)─┘
5──┬────────────────────────────┬──┬───────────────────────────────┬──┬────────────────────────────┬────────────────────────────5
└─DIR(──&CL-variable-name──)─┘ └─SECDTA(──&CL-variable-name──)─┘ └─CFG(──&CL-variable-name──)─┘
5──┬─────────────────────────────┬──┬────────────────────────────┬──┬────────────────────────────────┬──────────────────────────5
└─MAIL(──&CL-variable-name──)─┘ └─CAL(──&CL-variable-name──)─┘ └─EXITPGM(──&CL-variable-name──)─┘
5──┬───────────────────────────────────┬───────────────────────────────────────────────────────────────────────────────────────5%
└─EXITPGMLIB(──&CL-variable-name──)─┘
Note:
P All parameters preceding this point can be specified positionally.

Purpose SBMJOB
Specifies the name of the CL variable that receives the
The Retrieve Backup (RTVBCKUP) command is used in a indicator of whether the backup is run as a batch job.
CL program or REXX procedure to retrieve the options in The variable must have a minimum length of 4 charac-
one of the predefined backups into CL variables. More infor- ters. The value returned is either *YES or *NO.
mation on backup is in the Backup and Recovery book.
CHGONLY
Note: To see the parameter and value descriptions for this Specifies the name of the CL variable that receives the
command, refer to the online help text. For more indicator for saving changed objects only. The variable
information about printing the help text, refer to must have a minimum length of 4 characters. The value
“Printing CL Command Descriptions” in Chapter 1. returned is either *YES or *NO.

PRTRPT
Required Parameters Specifies the name of the CL variable that receives the
BCKUPOPT indicator for printing a report of saved objects. The vari-
Specifies the backup options to be retrieved. able must have a minimum length of 4 characters. The
value returned is either *YES or *NO.
*DAILY: The daily backup options are retrieved.
LIB
*WEEKLY: The weekly backup options are retrieved.
Specifies the name of the CL variable that receives the
*MONTHLY: The monthly backup options are retrieved. value specifying the libraries to save with this backup.
The variable must have a minimum length of 10 charac-
ters. A value of *ALLUSR, *FROMLIST, or *NONE is
Optional Parameters returned.
DEV
FLR
Specifies the name of the CL variable that receives the
Specifies the name of the CL variable that receives the
device value. The variable has a minimum length of 43
value specifying the folders to save with this backup.
characters. The value returned is a character string of
The variable must have a minimum length of 10 charac-
four 10-character device names, separated by blanks.
ters. A value of *ALL, *FROMLIST, or *NONE is
TAPSET returned.
Specifies the name of the CL variable that receives the
DIR
tape set names. The variable has a minimum length of
Specifies the name of the CL variable that receives the
34 characters (seven 4-character tape set names, sepa-
value specifying the user directories to save with this
rated by blanks).
backup. The variable must have a minimum length of
CLRTAP 10 characters. A value of *ALLUSR or *NONE is
Specifies the name of the CL variable that receives the returned.
indicator for clearing the tape for backup. The variable
SECDTA
must have a minimum length of 4 characters. The value
Specifies the name of the CL variable that receives the
returned is either *YES or *NO.
indicator for saving security data. The variable must

P3-892 OS/400 CL Reference - Part 2 (Full Version)


RTVBCKUP

have a minimum length of 4 characters. The value EXITPGM


returned is either *YES or *NO. Specifies the name of the CL variable that receives the
name of the user program to call before and after the
CFG
backup is run. The variable must have a minimum
Specifies the name of the CL variable that receives the
length of 10 characters. If no exit program is specified,
indicator for saving configuration data. The variable
*NONE is returned.
must have a minimum length of 4 characters. The value
returned is either *YES or *NO. EXITPGMLIB
Specifies the name of the CL variable that receives the
MAIL
name of the library that contains the exit program. The
Specifies the name of the CL variable that receives the
variable must have a minimum length of 10 characters.
indicator for saving OfficeVision mail. The variable must
If no exit program is specified, blanks are returned. If
have a minimum length of 4 characters. The value
*LIBL is returned, the program uses the library list.
returned is either *YES or *NO.

CAL Example
Specifies the name of the CL variable that receives the
indicator for saving OfficeVision calendars. The variable RTVBCKUP BCKUPOPT(\DAILY) SBMJOB(&SBMJOBVAR)
must have a minimum length of 4 characters. The value LIB(&LIBVAR)
returned is either *YES or *NO.
This command retrieves the SBMJOB and LIB values for the
daily backup into the CL variables SBMJOBVAR and LIBVAR
respectively.

Chapter 2. OS/400 Command Descriptions P3-893


RTVBNDSRC

RTVBNDSRC (Retrieve Binder Source) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌──
─────────────────────────────────────────────┐
│ ┌─\LIBL/────────┐ │
6 (1) ──)────
55──RTVBNDSRC──MODULE(──────┼───────────────┼──┬─\ALL─────────────────┬─┴───── (P) ───────────────────────────────────────────5
├─\CURLIB/──────┤ ├─generic\-module-name─┤
├─\USRLIBL/─────┤ └─module-name──────────┘
└─library-name/─┘
5──┬──────────────────────────────────────────────────────┬──┬─────────────────────────────────────────┬────────────────────────5
│ ┌─\LIBL/────────┐ ┌─QSRVSRC──────────┐ │ │ ┌─\DFT────────────────────┐ │
└─SRCFILE(──┼─\CURLIB/──────┼──┴─source-file-name─┴──)─┘ └─SRCMBR(──┴─source-file-member-name─┴──)─┘
└─library-name/─┘
5──┬──────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────5%
│ ┌─\REPLACE─┐ │
└─MBROPT(──┴─\ADD─────┴──)─┘
Notes:
1 A maximum of 300 module entries can be specified.

P All parameters preceding this point can be specified in positional form.

Purpose *ADD authority to the file and *EXECUTE, *READ and


*ADD authority to the library that contains the file.
The Retrieve Binder Source (RTVBNDSRC) command can
8. If the source file and member need to be created, you
be used to retrieve the exports from a module or a set of
must have *EXECUTE, *READ and *ADD authority to
modules and place them (along with the binder language
the library.
statements needed for the exports) in a specified file
member. This file member can later be used as input to the Note: To see the parameter and value descriptions for this
Create Service Program (CRTSRVPGM) command SRCMBR command, refer to the online help text. For more
parameter. After the binder language has been retrieved into information about printing the help text, refer to
a source file member, you can edit the binder language to “Printing CL Command Descriptions” in Chapter 1.
make changes as needed.

By default, the CRTSRVPGM command has a binder lan- Required Parameter


guage file specified on the SRCFILE parameter to identify MODULE
the exports from the service program. The RTVBNDSRC Specifies the list of modules from which to retrieve the
command can be useful in helping you automatically create exported symbols. If duplicate module and library spec-
this binder language. ifications are found, only the first instance of the dupli-
cate module and library is used.
Restrictions:
The name of the modules can be qualified by one of the
1. You must have *USE authority to the Create Source
following library values:
Physical File (CRTSRCPF) command if the file does not
exist. *LIBL: All libraries in the job's library list are
2. You must have *USE authority to the Reorganize Phys- searched until the first match is found.
ical File Member (RGZPFM) command. *CURLIB: The current library for the job is
3. You must have *USE authority to the Add Physical File searched. If no library is specified as the current
Member (ADDPFM) command if the member does not library for the job, the QGPL library is used.
exist. *USRLIBL: Only the libraries in the user portion of
4. You must have *USE authority to the module from which the job's library list are searched.
the exports are being retrieved. library-name: Specify the name of the library to be
5. You must have *EXECUTE authority to the library in searched.
which the module exists. *ALL: The exported symbols from all of the modules in
6. If the source file and member to receive the binder lan- the specified library are retrieved.
guage exist, you must have *CHANGE and *OBJALTER generic*-module-name: Specify a generic module name
or *OBJMGT authority to the file and *EXECUTE from which to retrieve the exported symbols. All
authority to the library that contains the file. modules that have names with the same prefix in the
7. If the source file exists but the source member needs to specified library or libraries are used. A generic name is
be created, you must have *OBJOPR, *OBJMGT, and a character string of one or more characters followed by

P3-894 OS/400 CL Reference - Part 2 (Full Version)


RTVBNDSRC

an asterisk (*); for example, ABC*. The asterisk substi- If the member does not exist in the source file specified,
tutes for any valid characters. A generic name specifies the member is created.
all objects with names that begin with the generic prefix
*DFT: The name of the source file member is taken
for which the user has authority. If an asterisk is not
from the value specified on the MODULE parameter.
included with the generic (prefix) name, the system
assumes it to be the complete object name. For more Ÿ If only one module is specified, the name of that
information on the use of generic names, refer to module is the member used.
“Generic Object Names” in Chapter 2.
Ÿ If more than one module is specified, the name of
module-name: Specify the name of the module from the first module specified is used.
which to retrieve the exported symbols.
Ÿ If the value *ALL or a generic name is specified, the
module name of the first occurrence found is the
Optional Parameters source member name used.

SRCFILE source-file-member-name: Specify the name of the


Specifies the name of the source file that is to hold the member that contains the binder language source.
binder language for the exported symbols. If the source
MBROPT
file does not exist, it is created.
Specifies whether the generated binder language state-
Notes: ments are replaced or added to the existing statements.
1. Only the physical files of the type *SRC can be *REPLACE: The system clears the existing member
specified. Distributed data management (DDM) files and adds the new records.
are not supported. *ADD: The system adds the new records to the end of
2. If the source file to receive the binder language the existing records.
exists, its record length must be a minimum of 92 Note: If the member already exists and, for example,
bytes. already contains STRPGMEXP and
The name of the source file can be qualified by one of ENDPGMEXP statements, the member may
the following library values: contain multiple STRPGMEXP and
ENDPGMEXP statements in the binder language
*LIBL: All libraries in the job's library list are at the end of this operation. You must edit these
searched until the first match is found. If a source multiple statements in order to use the binder
file by the name specified is not found in the library language for the CRTSRVPGM command.
list, it is created in the current library. If there is no
current library, the QGPL library is used.
*CURLIB: The current library for the job is Examples
searched. If a source file by the name specified RTVBNDSRC MODULE(MYLIB/\ALL)
does not exist, it is created in the current library. If SRCFILE(MYLIB/MYBINDFILE) MBROPT(\ADD)
there is no current library, the QGPL library is used.
This command retrieves the exports from all modules in the
library-name: Specify the name of the library to be
library MYLIB, and places them in the source member with
searched. If a source file by the name specified is
the name of the first module found. If this source member
not found in this library, the source file is created in
does not exist in the file MYBINDFILE in the library MYLIB, it
this library.
is created. The export statements are added to the end of
QSRVSRC: The source file name is the default source the member. If multiple start and end program export state-
file name, QSRVSRC. ments exist in the file when this command is ended, the
source member must be edited before it is used to create a
source-file-name: Specify the name of the source file.
service program. Either the extra STRPGMEXP,
SRCMBR ENDPGMEXP statements can be removed, or the PGMLVL
Specifies the name of the member in the source file that parameter can be added to the STRPGMEXP statements, if
is to hold the binder language for the exported symbols. some of the export blocks are for previous versions of the
Only one source member will contain the binder lan- service program.
guage, even if the binder language is generated from
exported symbols retrieved from multiple modules.

Chapter 2. OS/400 Command Descriptions P3-895


RTVCFGSRC

RTVCFGSRC (Retrieve Configuration Source) Command


Job: B,I Pgm: B,I REXX: B,I Exec

55──RTVCFGSRC──CFGD(──┬─\ALL─────────────────────────────────────────────┬──)──CFGTYPE(──┬─\ALL──┬──)───────────────────────────5
│ ┌──
───────────────────────────────────────────┐ │ ├─\NWSD─┤
└──6┬─generic\-configuration-description-name─┬┴───
(1) ─┘ ├─\NWID─┤
└─configuration-description-name──────────┘ ├─\LIND─┤
├─\CTLD─┤
├─\DEVD─┤
├─\MODD─┤
├─\COSD─┤
├─\CNNL─┤
├─\NTBD─┤
└─\IPXD─┘
(P) ──────────────────────────5
5──┬──────────────────────────────────────────────────────┬──┬────────────────────────────────────┬───
│ ┌─\LIBL/────────┐ ┌─QCLSRC───────────┐ │ │ ┌─\CFGD──────────────┐ │
└─SRCFILE(──┼───────────────┼──┴─source-file-name─┴──)─┘ └─SRCMBR(──┴─source-member-name─┴──)─┘
├─\CURLIB/──────┤
└─library-name/─┘
5──┬──────────────────────┬──┬──────────────────────────┬──┬─────────────────────────────┬─────────────────────────────────────5%
│ ┌─\NET─┐ │ │ ┌─\REPLACE─┐ │ │ ┌─\CFGDTXT──────┐ │
└─RTVOPT(──┴─\OBJ─┴──)─┘ └─MBROPT(──┴─\ADD─────┴──)─┘ └─TEXT(──┼─\BLANK────────┼──)─┘
└─'description'─┘
Notes:
1 A maximum of 256 repetitions

P All parameters preceding this point can be specified in positional form.

Purpose configuration-description-name: Specify the user-defined


name of the configuration description.
The Retrieve Configuration Source (RTVCFGSRC) command
retrieves CL command source to create existing configuration CFGTYPE
objects. This command allows easy portability of configura- Specifies the object type to which the names in the
tion objects from one system to another and provides a CFGD parameter are referring.
method of saving configurations without having to run the *ALL: All network servers, network interfaces, lines,
SAVSYS command. controllers, devices, connection lists, modes, classes-of-
Note: To see the parameter and value descriptions for this service, NetBIOS, and Internet Packet Exchange
command, refer to the online help text. For more descriptions matching the specified names are retrieved
information about printing the help text, refer to in the following order:
“Printing CL Command Descriptions” in Chapter 1. 1. Connection Lists
2. Network server descriptions
Required Parameters 3. Network Interfaces
4. Non-TDLC line descriptions
CFGD 5. Non-TDLC controller descriptions
Specifies the configuration objects of the CL source 6. TDLC line descriptions
being retrieved. Multiple names can be specified; 7. TDLC controller descriptions
generic names are accepted. The CFGTYPE parameter 8. Device descriptions
specifies the type of object to which the names refer. 9. Mode descriptions
*ALL: All objects specified by the CFGTYPE parameter 10. Class-of-service descriptions
are retrieved. 11. NetBIOS descriptions
12. IPX descriptions
generic*-configuration-description-name: Specify the 13. SWTCTLLST for line descriptions
generic name of the configuration description name. A 14. SWTLINLST for controller descriptions
generic name is a character string of one or more char- 15. SWTNWILST for line descriptions
acters followed by an asterisk (*); for example, ABC*. 16. Printer for remote displays
The asterisk substitutes for any valid characters. A
generic name specifies all objects with names that begin *NWSD: All network server descriptions matching the
with the generic prefix for which the user has authority. specified names are retrieved.
If an asterisk is not included with the generic (prefix) *NWID: All network interfaces matching the specified
name, the system assumes it to be the complete object names are retrieved.
name. For more information on the use of generic
names, refer to “Generic Object Names” in Chapter 2.

P3-896 OS/400 CL Reference - Part 2 (Full Version)


RTVCFGSRC

*LIND: All lines matching the specified names are This parameter cannot be specified if CFGTYPE(*ALL) is
retrieved. specified. If CFGTYPE(*ALL) is specified, the source is
retrieved for objects of all types with names as specified
*CTLD: All controllers matching the specified names are
on the CFGD parameter, followed by switched attach-
retrieved.
ment information (SWTCTLLST, SWTNWILST, and
*DEVD: All devices matching the specified names are SWTLINLST parameters on Change Line, Change
retrieved. Network Interface, and Change Controller commands).
*MODD: All modes matching the specified names are *NET: The source for the configuration object names
retrieved. specified on the CFGD parameter, of the type specified
*COSD: All classes-of-service matching the specified on the CFGTYPE parameter are retrieved. Also
names are retrieved. retrieved are the downward-attached configuration
objects. For example, if CFGTYPE(*CTLD) is specified,
*CNNL: All connection lists matching the specified the configuration source for devices attached to the
names are retrieved. specified controllers is also retrieved. For
*NTBD: All NetBIOS descriptions matching the specified CFGTYPE(*CTLD), the switched attachment configura-
names are retrieved. tion information (if any) is retrieved in the form of
Change Controller (CHGCTLxxx) commands including
*IPXD: All Internet Packet Exchange descriptions
the SWTLINLST parameter following the Create Con-
matching the specified names are retrieved.
troller (CRTCTLxxx) commands.
*OBJ: The source for the configuration object names
Optional Parameters specified on the CFGD parameter, of the type specified
SRCFILE on the CFGTYPE parameter, is retrieved.
Specifies the name of the previously created database
MBROPT
source file where the retrieved source is written.
Specifies whether the new records replace or are added
The name of the source file can be qualified by one of to the existing records.
the following library values:
*REPLACE: The system clears the existing member
*LIBL: All libraries in the job's library list are and adds the new records.
searched until the first match is found. *ADD: The system adds the new records to the end of
*CURLIB: The current library for the job is the existing records.
searched. If no library is specified as the current
TEXT
library for the job, the QGPL library is used.
Specifies the text that briefly describes the configuration
library-name: Specify the name of the library to be description. More information on this parameter is in
searched. Appendix A, “Expanded Parameter Descriptions.”
QCLSRC: The retrieved source is written in the *CFGDTXT: If *ALL is specified on the CFGD param-
QCLSRC source file. eter or a generic name or list of names, then *BLANK is
used as the text. If MBROPT(*ADD) is specified, the
source-file-name: Specify the name of the source file
member's text is replaced; otherwise, the text of the con-
where the retrieved source is being written.
figuration object being retrieved is used as the text.
SRCMBR *BLANK: Text is not specified.
Specifies the member name in the source file where the
retrieved source is written. If the member does not 'description': Specify no more than 50 characters of text,
exist, it is created. enclosed in apostrophes.

*CFGD: If *ALL, a generic name or list of names is


specified on the CFGD parameter, the name of the Example
source file member is CFGSRC. Otherwise, the name RTVCFGSRC CFGD(CTL\) CFGTYPE(\CTLD)
specified on the CFGD parameter is used as the SRCMBR(CTLS) RTVOPT(\OBJ)
member name.
This command places CL source statements in the file
source-member-name: Specify the source file member
member CTLS in the source file QCLSRC. These source
name.
statements can be used to re-create object descriptions for
RTVOPT all existing controllers with names beginning with CTL.
Specifies which attachment information is retrieved for
the specified objects.

Chapter 2. OS/400 Command Descriptions P3-897


RTVCFGSTS

RTVCFGSTS (Retrieve Configuration Status) Command


Pgm: B,I REXX: B,I

(P) ───────────────────5%
55──RTVCFGSTS──CFGD(──configuration-description-name──)──CFGTYPE(──┬─\NWS─┬──)──STSCDE(──&CL-variable──)────
├─\NWI─┤
├─\LIN─┤
├─\CTL─┤
└─\DEV─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose resource, downloading microcode to an I/O


processor, communicating with data circuit-
The Retrieve Configuration Status (RTVCFGSTS) command terminating equipment (DCE), and so on.
is used in a CL program or REXX procedure to retrieve the
30 VARIED ON–The tasks that manage the
status of a configuration object.
network interface, network server, line, con-
More information is in the Communications Management troller, or device have been put in place by
book and in the Communications Configuration book. the system, and the system has the capa-
bility to communicate with it.
Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more | 32 VARY ON/CNN PENDING– The first of a
information about printing the help text, refer to | pair of OptiConnect controllers is varied on
“Printing CL Command Descriptions” in Chapter 1. | but its attached device is not yet in a varied
| on state.
40 CONNECT PENDING–This status is only
Required Parameters valid for switched IDLC, SDLC, BSC, or
CFGD asynchronous lines. The line is in this
Specifies the name of the configuration object whose status while waiting for the switched con-
status is retrieved. Valid values range from 1 through 10 nection to be established; this connection
characters. can be either a dial or an answer.

CFGTYPE 50 SIGNON DISPLAY–This status is only valid


Specifies the type of configuration object. for display devices. The system is pre-
paring the device to receive the sign-on
*NWS: The object is a network server description. display, sending the sign-on display, or the
*NWI: The object is a network interface description. actual sign-on display is at the display
station.
*LIN: The object is a line description.
| 51 ACTIVE/CNN PENDING– The first of a pair
*CTL: The object is a controller description.
| of OptiConnect controllers and its attached
*DEV: The object is a device description. | device are varied on and waiting for the
| OptiConnect path to be established.
STSCDE
Specifies the name of the variable that will contain the 60 ACTIVE–The object is successfully placed
retrieved status. In a CL program, the variable name in VARIED ON status. For network inter-
should be a decimal variable of length (5 0). faces and network servers, one or more
attached lines are in VARY ON PENDING
The possible values which can be returned include:
status or higher. For lines, one or more
Value Definition attached controllers is in a VARY ON
PENDING status or higher. For controllers,
0 VARIED OFF–The system is not using the
one or more attached devices is in a VARY
description.
ON PENDING status or higher. For
10 VARY OFF PENDING–The description is devices, active status varies depending on
being varied off. During this time the the type of device. More information is in
system may be taking down the tasks which the Communications Configuration book. A
managed the resource. display device which is at a second sign-on
20 VARY ON PENDING–The description is display as a result of pressing the system
being varied on. During this time the system request key will be considered ACTIVE.
may be putting tasks in place to manage the

P3-898 OS/400 CL Reference - Part 2 (Full Version)


RTVCFGSTS

| 63 ACTIVE READER– The device is in use by 110 DIAGNOSTIC MODE–The network inter-
| a spool reader. face, network server, line, controller, or
| 66 ACTIVE WRITER– The device is in use by device resource is being used by problem
| a spool writer. analysis procedures to diagnose problems,
and the resource cannot be used by other
70 HELD–This status is only valid for Device users.
Descriptions. The user or the system held
the communications device to prevent it 111 DAMAGED–The network interface, network
from communicating. The Release Commu- server, line, controller, or device description
nications Device (RLSCMNDEV) command is damaged. This is a system error condi-
can be used to release the device. tion. Information indicating when this
damage occurred appears in the history log
80 RCYPND–Error recovery is pending for the (QHST). The description must be deleted
network interface, line, controller, or device. and created once more before it can be
A message indicating what error occurred used again.
appears on the QSYSOPR message queue.
112 LOCKED–The actual status of the resource
90 RCYCNL–Error recovery is canceled for the cannot be determined because another job
network interface, line, controller, or device. has an exclusive lock on the description.
An error occurred, and the operator replied Retry at a later time, or use the Work with
with a C (to cancel error recovery) to a Object Lock (WRKOBJLCK) command to
message, or the operator used a command determine which job has the lock on the
(ENDNWIRCY, ENDLINRCY, ENDCTLRCY, description.
ENDDEVRCY) to end error recovery.
113 UNKNOWN–The status indicator of the
| 95 SYSTEM REQUEST– The display device description cannot be determined. This is a
| has been requested by the system and its system error condition. Use the Dump
| associated job has been suspended. This Object (DMPOBJ) command to dump the
| occurs as a result of a user pressing the contents and/or attributes of the description
| System Request key. to a spooled printer file, and contact an IBM
100 FAILED– An error occurred for the network representative.
interface, network server, line, controller, or
device that can be recovered only by
varying off and on again.
Example
RTVCFGSTS CFGD(NDð1) CFGTYPE(\LIN)
| 103 FAILED READER– An error occurred for
STSCDE(&STSCODE)
| the device while in use by a spool reader.
| 106 FAILED WRITER– An error occurred for the This command retrieves the configuration status of the line
| device while in use by a spool writer. configuration description ND01 for use in the CL variable
&STSCODE.
| 107 SHUTDOWN– The NWSD was shut down
| using an AIX interface.

Chapter 2. OS/400 Command Descriptions P3-899


RTVCLNUP

RTVCLNUP (Retrieve Cleanup) Command


Pgm: B,I REXX: B,I

(P)─┬─────────────────────────────────┬──┬────────────────────────────────┬──┬───────────────────────────────┬──────5
55──RTVCLNUP───
└─ALWCLNUP(──&CL-variable-name──)─┘ └─STRTIME(──&CL-variable-name──)─┘ └─USRMSG(──&CL-variable-name──)─┘
5──┬───────────────────────────────┬──┬───────────────────────────────┬──┬───────────────────────────────┬──────────────────────5
└─SYSMSG(──&CL-variable-name──)─┘ └─SYSPRT(──&CL-variable-name──)─┘ └─SYSLOG(──&CL-variable-name──)─┘
5──┬───────────────────────────────┬──┬─────────────────────────────┬──┬────────────────────────────────┬──────────────────────5%
└─CALITM(──&CL-variable-name──)─┘ └─JOBQ(──&CL-variable-name──)─┘ └─JOBQLIB(──&CL-variable-name──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose variable named has a minimum length of 5 characters.


The special value *KEEP or the number of days job logs
The Retrieve Cleanup (RTVCLNUP) command is used in a are kept before they are deleted is returned.
CL program or REXX procedure to retrieve a cleanup opera-
tion value. The value is returned (copied) to the specified CL SYSLOG
variable. Specifies the name of the CL variable that receives the
value for deleting system journals, history files, problem
Note: To see the parameter and value descriptions for this log files, alert database, and program temporary fixes.
command, refer to the online help text. For more The variable named has a minimum length of 5 charac-
information about printing the help text, refer to ters. The special value *KEEP or the number of days
“Printing CL Command Descriptions” in Chapter 1. system journals and system logs are kept before they
are deleted is returned.
Optional Parameters CALITM
ALWCLNUP Specifies the name of the CL variable that receives the
Specifies the name of the CL variable that receives the value for deleting OfficeVision calendar items. The vari-
allow cleanup value. The variable named has a able named has a minimum length of 5 characters. The
minimum length of 4 characters. *YES is returned if the special value *KEEP or the number of days calendar
cleanup operation is allowed to run. Otherwise, *NO is items are kept before they are deleted is returned.
returned. JOBQ
STRTIME Specifies the name of the CL variable that receives the
Specifies the name of the CL variable that receives the name of the job queue to which the cleanup batch jobs
time the cleanup operation starts each day. The vari- are submitted. The variable named has a minimum
able named has a minimum length of 10 characters. length of 10 characters. The name of the job queue
The special value *NONE or *SCDPWROFF, or the start under which cleanup batch jobs are run is returned.
time is returned. JOBQLIB
USRMSG Specifies the name of the CL variable that receives the
Specifies the name of the CL variable that receives the library name of the job queue to which the cleanup batch
value for deleting user messages on user profile jobs are submitted. The variable named has a minimum
message queues. The variable named has a minimum length of 10 characters. The name of the library where
length of 5 characters. The special value *KEEP or the the job queue is located is returned.
number of days user messages are kept before they are
deleted is returned. Examples
SYSMSG
Example 1: Retrieving Number of Days Messages are
Specifies the name of the CL variable that receives the
Kept
value for deleting messages on the QSYSOPR message
queue and on work station message queues. The vari- DCL VAR(&UMSGDAYS) TYPE(\CHAR) LEN(5)
able named has a minimum length of 5 characters. The RTVCLNUP USRMSG(&UMSGDAYS)
special value *KEEP or the number of days system mes-
sages are kept before they are deleted is returned. These commands retrieve the number of days that user mes-
sages are kept before being deleted.
SYSPRT
Specifies the name of the CL variable that receives the Example 2: Retrieving Time Cleanup Operation Starts
value for deleting job logs and other system output. The

P3-900 OS/400 CL Reference - Part 2 (Full Version)


RTVCLNUP

DCL VAR(&CLNUPTIME) TYPE(CHAR) LEN(1ð) These commands retrieve the time that the cleanup opera-
RTVCLNUP STRTIME(&CLNUPTIME) tion starts.

Chapter 2. OS/400 Command Descriptions P3-901


RTVCLSRC

RTVCLSRC (Retrieve CL Source) Command


Job: B,I Pgm: B,I REXX: B,I Exec

┌─\LIBL/────────┐ ┌─\LIBL/────────┐
55──RTVCLSRC──PGM(──┼───────────────┼──program-name──)──SRCFILE(──┼───────────────┼──source-file-name──)────────────────────────5
├─\CURLIB/──────┤ ├─\CURLIB/──────┤
└─library-name/─┘ └─library-name/─┘
(P) ───────────────────────────────────────────────────────────────────────────────────5%
5──┬────────────────────────────────────┬───
│ ┌─\PGM───────────────┐ │
└─SRCMBR(──┴─source-member-name─┴──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose The name of the source file can be qualified by one of


the following library values:
The Retrieve CL Source (RTVCLSRC) command is used to
retrieve the source statements from a CL program used to *LIBL: All libraries in the job's library list are
compile that program. These source statements are placed searched until the first match is found.
into a source file member, which can be used as input when *CURLIB: The current library for the job is
recompiling the CL program. searched. If no library is specified as the current
Note: To see the parameter and value descriptions for this library for the job, the QGPL library is used.
command, refer to the online help text. For more library-name: Specify the name of the library to be
information about printing the help text, refer to searched.
“Printing CL Command Descriptions” in Chapter 1.
source-file-name: Specify the name of the database
source file that contains the CL source statements.
Required Parameters
PGM Optional Parameters
Specifies the qualified name of the CL program whose
source statements are being retrieved. SRCMBR
Specifies the name of the database source file member
The name of the program can be qualified by one of the into which the CL source statements are being written.
following library values: If not specified, the CL program name is assumed. If
*LIBL: All libraries in the job's library list are the member existed before running the command, it is
searched until the first match is found. cleared before any source statements are written into it.
If the member did not exist, it is created.
*CURLIB: The current library for the job is
searched. If no library is specified as the current *PGM: The name of the CL program is used as the
library for the job, the QGPL library is used. member name.

library-name: Specify the name of the library to be source-member-name: Specify the name of the source
searched. file member that contains the CL source statements.

program-name: Specify the name of the CL program


whose source statements are being retrieved. Example
RTVCLSRC PGM(JOHN1/TEXT1) SRCFILE(JOHN2)
SRCFILE SRCMBR(JOHN3)
Specifies the qualified name of the previously created
database source file into which the CL source state- This command retrieves the source statements from the CL
ments are being written. program named TEXT1 in library JOHN1. The retrieved
source statements are placed into the file named JOHN2,
and are named as member JOHN3.

P3-902 OS/400 CL Reference - Part 2 (Full Version)


RTVCURDIR

RTVCURDIR (Retrieve Current Directory) Command


Pgm: B,I REXX: B,I

(P) ─────────────────────────────────────────────5%
55──RTVCURDIR──RTNDIR(──&CL-variable-name──)──DIRNAMLEN(──&CL-variable-name──)────
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Note: To see the parameter and value descriptions for this
command, refer to the online help text. For more
The Retrieve Current Directory (RTVCURDIR) command is information about printing the help text, refer to
used in a CL program or REXX procedure to retrieve the “Printing CL Command Descriptions” in Chapter 1.
name of the current directory into the specified CL variable.
An absolute path name containing no symbolic links is
retrieved. The length of the name of the current directory is Required Parameters
also retrieved. RTNDIR
Specifies the name of the CL variable that receives the
The CL prompt for this command lists the minimum length for
name of the current directory. The variable must be a
retrieved variables next to the appropriate parameters. For
character variable. If the current directory name has
character variables, a single number is shown. For decimal
fewer characters than the variable allows, the value is
variables, two numbers are shown. The first number indi-
not padded.
cates the minimum variable length and the second number
indicates the minimum number of decimal positions. DIRNAMLEN
Specifies the name of the CL variable that receives the
Restrictions: length (in bytes) of the current directory name. This
1. *X authority is required to the current directory, and the length can be longer than the length of the character
user must have *RX authority to each directory in the variable to receive the directory name. The variable
path. must be a 7-digit decimal variable specified with no
decimal positions.
2. The maximum length of a directory name that can be
retrieved is limited by the maximum length of a character
variable. Example
Note: The maximum length of a character variable RTVCURDIR RTNDIR(&CD) DIRNAMLEN(&CDLEN)
cannot exceed 9999 bytes.
This command retrieves the name of the current directory
and the length of the name of the current directory.

Chapter 2. OS/400 Command Descriptions P3-903


RTVDLOAUT

RTVDLOAUT (Retrieve Document Library Object Authority) Command


Pgm: B,I REXX: B,I

55──RTVDLOAUT──DLO(──┬─\ROOT─────────┬──)──┬─────────────────────────────────────────┬──────────────────────────────────────────5
├─\DOCID────────┤ │ ┌─\NONE───────┐ │
├─\LADNTSP──────┤ (1) ─┴─folder-name─┴──)───
├─FLR(─── (P)───────────┤
├─\SYSOBJNAM────┤ │ ┌─\NONE───────────────┐ │
├─document-name─┤ ├─DOCID(───(2) ─┴─Document identifier─┴──)────┤
└─folder-name───┘ │ ┌─\NONE──────────┐ │
├─LADNTSP(─── (3) ─┴─LADN-timestamp─┴──)───────┤
│ ┌─\NONE──────────────┐ │
└─SYSOBJNAM(─── (4) ─┴─system-object-name─┴──)─┘

5──┬────────────────────────────────────────────────────────────┬──┬──────────────────────────────────┬─────────────────────────5
│ ┌─1────────────────────────────────────┐ │ └─OWNER(────&CL-variable-name────)─┘
(5) ─┴─starting-user-authority-entry-number─┴──)─┘
└─STRUSRAUTE(───
5──┬─────────────────────────────────┬──┬─────────────────────────────────────┬──┬───────────────────────────────────┬──────────5
└─AUTL(────&CL-variable-name────)─┘ └─SENSITIV(────&CL-variable-name────)─┘ └─PUBAUT(────&CL-variable-name────)─┘
5──┬──────────────────────────────────────┬──┬────────────────────────────────┬──┬───────────────────────────────────┬──────────5
└─CHKOUTUSR(────&CL-variable-name────)─┘ └─ACC(────&CL-variable-name────)─┘ └─USRAUT(────&CL-variable-name────)─┘
5──┬───────────────────────────────────┬──┬────────────────────────────────┬───────────────────────────────────────────────────5%
└─GRPAUT(────&CL-variable-name────)─┘ └─PGP(────&CL-variable-name────)─┘
Notes:
1 FLR (*NONE) must be specified if *DOCID, *LADNTSP, *SYSOBJNAM or *ROOT is specified on the DLO parameter.

P All parameters preceding this point can be specified in positional form.

2 Valid only if DLO(*DOCID) is specified.

3 Valid only if DLO(*LADNTSP) is specified.

4 Valid only if DLO(*SYSOBJNAM) is specified.

5 STRUSRAUTE is ignored if USRAUT is not specified.

Purpose *ROOT: The root folder contains all first-level folders. If


folder *ROOT is specified only public authority will be
The Retrieve Document Library Object Authority returned by PUBAUT parameter. No other authorities
(RTVDLOAUT) command retrieves the authority assigned a will be returned.
folder or filed document.
*LADNTSP: The timestamp from the library-assigned
Restrictions: document name (LADN) specified on the LADNTSP
parameter is used to identify the document or folder.
1. A user must be in the system distribution directory entry
to retrieve the various authorities. *SYSOBJNAM: The system object name specified on
2. A user must have at least *USE authority to the filed the SYSOBJNAM parameter is used to identify the docu-
document or folder. ment or folder.
3. A user with less than *ALL authority to the filed docu- document-name: Specify the user-assigned name of the
ment or folder will only be able to retrieve that user's document.
authority or the owner.
folder-name: Specify the user-assigned name of the
4. A user must have *ALL or *ALLOBJ authority or be the
folder.
owner of the filed document or folder to retrieve all the
authorities.
5. A user must have *ALLOBJ special authority to retrieve Optional Parameters
the *ROOT folder public authority.
FLR
Specifies the name of the folder where the object speci-
Required Parameters fied on the DLO parameter is located.
DLO *NONE: The name of folder that contains the object is
Specifies the name of the document or folder for which not specified, the object is not contained in a folder, or
authorities are retrieved. the object is specified using the LADNTSP, or
SYSOBJNAM parameter, or *ROOT was specified in the
*DOCID: The document of folder is identified using its
DLO parameter.
library-assigned document name specified in the DOCID
parameter. folder-name: Specify the name of the folder that con-
tains the object.

P3-904 OS/400 CL Reference - Part 2 (Full Version)


RTVDLOAUT

Note: FLR(*NONE) must be specified if the object is a the value is greater than the number of specific user
first-level folder. authorities for the DLO, an error message will be sent
and no specific user authorities will be returned.
DOCID
Specifies the library-assigned name of the document or OWNER
folder. Specifies the name of a 10-character CL variable used
to retrieve the owner of the selected document or folder.
*NONE: The object is not identified using its document
identifier (DOCID). AUTL
document-identifier: Specify the document identifier of Specifies the name of a 10-character CL variable used
the document or folder. The document identifier is 24 to retrieve the authorization list assigned to the selected
hexadecimal characters in length in the format document or folder. The value *NONE is returned if no
YYYYMMDDHHMNSSHSSNSNSNSN, where: authorization list has been assigned.

YYYY = year SENSITIV


MM = month Specifies the name of a 20-character CL variable used
DD = day to retrieve the sensitivity assigned to the selected docu-
HH = hour ment or folder. The possible values are:
MN = minute *NONE: The document has no sensitivity restrictions.
SS = second
*PERSONAL: The document is intended for the user as
HS = hundredths of a second
an individual.
SNSNSNSN = system name
*PRIVATE: The document contains information that
LADNTSP
should be accessed only by the owner.
Specifies the LADN timestamp of the document or
folder. *CONFIDENTIAL: The document contains information
that should be handled according to company proce-
*NONE: The object is not identified using its LADN
dures.
timestamp.
PUBAUT
LADN-timestamp: Specify the LADN timestamp of the
Specifies the name of a 10-character CL variable used
document or folder. The LADN timestamp is 16
to retrieve the public authority assigned to the selected
hexadecimal characters in length in the format
document of folder. The possible values are:
YYYYMMDDHHMNSSHS, where:
*USE: User can view, print, or copy the document or
YYYY = year
folder.
MM = month
DD = day *CHANGE: User can perform all operation listed for
HH = hour *USE and can also edit and mark the document for
MN = minute offline storage.
SS = second *ALL: User can perform all operations on the docu-
HS = hundredths of a second ment, except change ownership of the document or
SYSOBJNAM folder or give themselves authority to work with the doc-
Specifies the system object name. ument after authority has been revoked.

*NONE: The object is not identified using its system *EXCLUDE: All users who are not otherwise authorized
object name. to this document or folder are denied access.

system-object-name: Specify the 10-character system USER DEF: Authority to this document is user-defined
object name of the document or folder. and is not one of the system-defined sets of authorities
(*ALL, *CHANGE, *USE, *EXCLUDE).
STRUSRAUTE
*AUTL: Authority specified in the authorization list being
Allows a user to specify the starting user authority entry
used by this document should determine public authority.
number to use when retrieving specific user authorities
(USRAUT parameter). STRUSRAUTE will enable CHKOUTUSR
retrieving specific user authorities for a DLO that has Specifies the name of a 32-character CL variable used
more than 50 specific user authorities. If no CL variable to retrieve the user profile who has the document
is provided for the USRAUT parameter, this parameter is checked out and the user profile on whose behalf the
ignored. document was checked out. If no user has checked out
1: User authority will be returned starting with the first the documented, the 32-character variable will be blank.
specific user authority. If the document was not checked out by a user working
on behalf of another user, the last 16 characters will be
starting-user-authority-entry-number: User authority will blanks.
be returned starting with the specified entry number. If

Chapter 2. OS/400 Command Descriptions P3-905


RTVDLOAUT

Character position Length Description


1 8 Checked out by user ID
9 8 Checked out by user address
17 8 Checked out for user ID
25 8 Checked out for user address

ACC
Specifies the name of a 220-character CL variable used
to retrieve the access codes assigned to the specified
document or folder.

Character position Length Description


1 5 Total number of access codes
6 15 Reserved
21 4 1st access code
25 4 2nd access code
29 4 3rd access code
33 ... 220 4 nth access code

USRAUT Within the 1020-character CL variable are the total


Specifies the name of a 1020-character CL variable number of authorized users, the number of authority
used to retrieve the specific user authority assigned to entries returned, the starting entry number and the
the document or folder. USRAUT will return a maximum ending entry number.
of 50 specific authorities per invocation of the RTVDLOAUT DLO(MYDOC) FLR(MYFLR)
RTVDLOAUT command. If the document or folder has USRAUT(&RTNUSRAUT) + STRUSRAUTE(1)
more than 50 specific user authorities associated with it,
you can use the STRUSRAUTE parameter on subse- In the example above, MYDOC has 55 authorized users.
quent invocations of RTVDLOAUT to return user authori- The total number of specific user authorities will be 55.
ties starting with the specified entry numbers. The number of authority entries returned will be 50. The
starting authority entry number will be 1. The ending
authority entry number will be 51.

Character position Length Description


1 5 Total number of specific user authorities
6 5 Number of authority entries returned
11 5 Starting authority entry number
16 5 Ending authority entry number
21 10 1st user profile name
31 10 1st specific authority
41 10 2nd user profile name
51 10 2nd specific authority
61 ... 1020 ....... .......

GRPAUT document or folder. Only the groups associated to the


Specifies the name of a 340-character CL variable used user of this command will be returned.
to retrieve the group authority assigned to the specified

P3-906 OS/400 CL Reference - Part 2 (Full Version)


RTVDLOAUT

Character position Length Description


1 5 Total number of group authorities
6 15 Reserved
21 10 1st group user profile name
31 10 1st group authority
41 10 2nd group user profile name
51 10 2nd group authority
61 ... 340 ....... .......

PGP RTVDLOAUT DLO(MYDOC) FLR(MYFLR)


Specifies the name of a 10-character CL variable used USRAUT(&RTNUSRAUT) +
to retrieve the primary group assigned to the specified STRUSRAUTE(1)
document or folder. The value *NONE is returned if no
primary group has been assigned. Where document MYDOC in MYFLR has 55 authorized
users.

Example Returned in the &RTNUSRAUT variable, the total number of


RTVDLOAUT DLO(MYDOC) FLR(MYFLR) OWNER(&OWNER) specific authorities will be 55. The number of authority
entries returned will be 50. The starting authority entry
This command finds the document library object MYDOC in number will be 1. The ending authority entry number will be
folder MYFLR and returns its owner in the variable 51. Following will be the list of 50 privately authorized users
&OWNER. and their authrities.

Chapter 2. OS/400 Command Descriptions P3-907


RTVDLONAM

RTVDLONAM (Retrieve Document Library Object Name) Command


Pgm: B,I REXX: B,I

55──RTVDLONAM──DLO(──┬─\DOCID────────┬──)──┬─────────────────────────────────────────┬─── (P) ──┬────────────────────────┬───────────5


├─\LADNTSP──────┤ │ ┌─\NONE───────┐ │ │ ┌─\DOC───┐ │
├─\SYSOBJNAM────┤ (1) ─┴─folder-name─┴──)──────────────┤
├─FLR(─── └─OBJCLS(──┼─\FLR───┼──)─┘
├─document-name─┤ │ ┌─\NONE───────┐ │ (5) ┘
└─\DST───
└─folder-name───┘ ├─DOCID(───(2) ─┴─document-ID─┴──)────────────┤
│ ┌─\NONE──────────┐ │
├─LADNTSP(─── (3) ─┴─LADN-timestamp─┴──)───────┤
│ ┌─\NONE──────────────┐ │
└─SYSOBJNAM(─── (4) ─┴─system-object-name─┴──)─┘

5──┬───────────────────────────────────┬──┬───────────────────────────────────┬──┬─────────────────────────────────────┬────────5
└─RTNDLO(────&CL-variable-name────)─┘ └─RTNFLR(────&CL-variable-name────)─┘ └─RTNDOCID(────&CL-variable-name────)─┘
5──┬───────────────────────────────────────┬──┬──────────────────────────────────────┬──────────────────────────────────────────5
└─RTNLADNTSP(────&CL-variable-name────)─┘ └─RTNOBJNAM(────&CL-variable-name────)─┘
5──┬──────────────────────────────────────┬──┬───────────────────────────────────┬──┬──────────────────────────────────────┬───5%
└─RTNOBJCLS(────&CL-variable-name────)─┘ └─RTNASP(────&CL-variable-name────)─┘ └─RTNOVRFLW(────&CL-variable-name────)─┘
Notes:
1 FLR (*NONE) must be specified if *DOCID, *LADNTSP, or *SYSOBJNAM is specified on the DLO parameter.

2 Valid only if DLO(*DOCID) is specified.

3 Valid only if DLO(*LADNTSP) is specified.

4 Valid only if DLO(*SYSOBJNAM) is specified.

P All parameters preceding this point can be specified in positional form.

5 Valid only if DLO(*LADNTSP) or DLO(*SYSOBJNAM) is specified.

Purpose document-name: Specify the user-assigned name of the


document.
The Retrieve Document Library Object Name (RTVDLONAM)
folder-name: Specify the user-assigned name of the
command is used in a CL program or REXX procedure to
folder.
retrieve a list of all forms of a name for a folder, filed docu-
ment, or distribution document.
Optional Parameters
Restrictions:
FLR
1. A user must have *USE authority to the filed document
Specifies the name of the folder where the object speci-
or folder to retrieve the various forms of the name.
fied on the DLO parameter is located.
2. A user must have *ALLOBJ authority to retrieve the
various forms of the name for a distribution document. *NONE: The name of folder that contains the object is
not specified, the object is not contained in a folder, or
Note: To see the parameter and value descriptions for this
the object is specified using the DOCID, LADNTSP, or
command, refer to the online help text. For more
SYSOBJNAM parameter.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. folder-name: Specify the name of the folder that con-
tains the object.

Required Parameters Note: FLR(*NONE) must be specified if the object is a


first-level folder.
DLO
Specifies the name of the document or folder for which DOCID
forms of the name are retrieved. Specifies the library-assigned name of the document or
folder.
*DOCID: The library-assigned name specified on the
DOCID parameter is used to identify the document or *NONE: The object is not identified using its library-
folder. assigned name.

*LADNTSP: The timestamp from the library-assigned document-ID: Specify the library-assigned name of the
document name (LADN) specified on the LADNTSP document or folder object. Library-assigned names are
parameter is used to identify the document or folder. 16 to 24 characters in length in the format
YYYYMMDDHHMNSSHSSNSNSNSN, where:
*SYSOBJNAM: The system object name specified on
the SYSOBJNAM parameter is used to identify the docu- YYYY = year
ment or folder.

P3-908 OS/400 CL Reference - Part 2 (Full Version)


RTVDLONAM

MM = month document, a document without a folder, or a first-level


DD = day folder.
HH = hour
RTNDOCID
MN = minute
Specifies the name of a 24-character CL variable used
SS = second
to retrieve the library-assigned document name of the
HS = hundredths of a second
selected object. The variable is in the format
SNSNSNSN = system name (from 1 through 8 char-
YYYYMMDDHHMNSSHSSNSNSNSN. The *NONE
acters in length or omitted)
value is returned for a distribution document.
LADNTSP
RTNLADNTSP
Specifies the LADN timestamp of the document or
Specifies the name of a 16-character CL variable used
folder.
to retrieve the timestamp from the LADN of the selected
*NONE: The object is not identified using its LADN object. The variable is in the format
timestamp. YYYYMMDDHHMNSSHS.
LADN-timestamp: Specify the LADN timestamp of the RTNOBJNAM
document or folder. The LADN timestamp is 16 Specifies the name of a 10-character CL variable used
hexadecimal characters in length in the format to retrieve the system object name of the selected
YYYYMMDDHHMNSSHS, where: object.
YYYY = year RTNOBJCLS
MM = month Specifies the name of a 8-character CL variable used to
DD = day retrieve the object class. A value of *DOC is returned
HH = hour for a filed document, *FLR for a folder, and *DST for a
MN = minute
distribution document.
SS = second
HS = hundredths of a second RTNASP
Specifies the name of a variable used to return the auxil-
SYSOBJNAM iary storage pool ID. In control language (CL) programs,
Specifies the system object name.
this should be a decimal variable of length (2 0). The
*NONE: The object is not identified using its system following values can be returned:
object name.
1 The object is in the system auxiliary storage
system-object-name: Specify the 10-character system pool.
object name of the document or folder.
2-16 The object is in a user auxiliary storage
OBJCLS pool.
Specifies the class of the object to locate.
RTNOVRFLW
*DOC: The object is a filed document. Specifies the name of a 1-character CL variable used to
*FLR: The object is a folder. retrieve the overflow status of the object, where:

*DST: The object is a distribution document. N = No, the object has not overflowed its ASP
Y = Yes, the object has overflowed its ASP and part
RTNDLO or all of the object resides in the system ASP
Specifies the name of a 12-character CL variable used
to retrieve the user-assigned name of the selected docu-
ment or folder. The *NONE value is returned for a distri- Example
bution document or a document without a folder. RTVDLONAM DLO(MYDOC) FLR(MYFLR) OBJCLS(\DOC)
RTNFLR RTNDOCID(&DOCID)
Specifies the name of a 63-character CL variable used
This command finds the document MYDOC in folder MYFLR
to retrieve the folder path of the selected document or
and returns its document identifier in the variable &DOCID.
folder. The *NONE value is returned for a distribution

Chapter 2. OS/400 Command Descriptions P3-909


RTVDOC

RTVDOC (Retrieve Document) Command


Job: B,I Pgm: B,I REXX: B,I Exec

(1) ───────┬──)──┬────────────────────────────────┬───
55──RTVDOC──FROMDOC(──┬─\DOCID─── (P) ─────────────────────────────────────────────5
└─document-name───(2) ┘ │ (4) ────┐
┌─\NONE─── │
(3) ─┴─folder-name─┴──)─┘
└─FROMFLR(───
5──┬─────────────────────────────────────────────────┬──┬──────────────────────────────────────┬──┬──────────────────────┬──────5
│ (5) ─────────────────────────┐
┌─\NONE─── │ │ ┌─\CURRENT──────────────┐ │ │ ┌─\NO──┐ │
└─DOCID(──┴─library-assigned-document-name───(4) ┴──)─┘ └─USRID(──┴─user-ID──user-address─┴──)─┘ └─CHKOUT(──┴─\YES─┴──)─┘

5──┬────────────────────────────────────────────────────────┬──┬───────────────────────────────────────────┬────────────────────5
│ ┌─\NONE─────────────────────────────────┐ │ │ ┌─\FIRST──────┐ ┌─\REPLACE─┐ │
│ │ ┌─\LIBL/────────┐ │ │ └─OUTMBR(──┴─member-name─┴──┼──────────┼──)─┘
└─OUTFILE(──┴─┼───────────────┼──database-file-name─┴──)─┘ └─\ADD─────┘
├─\CURLIB/──────┤
└─library-name/─┘
5──┬────────────────────────────────────────┬──┬────────────────────────────────────────────────────┬──────────────────────────5%
│ ┌─\DFT────────────────┐ │ │ ┌─\SYSVAL──────────────────────────┐ │
└─OUTDTATYP(──┼─\ALL────────────────┼──)─┘ └─CMDCHRID(──┼─\DEVD────────────────────────────┼──)─┘
│ ┌──
──────────────┐ │ └─graphic-character-set──code-page─┘
└──6─┬─\DOCD────┬─┴───
(6) ─┘
├─\DOCCLS──┤
├─\SUBJECT─┤
├─\FILCAB──┤
├─\AUTHOR──┤
├─\KWD─────┤
├─\CPYLST──┤
├─\FILDATE─┤
├─\EXPDATE─┤
├─\DOCDATE─┤
├─\CRTDATE─┤
├─\ACTDATE─┤
├─\CHGDATE─┤
├─\CMPDATE─┤
├─\REF─────┤
├─\STATUS──┤
├─\PROJECT─┤
├─\IDP─────┤
└─\DOC─────┘
Notes:
1 FROMFLR(*NONE) and DOCID( library-assigned-document-name) must be specified if this value is specified.

2 FROMFLR( folder-name) and DOCID(*NONE) must be specified if this value is specified.

3 This parameter must be specified if a document name is specified on the FROMDOC parameter.

4 This value must be specified when FROMDOC(*DOCID) is specified.

5 This value must be specified when FROMDOC(document-name) is specified.

P All parameters preceding this point can be specified in positional form.

6 A maximum of 19 repetitions

Purpose behalf of a user that has *CHANGE authority to the doc-


ument.
The Retrieve Document (RTVDOC) command allows a user 3. To work on behalf of another user, you must have either
to copy information from a specific document to a database *ALLOBJ authority or special permission (granted with
file and allows the user to check out a document from the the Grant User Permission (GRTUSRPMN) command).
document library. Documents whose storage has been freed
(STG(*FREE) specified on the Save Document Library
Object (SAVDLO) command) cannot be retrieved. Required Parameters
FROMDOC
Restrictions:
Specifies the name of the document being retrieved.
1. To retrieve any records from the document to a data-
*DOCID: The document being retrieved is identified by
base file, you must have *USE authority to the document
the library-assigned document name specified on the
or be working on behalf of a user that has *USE
DOCID parameter.
authority to the document.
2. To check out the document, you must have at least document-name: Specify the name of the document that
*CHANGE authority to the document, or be working on is retrieved.

P3-910 OS/400 CL Reference - Part 2 (Full Version)


RTVDOC

Optional Parameters Note: If a user is retrieving a document to check it out


and a cancel request is entered, the document
FROMFLR may or may not be checked out.
Specifies the name of the folder that contains the docu-
*NO: The retrieve request only reads the data. Users
ment being retrieved.
requesting this function need only *USE authority to the
*NONE: No folder name is specified when the docu- document. The authority for the public is *READ
ment is identified by the DOCID parameter. authority.
folder-name: Specify the name of the folder that con- *YES: The document data can be updated and replaced
tains the document being retrieved. later. Users requesting this function must have
*CHANGE authority. The document is unavailable to
DOCID
other users until a replace operation is done using the
Specifies the library-assigned name of the document
Replace Document Command (RPLDOC) The checkout
being retrieved. This is the name assigned to the docu-
flag can be reset with the CHGDOCD or EDTDLOAUT
ment by the system when it is created. The library-
command.
assigned document names can be determined by using
the Query Document Library (QRYDOCLIB) command. OUTFILE
The library-assigned document name is also returned in Specifies the name of the database file where the docu-
a completion message when the File Document ment data of the display is directed. If the output file
(FILDOC) command is used. does not exist, this command creates a database file in
Library-assigned document names are 24 characters in the specified library. If the file is created by this func-
length with the following format: tion, the text "OUTFILE created by RTVDOC" is shown
YYYYMMDDHHMNSSHSSNSNSNSN where: and the authority given to users with no specific authority
is *EXCLUDE.
YYYY = year
Note: The output file format must be the same as the
MM = month
OSRTVD of the system file QSYS/QAOSIRTV.
DD = day
HH = hour More information on defining the format of database files
MN = minute (output files) is in the Office Services Concepts and
SS = second Programmer’s Guide book.
HS = hundredths of a second *NONE: The output is not directed to a database file.
SNSNSNSN = system name
The name of the database file can be qualified by one of
*NONE: No library-assigned document name is required the following library values:
when the document is identified by the FROMDOC
parameter. *LIBL: All libraries in the job's library list are
searched until the first match is found.
library-assigned-document-name: Specify the library-
assigned document name sent. More information on *CURLIB: The current library for the job is
library-assigned document names is in the Communica- searched. If no library is specified as the current
tions Configuration book. library for the job, the QGPL library is used.
library-name: Specify the name of the library to be
USRID
searched.
Specifies the user ID and address of the user for whom
the request is made. database-file-name: Specify the name of the database
*CURRENT: The user profile that is currently running is file to receive the output.
used. This file can be reused when other RTVDOC commands
Element 1: User ID are used. Output can be added to the file or can
replace the existing records. The IBM-supplied data-
user-ID: Specify the user ID of the user for whom the base file QAOSIRTV in library QSYS cannot be speci-
document is retrieved. fied.
Element 2: User Address
OUTMBR
user-address: Specify the user address of the user for Specifies the name of the database file member to which
whom the document is retrieved. the output is directed. If a member already exists, the
system uses the second element of this parameter to
CHKOUT
determine whether the member is cleared before the
Specifies whether the document being retrieved can be
new records are added. If the member does not exist
replaced with new or changed data. If the document is
and a member name is not specified, the system creates
read only, then specify CHKOUT(*NO). If the document
a member with the name of the output file specified on
being retrieved cannot be replaced, and CHKOUT(*YES)
the OUTFILE parameter. If an output file member name
is specified, an error occurs.

Chapter 2. OS/400 Command Descriptions P3-911


RTVDOC

is specified, but the member does not exist, the system *DOCD: The document information record is written to
creates it. the output file.
Element 1: Member to Receive Output *DOCCLS: The document class record is written to the
output file.
*FIRST: The first member in the file receives the output.
If OUTMBR(*FIRST) is specified and the member does *SUBJECT: The subject records are written to the
not exist, the system creates a member with the name of output file.
the file specified on the OUTFILE parameter.
*FILCAB: The filing cabinet reference code is written to
member-name: Specify the file member that receives the output file.
the output. If OUTMBR(member-name) is specified and
*AUTHOR: The author records are written to the output
the member does not exist, the system creates it.
file.
Element 2: Operation to Perform on Member
*KWD: The keyword records are written to the output
*REPLACE: The system clears the existing member file.
and adds the new records.
*CPYLST: The copy list records are written to the
Note: Document data for more than one document can output file.
be added to the same member. However, an
*FILDATE: The file date record is written to the output
error occurs if the member is filed to another
file.
document with the FILDOC command. The
FILDOC command only files the first document in *EXPDATE: The expiration date record is written to the
the member and issues an error message. output file.

*ADD: The system adds the new records to the end of *DOCDATE: The document date record is written to the
the existing records. output file.

OUTDTATYP *CRTDATE: The create date record is written to the


Specifies what parts of information about the selected output file.
documents are written to the output file if one is speci- *ACTDATE: The action due date record is written to the
fied. output file.
*DFT: The document information record is written to the *CHGDATE: The date last changed record is written to
output file. The following record codes are written to the the output file.
output file:
*CMPDATE: The completion date record is written to
Record Code Description the output file.
105 Document Description *REF: The reference record is written to the output file.
800 Document Data
*STATUS: The status record is written to the output file.
*ALL: All information records about the document are *PROJECT: The project record is written to the output
written to the output file. file.
Record Code Description *IDP: The interchange document profile (IDP) is written
105 Document Description to the output file.
110 Creation Date *DOC: The document data record is written to the
115 Expiration date output file.
120 Document date
125 File date CMDCHRID
130 Change date Specifies the character identifier (graphic character set
135 Action due date
and code page) for data being specified as parameter
140 Completion date
145 Author
values on this command. This character identifier
150 Copy list (CHRID) is related to the display device used to specify
155 Document class the command. More information about CHRID pro-
160 File cabinet reference cessing is in the Application Display Programming book.
165 Subject
Note: This value translates the USRID parameter to
170 Keyword
175 Reference character set and code page set of '930 256'.
180 Status The SNA Distribution Services book contains the
185 Project character set and code page table for '930 256'.
500 Interchange document profile
*SYSVAL: The system determines the graphic char-
data
800 Document Data
acter set and code page values for the command param-
eters from the QCHRID system values.

P3-912 OS/400 CL Reference - Part 2 (Full Version)


RTVDOC

*DEVD: The system determines the graphic character This command copies all information about document
set and code page values for the command parameter MYDOC located in folder PERSONAL for the current user of
from the display device description where the command this command. CHECKOUT(*NO) is assumed; therefore, the
is entered. This option is valid only when specified from document data can only be read. The output is directed to
an interactive job. If this value is specified in an interac- the database file MYFILE in the user's current library and is
tive CL program or a batch job, an error message is added to the first member in that file.
sent.
Example 2: Copying Default Information
Element 1: Character Set
RTVDOC FROMDOC(SECOP) FROMFLR(PERSONAL)
graphic-character-set: Specify the graphic character set USRID(MARY SYSTEM1 ) CHKOUT(\YES)
values used to create the command parameter. OUTFILE(MARLIB/SECFILE) OUTMBR(\FIRST \ADD)
Element 2: Code Page
This command copies the default information (*DOCD and
code-page: Specify the code page value used to create *DOC) about document SECOP located in folder PERSONAL
the command parameters. Valid values range from 1 for MARY. The document can be updated with new data
through 999. and then replaced. The current user of this command must
have the authority to work on behalf of MARY given by Mary
by using the GRTUSRPMN command. The output is
Examples
directed to the database file SECFILE in Mary's library
Example 1: Copying All Information MARLIB. The output is added to the first member of
SECFILE.
RTVDOC FROMDOC(MYDOC) FROMFLR(PERSONAL)
USRID(\CURRENT) OUTFILE(\CURLIB/MYFILE)
OUTMBR(\FIRST) MBROPT(\ADD) OUTDTATYP(\ALL)

Chapter 2. OS/400 Command Descriptions P3-913


RTVDSKINF

RTVDSKINF (Retrieve Disk Information) Command


Job: B Pgm: B REXX: B Exec

55──RTVDSKINF──────────────────────────────────────────────────────────────────────────────────────────────────────────────────5%

Purpose member in file QAEZDISK, the results of running this


command can be unpredictable.
The Retrieve Disk Information (RTVDSKINF) command is
used to collect disk space information. The collected infor- There are no parameters for this command.
mation is stored in the library QUSRSYS, in a database file
named QAEZDISK, in a member named QCURRENT.
Example
Each time this command is run, existing information in RTVDSKINF
QCURRENT is written over. To save existing information in
QCURRENT, rename file QAEZDISK or copy it to another This command retrieves disk space information and stores it
file. in member QCURRENT of database file QAEZDISK. Any
information in QCURRENT is overwritten.
Note: Do not rename member QCURRENT and leave it
within file QAEZDISK. If there is more than one

P3-914 OS/400 CL Reference - Part 2 (Full Version)


RTVDTAARA

RTVDTAARA (Retrieve Data Area) Command


Pgm: B,I REXX: B,I

┌─\LIBL/────────┐ ┌─\ALL──────────────────────────────────────────┐
(3) ──────5
55──RTVDTAARA──DTAARA(──┬─┼───────────────┼──data-area-name─┬──)──┴─substring-starting-position──substring-length─┴──)────
│ ├─\CURLIB/──────┤ │
│ └─library-name/─┘ │
(1) ───────────────────────────┤
├─\GDA───
├─\LDA──────────────────────────────┤
(2) ──────────────────────────┘
└─\PDA(───
(P) ───────────────────────────────────────────────────────────────────────────────────────────5%
5──RTNVAR(──&CL-variable-name──)────
Notes:
1 This value is valid only if this job is a group job.

2 This value is valid only if this job is a prestart job.

3 This option is allowed only if the data area TYPE is *CHAR.

P All parameters preceding this point can be specified in positional form.

Purpose To use this command, the user must have *CHANGE


authority for the data area and *USE authority for the library
The Retrieve Data Area (RTVDTAARA) command is used in where the data area is located. No specific authority is
a CL program or REXX procedure to retrieve all or part of a required to retrieve the value of a local data area or group
specified data area and to copy it into a CL variable. data area.
RTVDTAARA does not retrieve any other attributes of the
Note: To see the parameter and value descriptions for this
data area. Existence of the data area is not required at the
command, refer to the online help text. For more
time the CL program is compiled.
information about printing the help text, refer to
If the job is a group job, the data area specified may be the “Printing CL Command Descriptions” in Chapter 1.
group data area (*GDA). This data area is automatically
associated with the group, and it is inaccessible from jobs Required Parameters
outside the group. The length of this character data area is
512 bytes. More information about group jobs is in the Work DTAARA
Management book. Specifies the qualified name of the data area whose
value is retrieved.
A local data area (*LDA) is a character data area that is
The name of the data area can be qualified by one of
1024 bytes in length, and it is automatically associated with
the following library values:
the job. Another job cannot access the local data area.
*LIBL: All libraries in the job's library list are
If the job is a prestart job, the data area specified may be the searched until the first match is found.
data area that contains program initialization parameter data
(*PDA). This data area is automatically associated with the *CURLIB: The current library for the job is
prestart job and is inaccessible from other jobs. The length searched. If no library is specified as the current
of this character data area is 2000 bytes. More information library for the job, the QGPL library is used.
about prestart jobs is in the Work Management book. library-name: Specify the name of the library to be
searched.
When a local data area or group data area must be retrieved
during the processing of the RTVDTAARA command, the Element 1: Data Area Name
data area is locked during the retrieval operation so that data-area-name: Specify the name of the data area
commands in other jobs cannot change or destroy it until the whose value is being retrieved.
operation is complete. If the data area is shared with other
jobs and is updated in steps involving more than one Element 2: Data Area Options
command in a job, the data area should be explicitly allo- *GDA: The value of the group data area is being
cated to that job until all the steps have been performed. A retrieved. This value is valid only if this is a group job.
data area other than a local data area, group data area, or
*LDA: The value of the local data area is being
program initialization parameter data area can be explicitly
retrieved.
allocated with the Allocate Object (ALCOBJ) command. No
allocation is necessary for a local data area, group data area, *PDA: The value of the program initialization parameter
or program initialization parameter data area. data area is being retrieved. This value is valid only if
this is a prestart job.
Restriction:

Chapter 2. OS/400 Command Descriptions P3-915


RTVDTAARA

The substring retrieval option, which is valid for char- Fractional data is truncated if the fraction contains more
acter data areas only, specifies the starting position and digits than the CL variable.
the length of the portion of the data area that is being
retrieved into the CL character variable.
Examples
Element 3: Starting Position of the Data Area
*ALL: The entire data area is retrieved. Assume data area DA1 has been created by the following
command:
substring-starting-position: Specify the starting position
of the data area being retrieved. CRTDTAARA DTAARA(DA1) TYPE(\CHAR) LEN(3) VALUE(ABC)
Element 4: Length of the Data Area and variable &CLVAR1 has been declared as:
substring-length: Specify the length of the data area DCL VAR(&CLVAR1) TYPE(\CHAR) LEN(5) VALUE(VWXYZ)
substring being retrieved.
Example 1: Running This Command
It is not possible to retrieve data outside the data area.
The combination of starting position and length must RTVDTAARA DTAARA(DA1) RTNVAR(&CLVAR1)
always specify positions within the data area.
results in:
RTNVAR &CLVAR1 = 'ABC '
Specifies the name of the CL program variable that
receives the contents of the data area being returned. Example 2: Running This Command
No type conversion is performed by the RTVDTAARA RTVDTAARA DTAARA(DA1 (2 1)) RTNVAR(&CLVAR1)
command:
results in:
Ÿ If RTNVAR is declared as TYPE(*DEC), the data
&CLVAR1 = 'B '
area retrieved must be TYPE(*DEC).
Ÿ If RTNVAR is declared as TYPE(*CHAR), the data Example 3: Decimal Data Area Example
area retrieved must be either TYPE(*CHAR) or
TYPE(*LGL). Assume data area DA2 has been created with the following
attributes:
Ÿ If RTNVAR is declared as TYPE(*LGL), the data
area retrieved must be either TYPE(*LGL) or CRTDTAARA DTAARA(DA2) TYPE(\DEC) LEN(5 2) VALUE(12.39)
TYPE(*CHAR) with a value of either '0' or '1'.
and variable &CLVAR2 has been declared as:
If a retrieved character string is shorter than the length
DCL VAR(&CLVAR2) TYPE(\DEC) LEN(5 1) VALUE(4567.8)
of the variable specified by the RTNVAR parameter, the
value is padded on the right with blanks. The retrieved Example 4: Running This Command
string length must be less than or equal to the CL vari-
able length. RTVDTAARA DTAARA(MYLIB/&DTAARA) RTNVAR(&CLVAR2)

When decimal data areas are retrieved, the decimals are results in:
aligned. The value of the integer portion of the data
CLVAR2 = ðð12.3
area must fit into the integer portions of the CL variable.
Note that fractional digits are truncated instead of rounded.

P3-916 OS/400 CL Reference - Part 2 (Full Version)


RTVGRPA

RTVGRPA (Retrieve Group Attributes) Command


Pgm: I REXX: I

(P) ─────5
55──RTVGRPA──┬───────────────────────────────┬──┬────────────────────────────────┬──┬──────────────────────────────────┬───
└─GRPJOB(──&CL-variable-name──)─┘ └─GRPJOBL(──&CL-variable-name──)─┘ └─GRPJOBCNT(──&CL-variable-name──)─┘
5──┬─────────────────────────────┬──┬────────────────────────────────┬──┬──────────────────────────────────┬────────────────────5
└─MSGQ(──&CL-variable-name──)─┘ └─MSGQLIB(──&CL-variable-name──)─┘ └─PRVGRPJOB(──&CL-variable-name──)─┘
5──┬───────────────────────────────┬───────────────────────────────────────────────────────────────────────────────────────────5%
└─CTLCDE(──&CL-variable-name──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose GRPJOBL
Specifies the name of the CL variable that receives the
The Retrieve Group Attributes (RTVGRPA) command is used list of jobs in the group. Each entry contains the job's
in a CL program or REXX procedure to retrieve information group job name, the job number, and the 50 characters
about the group in which the job that issued the RTVGRPA of descriptive text.
command belongs. The following attributes can be retrieved:
The maximum number of entries in the variable is 16.
Ÿ The group job name of the job calling the RTVGRPA The entries are ordered by most recently active job (the
command group job that is issuing the RTVGRPA command is
Ÿ A list that contains information about all active jobs in always first in the variable).
the group
The variable must be a character variable with a
Ÿ A count of the number of active jobs in the group
minimum length of 1056 characters. If the group job list
Ÿ The name of the group message queue
has fewer characters than the variable allows, the value
Ÿ The library where the group message queue resides
is padded on the right with blanks.
Ÿ The group job name and job number of the previously
active job in the group The group job list has the following format:
Ÿ A control code indicating why the currently active job in Entry-1
the group gained control
Group-job-name CHAR(10)
The prompt for this command lists the minimum length for Job-number CHAR(6)
retrieved variables next to the appropriate parameters. For Group-job-text CHAR(50)
character variables, a single number is shown. For decimal
variables, two numbers are shown. The first number indi- Entry-2
cates the minimum variable length, and the second number .
indicates the minimum number of decimal positions. .
.
Optional Parameters Entry-16
GRPJOB Group-job-name CHAR(10)
Specifies the name of the CL variable that receives the Job-number CHAR(6)
group job name of the job. The variable must be a char- Group-job-text CHAR(50)
acter variable with a minimum length of 10 characters. If
the group job name has fewer characters than the vari- This list contains all of the active jobs in the group. Jobs
able allows, the value is padded on the right with blanks. in the group that have not completely ended (jobs that
have been canceled) are not listed.
Note: This is the only parameter of the RTVGRPA
command that is meaningful if the job that issued GRPJOBCNT
the RTVGRPA command is not a group job. Specifies the CL variable that receives the count of
When this occurs, the variable is set to the active jobs in the group. The CL variable must be a
special value of *NONE, and other parameters three-position decimal variable with no decimal positions.
specified in the command are filled with zeros or
The CL variable contains the number of nonblank entries
blanks (numeric variables with zeros, character
in the group job list. The count includes all of the active
variables with blanks). If this parameter is not
jobs in the group. Jobs that have not completely ended
specified and the job issuing this command is not
(jobs that have been canceled) are not counted.
a group job, an error message is sent.

Chapter 2. OS/400 Command Descriptions P3-917


RTVGRPA

MSGQ 30 The previously active job was ended by the End


Specifies the name of the CL variable that receives the Group Job (ENDGRPJOB) command, and this
group message queue name. This must be a character job was selected to gain control (the
variable with a minimum length of 10 characters. If the RSMGRPJOB parameter specified this group
message queue name has fewer characters than the job).
variable allows, the value is padded on the right with
40 The previously active job was ended by the End
blanks.
Group Job (ENDGRPJOB) command and
MSGQLIB selected a job other than this job to gain control
Specifies the name of the CL variable that receives the (which was ended before it could be resumed).
name of the library that contains the group message Since this job was the most recently active job
queue. This variable must be a character variable with a in the group, control is passed to it.
minimum length of 10 characters. If the library name 50 The previously active job was ended by the End
has fewer characters than the variable allows, the value Group Job (ENDGRPJOB) command, and this
is padded on the right with blanks. If there is no job was the most recently active job in the
message queue associated with the group, the CL vari- group (the RSMGRPJOB parameter specified
able is set to blanks. *PRV).
Refer to the Change Group Attributes (CHGGRPA) 60 The previously active job's first group program
command description for more information on the use of ended abnormally, and this job was the most
the group message queue. recently active job in the group.
PRVGRPJOB 70 The previously active job was ended by the End
Specifies the name of the CL variable that receives the Job (ENDJOB) command, and this job was the
group job name and job number of the previously active most recently active job in the group.
job in the group. The variable must be a character vari-
able with a minimum length of 16 characters. If the
group job name has fewer characters than the variable Examples
allows, the value is padded on the right with blanks.
Assume jobs 0001/QUSER/WORKST01 and
If there is no previously active job in the group (no
0002/QUSER/WORKST01 are group jobs with group job
Transfer to Group Job [TFRGRPJOB] command is
names GROUPJ1 and GROUPJ2, respectively. Also
issued), the group job name portion of the CL variable is
assume that message queue QGPL/GROUPMSGQ is asso-
set to the special value of *NONE, and the job number
ciated with the group. If group job GROUPJ1 has just issued
portion of the CL variable is set to blanks. The CL vari-
the TFRGRPJOB command to transfer to group job
able is returned in the following format:
GROUPJ2, and GROUPJ2 called the following CL program:
Group-job-name CHAR(1ð)
Job-number CHAR(6) PGM Example
Even though a group job name and job number are
DCL VAR(&GRPJOBN) TYPE(\CHAR) LEN(1ð)
returned, it is not necessarily true that the group job still DCL VAR(&GRPJOBL) TYPE(\CHAR) LEN(1ð56)
exists. There are cases in which the previously active DCL VAR(&GRPCOUNT) TYPE(\DEC) LEN(3 ð)
job in the group has ended, which caused the currently DCL VAR(&MSGQNAME) TYPE(\CHAR) LEN(1ð)
active job to become active. DCL VAR(&MSGQLIB) TYPE(\CHAR) LEN(1ð)
DCL VAR(&PRVJOB) TYPE(\CHAR) LEN(16)
CTLCDE
DCL VAR(&CTLCODE) TYPE(\DEC) LEN(3 ð)
Specifies the name of the CL variable that receives infor-
mation about why the active job in the group has gained RTVGRPA GRPJOB(&GRPJOBN) GRPJOBL(&GRPJOBL)
control. The CL variable must be a three-position GRPJOBCNT(&GRPCOUNT) MSGQ(&MSGQNAME)
decimal variable with no decimal positions. The fol- MSGQLIB(&MSGQLIB) PRVGRPJOB(&PRVJOB)
lowing control codes (and their meanings) are possible: CTLCDE(&CTLCODE)
0 There was no previously active job (no The contents of the CL variables returned are as follows:
TFRGRPJOB commands have been run for this
&GRPJOBN: GROUPJ2
group).
&GRPJOBL:
10 The previously active job selected this job to be
transferred to on the TFRGRPJOB command. GROUPJ2 ððð2 5ð characters of text for
this group job...
20 The previously active job's first group program
GROUPJ1 ððð1 5ð characters of text for
ended normally, and this job was the most this group job...
recently active job in the group.
Fourteen more entries, full of blanks

P3-918 OS/400 CL Reference - Part 2 (Full Version)


RTVGRPA

&GRPCOUNT: ðð2
&MSGQNAME: GROUPMSGQ
&MSGQLIB: QGPL
&PRVJOB: GROUPJ1 ððð1
&CTLCODE: ð1ð

Chapter 2. OS/400 Command Descriptions P3-919


RTVJOBA

RTVJOBA (Retrieve Job Attributes) Command


Pgm: B,I REXX: B,I

(P) ─────────────────5
55──RTVJOBA──┬────────────────────────────┬──┬─────────────────────────────┬──┬────────────────────────────┬───
└─JOB(──&CL-variable-name──)─┘ └─USER(──&CL-variable-name──)─┘ └─NBR(──&CL-variable-name──)─┘
5──┬───────────────────────────────┬──┬───────────────────────────────┬──┬────────────────────────────────┬─────────────────────5
└─LOGLVL(──&CL-variable-name──)─┘ └─LOGSEV(──&CL-variable-name──)─┘ └─LOGTYPE(──&CL-variable-name──)─┘
5──┬─────────────────────────────────┬──┬──────────────────────────────────┬──┬─────────────────────────────┬───────────────────5
└─LOGCLPGM(──&CL-variable-name──)─┘ └─INQMSGRPY(──&CL-variable-name──)─┘ └─OUTQ(──&CL-variable-name──)─┘
5──┬────────────────────────────────┬──┬───────────────────────────────┬──┬─────────────────────────────┬───────────────────────5
└─OUTQLIB(──&CL-variable-name──)─┘ └─ACGCDE(──&CL-variable-name──)─┘ └─DATE(──&CL-variable-name──)─┘
5──┬────────────────────────────┬──┬─────────────────────────────┬──┬───────────────────────────────┬───────────────────────────5
└─SWS(──&CL-variable-name──)─┘ └─TYPE(──&CL-variable-name──)─┘ └─RTNCDE(──&CL-variable-name──)─┘
5──┬───────────────────────────────┬──┬───────────────────────────────┬──┬──────────────────────────────────┬───────────────────5
└─ENDSTS(──&CL-variable-name──)─┘ └─RUNPTY(──&CL-variable-name──)─┘ └─TIMESLICE(──&CL-variable-name──)─┘
5──┬──────────────────────────────┬──┬────────────────────────────────┬──┬────────────────────────────────┬─────────────────────5
└─PURGE(──&CL-variable-name──)─┘ └─DFTWAIT(──&CL-variable-name──)─┘ └─USRLIBL(──&CL-variable-name──)─┘
5──┬────────────────────────────────┬──┬───────────────────────────────────┬──┬───────────────────────────────┬─────────────────5
└─SBMMSGQ(──&CL-variable-name──)─┘ └─SBMMSGQLIB(──&CL-variable-name──)─┘ └─PRTTXT(──&CL-variable-name──)─┘
5──┬───────────────────────────────┬──┬───────────────────────────────┬──┬───────────────────────────────┬──────────────────────5
└─DDMCNV(──&CL-variable-name──)─┘ └─BRKMSG(──&CL-variable-name──)─┘ └─DATFMT(──&CL-variable-name──)─┘
5──┬───────────────────────────────┬──┬───────────────────────────────┬──┬───────────────────────────────┬──────────────────────5
└─DATSEP(──&CL-variable-name──)─┘ └─CURLIB(──&CL-variable-name──)─┘ └─PRTDEV(──&CL-variable-name──)─┘
5──┬────────────────────────────────┬──┬────────────────────────────────┬──┬────────────────────────────────┬───────────────────5
└─SYSLIBL(──&CL-variable-name──)─┘ └─CURUSER(──&CL-variable-name──)─┘ └─SUBTYPE(──&CL-variable-name──)─┘
5──┬──────────────────────────────────┬──┬───────────────────────────────┬──┬────────────────────────────────┬──────────────────5
└─PRTKEYFMT(──&CL-variable-name──)─┘ └─TIMSEP(──&CL-variable-name──)─┘ └─TSEPOOL(──&CL-variable-name──)─┘
5──┬──────────────────────────────────┬──┬───────────────────────────────┬──┬───────────────────────────────┬───────────────────5
└─DEVRCYACN(──&CL-variable-name──)─┘ └─STSMSG(──&CL-variable-name──)─┘ └─SRTSEQ(──&CL-variable-name──)─┘
5──┬──────────────────────────────────┬──┬───────────────────────────────┬──┬────────────────────────────────┬──────────────────5
└─SRTSEQLIB(──&CL-variable-name──)─┘ └─LANGID(──&CL-variable-name──)─┘ └─CNTRYID(──&CL-variable-name──)─┘
5──┬──────────────────────────────┬──┬──────────────────────────────────┬──┬──────────────────────────────────┬─────────────────5
└─CCSID(──&CL-variable-name──)─┘ └─JOBMSGQMX(──&CL-variable-name──)─┘ └─JOBMSGQFL(──&CL-variable-name──)─┘
5──┬─────────────────────────────────┬──┬─────────────────────────────────┬──┬───────────────────────────────┬─────────────────5%
| └─DFTCCSID(──&CL-variable-name──)─┘ └─CYMDDATE(──&CL-variable-name──)─┘ └─DECFMT(──&CL-variable-name──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose JOB
Specifies, if the job name is returned, the name of the
The Retrieve Job Attributes (RTVJOBA) command is used in CL variable that receives the name of the job. The vari-
a CL program or REXX procedure to retrieve the values of able must be a character variable with a minimum length
one or more job attributes and to place those values into the of 10 characters. If the job name has fewer characters
specified CL variable. The attributes are retrieved for the job than the variable allows, the value is padded on the right
in which this command is used. with blanks.

The CL prompt for this command lists the minimum length for USER
retrieved variables next to the appropriate parameters. For Specifies, if the user name is returned, the name of the
character variables, a single number is shown. For decimal CL variable that receives the name of the user profile
variables, two numbers are shown. The first number indi- associated with the job when the job was started. The
cates the minimum variable length and the second number user name is the second part of the qualified job name.
indicates the minimum number of decimal positions. The variable must be a character variable with a
minimum length of 10 characters. If the user name has
Note: To see the parameter and value descriptions for this
fewer characters than the variable allows, the value is
command, refer to the online help text. For more
padded on the right with blanks.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. NBR
Specifies, if the job number is being returned, the name
of the CL variable that receives the unique 6-character
Optional Parameters

P3-920 OS/400 CL Reference - Part 2 (Full Version)


RTVJOBA

number assigned to the job by the system. The job file or the job description, will be used for the spooled
number is the first part of the qualified job name. output of this job.

LOGLVL OUTQLIB
Specifies the name of the CL variable that receives the Specifies the name of the CL variable that receives the
1-character value, ranging from 0 through 4, that is the name of the library that contains the output queue being
message logging level used to determine the type of used by the job for spooled output. The library name is
messages logged in the job log. The variable must be a the second part of the qualified output queue name
character variable with a minimum length of 1 character. (output-queue/library-name). The variable must be a
character variable with a minimum length of 10 charac-
LOGSEV
ters. If the output queue library name has fewer charac-
Specifies the name of the CL variable that receives the
ters than the variable allows, the value is padded on the
2-digit value, ranging from 00 through 99, which is the
right with blanks.
minimum severity level a message must have before it is
logged in the job log. The variable must be a 2-digit ACGCDE
decimal variable specified with no decimal positions. Specifies the name of the CL variable that receives the
accounting code for the job. The variable must be a
LOGTYPE
character variable with a minimum length of 15 charac-
Specifies the name of the CL variable that receives the
ters. If the accounting code has fewer characters than
special value that indicates the level of text that appears
the variable allows, the value is padded on the right with
for any message written to the job log. The variable
blanks.
must be a character variable with a minimum length of
10 characters. If the special value has fewer characters DATE
than the variable allows, the value is padded on the right Specifies, if the job date is to be returned, the name of
with blanks. the CL variable that receives the date assigned to the
job by the system when the job was started. The vari-
LOGCLPGM
able must be a character variable with a minimum length
Specifies the name of the CL variable that receives the
of 6 characters. The job date is returned in the system
special value that indicates whether processed com-
date format specified by the system value QDATFMT.
mands in a CL program are being logged in the job log.
Note that this logging flag only has meaning for com- SWS
mands processed in CL programs which were created Specifies, if the job switch settings are being returned,
with LOG(*JOB) specified on the Create CL Program the name of the CL variable that receives the status (on
(CRTCLPGM) command. Additional information on the or off) value of the eight job switches used by the job.
job's CL program logging flag is in the LOGCLPGM The job switches are retrieved as a single 8-character
parameter description in the Change Job (CHGJOB) value with each of the characters specifying a 1 (on) or
command. The variable must be a character variable 0 (off) as the value of the associated switch. The CL
with a minimum length of 10 characters. If the special variable must be a character variable with a minimum
value has fewer characters than the variable allows, the length of 8 characters.
value is padded on the right with blanks.
TYPE
INQMSGRPY Specifies, if the type of job environment is being
Specifies the name of the CL variable that receives the returned, the name of the CL variable that receives the
special value that indicates how inquiry messages are 1-character value representing the environment of the
being handled by the job. Additional information on the job. A character value of 0 indicates the job is running
value returned in the variable is in the INQMSGRPY as a batch job, and a 1 indicates an interactive job. The
parameter description in the Change Job (CHGJOB) variable must be a character variable with a minimum
command. The variable must be a character variable length of 1 character.
with a minimum length of 10 characters. If the special
RTNCDE
value has fewer characters than the variable allows, the
Specifies (if the completion status of an RPG, COBOL,
value is padded on the right with blanks.
DFU, or sort utility program is being returned) the name
OUTQ of the CL variable that receives the 5-digit decimal return
Specifies the name of the CL variable that receives the code. The return code is set by these programs before
name of the output queue being used by the job for they return to the programs that called them. The return
spooled output. The variable must be a character vari- code indicates the completion status of the last program
able with a minimum length of 10 characters. If the (of these types) that has completed processing within
output queue name has fewer characters than the vari- the job, as follows:
able allows, the value is padded on the right with blanks.
0 Normal return (RPG, COBOL, DFU, or sort Utility)
The special value *DEV can be retrieved. This value
1 LR (last record) indicator on (RPG)
indicates that the output queue with the same name as
the printer device, which is specified on either the printer

Chapter 2. OS/400 Command Descriptions P3-921


RTVJOBA

2 Error–no halt indicator set (RPG, COBOL, DFU, or USRLIBL


sort Utility) Specifies the name of the CL variable that receives the
| user portion of the thread's library list. The variable
3 Halt indicator set on (one of the RPG indicators H1
| must be a character variable with up to 275 variables.
through H9)
Each library name returned is left-justified in an
The CL variable must be a five-position decimal variable 11-character field and padded on the right with blanks.
with no decimal positions.
SBMMSGQ
ENDSTS Specifies the name of the CL variable that receives the
Specifies, if checking for a controlled end operation, the name of a message queue. If this parameter is coded
name of the CL variable that receives the end status. for a RTVJOBA command in a CL program which is part
The single-character value indicates whether a controlled of a batch job, the value returned is associated with the
end that affects the job is currently being performed. A MSGQ parameter on the JOB or SBMJOB command
value of 1 indicates that the system, the subsystem in which caused the batch job to start running. If *NONE
which the job is running, or the job itself is being ended; was specified for the MSGQ parameter of the JOB or
a value of 0 indicates no controlled end is being per- SBMJOB commands, or the CL program that contains
formed. The CL variable must be a character variable the RTVJOBA command is not part of a batch job,
with a minimum length of 1 character. *NONE is returned to the CL variable coded for this
parameter. The variable must be a character variable
RUNPTY with a minimum length of 10 characters. If the message
Specifies the name of the CL variable that receives the queue name has fewer characters than the variable
2-digit value, ranging from 1 through 99, that is the run allows, the value is padded on the right with blanks.
| (or processing) priority for the thread in which this
| command is used. For additional information on run pri- SBMMSGQLIB
ority, refer to this parameter description in the CHGJOB Specifies the name of the CL variable that receives the
(Change Job) command. The variable must be a 2-digit name of the library that contains the message queue
decimal variable specified with no decimal positions. described above. (See the SBMMSGQ parameter
description above.) The library name is the second part
TIMESLICE of the qualified message queue name. If *NONE is
Specifies the name of the CL variable that receives the returned for the SBMMSGQ parameter, it is also
7-digit value, ranging from 1 through 9999999, that is the returned for this parameter. The variable must be a
| maximum number of milliseconds that a thread within character variable with a minimum length of 10 charac-
| this job can run when it is given processing time. For ters. If the message queue library name has fewer char-
additional information on time slice, refer to this param- acters than the variable allows, the value is padded on
eter description under the CHGJOB (Change Job) the right with blanks.
command. The variable must be a 7-digit decimal vari-
able specified with no decimal positions. /\ Declare Variables \/
DCL &LIBL \CHAR 275
PURGE DCL &CHGLIBL \CHAR 285
Specifies the name of the CL variable that receives the /\ save library list \/
special value that indicates whether the job is marked as RTVJOBA USRLIBL(&LIBL)
eligible to move from main storage at the end of a time Ÿ
slice or a long wait state. For additional information on Ÿ
job purging, refer to this parameter description under the Ÿ
/\ temporarily change library list \/
CHGJOB (Change Job) command. The variable must
CHGLIBL LIBL(MYLIB QGPL)
be a character variable with a minimum length of 10
Ÿ
characters. If the special value has fewer characters Ÿ
than the variable allows, the value is padded on the right Ÿ
with blanks. /\ build command string \/
CHGVAR &CHGLIBL ('CHGLIBL (' \CAT &LIBL \TCAT ')')
DFTWAIT
Specifies the name of the CL variable that receives the
/\ restore library list \/
7-digit value, ranging from 1 through 9999999 (or -1 if CALL QCMDEXC (&CHGLIBL 285)
the value is set to *NOMAX), which is the default for the
maximum number of seconds that the system waits for a The above commands retrieve the user portion of the
machine instruction to be completely processed. For library list so that later it can be restored from its tempo-
additional information on wait-time, refer to the rary state, where only MYLIB and QGPL are in the user
DFTWAIT parameter description under the CHGJOB portion of the library list, to its original state. If there are
(Change Job) command. The variable must be a 7-digit no libraries on the user portion of the library list, then
decimal variable specified with no decimal positions. blanks are returned in the variable.

P3-922 OS/400 CL Reference - Part 2 (Full Version)


RTVJOBA

PRTTXT CURUSER
Specifies the name of the CL variable that receives the Specifies, if the user name is returned, the 10-character
print text for the job. This must be a character variable CL variable that receives the name of the current user
with a minimum length of 30 characters. More informa- profile. If the current user name has fewer characters
tion on this parameter is in Appendix A, “Expanded than the variable allows, the value is padded on the right
Parameter Descriptions.” with blanks.

DDMCNV SUBTYPE
Specifies the name of a CL variable that receives the Specifies, if the SUBTYPE of job environment is being
special value that indicates the action taken for DDM returned, the 1-character CL variable that receives the
conversations on the job. The variable must be a char- name of the job environment. The valid character
acter variable with a minimum length of 5 characters. If values are:
the special value has fewer characters than the variable
Character Value
allows, the value is padded on the right with blanks.
* Job has no subtype
BRKMSG
Specifies the name of a CL variable that receives the E Job is running as an evoked job
special value that indicates the mode for break message T Job is running as a Multiple
handling that is in effect for the job. The variable must Requester Terminal (MRT) job
be a character variable with a minimum length of 7 char-
J Job is running as a prestart job
acters. If the special value has fewer characters than
the variable allows, the value is padded on the right with P Job is running as a print driver
blanks.
PRTKEYFMT
DATFMT Specifies the name of the CL variable that receives the
Specifies the name of a CL variable that receives the print key format for the job. The variable must have a
special value being used as the date format for the job. minimum length of 7 characters. The special value
The variable must be a character variable with a *NONE, *PRTBDR, *PRTHDR, or *PRTALL is returned.
minimum length of 4 characters. If the special value has
TIMSEP
fewer than 4 characters, the value is padded on the right
Specifies the name of a CL variable that receives the
with blanks.
character being used as the time separator character for
DATSEP the job. The variable must be a character variable with
Specifies the name of a CL variable that receives the a minimum length of one character.
character being used as the date separator character for
TSEPOOL
the job. The variable must be a character variable with
Specifies the name of the CL variable that receives the
a minimum length of 1 character.
special value indicating whether interactive jobs are
CURLIB moved to another main storage pool when they reach
Specifies the name of a CL variable that is used to the time slice end. The variable must be a character
| retrieve the name of the current library for the thread. variable with a minimum length of 10 characters.
| The variable must be a character variable with a
DEVRCYACN
minimum length of 10 characters. If the current library
Specifies the name of the CL variable that receives the
name has fewer characters than the variable allows, the
special value indicating the recovery action to take for
value is padded on the right with blanks.
the job when an I/O error is encountered on the
| Note: If the thread does not have a current library, a *REQUESTER device for interactive jobs. The variable
| value of *NONE is returned in this variable. must be a character variable with a minimum length of
13 characters.
PRTDEV
Specifies the name of the CL variable that receives the STSMSG
name of the printer device. The variable must be a Specifies the name of the CL variable that receives the
character variable with a minimum length of 10 charac- special value indicating how status messages are
ters. If the printer device name has fewer characters handled for the job. The variable must be a character
than the variable allows, the value is padded on the right variable with a minimum length of 7 characters.
with blanks.
SRTSEQ
SYSLIBL Specifies the name of the CL variable that receives the
Specifies the name of the CL variable that receives the name of the sort sequence table used for the job. The
| system portion of the thread's library list. The variable special value *LANGIDUNQ, *LANGIDSHR, or *HEX can
| must be a character variable with up to 165 characters. be returned to the variable. The variable must be a
Each library name returned is left-justified in an
11-character field and padded on the right with blanks.

Chapter 2. OS/400 Command Descriptions P3-923


RTVJOBA

character variable with a minimum length of 10 charac- century, YY is the year, MM is the month and DD is the
ters. day.

SRTSEQLIB | DECFMT
Specifies the name of the CL variable that receives the | Specifies the name of a CL variable that receives the
name of the library containing the sort sequence table to | character being used as the decimal format for the job.
be used for the job. The variable must be a character | The variable must be a character variable with a
variable with a minimum length of 10 characters. If | minimum length of 1 character.
SRTSEQ is *LANGIDUNQ, *LANGIDSHR, or *HEX,
blanks are returned in the variable.
Example
LANGID RTVJOBA NBR(&JOBNBR) DATE(&JOBDATE) DFTCCSID(&DFTCSID)
Specifies the name of the CL variable that receives the
value indicating the language identifier to be used for the This command retrieves the job number and job date attri-
job. The variable must be a character variable with a butes from the job in which this command is located. The
minimum length of 3 characters. 6-digit job number is copied into the CL variable &JOBNBR.
The job date is copied into the CL variable &JOBDATE; the
CNTRYID
values for both &JOBNBR and &JOBDATE must be 6 char-
Specifies the name of the CL variable that receives the
acters in length. The 5-digit DFTCCSID value is copied into
value indicating the country identifier to be used for the
the CL variable &DFTCCSID; this value must be 5 characters
job. The variable must be a character variable with a
in length. The format of the date is determined by the con-
minimum length of 2 characters.
tents of the system value QDATFMT, which controls the
CCSID system date format.
Specifies the name of a CL variable that receives the /\ Declare Variables \/
CCSID value being used for the job. The variable must DCL &LIBL \CHAR 275
be a 5-digit decimal variable with no decimal positions. DCL &CHGLIBL \CHAR 285
JOBMSGQMX /\ save library list \/
Specifies the name of a CL variable that receives the RTVJOBA USRLIBL(&LIBL)
maximum size of the job message queue. The variable Ÿ
must be a 2-digit decimal variable with no decimal posi- Ÿ
tion. Ÿ
/\ temporarily change library list \/
JOBMSGQFL CHGLIBL LIBL(MYLIB QGPL)
Specifies the action that should be taken when the job Ÿ
message queue is full. The variable must have a Ÿ
minimum length of 10 characters. The special value Ÿ
*NOWRAP, *WRAP, or *PRTWRAP is returned. /\ build command string \/
CHGVAR &CHGLIBL ('CHGLIBL (' \CAT &LIBL \TCAT ')')
DFTCCSID
Specifies the name of a CL variable that receives the /\ restore library list \/
DFTCCSID value being used for the job. The variable CALL QCMDEXC (&CHGLIBL 285)
must be a 5-digit decimal variable with no decimal posi-
tions. The above command retrieves the user portion of the library
list so that it later can be restored from its temporary state,
CYMDDATE where only MYLIB and QGPL were in the user portion of the
Specifies the name of the CL variable that receives the library list, to its original state.
date assigned to the job by the system when the job
was started. The variable must be a character variable If there are no libraries on the user portion of the library list,
with a minimum length of 7 characters. The job date is blanks are returned in the variable. If a library on the library
returned in the format CYYMMDD, where C is the list has been deleted, the value '*DELETED' is put in the var-
iable position for that name.

P3-924 OS/400 CL Reference - Part 2 (Full Version)


RTVJRNE

| RTVJRNE (Retrieve Journal Entry) Command


Pgm: B,I REXX: B,I

┌─\LIBL/────────┐
55──RTVJRNE──JRN(──┼───────────────┼──journal-name──)───────────────────────────────────────────────────────────────────────────5
├─\CURLIB/──────┤
└─library-name/─┘
5──┬───────────────────────────────────────────────────────────────────────────────────────┬────────────────────────────────────5
│ ┌─\ALLFILE────────────────────────────────────────────────────────────────┐ │
│ │ ┌──
──────────────────────────────────────────────────────────────────┐ │ │
│ │ │ ┌─\LIBL/────────┐ ┌─\FIRST──────┐ │ │ │
6 (1) (2)
└─FILE(──┴───(──┼───────────────┼──┬─\ALL───────────────┬──┼─────────────┼──)─┴────┴──)─┘
├─\CURLIB/──────┤ └─physical-file-name─┘ ├─\ALL────────┤
└─library-name/─┘ └─member-name─┘
(P) ────────────────5
5──┬────────────────────────────────────────────────────────────────────────────────────────────────────────┬───
│ ┌─\CURRENT───────────────────────────────────────────────────────────────────────────────┐ │
│ ├─\CURCHAIN──────────────────────────────────────────────────────────────────────────────┤ │
│ │ ┌─\CURRENT────────────────────────────────┐ │ │
│ │ ┌─\LIBL/────────┐ │ ┌─\LIBL/────────┐ │ │ │
└─RCVRNG(──┴─┼───────────────┼──start-journal-receiver──┴─┼───────────────┼──end-journal-receiver─┴─┴──)─┘
├─\CURLIB/──────┤ ├─\CURLIB/──────┤
└─library-name/─┘ └─library-name/─┘
5──┬────────────────────────────────────────────────┬──┬──────────────────────────────────────────┬─────────────────────────────5
│ ┌─\FIRST───────────────────┐ │ │ ┌─\LAST──────────────────┐ │
├─FROMENT(──┼─\LAST────────────────────┼──)──────┤ ├─TOENT(──┼─\FIRST─────────────────┼──)────┤
│ └─starting-sequence-number─┘ │ │ └─ending-sequence-number─┘ │
└─FROMTIME(──starting-date──┬───────────────┬──)─┘ └─TOTIME(──ending-date──┬─────────────┬──)─┘
└─starting-time─┘ └─ending-time─┘
5──┬──────────────────────────┬──┬───────────────────────────────────────────────────────┬──────────────────────────────────────5
│ ┌─\ASCEND──┐ │ │ ┌─\ALL──────────────────────────────────┐ │
└─SEARCH(──┴─\DESCEND─┴──)─┘ └─JRNCDE(──┼─\CTL──────────────────────────────────┼──)─┘
│ ┌──
────────────────────────────────┐ │
│ │ ┌─\ALLSLT──────┐ │ │
6 (3) (4)
└───journal-code──┴─\IGNFILSLT───┴─┴────┘
5──┬───────────────────────────────────┬──┬────────────────────────────────────────────────────────┬────────────────────────────5
│ ┌─\ALL──────────────┐ │ │ ┌─\ALL──────────────────────────────────────┐ │
└─ENTTYP(──┼─\RCD──────────────┼──)─┘ └─JOB(──┼─\─────────────────────────────────────────┼──)─┘
│ ┌──
────────────┐ │ └─┬─────────────────────────────┬──job-name─┘
└──6─entry-type─┴───
(5) ─┘ └─┬─────────────┬──user-name/─┘
└─job-number/─┘
5──┬───────────────────────────┬──┬───────────────────────────┬──┬───────────────────────────────────────────┬──────────────────5
│ ┌─\ALL─────────┐ │ │ ┌─\ALL──────┐ │ │ ┌─\ALL────────────────────┐ │
└─PGM(──┴─program-name─┴──)─┘ └─USRPRF(──┴─user-name─┴──)─┘ └─CMTCYCID(──┴─commit-cycle-identifier─┴──)─┘
5──┬───────────────────────┬──┬──────────────────────────┬──┬────────────────────────────────┬──────────────────────────────────5
│ ┌─\ALL──┐ │ │ ┌─\TYPE1─┐ (7) ─field-length──)─┘
│ └─NULLINDLEN(───
(6) ─┼─\TYPE2─┼──)─┘
└─DEPENT(──┴─\NONE─┴──)─┘ └─ENTFMT(───
├─\TYPE3─┤
└─\TYPE4─┘
5──┬──────────────────────────────┬──┬──────────────────────────────────┬──┬──────────────────────────────────┬─────────────────5
| │ ┌─\CONFIRMED─┐ │ └─RTNSEQNBR(──&CL-variable-name──)─┘ └─RTNJRNCDE(──&CL-variable-name──)─┘
| (8) ─┴─\ALL───────┴──)─┘
└─INCENT(───
5──┬──────────────────────────────────┬──┬───────────────────────────────┬──┬──────────────────────────────────┬────────────────5
└─RTNENTTYP(──&CL-variable-name──)─┘ └─RTNRCV(──&CL-variable-name──)─┘ └─RTNRCVLIB(──&CL-variable-name──)─┘
5──┬────────────────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────5%
└─RTNJRNE(──&CL-variable-name──)─┘
Notes:
1 If *ALL is specified instead of physical-file-name, the format must be library-name/*ALL.

2 A maximum of 300 repetitions.

| 3 This value is not valid for journal code D, F or R.


| 4 A maximum of 12 repetitions.
5 A maximum of 50 repetitions.

6 If ENTFMT(*TYPE3) or ENTFMT(*TYPE4) is specified, the NULLINDLEN parameter must be specified.

7 The NULLINDLEN parameter is valid only if ENTFMT(*TYPE3) or ENTFMT(*TYPE4) is specified.

| 8 This parameter is only valid for a remote journal.


P All parameters preceding this point can be specified in positional form.

Chapter 2. OS/400 Command Descriptions P3-925


RTVJRNE

Purpose receivers in the specified receiver range was attached to


a journal that had RCVSIZOPT(*MINFIXLEN) specified.
The Retrieve Journal Entry (RTVJRNE) command is used in Note: To see the parameter and value descriptions for this
a CL program or REXX procedure to retrieve a journal entry command, refer to the online help text. For more
and place the results in CL variables. The CL variables information about printing the help text, refer to
contain information, such as the sequence number of the “Printing CL Command Descriptions” in Chapter 1.
retrieved entry, and are useful in automating certain types of
recovery functions. The search for a journal entry can be
restricted to a file, to a range of journal receivers, to a range Required Parameter
of journal entries, to a journal code, to an entry type, to a job,
JRN
to a program, to a user profile, or to a commit cycle identifier.
Specifies the qualified name of the journal from which
Multiple limitation criteria can be specified. If more than one
the journal entry is retrieved.
journal entry satisfies the search values specified, the first
occurrence of a journal entry satisfying all of the specified The name of the journal can be qualified by one of the
search values is returned. If there is no journal entry satis- following library values:
fying the search values specified, the command ends with an
*LIBL: All libraries in the job's library list are
escape message, and the return CL variables
searched until the first match is found.
(RTNSEQNBR, RTNJRNCDE, RTNENTTYP, RTNRCV,
RTNRCVLIB and RTNJRNE) remain the same. *CURLIB: The current library for the job is
searched. If no library is specified as the current
The order of the search through the journal entries can be library for the job, the QGPL library is used.
ascending or descending. The search order is determined
library-name: Specify the name of the library to be
by the value specified in the SEARCH parameter. The value
searched.
for the FROM parameter must come before the value speci-
fied for the TO parameter in the specified search order. journal-name: Specify the name of the journal from
which the journal entry is retrieved.
The CL prompt for this command lists the minimum length for
retrieved variables next to the correct parameters. For char-
acter variables, a single number is shown. For decimal vari- Optional Parameters
ables, two numbers are shown. The first number indicates
FILE
the minimum variable length, and the second number indi-
Specifies a maximum of 300 qualified file names whose
cates the minimum number of decimal positions.
journal entries are retrieved. This parameter also speci-
Restrictions: fies the name of the file member whose journal entries
are to be retrieved.
1. If the sequence number is reset in the range of receivers
specified, the first occurrence of either the FROMENT or | To determine which journal entries are to be converted
TOENT parameter is used, if they are specified. | for output, based on the specified file member name, the
| following is done:
2. The FILE, JRNCDE, ENTTYP, JOB, PGM, USRPRF,
CMTCYCID, and DEPENT parameters can be used to | Ÿ If the specified file member currently exists on the
specify a subset of all available entries within a range of | system, the journal identifier is determined from the
journal entries. | specified file member. All journal entries in the
| specified receiver range for that journal identifier are
Ÿ If no values are specified using these parameters,
| converted for output.
all available journal entries are retrieved.
Ÿ If more than one of these parameters are specified, | Ÿ If the specified file member does not currently exist
then a journal entry must satisfy all of the values | on the system, the specified receiver range is
specified on these parameters, except when | searched to determine all possible journal identifiers
*IGNFILSLT is specified on the JRNCDE parameter. | that are associated with the specified file member.
Ÿ If a journal code is specified on the JRNCDE | All journal entries in the specified receiver range for
parameter and *IGNFILSLT is specified for that | those journal identifiers are converted for output.
journal code, then journal entries with the specified | There can be more than one journal identifier asso-
journal code are selected if they satisfy all selection | ciated with the specified file member if, for example,
criteria except what is specified on the FILE param- | a file member was created by that name, it was
eter. | journaled, and then deleted. Then another file
3. The JOB, PGM, and USRPRF parameters cannot be | member was created with the same name, and it
used to specify selection criteria if one or more journal | was also journaled and then deleted. All of these
| actions would have to occur within the specified
| receiver range.

P3-926 OS/400 CL Reference - Part 2 (Full Version)


RTVJRNE

| Notes: example, if library-name/*ALL *FIRST is specified on the


FILE parameter, the journal entries of the first members
| 1. The journal identifier is the unique identifier associ-
of all applicable files in the specified library are retrieved.
| ated with the object when journaling is started for
| that object. The journal identifier stays constant, | Note: If more than the maximum number of members
| even if the object is renamed or moved. See the | is identified (32767 members if a list of files is
| Backup and Recovery book for more information. specified), an error occurs and no entries are
retrieved. This restriction is ignored if *ALLFILE
2. When specifying a database file on this parameter,
is specified.
journal entries with the following journal code values
are retrieved only if they satisfy the values specified If the specified physical file does not exist on the
on the other parameters: system, specify either *ALL or a specific file member
name.
| Ÿ Journal code D (database file-level information
| entries). RCVRNG
| Ÿ Journal code F (file member-level information Specifies the qualified names of the starting (first) and
| entries). ending (last) journal receivers used in the search for a
Ÿ Journal code R (record-level information journal entry to be retrieved. The system starts the
entries). search with the starting journal receiver (as specified by
Ÿ Journal code U (user-generated entries). the first value) and proceeds through the receiver chain
Ÿ Other journal codes, if *IGNFILSLT is specified until the ending journal receiver (as specified by the
on that journal code. If *ALLSLT is specified on second value) is processed.
that journal code, no journal entries with that
If dual receivers (pairs of receivers added or removed at
code are retrieved.
the same time) are used at any time, the first of the
The single value *ALLFILE can be specified on the list of receivers is used when chaining through the receivers.
two values. The Work with Journal Attributes (WRKJRNA) command
can be used to display the order of the receivers in the
*ALLFILE: The search for the entry being retrieved is
receiver chain. If any problem is found in the receiver
not limited by a particular file name.
chain before the search operation begins, such as
Element 1: Physical File Name damaged or off-line receivers, the system attempts to
use the second of the dual receivers. If the second of
The name of the physical file can be qualified by one of
the receivers is damaged or off-line, or if a problem is
the following library values:
found during the operation, the operation ends.
*LIBL: All libraries in the job's library list are
If SEARCH(*ASCEND) is specified, journal receivers
searched until the first match is found.
must be specified in the order of oldest to newest. If
*CURLIB: The current library for the job is SEARCH(*DESCEND) is specified, journal receivers
searched. If no library is specified as the current must be specified in the order of newest to oldest.
library for the job, the QGPL library is used.
*CURRENT: The journal receiver that is currently
library-name: Specify the name of the library to be attached when starting to retrieve journal entries is used.
searched.
*CURCHAIN: The journal receiver chain that includes
| *ALL: Journal entries in all physical files in the specified the journal receiver that is currently attached when
| library (the library name must be specified) whose jour- starting to retrieve journal entries is used. This receiver
| naled changes are currently in the journal receiver are chain does not cross a break in the chain. If there is a
| converted for output. If *ALL is specified and the user break in the chain, the receiver range is from the most
| does not have the required authority to all of the files, an recent break in the chain through the receiver that is
| error occurs, and the command ends. attached when starting to retrieve journal entries.

physical-file-name: Specify the name of the physical Element 1: Starting Journal Receiver
database file for which a journal entry is retrieved. The name of the starting journal receiver can be quali-
Element 2: Member Name fied by one of the following library values:

*FIRST: An entry for the first member in the file is *LIBL: All libraries in the job's library list are
retrieved. searched until the first match is found.
*ALL: Journal entries for currently existing members in *CURLIB: The current library for the job is
the file are retrieved. searched. If no library is specified as the current
library for the job, the QGPL library is used.
member-name: Specify the name of the member for
which a journal entry is retrieved. library-name: Specify the name of the library to be
searched.
If *ALL is specified for the file-name value, this member
name is used for all applicable files in the library. For

Chapter 2. OS/400 Command Descriptions P3-927


RTVJRNE

starting-journal-receiver: Specify the name of the first must be enclosed in apostrophes. If a time sepa-
journal receiver that contains journal entries to be rator other than the separator specified for your job
retrieved. is used, this command fails.
Element 2: Ending Journal Receiver Ÿ Without a time separator, specify a string of 4 or 6
digits (hhmm or hhmmss) where hh = hours, mm =
*CURRENT: The journal receiver that is currently
minutes, and ss = seconds. Valid values for hh
attached when starting to retrieve journal entries is used.
range from 00 through 23. Valid values for mm and
The name of the ending journal receiver can be qualified ss range from 00 through 59.
by one of the following library values:
TOENT
*LIBL: All libraries in the job's library list are Specifies the last journal entry considered for retrieval.
searched until the first match is found.
*LAST: The search continues until the last journal entry
*CURLIB: The current library for the job is in the specified journal receiver range is processed. If
searched. If no library is specified as the current SEARCH(*DESCEND) is specified, TOENT(*LAST) is
library for the job, the QGPL library is used. valid only if FROMENT(*LAST) is also specified.
library-name: Specify the name of the library to be *FIRST: The search continues until the first journal
searched. entry in the specified journal receiver range is pro-
cessed. If SEARCH(*ASCEND) is specified,
ending-journal-receiver: Specify the name of the last
TOENT(*FIRST) is only valid if FROMENT(*FIRST) is
journal receiver containing journal entries to be
also specified.
searched. If the end of the receiver chain is reached
before a receiver of this name is found, an error ending-sequence-number: Specify the sequence
message is sent and no journal entry is retrieved. number of the journal entry that is the final entry consid-
ered for retrieval.
Note: If the maximum number of receivers in the range
is larger than 256, an error message is sent and Note: The values specified for the FROMENT and
no journal entry is retrieved. TOENT parameter can be the same (for
example, FROMENT(234) and TOENT(234) can
FROMENT
be specified).
Specifies the first journal entry considered for retrieval.
TOTIME
*FIRST: The first journal entry in the specified journal
Specifies the date and time of the last entry considered
receiver range is the first entry considered for retrieval.
for retrieval. The first journal entry found with the speci-
If SEARCH(*DESCEND) is specified,
fied date and time, or the latest earlier journal entry is
FROMENT(*FIRST) is valid only if TOENT(*FIRST) is
the ending point for the search.
also specified.
*LAST: The last journal entry in the specified journal
ending-date: Specify the ending date using the format
defined by the system values QDATFMT and, if separa-
receiver range is the first entry considered for retrieval.
tors are used, QDATSEP.
If SEARCH(*ASCEND) is specified, FROMENT(*LAST)
is valid only if TOENT(*LAST) is also specified. ending-time: Specify the ending time. See the
FROMTIME parameter for a description of time formats.
starting-sequence-number: Specify the sequence
number of the journal entry that is the first entry consid- SEARCH
ered for retrieval. Specifies the order in which the journal entries are
searched to retrieve an entry.
FROMTIME
Specifies the date and time of the first journal entry con- *ASCEND: The journal entries are searched in
sidered for retrieval. The first journal entry found with ascending order (from the oldest entry to the newest
the specified date and time or the next later journal entry entry).
is the starting point for the search.
*DESCEND: The journal entries are searched in
starting-date: Specify the starting date using the format descending order (from the newest entry to the oldest
defined by the system values QDATFMT and, if separa- entry).
tors are used, QDATSEP.
JRNCDE
starting-time: Specify the starting time. The time is Specifies the journal codes of the journal entries being
specified in 24-hour format with or without a time sepa- considered for retrieval.
rator as follows:
*ALL: The search for the entry to retrieve is not limited
Ÿ With a time separator, specify a string of 5 or 8 to a specified journal code.
digits, where the time separator for the job sepa-
*CTL: The entries considered for retrieval are the
rates the hours, minutes, and seconds. If you issue
journal entries created to control the journal functions.
this command from the command line, the string
The journal codes for these are J and F.

P3-928 OS/400 CL Reference - Part 2 (Full Version)


RTVJRNE

Element 1: Journal Code Value job-number: Specify the number of the job whose
journal entries are being considered for retrieval.
journal-code: Specify the journal code to which journal
entries are limited. Only journal entries with the speci- PGM
fied journal code are retrieved. A list of journal codes Specifies the name of a program whose journal entries
that can be specified is provided in the Backup and are considered for retrieval.
Recovery book.
*ALL: The search is not limited to entries for a specified
Element 2: Journal Code Selection program.
*ALLSLT: The journal entries with the specified journal program-name: Specify the name of the program whose
code are retrieved only if all other selection parameters journal entries are considered for retrieval. Only journal
are satisfied. entries for this program are considered for retrieval.
*IGNFILSLT: The journal entries having the specified
USRPRF
journal code are retrieved only if all selection parame-
Specifies that the journal entries to be considered for
ters, except the FILE parameter, are satisfied.
retrieval are limited to the journal entries for a specified
| Note: This value is not valid for journal code D, F or R. user profile name.

ENTTYP *ALL: The retrieval is not limited to entries for a speci-


Specifies whether to limit the journal entries retrieved to fied user profile.
those of a specified journal entry type. user-name: Specify the name of the user profile whose
*ALL: The search for the entry to retrieve is not limited journal entries are to be considered for retrieval. Only
to a specified entry type. changes for this user profile that were journaled are con-
sidered for retrieval.
*RCD: Only entries that have an entry type for record-
level operations are retrieved. The following entry types CMTCYCID
are valid: BR, DL, DR, PT, PX, UB, UP, and UR. Specifies that the journal entries considered for retrieval
are limited to the journal entries that contain the speci-
entry-type: Specify the entry type that limits the search
fied commit cycle identifier.
for the entry journal entries to retrieve. Only journal
entries that contain the specified entry type are consid- *ALL: The search is not limited to entries for a specified
ered for retrieval. Up to 50 valid entry types can be commit cycle identifier.
specified. A list of valid entry types is in the Backup and
commit-cycle-identifier: Specify the commit cycle identi-
Recovery book. fier that limits the search for the entry to retrieve. Only
JOB journal entries that contain the commit cycle identifier
Specifies whether the journal entries being retrieved are are considered for retrieval.
limited to the journal entries for a specified job. Only
DEPENT
journal entries for the specified job are considered for
Specifies whether to retrieve the journal entries
retrieval. If no job name is given, all of the journal
recording actions that occur as a result of a trigger
entries that contain the simple name of the job are con-
program and actions on records that are part of a refer-
sidered for retrieval.
ential constraint.
A job identifier is a special value or a qualified name
*ALL: The journal entries relating to trigger programs
with up to three elements. For example:
and referential constraints are retrieved.
\ALL
*NONE: The journal entries relating to trigger programs
\
job-name and referential constraints are not retrieved.
user-name/job-name ENTFMT
job-number/user-name/job-name Specifies the format of the journal entries being
More information on this parameter is in Appendix A, retrieved. For a description of what is represented by
“Expanded Parameter Descriptions.” each of the fields in the journal entry, see the Backup
and Recovery book
*ALL: The search is not limited to entries for a specified
job. Lists showing detailed information on the format of the
retrieved journal entries are in the RTNJRNE parameter
*: The search is limited to entries for the current job.
description.
Only entries for the requesting job are considered for
retrieval. *TYPE1: The retrieved journal entries are formatted to
include the minimum information that can be specified.
job-name: Specify the name of the job whose journal
The retrieved journal entries include the information in
entries are being considered for retrieval.
the format listed in the RTNJRNE parameter description
user-name: Specify the name of the user of the job for ENTFMT(*TYPE1).
whose journal entries are being considered for retrieval.

Chapter 2. OS/400 Command Descriptions P3-929


RTVJRNE

*TYPE2: The retrieved journal entries include the infor- RTNJRNCDE


mation returned when ENTFMT(*TYPE1) is specified, Specifies the name of the CL character variable in the
the user profile field giving the name of the user who program into which the journal code of the retrieved
logged the retrieved journal entries, and the name of the journal entry is copied. If a CL variable name is not
system on which the entry was sent. specified, the journal code of the retrieved journal entry
is not copied into the program. The specified variable
*TYPE3: The retrieved journal entries include the infor-
must be a character variable with a minimum length of 1
mation returned when ENTFMT(*TYPE2) is specified,
character. If the length of the variable is longer than 1
and the null value indicators.
character, it is padded on the right with blanks.
*TYPE4: The retrieved journal entries include the infor-
mation returned when ENTFMT(*TYPE3) is specified, RTNENTTYP
the journal identifier, the physical file trigger indicator, Specifies the name of the CL character variable in the
and the referential constraint indicator. program into which the entry type of the retrieved journal
entry is copied. If a CL variable name is not specified,
NULLINDLEN the entry type of the retrieved journal entry is not copied
Specifies the length, in bytes, used for the null value into the program. The specified variable must be a char-
indicators portion of the retrieved entry. This parameter acter variable with a minimum length of 2 characters. If
is valid only if ENTFMT(*TYPE3) or ENTFMT(*TYPE4) is the length of the variable is longer than 2 characters, it
specified. Valid values range from 1 to 8000. is padded on the right with blanks.
If the retrieved journal entry has fewer null value indica-
RTNRCV
tors than the specified field length, the trailing bytes in
Specifies the name of the CL character variable in the
the null value indicators field will be set to 'F0'X.
program into which the journal receiver name from
| INCENT where the returned journal entry was retrieved is copied.
| Specifies whether only the confirmed or both the con- If the CL variable name is not specified, the journal
| firmed and unconfirmed, journal entries are converted for receiver name is not copied into the program. The spec-
| output. This parameter only applies when converting ified variable must be a character variable with a
| journal entries for output from a remote journal. minimum length of 10 characters. If the length of the
variable is longer than 10 characters, it is padded on the
| Confirmed entries are those journal entries which have
right with blanks.
| been sent to this remote journal and the state of the
| Input/Output (I/O) to auxiliary storage for the same RTNRCVLIB
| journal entries on the local journal is known. Specifies the name of the CL character variable in the
program into which journal receiver library name identi-
| Unconfirmed entries are those journal entries which have
fied by the returned journal entry was retrieved is copied.
| been sent to this remote journal, but the state of the
If the CL variable name is not specified, the journal
| Input/Output (I/O) to auxiliary storage for the same
receiver library name is not copied into the program.
| journal entries on the local journal is not known, or the
The specified variable must be a character variable with
| object name information for those journal entries is not
a minimum length of 10 characters. If the length of the
| yet known to the remote journal. Unconfirmed journal
variable is longer than 10 characters, it is padded on the
| entries can only exist within the attached receiver of a
right with blanks.
| remote journal. This only applies if synchronous delivery
| mode is being used for a particular remote journal. RTNJRNE
| *CONFIRMED: Only those journal entries which have Specifies the name of the CL character variable in the
| been confirmed are converted for output. program into which the retrieved journal entry is copied.
If a CL variable name is not specified, the retrieved
| *ALL: All confirmed and unconfirmed journal entries are journal entry is not copied into the program. The speci-
| converted for output. fied variable must be a character variable. If the
RTNSEQNBR retrieved journal entry is longer than the variable's field
Specifies the name of the CL decimal variable in the length, the entry is truncated. If the entry is shorter, it is
program into which the journal entry sequence number padded on the right with blanks.
of the retrieved journal entry is copied. If a CL variable The journal entry can be retrieved in one of four possible
name is not specified, the journal entry sequence formats.
number is not copied into the program. The specified
The following lists show detailed information on the
variable must be a decimal variable that has a length of
format of the retrieved journal entries.
ten positions with no decimal positions.
If ENTFMT(*TYPE1) is specified, then the format of the
fields in the retrieved entry is as follows:

P3-930 OS/400 CL Reference - Part 2 (Full Version)


RTVJRNE

Field Name Field Attributes Field Name Field Attributes


ENTRY LENGTH TYPE(\DEC) LEN(5 ð) ENTRY LENGTH TYPE(\DEC) LEN(5 ð)
SEQUENCE NUMBER TYPE(\DEC) LEN(1ð ð) SEQUENCE NUMBER TYPE(\DEC) LEN(1ð ð)
JOURNAL CODE TYPE(\CHAR) LEN(1) JOURNAL CODE TYPE(\CHAR) LEN(1)
JOURNAL ENTRY TYPE TYPE(\CHAR) LEN(2) JOURNAL ENTRY TYPE TYPE(\CHAR) LEN(2)
DATE TYPE(\CHAR) LEN(6) TIMESTAMP TYPE(\TIMESTAMP) LEN(26)
TIME TYPE(\DEC) LEN(6 ð) JOB NAME TYPE(\CHAR) LEN(1ð)
JOB NAME TYPE(\CHAR) LEN(1ð) USER NAME TYPE(\CHAR) LEN(1ð)
USER NAME TYPE(\CHAR) LEN(1ð) JOB NUMBER TYPE(\DEC) LEN(6 ð)
JOB NUMBER TYPE(\DEC) LEN(6 ð) PROGRAM NAME TYPE(\CHAR) LEN(1ð)
PROGRAM NAME TYPE(\CHAR) LEN(1ð) OBJECT NAME TYPE(\CHAR) LEN(1ð)
OBJECT NAME TYPE(\CHAR) LEN(1ð) OBJECT LIBRARY TYPE(\CHAR) LEN(1ð)
OBJECT LIBRARY TYPE(\CHAR) LEN(1ð) MEMBER NAME TYPE(\CHAR) LEN(1ð)
MEMBER NAME TYPE(\CHAR) LEN(1ð) COUNT/RRN TYPE(\DEC) LEN(1ð ð)
COUNT/RRN TYPE(\DEC) LEN(1ð ð) FLAG TYPE(\CHAR) LEN(1)
FLAG TYPE(\CHAR) LEN(1) COMMIT CYCLE ID TYPE(\DEC) LEN(1ð)
COMMIT CYCLE ID TYPE(\DEC) LEN(1ð ð) USER PROFILE TYPE(\CHAR) LEN(1ð)
RESERVED TYPE(\CHAR) LEN(8) SYSTEM NAME TYPE(\CHAR) LEN(8)
ENTRY-SPECIFIC DATA TYPE(\CHAR) LEN(up to 9844) NULL VALUE INDICATORS TYPE(\CHAR) field-length1
ENTRY-SPECIFIC DATA TYPE(\CHAR) ((up to 985ð)
If ENTFMT(*TYPE2) is specified, the format of the fields
minus (field length))2.
in the retrieved entry is as follows:
Notes:
Field Name Field Attributes
ENTRY LENGTH TYPE(\DEC) LEN(5 ð) 1 The length of this field is the length specified on the
SEQUENCE NUMBER TYPE(\DEC) LEN(1ð ð) NULLINDLEN parameter.
JOURNAL CODE TYPE(\CHAR) LEN(1)
JOURNAL ENTRY TYPE TYPE(\CHAR) LEN(2) 2 The length of this portion of the entry depends on
DATE TYPE(\CHAR) LEN(6) the length specified on the RTNJRNE parameter and
TIME TYPE(\DEC) LEN(6 ð) the length specified on the NULLINDLEN parameter.
JOB NAME TYPE(\CHAR) LEN(1ð)
USER NAME TYPE(\CHAR) LEN(1ð) If ENTFMT(*TYPE4) is specified and a value is specified
JOB NUMBER TYPE(\DEC) LEN(6 ð) on the NULLINDLEN parameter, the format of the
PROGRAM NAME TYPE(\CHAR) LEN(1ð) retrieved journal entry is as follows:
OBJECT NAME TYPE(\CHAR) LEN(1ð) Field Name Field Attributes
OBJECT LIBRARY TYPE(\CHAR) LEN(1ð) ENTRY LENGTH TYPE(\DEC) LEN(5 ð)
MEMBER NAME TYPE(\CHAR) LEN(1ð) SEQUENCE NUMBER TYPE(\DEC) LEN(1ð ð)
COUNT/RRN TYPE(\DEC) LEN(1ð ð) JOURNAL CODE TYPE(\CHAR) LEN(1)
FLAG TYPE(\CHAR) LEN(1) JOURNAL ENTRY TYPE TYPE(\CHAR) LEN(2)
COMMIT CYCLE ID TYPE(\DEC) LEN(1ð ð) TIMESTAMP TYPE(\TIMESTAMP) LEN(26)
USER PROFILE TYPE(\CHAR) LEN(1ð) JOB NAME TYPE(\CHAR) LEN(1ð)
SYSTEM NAME TYPE(\CHAR) LEN(8) USER NAME TYPE(\CHAR) LEN(1ð)
RESERVED TYPE(\CHAR) LEN(2ð) JOB NUMBER TYPE(\DEC) LEN(6 ð)
ENTRY-SPECIFIC DATA TYPE(\CHAR) LEN(up to 9844) PROGRAM NAME TYPE(\CHAR) LEN(1ð)
If ENTFMT(*TYPE3) is specified and a value is specified OBJECT NAME TYPE(\CHAR) LEN(1ð)
on the NULLINDLEN parameter, the format of the OBJECT LIBRARY TYPE(\CHAR) LEN(1ð)
retrieved journal entry is as follows: MEMBER NAME TYPE(\CHAR) LEN(1ð)
COUNT/RRN TYPE(\DEC) LEN(1ð ð)
FLAG TYPE(\CHAR) LEN(1)
COMMIT CYCLE ID TYPE(\DEC) LEN(1ð)
USER PROFILE TYPE(\CHAR) LEN(1ð)
SYSTEM NAME TYPE(\CHAR) LEN(8)
JOURNAL IDENTIFIER TYPE(\CHAR) LEN(1ð)
REF CONSTRAINT TYPE(\CHAR) LEN(1)
TRIGGER TYPE(\CHAR) LEN(1)
RESERVED TYPE(\CHAR) LEN(8)
NULL VALUE INDICATORS TYPE(\CHAR) field-length1
ENTRY-SPECIFIC DATA TYPE(\CHAR) ((up to 983ð)
minus (field length))2
Notes:
1 The length of this field is the length specified on the
NULLINDLEN parameter.

Chapter 2. OS/400 Command Descriptions P3-931


RTVJRNE

2 The length of this portion of the entry depends on Example 2


the length specified on the RTNJRNE parameter and
the length specified on the NULLINDLEN parameter. Assume the following variables are specified:

DCL &ENTNO TYPE(\DEC) LEN(1ð ð)


Examples DCL &JCODE TYPE(\CHAR) LEN(1)
DCL &ETYPE TYPE(\CHAR) LEN(2)
Example 1 DCL &RCVNAME TYPE(\CHAR) LEN(1ð)
DCL &RCVLIB TYPE(\CHAR) LEN(1ð)
Assume the following variables are specified: DCL &JENTRY TYPE(\CHAR) LEN(2ð5)
DCL &SEQ TYPE(\DEC) LEN(1ð ð) and this command is run:
DCL &JRNENT TYPE(\CHAR) LEN(2ðð)
DCL &RCVNAME TYPE(\CHAR) LEN(1ð) RTVJRNE JRN(MYLIB/JRNLA) FILE(LIB1/A MBR3)
DCL &RCVLIB TYPE(\CHAR) LEN(1ð) RCVRNG(RCVLIB/RCV3ð RCVLIB/RCV27)
ORDER(\DESCEND) JRNCDE(R) ENTTYP(UP DL)
and this command is run: JOB(ððð666/QPGMR/PRESTRT) PGM(WAKEUP)
USRPRF(MAC7) ENTFMT(\TYPE2)
RTVJRNE JRN(MYLIB/JRNA) ENTTYP(PR) RTNSEQNBR(&ENTNO) RTNJRNCDE(&JCODE)
RTNSEQNBR(&SEQ#) RTNJRNE(&JRNENT) RTNENTTYP(&ETYPE) RTNRCV(&RCVNAME)
RTNRCVLIB(&RCVLIB) RTNJRNE(&JENTRY)
Since no starting journal entry is specified in this command,
the first entry from the journal receiver that is currently This command gets a journal entry, searching in descending
attached to the journal JRNA in the library MYLIB, when order the journal receiver chain from receiver RCV30 in
starting to retrieve entries, is considered for retrieval. The library RCVLIB to receiver RCV27 in library RCVLIB, jour-
first entry in any receiver is always an identifier for the naled through journal JRNLA in library MYLIB, and copies
previously-attached receiver. This first receiver entry is the entry into the specified CL variables. The retrieved entry
known as a type PR entry, and it contains the name of the is an UPDATE or DELETE entry with journal code R from
previously attached receiver in its entry-specific data. The member MBR3 in file A in library LIB1, created in job
PR entry is the first entry in ascending order in the currently 000666/QPGMR/PRESTRT in program WAKEUP by user
attached receiver; when it is found, the entry is placed into a profile MAC7. The retrieved journal entry includes the user
CL variable named &JRNENT. profile field. The sequence number of the retrieved entry is
copied into CL variable &ENTNO. The journal code of the
Then Change Variable (CHGVAR) can be used to separate
retrieved entry is copied into CL variable &JCODE. The
the name and library of the previous journal receiver, found
entry type of the retrieved entry is copied into CL variable
in the entry specific data, as follows:
&ETYPE. The name of the journal receiver from which the
CHGVAR &RCVNAME (%SST(&JRNENT 126 1ð)) returned entry was retrieved is copied into &RCVNAME. The
CHGVAR &RCVLIB (%SST(&JRNENT 136 1ð)) library name of the journal receiver from which the returned
entry was retrieved is copied into &RCVLIB.

P3-932 OS/400 CL Reference - Part 2 (Full Version)


RTVLIBD

RTVLIBD (Retrieve Library Description) Command


Pgm: B,I REXX: B,I

55──RTVLIBD──LIB(────library-name────)──┬─────────────────────────────────┬──┬───────────────────────────────────┬──────────────5
└─TYPE(────&CL-variable-name────)─┘ └─CRTAUT(────&CL-variable-name────)─┘
5──┬────────────────────────────────┬──┬──────────────────────────────────────┬──┬─────────────────────────────────┬───────────5%
└─ASP(────&CL-variable-name────)─┘ └─CRTOBJAUD(────&CL-variable-name────)─┘ └─TEXT(────&CL-variable-name────)─┘

Purpose The value that can be returned is *SYSVAL, *CHANGE,


*ALL, *USE, *EXCLUDE, or the name of an authori-
The Retrieve Library Description (RTVLIBD) command is zation list.
used in a CL program or REXX procedure to retrieve the
description of a library. ASP
Specifies the name of a decimal variable that is used to
The CL prompt for this command lists the minimum length for retrieve the identifier of the auxiliary storage pool (ASP)
each variable next to the parameters being retrieved. For from which the system allocates storage for the library.
character variables, a single number is shown. For decimal In CL programs, this must be a decimal variable length
variables, two numbers are shown. The first number indi- of (2 0). The following values can be returned:
cates the minimum variable length and the second number
1 The object is in the system auxiliary storage
indicates the minimum number of decimal positions.
pool.
Restriction: The user cannot retrieve the attributes of a 2-16 The object is in a user auxiliary storage
library for which they have *EXCLUDE authority. pool.
Note: To see the parameter and value descriptions for this CRTOBJAUD
command, refer to the online help text. For more Specifies the name of a 10-character variable used to
information about printing the help text, refer to return the auditing value of the library. The values that
“Printing CL Command Descriptions” in Chapter 1. can be retrieved include *SYSVAL, *NONE, *USRPRF,
*CHANGE, and *ALL. See the CRTOBJAUD parameter
Required Parameter on the Create Library (CRTLIB) command for more infor-
mation.
LIB
Specifies the name of the library for which information is TEXT
being retrieved. If a variable is specified, it must be 10 Specifies the name of a 50-character CL variable that is
characters in length and include a library name. used to return the text description to a library.

Optional Parameters Example


CRTLIB LIB(TESTLIB) CRTAUT(\ALL)
TYPE TEXT('John Smith library')
Specifies the name of a 10-character CL variable that is
used to retrieve the type of the library. This command creates John Smith's library.
The value that can be returned is PROD or TEST. DCL &CRTAUT \CHAR1ð
RTVLIBD LIB(TESTLIB)
CRTAUT CRTAUT(&CRTAUT)
Specifies the name of a 10-character CL variable that is
used to return the create authority value of the library. When user Smith calls a CL program containing the above,
the following values are returned:
&CRTAUT \ALL

Chapter 2. OS/400 Command Descriptions P3-933


RTVMBRD

RTVMBRD (Retrieve Member Description) Command


Pgm: B,I REXX: B,I

┌─\LIBL/────────┐
(P) ─┬──────────────────────────────────────────────────┬────────────────────5
55──RTVMBRD──FILE(──┼───────────────┼──file-name──)────
├─\CURLIB/──────┤ │ ┌─\FIRST──────────────────────────────┐ │
└─library-name/─┘ └─MBR(──┼─\LAST───────────────────────────────┼──)─┘
│ ┌─\SAME─┐ │
└─┬─\FIRSTMBR────────────┬──┼───────┼─┘
├─\LASTMBR─────────────┤ ├─\NEXT─┤
├─member-name──────────┤ └─\PRV──┘
└─generic\-member-name─┘
5──┬──────────────────────────────────┬──┬───────────────────────────────┬──┬───────────────────────────────┬───────────────────5
└─RTNSYSTEM(──&CL-variable-name──)─┘ └─RTNLIB(──&CL-variable-name──)─┘ └─RTNMBR(──&CL-variable-name──)─┘
5──┬────────────────────────────────┬──┬─────────────────────────────────────┬──┬────────────────────────────────┬──────────────5
└─FILEATR(──&CL-variable-name──)─┘ └─FILETYPE(──&CL-variable-name──────)─┘ └─SRCTYPE(──&CL-variable-name──)─┘
5──┬───────────────────────────────────┬──┬────────────────────────────────┬──┬────────────────────────────────┬────────────────5
└─SRCCHGDATE(──&CL-variable-name──)─┘ └─CRTDATE(──&CL-variable-name──)─┘ └─EXPDATE(──&CL-variable-name──)─┘
5──┬─────────────────────────────┬──┬──────────────────────────────────┬──┬──────────────────────────────────┬──────────────────5
└─TEXT(──&CL-variable-name──)─┘ └─NBRCURRCD(──&CL-variable-name──)─┘ └─NBRDLTRCD(──&CL-variable-name──)─┘
5──┬──────────────────────────────┬──┬──────────────────────────────────┬──┬──────────────────────────────────┬─────────────────5
└─SHARE(──&CL-variable-name──)─┘ └─DTASPCSIZ(──&CL-variable-name──)─┘ └─ACCPTHSIZ(──&CL-variable-name──)─┘
5──┬────────────────────────────────┬──┬────────────────────────────────┬──┬────────────────────────────────┬───────────────────5
└─CHGDATE(──&CL-variable-name──)─┘ └─SAVDATE(──&CL-variable-name──)─┘ └─RSTDATE(──&CL-variable-name──)─┘
5──┬───────────────────────────────────┬──┬────────────────────────────────┬──┬─────────────────────────────────┬───────────────5
└─NBRDTAMBRS(──&CL-variable-name──)─┘ └─USEDATE(──&CL-variable-name──)─┘ └─USECOUNT(──&CL-variable-name──)─┘
5──┬──────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────5%
└─RESETDATE(──&CL-variable-name──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose Ÿ The days count used.


Ÿ The date and days count was reset.
The Retrieve Member Description (RTVMBRD) command is
Note: To see the parameter and value descriptions for this
used in a CL program or REXX procedure to retrieve (return)
command, refer to the online help text. For more
the member-level information (in CL variables) from a data-
information about printing the help text, refer to
base file.
“Printing CL Command Descriptions” in Chapter 1.
The values are returned (copied) to the specified CL vari-
ables. The following kinds of member information can be Required Parameters
retrieved:
FILE
Ÿ The library name.
Specifies the qualified name of the file that contains the
Ÿ The member name.
member description being retrieved.
Ÿ The file attribute.
Ÿ The file type. Note: *OBJOPR authority to the file and *READ
Ÿ The source type. authority to the library are required for the
Ÿ The source date. member description being retrieved.
Ÿ The date created. The name of the file can be qualified by one of the fol-
Ÿ The expiration date. lowing library values:
Ÿ The member text.
Ÿ The number of nondeleted records. *LIBL: All libraries in the job's library list are
Ÿ The number of deleted records. searched until the first match is found.
Ÿ The open data path status (shared or not shared). *CURLIB: The current library for the job is
Ÿ The data space size. searched. If no library is specified as the current
Ÿ The access path size. library for the job, the QGPL library is used.
Ÿ The date changed.
Ÿ The date saved. library-name: Specify the name of the library to be
Ÿ The date restored. searched.
Ÿ The number of data members. file-name: Specify the name of the file.
Ÿ The last date used.

P3-934 OS/400 CL Reference - Part 2 (Full Version)


RTVMBRD

Optional Parameters (retrieves the attribute for a physical file member) and
*LF (retrieves the attribute for a logical file member).
MBR
Specifies the member whose description is retrieved. FILETYPE
Specifies the name of a 5-character CL variable used to
*FIRST: The first member in the database file is used. retrieve the file type. The possible values are *DATA
*LAST: The last member of the specified physical file is (retrieves the file type for a data member) and *SRC
retrieved. (retrieves the file type for a source member).
Element 1: Member to Retrieve SRCTYPE
*FIRSTMBR: The first member in a list sorted by name Specifies the name of a 10-character CL variable used
is retrieved. to retrieve the source member type (if this is a source
member). Blanks are returned if this is not a source
*LASTMBR: The last member in a list sorted by name member.
is retrieved.
SRCCHGDATE
member-name: Specify the name of the reference
Specifies the name of a 13-character CL variable used
member. The reference member is a base from which
to retrieve the century, date, and time the last source file
the *NEXT, *PRV, or *SAME member is retrieved.
member was changed. The format is
generic*-member-name: Specify the generic member CYYMMDDHHMMSS where C=Century (0=1940 through
name being retrieved. A generic name is a character 1999 and 1=2000 through 2039), Y=Year, M=Month,
string of one or more characters followed by an asterisk D=Day, H=Hour, M=Minutes, and S=Seconds. Blanks
(*); for example, ABC*. The asterisk substitutes for any are returned if no date is available or if the date of
valid characters. A generic name specifies all objects remote non-AS/400 system or non-System/38 files are
with names that begin with the generic prefix for which retrieved.
the user has authority. If an asterisk is not included with
the generic (prefix) name, the system assumes it to be CRTDATE
the complete object name. If the complete object name Specifies the name of a 13-character CL variable used
is specified, and multiple libraries are searched, multiple to retrieve the member creation century, date, and time.
objects can be retrieved only if *ALL or *ALLUSR library The format is CYYMMDDHHMMSS where C=Century
values can be specified for the name. For more infor- (0=1940 through 1999 and 1=2000 through 2039),
mation on the use of generic names, refer to “Generic Y=Year, M=Month, D=Day, H=Hour, M=Minutes, and
Object Names” in Chapter 2. S=Seconds.

Element 2: Operation to Perform on Member EXPDATE


Specifies the name of a 7-character CL variable used to
*SAME: The value does not change.
retrieve the member expiration century, date, and time.
*NEXT: The member immediately after the reference The format is CYYMMDD where C=Century (0=1940
member is retrieved. through 1999 and 1=2000 through 2039), Y=Year,
*PRV: The member immediately before the reference M=Month, and D=Day. *NONE is returned if no date is
member is retrieved. available.

RTNSYSTEM TEXT
Specifies the name of a 4-character CL variable used to Specifies the name of a 50-character CL variable used
retrieve an indication of the system from which the to retrieve the text description of the file member. More
description is retrieved. The possible values are *LCL information on this parameter is in Appendix A,
(file found on the local system) and *RMT (file found on “Expanded Parameter Descriptions.”
remote system). NBRCURRCD
RTNLIB Specifies the name of a 10-position decimal CL variable
Specifies the name of a 10-character CL variable used used to retrieve the current number of nondeleted
to retrieve the name of the library where the specified records in the member. If the member is a keyed logical
file is located. member, the number of index entries is returned. For
nonkeyed logical members, the number of nondeleted
RTNMBR records in the based-on physical file member is returned.
Specifies the name of a 10-character CL variable used
to retrieve the name of the member whose description is NBRDLTRCD
being retrieved. Specifies the name of a 10-position decimal CL variable
used to retrieve the current number of deleted records in
FILEATR this member. Zero (0) is returned for keyed logical files.
Specifies the name of a 3-character CL variable used to For nonkeyed logical files, the number of nondeleted
retrieve the file attribute. The possible values are *PF records in the based-on physical file member is returned.

Chapter 2. OS/400 Command Descriptions P3-935


RTVMBRD

SHARE USECOUNT
Specifies whether the open data path (ODP) for the Specifies the name of a 5 position decimal CL variable
member description is shared with other programs in the used to return the number of days the object has been
routing step. When an ODP is shared, the programs used. If the object does not have a last used date, 0 will
accessing the file share facilities such as the file status be returned.
and the buffer.
RESETDATE
More information on shared database files is in the DB2 Specifies the name of a 7-character CL variable that is
for AS/400 Database Programming book. used to return the date the days-used count was last
reset to 0. The date will be returned in the form
DTASPCSIZ
CYYMMDD where C=Century (0=1940 through 1999
Specifies the name of a 15-position decimal CL variable
and 1=2000 through 2039), Y=Year, M=Month, and
used to retrieve the data space size (in bytes) of this
D=Day. If the days used count has not been reset,
member. Zero (0) is returned if this is a logical member.
blanks will be returned.
ACCPTHSIZ
Specifies the name of a 12-position decimal CL variable
used to retrieve the access path size (in bytes) for this
Examples
member. Zero (0) is returned if the member is non-
keyed. Remote non-AS/400 system and non-System 38 Assume the user has a file named MYFILE in library MYLIB
files return a value of zero (0). (which is the current library) with members QMEMBER,
BMEMBER, ZMEMBER, and JMEMBER (created in that
CHGDATE order).
Specifies the name of a 13-character CL variable used
to retrieve the member change century, date, and time. Also assume the following variables are specified in the CL
The format is CYYMMDDHHMMSS where C=Century program:
(0=1940 through 1999 and 1=2000 through 2039),
Y=Year, M=Month, D=Day, H=Hour, M=Minutes, and DCL &LIB TYPE(\CHAR) LEN(1ð)
S=Seconds. DCL &MBR TYPE(\CHAR) LEN(1ð)
DCL &SYS TYPE(\CHAR) LEN(4)
SAVDATE DCL &MTYPE TYPE(\CHAR) LEN(5)
Specifies the name of a 13-character CL variable used DCL &CRTDATE TYPE(\CHAR) LEN(13)
to retrieve the member save century, date, and time. DCL &CHGDATE TYPE(\CHAR) LEN(13)
The format is CYYMMDDHHMMSS where C=Century DCL &TEXT TYPE(\CHAR) LEN(5ð)
DCL &NBRRCD TYPE(\DEC) LEN(1ð ð)
(0=1940 through 1999 and 1=2000 through 2039),
DCL &SIZE TYPE(\DEC) LEN(1ð ð)
Y=Year, M=Month, D=Day, H=Hour, M=Minutes, and
S=Seconds. Blanks are returned if no date is available. This command is run:
Remote non-AS/400 system and non-System 38 files
return blanks. RTVMBRD FILE(\CURLIB/MYFILE) MBR(BMEMBER \SAME)
RTNLIB(&LIB) RTNSYSTEM(&SYS) RTNMBR(&MBR)
RSTDATE FILEATR(&MTYPE) CRTDATE(&CRTDATE) TEXT(&TEXT)
Specifies the name of a 13-character CL variable used NBRCURRCD(&NBRRCD) DTASPCSIZ(&SIZE)
to retrieve the member restore century, date, and time.
The format is CYYMMDDHHMMSS where C=Century The requested information is placed in the CL variables as
(0=1940 through 1999 and 1=2000 through 2039), follows:
Y=Year, M=Month, D=Day, H=Hour, M=Minutes, and
Ÿ The current library name (MYLIB) is placed in the CL
S=Seconds. Blanks are returned if there is no date
variable named &LIB.
available.
Ÿ The system on which MYFILE was found is placed in the
NBRDTAMBRS CL variable named &SYS. (*LCL means the file was
Specifies the name of a 2-position decimal CL variable found on the local system, and *RMT means the file was
used to retrieve the number of data members for this found on a remote system.)
logical member. If the member is a physical member,
zero (0) is returned. Ÿ The member name (BMEMBER) is placed in the CL var-
iable named &MBR.
USEDATE
Ÿ The file attribute of MYFILE is placed in the CL variable
Specifies the name of a 7-character CL variable that is
named &MTYPE. (*DATA means the member is a data
used to retrieve the date the object was used last. The
member, and *SRC means the file is a source member.)
date will be returned in the form CYYMMDD where
C=Century (0=1940 through 1999 and 1=2000 through Ÿ The creation date of BMEMBER is placed in the CL vari-
2039), Y=Year, M=Month, and D=Day. If the object able named &CRTDATE.
does not have a last-used date, blanks will be returned. Ÿ The text associated with BMEMBER is placed in the CL
variable called &TEXT.

P3-936 OS/400 CL Reference - Part 2 (Full Version)


RTVMBRD

Ÿ The current number of records in BMEMBER is placed RTVMBRD FILE(\CURLIB/MYFILE) MBR(ZMEMBER \PRV)
in the CL variable called &NBRRCD. RTNMBR(&MBR) CHGDATE(&CHGDATE) TEXT(&TEXT)
Ÿ The size of BMEMBER's data space (in bytes) is placed The requested information is placed in the CL variables as
in the CL variable called &SIZE. follows:
This command is run next: Ÿ The member name (QMEMBER since it is the member
just previous to ZMEMBER in a name ordered list) is
RTVMBRD FILE(&LIB/MYFILE) MBR(&MBR \NEXT) placed in the CL variable named &MBR.
RTNMBR(&MBR) CRTDATE(&CRTDATE) TEXT(&TEXT) Ÿ The date QMEMBER was last changed is placed in the
NBRCURRCD(&NBRRCD) DTASPCSIZ(&SIZE) CL variable named &CHGDATE.
Ÿ The text associated with QMEMBER is placed in the CL
Then the requested information is placed in the CL variables
variable called &TEXT.
as follows:
Ÿ The next members name after BMEMBER (JMEMBER If only the first part of the member name is known, the user
since the file is searched in name order) in MYFILE is can do a Generic* (or partial name) search of the list of
placed in the CL variable named &MBR. members, as follows:
Ÿ The creation date of JMEMBER is placed in the CL vari- RTVMBRD FILE(\LIBL/MYFILE) MBR(JM\) RTNMBR(&MBR)
able named &CRTDATE. CHGDATE(&CHGDATE) TEXT(&TEXT)
Ÿ The text associated with JMEMBER is placed in the CL
The requested information is placed in the CL variables as
variable called &TEXT.
follows:
Ÿ The current number of records in JMEMBER is placed in
Ÿ The member name (JMEMBER since it is the first
the CL variable called &NBRRCD.
member starting with the characters JM in a name
Ÿ The size of JMEMBER’s data space (in bytes) is placed ordered list) is placed in the CL variable named &MBR.
in the CL variable called &SIZE. Ÿ The date JMEMBER was last changed is placed in the
CL variable named &CHGDATE.
The file can also be searched backwards. An example is:
Ÿ The text associated with JMEMBER is placed in the CL
variable called &TEXT.

Chapter 2. OS/400 Command Descriptions P3-937


RTVMSG

RTVMSG (Retrieve Message) Command


Pgm: B,I REXX: B,I

┌─\LIBL/────────┐
(P)────────────────────────────────────5
55──RTVMSG──MSGID(──message-identifier──)──MSGF(──┼───────────────┼──message-file-name──)───
├─\CURLIB/──────┤
└─library-name/─┘
┌─\JOB───────────────────────────┐
5──CCSID(──┼─\HEX───────────────────────────┼──)──┬───────────────────────────────┬──┬────────────────────────────┬─────────────5
└─coded-character-set-identifier─┘ └─MSGDTA(──&CL-variable-name──)─┘ └─MSG(──&CL-variable-name──)─┘
5──┬───────────────────────────────┬──┬───────────────────────────────┬──┬──────────────────────────────────┬───────────────────5
└─MSGLEN(──&CL-variable-name──)─┘ └─SECLVL(──&CL-variable-name──)─┘ └─SECLVLLEN(──&CL-variable-name──)─┘
5──┬────────────────────────────┬──┬───────────────────────────────┬──┬───────────────────────────────┬─────────────────────────5
└─SEV(──&CL-variable-name──)─┘ └─ALROPT(──&CL-variable-name──)─┘ └─LOGPRB(──&CL-variable-name──)─┘
5──┬─────────────────────────────────┬──┬─────────────────────────────────┬─────────────────────────────────────────────────────5
└─TXTCCSID(──&CL-variable-name──)─┘ └─DTACCSID(──&CL-variable-name──)─┘
┌─\JOB───────────────────────────┐
5──MDTACCSID(──┼─\HEX───────────────────────────┼──)───────────────────────────────────────────────────────────────────────────5%
└─coded-character-set-identifier─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose MSGF
Specifies the qualified name of the message file that
The Retrieve Message (RTVMSG) command is used in a CL contains the predefined message being retrieved.
program or REXX procedure to retrieve a specified prede-
The name of the message file can be qualified by one of
fined message from a message file and to copy it into CL
the following library values:
variables. Substitution values can be specified in the
MSGDTA parameter (as a single character string containing *LIBL: All libraries in the job's library list are
one or more concatenated message data fields) to replace searched until the first match is found.
the substitution variables in the predefined message text.
*CURLIB: The current library for the job is
The program can later write the message to an output device
searched. If no library is specified as the current
file to be printed, for example.
library for the job, the QGPL library is used.
The CL prompt for this command lists the minimum length for library-name: Specify the name of the library to be
retrieved variables next to the parameters that have a searched.
minimum length. For character variables, a single number is
shown. For decimal variables, two numbers are shown. The message-file-name: Specify the name of the message
first number indicates the minimum variable length and the file to use.
second number indicates the minimum number of decimal
positions. Optional Parameters
Restriction: The user of this command must have *USE CCSID
authority for the message file and the library in which the Specifies the coded character set identifier (CCSID) in
message file is stored. which you want your message text returned. This
Note: To see the parameter and value descriptions for this applies only to text returned in the MSG and SECLVL
command, refer to the online help text. For more parameters. When replacement data is substituted into
information about printing the help text, refer to the text returned in the MSG or SECLVL parameters,
“Printing CL Command Descriptions” in Chapter 1. only the part of the replacement data that is defined as a
character that can be converted (*CCHAR) is converted.
The rest of the replacement data will not be converted.
Required Parameters For more information about the *CCHAR field, see the
Add Message Description (ADDMSGD) command.
MSGID
Specifies the message identifier of the predefined *JOB: The retrieved message description is converted
message being retrieved from the specified message to the CCSID of the job before being returned.
file. *HEX: The retrieved message description is not con-
verted before being returned.

P3-938 OS/400 CL Reference - Part 2 (Full Version)


RTVMSG

coded-character-set-identifier: Specify the CCSID that For more information on coding this parameter, refer to
you want your message description converted to before the description of the MSGDTA parameter in the
it is returned. SNDUSRMSG or SNDPGMMSG commands.
Note: The valid values range from 1 through 65535. MSG
See the International Application Development Specifies the name of the CL character variable in the
book for a list of valid CCSID values. Only those program into which the first-level message text from the
CCSID values that the job can be changed to are retrieved message is copied. If a CL variable name is
accepted. not specified, the text is not copied into the program.
For more information on the message handler and its The specified variable must be a character variable. If
use of CCSIDs, see the National Language Support the retrieved text is longer than the variable's field
book. length, the text is truncated. If the text is shorter, it is
MSGDTA padded to the right with blanks. Although this is a
Specifies the substitution values that are used in the variable-length field, most first-level message text is
retrieved message if the predefined message contains designed to be less than 132 characters.
substitution variables. Either a character string or a CL MSGLEN
variable containing the character string can be specified. Specifies the name of the CL decimal variable in the
As many substitution values can be specified in the program into which the total length of the text available
character string as there are substitution variables in the to be retrieved is copied. The length specified is the
predefined message. The values, which take the place total length after the substitution values (specified in the
of the substitution variables defined in the message text MSGDTA parameter) are placed in the text.
when the message was defined, must be specified by
the following rules: The specified variable must be a decimal variable that
has a length of five digits. If a CL variable name is not
Ÿ Multiple values must be concatenated to form a specified, the length is not copied into the program.
single character string. The length of the entire
character string of concatenated substitution values SECLVL
cannot exceed 512 characters. The CL Program- Specifies the name of the CL character variable in the
ming book has more details. program into which the second-level message text of the
retrieved message is copied. If a variable name is not
Ÿ Multiple values must be specified in the same order specified, the second-level message text is not copied
in the character string as the substitution variables into the program.
were defined in the FMT parameter of the
ADDMSGD command. If the retrieved second-level message text is longer than
the variable's field length, the text is truncated. If the
Ÿ Each value must be specified as long as its associ- text is shorter, it is padded on the right with blanks.
ated variable was defined, and the specified char- Although this is a variable length field, most second-level
acter string must be the same length as the sum of message text is designed to be less than 3000 charac-
the message data fields defined in the message ters.
description.
SECLVLLEN
Ÿ For multiple values, each substitution value can be
Specifies the name of the CL decimal variable in the
specified as a CL program constant or CL variable;
program into which the total length of the second-level
that is, any combination of constants and variables
message text being retrieved is copied. The length
can be specified if they are first concatenated into
specified is the total length after the substitution values
one character string and they are in the same
(specified in the MSGDTA parameter) are placed in the
format and sequence expected.
second-level message text.
Ÿ The length of the substitution value should be the
The specified variable must be a decimal variable that
same length as the length defined for the substi-
has a length of five positions. If a CL variable name is
tution variables. If the substitution value length is
not specified, the length is not copied into the program.
longer than the substitution variable length, the
message data is truncated. If the substitution value SEV
is shorter, it becomes a null field. Specifies the name of the CL decimal variable into which
the severity code of the retrieved message is copied.
Ÿ The message data supplied by this command that
The specified variable must be a decimal variable that
corresponds to a *CCHAR type field is assumed to
has a length of two positions. If a variable name is not
be in the CCSID of the job running this command
specified, the severity code of the retrieved message is
unless the MDTACCSID parameter is coded. For
not copied into the program.
more information on the *CCHAR type field, see the
Add Message Description (ADDMSGD) command.

Chapter 2. OS/400 Command Descriptions P3-939


RTVMSG

ALROPT If they are not equal and they are not 65535, a conver-
Specifies the name of the CL variable into which the sion error occurred.
alert option of the retrieved message is copied. The var-
MDTACCSID
iable must be a character variable nine positions long.
Specifies the CCSID that the supplied message data is
LOGPRB to be considered in. This only applies to the parts of the
Specifies the name of the variable into which a Y (yes) replacement data that are defined as *CCHAR. The rest
or N (no) is returned indicating whether or not the of the replacement data will never be converted and is
message can be logged in the service activity log. The assumed to have a CCSID of 65535.
variable must be a character variable one position long.
*JOB: The message data supplied is assumed to be in
TXTCCSID the CCSID of the job running this command.
Specifies the name of the CL variable, if any, used to *HEX: The message data supplied is assumed to be
return the coded character set identifier (CCSID) associ- 65535 and is never converted.
ated with the text returned by the MSG and SECLVL
parameters. If a conversion error occurs, or if the
coded-character-set-identifier: The message data sup-
plied is assumed to be in the CCSID specified. Valid
CCSID you requested the text to be converted to is
values range from 1 through 65535. For a list of valid
65535, the CCSID that the message description is
CCSID values, see the International Application Devel-
stored in is returned. Otherwise, the CCSID you wanted
the text converted to is returned. If you do not want the
opment book.
text converted before it is returned to you but you do
want to know the CCSID that the message description is Examples
stored in, specify 65535 on the CCSID parameter. The
CCSID that the message description is stored in is Example 1: Replacing Substitution Variables
returned in the TXTCCSID parameter. You can also RTVMSG MSGID(UINð145) MSGF(INVN) MSG(&WORK)
check for a conversion error by comparing the CCSID MSGDTA('any old time')
you passed in against the TXTCCSID returned. If they
are not equal and they are not 65535, a conversion error This command retrieves the message text of the message
occurred. UIN0145 stored in the INVN message file. The retrieved text
is copied into the CL variable &WORK after the substitution
DTACCSID variables are replaced with the values any, old, and time.
Specifies the name of the CL variable, if any, used to This example assumes that the substitution variables &1, &2,
return the coded character set identifier (CCSID) associ- and &3 have been defined in the message as character vari-
ated with the replacement data defined as *CCHAR. All ables, each 4 characters long.
other replacement data is not converted before it is
returned. If a conversion error occurs, or if the CCSID Example 2: Retrieving First- and Second-Level Message
you requested the text to be converted to is 65535, the Text
CCSID specified on the MDTACCSID parameter is
RTVMSG MSGID(UINð15ð) MSGF(INV) MSG(&MSG)
returned. Otherwise the CCSID you wanted the text
SECLVL(&SECLVL)
converted to is returned. In the case when there is no
*CCHAR replacement data in the text, 65535 is returned. This command retrieves the first- and second-level message
You can check for a conversion error by comparing the text of the message UIN0150, which is stored in message file
CCSID you passed in against the DTACCSID returned. INV, and moves it into the CL variables &MSG and
&SECLVL.

P3-940 OS/400 CL Reference - Part 2 (Full Version)


RTVNETA

RTVNETA (Retrieve Network Attributes) Command


Pgm: B,I REXX: B,I

(P)─┬────────────────────────────────┬──┬───────────────────────────────────┬──┬─────────────────────────────────┬───5
55──RTVNETA───
└─SYSNAME(──&CL-variable-name──)─┘ └─PNDSYSNAME(──&CL-variable-name──)─┘ └─LCLNETID(──&CL-variable-name──)─┘
5──┬──────────────────────────────────┬──┬───────────────────────────────────┬──┬────────────────────────────────┬──────────────5
└─LCLCPNAME(──&CL-variable-name──)─┘ └─LCLLOCNAME(──&CL-variable-name──)─┘ └─DFTMODE(──&CL-variable-name──)─┘
5──┬─────────────────────────────────┬──┬───────────────────────────────┬──┬──────────────────────────────────┬─────────────────5
└─NODETYPE(──&CL-variable-name──)─┘ └─DTACPR(──&CL-variable-name──)─┘ └─DTACPRINM(──&CL-variable-name──)─┘
5──┬──────────────────────────────────┬──┬────────────────────────────┬──┬──────────────────────────────────┬───────────────────5
└─MAXINTSSN(──&CL-variable-name──)─┘ └─RAR(──&CL-variable-name──)─┘ └─NETSERVER(──&CL-variable-name──)─┘
5──┬───────────────────────────────┬──┬─────────────────────────────────┬──┬─────────────────────────────────┬──────────────────5
└─ALRSTS(──&CL-variable-name──)─┘ └─ALRPRIFP(──&CL-variable-name──)─┘ └─ALRDFTFP(──&CL-variable-name──)─┘
5──┬─────────────────────────────────┬──┬─────────────────────────────────┬──┬───────────────────────────────┬──────────────────5
└─ALRBCKFP(──&CL-variable-name──)─┘ └─ALRRQSFP(──&CL-variable-name──)─┘ └─ALRFTR(──&CL-variable-name──)─┘
5──┬──────────────────────────────────┬──┬──────────────────────────────────┬──┬────────────────────────────────┬───────────────5
└─ALRFTRLIB(──&CL-variable-name──)─┘ └─ALRLOGSTS(──&CL-variable-name──)─┘ └─ALRCTLD(──&CL-variable-name──)─┘
5──┬──────────────────────────────────┬──┬─────────────────────────────┬──┬────────────────────────────────┬────────────────────5
└─ALRHLDCNT(──&CL-variable-name──)─┘ └─MSGQ(──&CL-variable-name──)─┘ └─MSGQLIB(──&CL-variable-name──)─┘
5──┬─────────────────────────────┬──┬────────────────────────────────┬──┬───────────────────────────────┬───────────────────────5
└─OUTQ(──&CL-variable-name──)─┘ └─OUTQLIB(──&CL-variable-name──)─┘ └─JOBACN(──&CL-variable-name──)─┘
5──┬───────────────────────────────┬──┬───────────────────────────────┬──┬──────────────────────────────────┬───────────────────5
└─MAXHOP(──&CL-variable-name──)─┘ └─DDMACC(──&CL-variable-name──)─┘ └─DDMACCLIB(──&CL-variable-name──)─┘
5──┬───────────────────────────────┬──┬──────────────────────────────────┬──┬───────────────────────────────────┬───────────────5
└─PCSACC(──&CL-variable-name──)─┘ └─PCSACCLIB(──&CL-variable-name──)─┘ └─DFTNETTYPE(──&CL-variable-name──)─┘
5──┬──────────────────────────────────┬──┬───────────────────────────────────┬──┬──────────────────────────────────┬────────────5
| └─DFTCNNLST(──&CL-variable-name──)─┘ └─ALWVRTAPPN(──&CL-variable-name──)─┘ └─ALWHPRTWR(──&CL-variable-name──)─┘
5──┬───────────────────────────────────┬──┬──────────────────────────────────┬─────────────────────────────────────────────────5%
| └─VRTAUTODEV(──&CL-variable-name──)─┘ └─HPRPTHTMR(──&CL-variable-name──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose PNDSYSNAME
Specifies the name of the CL variable that receives the
The Retrieve Network Attributes (RTVNETA) command is pending system name. Specify the name of the char-
used in a CL program or REXX procedure to retrieve the acter variable with a minimum length of 8 characters.
network attributes of the system. The value returned is blank if no pending system name
is provided. If the system name has fewer characters
The values are returned (copied) to the specified CL vari- than the variable allows, the value is padded on the right
ables. with blanks.
Restriction: The attributes of the network attribute and the LCLNETID
receiving CL variable must be compatible. Specifies the name of the CL variable that receives the
Note: To see the parameter and value descriptions for this current local network ID. Specify the name of the char-
command, refer to the online help text. For more acter variable with a minimum length of 8 characters. If
information about printing the help text, refer to the network ID has fewer characters than the variable
“Printing CL Command Descriptions” in Chapter 1. allows, the value is padded on the right with blanks.

LCLCPNAME
Optional Parameters Specifies the name of the CL variable that receives the
current local control point. Specify the name of the char-
SYSNAME acter variable with a minimum length of 8 characters. If
Specifies the name of the CL variable that receives the the control point has fewer characters than the variable
current system name. Specify the name of a character allows, the value is padded on the right with blanks.
variable with a minimum length of 8 characters. If the
system name has fewer characters than the variable LCLLOCNAME
allows, the value is padded on the right with blanks. Specifies the local location name.

Chapter 2. OS/400 Command Descriptions P3-941


RTVNETA

DFTMODE Specify the name of the decimal variable with a


Specifies the name of the CL variable that receives the minimum length of 10 digits without decimal positions.
default mode name. Specify the name of the character
The values that can be returned in the variable as the
variable with a minimum length of 8 characters. If the
intermediate node data compression levels are:
default mode has fewer characters than the variable
allows, the value is padded on the right with blanks. 0 *NONE: The remote systems are not notified of a
need to compress data when the AS/400 system is
NODETYPE
an SNA intermediate node.
Specifies the name of the CL variable that receives the
current APPN nodetype. Specify the name of the char- -1 *REQUEST: The remote systems are requested to
acter variable with a minimum length of 8 characters. compress data when the AS/400 system is an SNA
intermediate node.
The values that can be returned in the variable as the
node type are: MAXINTSSN
Specifies the name of the CL variable that receives the
*ENDNODE
maximum number of intermediate sessions. Specify the
The node does not provide network services
name of the decimal variable with a minimum length of 5
to other nodes but may participate in the
digits without decimal positions.
APPN network by using the services of an
attached network server or may operate in a RAR
peer-to-peer environment similar to Specifies the name of the CL variable that receives the
migration end nodes. route addition resistance. Specify the name of the
decimal variable with a minimum length of 5 digits
*NETNODE
without decimal positions.
The node provides intermediate routing,
route selection services, and distributed NETSERVER
directory services for local users and to end Specifies the name of the CL variable that receives the
nodes and migration end nodes that it is list of network node servers. Specify the name of a
serving. character variable with a minimum length of 85 charac-
ters. If the server control point name or network ID has
DTACPR
fewer characters than the variable allows, the value is
Specifies the name of the CL variable that receives the
padded on the right with blanks. The list can contain
current level of data compression. Specify the name of
five node servers. Each server has the form: Network
the decimal variable with a minimum length of 10 digits
ID (9 characters) followed by the server name (8 charac-
without decimal positions.
ters). There are no separators. The network ID may
The values that can be returned in the variable as the contain the value *LCLNETID which specifies that the
data compression level are: current network ID is used. If less than five node
servers are specified, the remaining ones contain
0 *NONE: Data compression is not allowed on the
hexadecimal zeros for a name. As soon as the first null
session.
name is encountered in the list, it is safe to assume that
-1 *REQUEST: Data compression is requested on the the remaining names will also be null.
session by the local system. However, the request
can be refused or changed to a lower compression ALRSTS
level by the remote system. Data compression is Specifies the name of the CL variable that receives the
allowed on the session if requested by the remote current system alert status. Specify the name of a char-
system. acter variable with a minimum length of 10 characters. If
the alert status value has fewer characters than the vari-
-2 *ALLOW: Data compression is allowed on the able allows, the value is padded on the right with blanks.
session by the local system if requested by a
remote system. The local system does not request The values that can be returned in the variable as the
compression. current system alert status are:

-3 *REQUIRE: Data compression is required on the *ON Alert processing is currently active.
session. If the remote system does not change the *UNATTEND Alert processing is currently active, but
levels of compression to the local system's exact the system is unattended.
requested levels, the session is not established.
The data compression levels that the local system *OFF Alert processing is currently inactive.
requires are the specified levels. ALRPRIFP
DTACPRINM Specifies the name of the CL variable that receives the
Specifies the name of the CL variable that receives the primary alert focal point. Specify the name of a char-
current level of intermediate node data compression. acter variable with a minimum length of 10 characters. If
the primary focal point value has fewer characters than

P3-942 OS/400 CL Reference - Part 2 (Full Version)


RTVNETA

the variable allows, the value is padded on the right with The values that can be returned in the variable as the
blanks. current alert logging status are:
The values that can be returned in the variable as the *NONE Do not log alerts.
primary alert focal point are:
*LOCAL Log only locally generated alerts.
*NO The system is not an alert primary focal *RCV Log only alerts received from other nodes.
point.
*ALL Log both locally generated and incoming
*YES The system is an alert primary focal point. alerts.
ALRDFTFP ALRCTLD
Specifies the name of the CL variable that receives the Specifies the name of the CL variable that receives the
default alert focal point. Specify the name of a character name of the controller through which alert messages are
variable with a minimum length of 10 characters. If the sent to another system when alert processing is active.
default focal point value has fewer characters than the Specify the name of a character variable with a minimum
variable allows, the value is padded on the right with length of 10 characters. If the alert controller name has
blanks. fewer characters than the variable allows, the value is
The values that can be returned in the variable as the padded on the right with blanks.
default alert focal point are: The values that can be returned in the variable are:
*NO The system is not an alert default focal *NONE There is no controller for alerts.
point.
controller-name
*YES The system is an alert default focal point.
Specifies the name of the controller being
ALRBCKFP used for alerts in an alert controller session.
Specifies the name of the CL variable that receives the This controller is ignored if the system has a
name of the system that provides alert focal point ser- primary or default alert focal point (if, for
vices if the primary focal point is unavailable. You must example, the node is in another system's
specify the name of a character variable with a minimum sphere of control).
length of 10 characters. If the back up system name
ALRHLDCNT
has fewer characters than the variable allows, the value
Specifies the name of the CL variable that receives the
is padded on the right with blanks.
maximum number of alerts that are created before the
ALRRQSFP alerts are sent over the alert controller session
Specifies the name of the CL variable that receives the (ALRCTLD network attribute). The alerts are held
name of the system that is requested to provide alert (queued) by the system until the specified number of
focal point services. You must specify the name of a alerts have been created. This parameter can be used
character variable with a minimum length of 10 charac- to manage alerts that are sent over a limited resource by
ters. If the requesting system name has fewer charac- reducing the number of times alerts are sent. Specify
ters than the variable allows, the value is padded on the the name of a decimal variable with a total length of 5
right with blanks. digits without decimal positions. The maximum number
of alerts that can be created before the alerts are sent is
ALRFTR 32,767.
Specifies the name of the CL variable that receives the
Note: The ALRHLDCNT network attribute only applies
name of the active alert filter. You must specify the
when the ALRCTLD network attribute is used.
name of a character variable with a minimum length of
When management services sessions, APPN,
10 characters. If the alert filter name has fewer charac-
and sphere of control support are used, the
ters than the variable allows, the value is padded on the
ALRHLDCNT value is ignored.
right with blanks.
The value that can be returned in the variable as the
ALRFTRLIB
maximum number of alerts is:
Specifies the name of the CL variable that receives the
name of the library that contains the alert filter definition.
*NOMAX The alerts are held indefinitely. The current
Specify the name of a character variable with a minimum
alert hold count is the maximum value. The
length of 10 characters. If the library name has fewer
alerts can be sent at a later time by
characters than the variable allows, the value is padded
changing the ALRHLDCNT value to a lower
on the right with blanks.
value.
ALRLOGSTS
MSGQ
Specifies the name of the CL variable that receives the
Specifies the name of the CL variable that receives the
current alert logging status. Specify the name of a char-
group message queue name. This must be a character
acter variable with a minimum length of 10 characters.
variable with a minimum length of 10 characters. If the

Chapter 2. OS/400 Command Descriptions P3-943


RTVNETA

message queue name has fewer characters than the value has fewer characters than the variable allows, the
variable allows, the value is padded on the right with value is padded on the right with blanks.
blanks.
The values that can be returned in the variable as the
MSGQLIB current system action for DDM requests are:
Specifies the name of the CL variable that receives the
*REJECT The system does not allow any DDM
name of the library that contains the system-default
requests from remote systems. However,
network message queue. Specify the name of a char-
the system may use DDM to access files on
acter variable with a minimum length of 10 characters. If
remote systems. (A remote system cannot
the library name has fewer characters than the variable
access any file on a system that specifies
allows, the value is padded on the right with blanks.
*REJECT).
OUTQ *OBJAUT All file requests are allowed and controlled
Specifies the name of the CL variable that receives the by the object authorizations on the system
system default network output queue name. Specify the (normal system object level security).
name of a character variable with a minimum length of
10 characters. If the output queue name has fewer
program-name
Specifies the name of the customer vali-
characters than the variable allows, the value is padded
dation program that can supplement object
on the right with blanks.
level security. This user-exit program can
OUTQLIB restrict user access to *PUBLIC and private
Specifies the name of the CL variable that receives the files. The target DDM support calls the user
name of the library that contains the system-default program for each reference to a file. The
network message queue. Specify the name of a char- user-exit program indicates to DDM if the
acter variable with a minimum length of 10 characters. If request should proceed or end.
the library name has fewer characters than the variable
DDMACCLIB
allows, the value is padded on the right with blanks.
Specifies the name of the CL variable that receives the
JOBACN name of the library that contains the DDM access
Specifies the name of the CL variable that receives the program. Specify the name of a character variable with
current job action for input streams received through the a minimum length of 10 characters. If the library name
network. Specify the name of a character variable with has fewer characters than the variable allows, the value
a minimum length of 10 characters. If the job action is padded on the right with blanks. If *REJECT or
value has fewer characters than the variable allows, the *OBJAUT is returned for the DDMACC parameter, the
value is padded on the right with blanks. value for DDMACCLIB is all blanks.
The values that can be returned in the variable as the PCSACC
current job action are: Specifies the name of the CL variable that receives the
current system action for PCS requests. Specify the
*FILE Input streams received from the network are name of a character variable with a minimum length of
filed in the queue of network files for the 10 characters. If the PCS access value has fewer char-
user to which it was sent. acters than the variable allows, the value is padded on
*REJECT Input streams received from the network are the right with blanks.
rejected. The values that can be returned in the variable as the
*SEARCH The table of network job entries is searched current system action for PCS requests are:
to determine the action for any input
*REJECT The system does not allow any PCS
streams received.
requests.
MAXHOP *OBJAUT All PCS requests are allowed and controlled
Specifies the name of the CL variable that receives the by the object authorizations on the system.
maximum number of systems in the SNADS network so
*REGFAC The registration facility is used to determine
that a distribution queue originating at this node may be
exit programs for the different servers. If no
received and rerouted on the path to its final destination.
program is defined in the registration facility,
Specify the name of a decimal variable with a total
*OBJAUT is used.
length of 5 digits without decimal positions.
program-name
DDMACC
Specify the name of the customer supplied
Specifies the name of the CL variable that receives the
Client Access/400 host system application
current system action for DDM requests from other
exit program that can supplement system
systems. Specify the name of a character variable with
object level security.
a minimum length of 10 characters. If the DDM access

P3-944 OS/400 CL Reference - Part 2 (Full Version)


RTVNETA

PCSACCLIB user must specify a character variable name with a


Specifies the name of the CL variable that receives the minimum length of 10 characters.
name of the library that contains the PCS access
program. Specify the name of a character variable with ALWANYNET
a minimum length of 10 characters. If the library name Specifies the name of the CL variable that receives the
has fewer characters than the variable allows, the value network attribute that allows AS/400 Communications
is padded on the right with blanks. If *REJECT or APIs to use other communication transports that are not
*OBJAUT is returned for the PCSACC parameter, the native for that API. Examples include ICF over TCP/IP
value for PCSACCLIB is all blanks. or Sockets over SNA. You must specify a character var-
iable name with a maximum length of 10 characters.
DFTNETTYPE
Specifies the name of the CL variable that receives the NWSDOMAIN
system default value for the integrated services digital Specifies the name of the CL variable that receives the
network (ISDN) network type. The user must specify a LAN Server domain to which all Integrated PC Servers,
character variable name with a minimum length of 10 also known as File Server Input/Output Processors
characters. (FSIOP), on the system belong. You must specify a
character variable name with a maximum length of 8
The values that can be returned in the variable as the characters.
network type are:
| ALWVRTAPPN
*ATTG3: Indicates an ISDN in the United States or
| Specifies the name of the CL variable that receives the
Canada that uses AT&T 5ESS version G3 switching
| current setting for the virtual APPN support. The char-
equipment.
| acter variable must have a minimum length of 10 char-
*ATT5E42: Indicates an ISDN in the United States or | acters.
Canada that uses AT&T 5ESS version 5E4.2 switching
equipment. | ALWHPRTWR
| Specifies the name of the CL variable that receives the
*ATT5E5: Indicates an ISDN in the United States or | current setting for the HPR tower transport support. The
Canada that uses AT&T 5ESS version 5E5 switching | character variable must have a minimum length of 10
equipment. | characters.
*ATT5E6: Indicates an ISDN in the United States or
| VRTAUTODEV
Canada that uses AT&T 5ESS version 5E6 switching
| Specifies the name of the CL variable that receives the
equipment.
| current setting for the maximum amount of automatically
*BTNR191: Indicates an ISDN in the United Kingdom | created APPC devices allowed on a virtual controller.
controlled by British Telecomm. | The decimal variable must be of at least 5 digits length.
*CCITT88: The ISDN default values recommended by | HPRPTHTMR
the International Telegraph and Telephone Consultative | Specifies the name of the CL variable that receives the
Committee (CCITT) in 1988 are used. | current settings for the maximum amount of time in
*DBP1TR6: Indicates an ISDN controlled by Germany's | minutes for the HPR path switch timers. This field
PTT. (Deutsche Bundes Poste 1TR6). | requires a 40 character variable, each 10 characters
| represents one of the four timer values in the order of
*ETSI: Indicates an ISDN that uses the European Tele-
| network, high, medium and low priority.
communications Standards Institute (ETSI, also known
as EuroISDN) standard.
*FTVN2: Indicates version 2 of the ISDN controlled by
Examples
France's post telephone and telegraph administration | Example 1: Retrieving Current System Name and
(PTT). (France Telecom Numeris VN2). | Number of Systems

*INSNET64: Indicates the INSNET64 ISDN controlled DCL VAR(&SNAME) TYPE(\CHAR) LEN(8)
DCL VAR(&HOPS) TYPE(\DEC) LEN(5 ð)
by Japan's Nippon Telephone and Telegraph Public Cor-
RTVNETA SYSNAME(&SNAME) MAXHOP(&HOPS)
poration (NTT).
*NISDN: Indicates an ISDN that uses the National This command retrieves the current system name and the
ISDN-1 or National ISDN-2 standard for North America. maximum number of systems in a SNADS network so that a
distribution queue entry can be received and rerouted on the
*NT100B29: Indicates an ISDN in the United States or
path to its destination.
Canada that uses Northern Telecom DMS100 Version
BCS-29 switching equipment. | Example 2: Retrieving Virtual APPN Support, APPC
DFTCNNLST | Device Limits, and HPR Path Switch Timers
Specifies the name of the CL variable that receives the
system default value for the ISDN connection list. The

Chapter 2. OS/400 Command Descriptions P3-945


RTVNETA

| DCL VAR(&ALWVRTAPPN) TYPE(\CHAR) LEN(1ð) | This command retrieves the current network attribute settings
| DCL VAR(&VRTAUTODEV) TYPE(\DEC) LEN(5 ð) | for allow virtual APPN support, automatically created APPC
| DCL VAR(&HPRPTHTMR) TYPE(\CHAR) LEN(4ð) | devices on a virtual controller, and the HPR path switch
| RTVNETA ALWVRTAPPN(&ALWVRTAPPN) VRTAUTODEV(&VRTAUTODEV) |+ timers.
| HPRPTHTMR(&HPRPTHTMR)

P3-946 OS/400 CL Reference - Part 2 (Full Version)


RTVOBJD

RTVOBJD (Retrieve Object Description) Command


Pgm: B,I REXX: B,I

┌─\LIBL/────────┐
(P) ─┬───────────────────────────────┬────────────5
55──RTVOBJD──OBJ(──┼───────────────┼──object-name──)──OBJTYPE(──object-type──)────
├─\CURLIB/──────┤ └─RTNLIB(──&CL-variable-name──)─┘
└─library-name/─┘
5──┬───────────────────────────────┬──┬──────────────────────────────────┬──┬─────────────────────────────┬─────────────────────5
└─OBJATR(──&CL-variable-name──)─┘ └─USRDFNATR(──&CL-variable-name──)─┘ └─TEXT(──&CL-variable-name──)─┘
5──┬──────────────────────────────┬──┬────────────────────────────┬──┬────────────────────────────┬─────────────────────────────5
└─OWNER(──&CL-variable-name──)─┘ └─PGP(──&CL-variable-name──)─┘ └─ASP(──&CL-variable-name──)─┘
5──┬───────────────────────────────┬──┬────────────────────────────────┬──┬────────────────────────────────┬────────────────────5
└─OVFASP(──&CL-variable-name──)─┘ └─CRTDATE(──&CL-variable-name──)─┘ └─CHGDATE(──&CL-variable-name──)─┘
5──┬────────────────────────────────┬──┬───────────────────────────────────┬──┬────────────────────────────────┬────────────────5
└─SAVDATE(──&CL-variable-name──)─┘ └─SAVACTDATE(──&CL-variable-name──)─┘ └─RSTDATE(──&CL-variable-name──)─┘
5──┬────────────────────────────────┬──┬──────────────────────────────────┬──┬───────────────────────────────┬──────────────────5
└─CRTUSER(──&CL-variable-name──)─┘ └─CRTSYSTEM(──&CL-variable-name──)─┘ └─OBJDMN(──&CL-variable-name──)─┘
5──┬───────────────────────────────┬──┬────────────────────────────────┬──┬─────────────────────────────────┬───────────────────5
└─USEUPD(──&CL-variable-name──)─┘ └─USEDATE(──&CL-variable-name──)─┘ └─USECOUNT(──&CL-variable-name──)─┘
5──┬──────────────────────────────────┬──┬────────────────────────────┬──┬────────────────────────────┬─────────────────────────5
└─RESETDATE(──&CL-variable-name──)─┘ └─STG(──&CL-variable-name──)─┘ └─CPR(──&CL-variable-name──)─┘
5──┬─────────────────────────────┬──┬────────────────────────────────┬──┬───────────────────────────────┬───────────────────────5
└─SIZE(──&CL-variable-name──)─┘ └─SAVSIZE(──&CL-variable-name──)─┘ └─SAVCMD(──&CL-variable-name──)─┘
5──┬──────────────────────────────────┬──┬──────────────────────────────────┬──┬───────────────────────────────┬────────────────5
| └─SAVSEQNBR(──&CL-variable-name──)─┘ └─SAVLRGSEQ(──&CL-variable-name──)─┘ └─SAVVOL(──&CL-variable-name──)─┘
5──┬───────────────────────────────┬──┬─────────────────────────────┬──┬────────────────────────────────┬───────────────────────5
└─SAVDEV(──&CL-variable-name──)─┘ └─SAVF(──&CL-variable-name──)─┘ └─SAVFLIB(──&CL-variable-name──)─┘
5──┬─────────────────────────────────┬──┬─────────────────────────────┬──┬────────────────────────────────┬─────────────────────5
└─SAVLABEL(──&CL-variable-name──)─┘ └─SRCF(──&CL-variable-name──)─┘ └─SRCFLIB(──&CL-variable-name──)─┘
5──┬───────────────────────────────┬──┬────────────────────────────────┬──┬───────────────────────────────┬─────────────────────5
└─SRCMBR(──&CL-variable-name──)─┘ └─SRCDATE(──&CL-variable-name──)─┘ └─SYSLVL(──&CL-variable-name──)─┘
5──┬─────────────────────────────────┬──┬───────────────────────────────┬──┬──────────────────────────────────┬─────────────────5
└─COMPILER(──&CL-variable-name──)─┘ └─OBJLVL(──&CL-variable-name──)─┘ └─ALWAPICHG(──&CL-variable-name──)─┘
5──┬───────────────────────────────┬──┬───────────────────────────────┬──┬───────────────────────────────┬──────────────────────5
└─APICHG(──&CL-variable-name──)─┘ └─USRCHG(──&CL-variable-name──)─┘ └─LICPGM(──&CL-variable-name──)─┘
5──┬────────────────────────────┬──┬─────────────────────────────┬──┬───────────────────────────────┬──────────────────────────5%
└─PTF(──&CL-variable-name──)─┘ └─APAR(──&CL-variable-name──)─┘ └─OBJAUD(──&CL-variable-name──)─┘
Note:
P All parameters preceding this point can be specified in positional form.

Purpose *LIBL: All libraries in the job's library list are


searched until the first match is found.
The Retrieve Object Description (RTVOBJD) command is
*CURLIB: The current library for the job is
used in a CL program or REXX procedure to retrieve the
searched. If no library is specified as the current
description of a specific object.
library for the job, the QGPL library is used.
Note: To see the parameter and value descriptions for this
library-name: Specify the name of the library to be
command, refer to the online help text. For more
searched.
information about printing the help text, refer to
“Printing CL Command Descriptions” in Chapter 1. object-name: Specify the name of the object that is
being retrieved.
Required Parameters OBJTYPE
Specify the type of object being retrieved. If a variable
OBJ
is specified, it can be up to 8 characters in length. More
Specifies the qualified name of the object being
information on this parameter is in Appendix A,
retrieved. If no library name is given, *LIBL is used to
“Expanded Parameter Descriptions.”
find the specified object.
The name of the object being retrieved can be qualified
by one of the following library values: Optional Parameters

Chapter 2. OS/400 Command Descriptions P3-947


RTVOBJD

RTNLIB CRTDATE
Specifies the name of a variable used to return the Specifies the name of a variable used to return the date
name of the library that contains the object. In a CL and time the object was created. In a CL program, the
program, the variable returned has a length of 10 char- variable returned has a length of 13 characters. The
acters. If *LIBL or *CURLIB is specified for the library value is returned in the form CYYMMDDHHMMSS, where C =
name on the OBJ parameter, the value returned is the century; '0' indicates the 20th century and '1' indicates
name of the library where the object was found. the 21st century; YY = year, MM = month, DD = day, HH
= hour, MM = minutes, and SS = seconds.
OBJATR
Specifies the name of a variable used to return an CHGDATE
extended attribute of the object, such as a program or Specifies the name of a variable used to return the date
file type. In a CL program the variable returned has a and time the object was last changed. In a CL program,
length of 10 characters. For example, the variable may the variable returned has a length of 13 characters. The
be returned with PROD (production) or CLP (control lan- variable is returned in the same format as CRTDATE or
guage program). No asterisk (*) precedes the value. is returned blank if the object has not been changed.

USRDFNATR SAVDATE
Specifies the name of a variable used to return the user- Specifies the name of a variable used to return the date
defined attribute of an object. In a CL program the vari- and time the object was last saved. In a CL program,
able returned has a length of 10 characters. Blanks are the variable returned has a length of 13 characters. The
returned if the retrieved object does not have a user- variable is returned in the same format as CRTDATE or
defined attribute. is returned blank if the object has not been saved.

TEXT SAVACTDATE
Specifies the text that briefly describes the object being Specifies the name of a variable used to return the date
retrieved. More information on this parameter is in and time the object was last saved. In a CL program,
Appendix A, “Expanded Parameter Descriptions.” the variable returned has a length of 13 characters.
Blanks are returned if the object has not been saved or
OWNER if SAVACT(*NO) was specified on the last save opera-
Specifies the name of a variable that is used to return tion for the object.
the name of the object owner's user profile. In a CL
program, the variable returned has a length of 10 char- RSTDATE
acters. Specifies the name of a variable used to return the date
and time the object was last restored. In a CL program,
PGP the variable returned has a length of 13 characters. The
Specifies the name of a variable that is used to return variable is returned in the same format as CRTDATE or
the name of the primary group for the object. If there is is returned blank if the object has not been restored.
no primary group for the object, this field contains a
value of *NONE. In a CL program, the variable returned CRTUSER
has a length of 10 characters. Specifies the name of a variable used to return the
name of the user that created the object. In a CL
ASP program, the variable returned has a length of 10 char-
Specifies the name of a variable that is used to return acters.
the auxiliary storage pool ID. In a CL program, the vari-
able returned has a decimal length of (2 0). The fol- CRTSYSTEM
lowing values can be returned: Specifies the name of a variable used to return the
name of the system on which the object was created. In
1 The object is in the system auxiliary storage a CL program, the variable returned has a length of 8
pool. characters.
2-16 The object is in a user auxiliary storage
OBJDMN
pool.
Specifies the name of a CL variable used to return the
OVFASP object domain value for an object. In a CL program, the
Specifies the name of a variable that is used to return variable returned has a length of 2 characters. A value
the Object Overflowed ASP flag. A value of 1 is of *U indicates the object is in the user domain; a value
returned if the object overflowed the ASP in which it of *S indicates the object is in the system domain.
resides. A value of 0 is returned if the object does not
USEUPD
overflow the ASP. It is not possible for an object
Specifies the name of a variable that indicates whether
residing in the system ASP to overflow its ASP, there-
the object usage information is updated for this object
fore, a value of 0 is always returned for objects in the
type. In a CL program, the variable returned has a
system ASP.
length of 1 character. The indicator is returned as 'Y' or

P3-948 OS/400 CL Reference - Part 2 (Full Version)


RTVOBJD

'N'. If 'N' is returned, the last used date for the object is variable is returned blank if the object has not been
blank. saved.

USEDATE SAVSEQNBR
Specifies the name of a 7-character CL variable used to Specifies the name of a variable used to return the tape
return the date the object was used last. In a CL sequence number generated when the object was saved
program, the variable returned has a length of 7 charac- on tape. In a CL program, the variable returned has a
ters. The date is returned in the form CYYMMDD. If the decimal length of (4 0). The variable is returned with
object does not have a last used date, blanks are zeros if the object has not been saved or was not saved
returned. | to tape. This variable will contain a sequence number
| up to 9999. If a sequence number is actually greater
USECOUNT | than 9999, -1 is returned in this variable. Parameter
Specifies the name of a variable used to return the | SAVLRGSEQ should be used to return a sequence
number of days the object has been used. In a CL | number which can be larger than 9999.
program, the variable returned has a decimal length of
(5 0). If the object does not have a last used date, zero | SAVLRGSEQ
(0) is returned. | Specifies the name of a variable used to return the tape
| sequence number (similar to parameter SAVSEQNBR).
RESETDATE | This variable can contain a larger tape sequence
Specifies the name of a variable used to return the date | number than parameter SAVSEQNBR.
on which the days used count was reset to 0. In a CL
program, the variable returned has a length of 7 charac- SAVVOL
ters. The date is returned in the form CYYMMDD. If the Specifies the name of a variable used to return the tape,
days used count has not been reset, blanks are diskette, or optical volumes used for saving the object.
returned. In a CL program, the variable returned has a length of
71 characters. The variable returns up to 10 six-
STG character volumes. Each volume ID entry is separated
Specifies the name of a variable used to return the by a single blank. The volume IDs begin in character
storage status of the object data. In a CL program, the positions 1, 8, 15, 22, 29, 36, 43, 50, 57, and 64. If
variable returned has a length of 10 characters. *FREE more than 10 volumes are used, a '1' is returned in the
is returned if the object data has been freed and the 71st character of the variable, otherwise the 71st char-
object has been suspended. *KEEP is returned if the acter is blank. The variable is returned blank if the
object data has not been freed and the object has not object was saved to a save file the last time it was
been suspended. saved, or if it was never saved.
CPR SAVDEV
Specifies the name of a variable used to return the com- Specifies the name of a variable used to return the type
pression status of the object. In a CL program, the vari- of device to which the object was last saved. In a CL
able returned has a length of 1 character. (Y) is program, the variable returned has a length of 10 char-
returned if the object is compressed. (N) is returned if acters. The variable is returned with one of the following
the object is permanently decompressed. (T) is returned values, dependent on the device used for the last save
if the object is temporarily decompressed. (F) is operation:
returned if the object is eligible for compression but is
saved with storage freed. (X) is returned if the object is Ÿ *SAVF for a save file.
ineligible for compression. Ÿ *DKT for a diskette.
SIZE Ÿ *TAP for a tape.
Specifies the name of a variable used to return the size
Ÿ *OPT for an optical volume.
of the object in bytes. In a CL program, the variable
returned has a decimal length of (15 0). Ÿ The variable is returned blank if the object was not
saved.
SAVSIZE
Specifies the name of a variable used to return the size SAVF
of the object in bytes of storage at the time of the last Specifies the name of a variable used to return the
save operation. In a CL program, the variable returned name of the save file if the object was saved to a save
has a decimal length of (15 0). The variable is returned file. In a CL program, the variable returned has a length
with zeros if the object has not been saved. of 10 characters. The variable is returned blank if the
object was not saved to a save file.
SAVCMD
Specifies the name of a variable used to return the SAVFLIB
command used to save the object. In a CL program, the Specifies the name of a variable used to return the
variable returned has a length of 10 characters. The name of the library that contains the save file if the
object was saved to a save file. In a CL program, the

Chapter 2. OS/400 Command Descriptions P3-949


RTVOBJD

variable returned has a length of 10 characters. The COMPILER


variable is returned blank if the object was not saved to Specifies the name of a variable used to return the
a save file. licensed program identifier, version level, release level,
and modification level of the compiler. In a CL program,
SAVLABEL the variable returned has a length of 16 characters. The
Specifies the name of a variable used to return the file variable is returned with the 7-character program identi-
label used when the object was saved. In a CL fier starting in character position 1, the 3-character
program, the variable returned has a length of 17 char- version level in character position 8, the 3-character
acters. The variable is returned blank if the object was release level in character position 11, and the
not saved to tape, to diskette, or to an optical volume. 3-character modification level in character position 14.
The value of the return variable corresponds to the value The first character of the version level is always the
specified on the LABEL parameter on the command letter 'V'; the first character of the release level is always
used to save the object. the letter 'R'; the first character of the modification level
SRCF is always the letter 'M'. The variable is returned blank if
Specifies the name of a variable used to return the no compiler was used.
name of the source file used to create the object. In a OBJLVL
CL program, the variable returned has a length of 10 Specifies the name of a variable used to return the
characters. The variable is returned blank if no source object control level for the created object. In a CL
file was used to create the object. program, the variable returned has a length of 8 charac-
SRCFLIB ters.
Specifies the name of a variable used to return the ALWAPICHG
name of the library that contains the source file that was Specifies the name of a variable used to return the Allow
used to create the object. In a CL program, the variable Change by Program flag. A '1' is returned if the object
returned has a length of 10 characters. The variable is can be changed with the Change Object Description
returned blank if no source file was used to create the API, QLICOBJD. A '0' is returned if the object cannot be
object. changed with the API.
SRCMBR APICHG
Specifies the name of a variable used to return the Specifies the name of a variable used to return the
name of the member in the source file (parameter Changed by Program flag. A '1' is returned if the object
SRCF). In a CL program, the variable returned has a has been modified with the Change Object Description
length of 10 characters. The variable is returned blank if API, QLICOBJD. A '0' is returned if the object has not
no source file was used to create the object. been modified by the API.
SRCDATE USRCHG
Specifies the name of a variable used to return the date Specifies the name of a variable used to return whether
and time the member in the source file was last updated. the program was modified by the user. In a CL
In a CL program, the variable returned has a length of program, the variable returned has a length of 1 char-
13 characters. The variable is returned in the same acter. A '1' is returned if the object was modified by the
format as CRTDATE or is returned blank if the member user. A '0' is returned if the object was not modified by
is not updated. the user.
SYSLVL LICPGM
Specifies the name of a variable used to return the level Specifies the name of a variable used to return the
of the operating system when the object was created. In name, version level, release level, and modification level
a CL program, the variable returned has a length of 9 of the licensed program if the retrieved object is part of a
characters: licensed program. In a CL program, the variable
Ÿ A 3-character version level starting in character returned has a length of 16 characters:
position 1 Ÿ The 7-character name starting in character position
Ÿ A 3-character release level starting in character 1
position 4 Ÿ The 3-character version level in character position 8
Ÿ A 3-character modification level starting in character Ÿ The 3-character release level in character position
position 7 11
The first character of the version level is always the Ÿ The 3-character modification le

You might also like