src://
Refers to files located within your Grace project's local src/
directory. This prefix is primarily used for source code (COBOL. PL/I, copybooks), JCL templates, scripts, or any other project-local file that needs to be uploaded to the mainframe as part of a PDS member or used by a local shell
job.
Resolution
-
Local file: Grace looks for
<filepath_within_src_directory>
inside thesrc/
directory, which is expected to be at the same level as yourgrace.yml
file.- e.g. If
grace.yml
is inmyproject/
andpath
issrc://programs/main.cbl
, Grace looks formyproject/src/programs/main.cbl
.
- e.g. If
-
Mainframe PDS member (for z/OS job inputs):
- When used as an input to a z/OS job module (
compile
,linkedit
,execute
),grace deck
uploads the local file to the PDS specified indatasets.src
(globally or via job-level override). - The PDS member name is derived from the filename part of
<filepath_within_src_directory>
by converting it to uppercase and removing extensions (e.g.main.cbl
becomesMAIN
). Grace's PDS member name validation rules apply. - e.g.
src://programs/main.cbl
might resolve toYOUR.HLQ.SRC(MAIN)
on the mainframe.
- When used as an input to a z/OS job module (
Typical usage examples
Compile mainframe source:
Execute a local script from src/
:
Shell job consuming a local src/
file:
Shell job generating a file into src/
:
Key considerations
- The
grace deck
command handles the upload ofsrc://
files only when they are defined asinputs
to z/OS job types. - When
src://
is used withshell
jobs (forwith.script
,inputs
, oroutputs
), it refers to paths within the localsrc/
directory of your Grace project. - Ensure filenames within
src/
that are intended for mainframe PDS members are convertible to valid member names (Grace uppercases and removes file extensions such as.cbl
,.cpy
).