C Z-ADD RETCOD
C ELSE
C 'CPF1F2' IFEQ ERRID
C 'CPF1F22' OREQ ERRID
Cᑍ ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ
Cᑍ THERE IS NO NEED TO REINITIALIZE THE ERROR CODE PARAMETER.
Cᑍ ONLY BYTES PROVIDED IS INPUT TO THE API; IT WILL RESET THE
Cᑍ ERROR CODE PARAMETER FOR US. AFTER THE CALL TO QHFCRTDR,
Cᑍ BYTES AVAILABLE WILL EITHER BE IF SUCCESSFUL OR NONZERO
Cᑍ IF THE CREATE FAILS. WE DO NOT HAVE TO WORRY ABOUT THE
Cᑍ PREVIOUS ERROR CODE BEING LEFT IN THE ERROR CODE PARAMETER.
Cᑍ ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ
C CALL 'QHFCRTDR'
C PARM PATHNM
C PARM 2 PATHLN
C PARM ATTR 1
C PARM ATTRLN
C PARM ERROR
C BYTAVA IFEQ ᑍZERO
C Z-ADD RETCOD
C ELSE
C Z-ADD1 RETCOD
C END
Cᑍ
C ELSE
C Z-ADD1 RETCOD
C END
C END
Cᑍ
Cᑍ PROGRAM END
Cᑍ
C SETON LR
Related Information
“Retrieving the Hold Parameter (Exception Message)—OPM RPG Example” on
page 3-6
“Error Handling” on page 4-5
The “API Error Reporting” topic in Chapter 2 of the
System API Reference
,
SC41-5801
Internal Identifiers
You know of jobs, spooled files, and so forth, by their names. The system uses an
ID that is associated with the name. The ID is assigned based on usage. Several
of the APIs either require or allow you to use an internal ID. When you use an
internal ID, it is generally faster because the system does not have to convert the
external name to the internal ID.
A variety of terminology is used to identify internal IDs. For example:
Work Management uses an
internal job identifier
.
Spooling uses an
internal spooled file identifier
.
Security uses the term
handle
to mean the user profile that is currently running
the job.
Message handling uses the term
message key
(also appears on CL com-
mands) to identify a message in a message queue.
The internal values are often accessed in one API and then used in another. For
example, if you want a list of jobs, you would use the List Jobs (QUSLJOB) API,
which provides the internal job ID for each job in the list. You could then use the
2-12 System API Programming V4R1