Stay organized with collectionsSave and categorize content based on your preferences.
Mainframe Connector lets you trigger and monitor
Cloud Run jobs from your Mainframe. For example, you can use this
feature, to integrate your existing extraction, transformation, and loading
(ETL) tool with Mainframe Connector using Cloud Run
jobs.
This page discusses how you can perform the following tasks using
Mainframe Connector:
Trigger a Cloud Run job:initiate a Cloud Run
job from Mainframe Connector
View Cloud Run job logs:view Cloud Run job
logs locally on your Mainframe for monitoring
Cancel a Cloud Run job:cancel an ongoing
Cloud Run job
For more information about creating and managing Cloud Run jobs,
seeCloud Run documentation.
To run a Cloud Run job using Mainframe Connector,
follow these steps:
To trigger a Cloud Run job from your Mainframe, use thecloud run job executecommandfrom your Mainframe Job Control Language
(JCL) file:
//STEP01 EXEC BQSH
//STDIN DD *
cloud run job executeJOB_NAME/*
ReplaceJOB_NAMEwith the Cloud Run job that you
want to run.
You can run thecloud run job executecommand in the synchronous and
asynchronous mode. If you want to trigger a job in synchronous mode and print
job logs as the job progresses, then use the previous command with the--tail_logsflag.
To view the logs for a specific Cloud Run job execution, use
thecloud run job logscommandfrom your Mainframe JCL file:
//STEP01 EXEC BQSH
//STDIN DD *
cloud run job logsEXECUTION_ID/*
ReplaceEXECUTION_IDwith the execution ID of the
Cloud Run job.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Use Cloud Run with Mainframe Connector\n\nMainframe Connector lets you trigger and monitor\nCloud Run jobs from your Mainframe. For example, you can use this\nfeature, to integrate your existing extraction, transformation, and loading\n(ETL) tool with Mainframe Connector using Cloud Run\njobs.\n\nThis page discusses how you can perform the following tasks using\nMainframe Connector:\n\n- **Trigger a Cloud Run job:** initiate a Cloud Run job from Mainframe Connector\n- **View Cloud Run job logs:** view Cloud Run job logs locally on your Mainframe for monitoring\n- **Cancel a Cloud Run job:** cancel an ongoing Cloud Run job\n\nFor more information about creating and managing Cloud Run jobs,\nsee [Cloud Run documentation](/run/docs).\n\nBefore you begin\n----------------\n\n- If you haven't already, then [install Mainframe Connector on your Mainframe](/mainframe-connector/docs/installation).\n- To run the Cloud Run commands, ensure that you assign the following roles to your user account:\n - [Cloud Run Invoker](/run/docs/reference/iam/roles#run.invoker)\n - [Cloud Run Jobs Executor](/run/docs/reference/iam/roles#run.jobsExecutor)\n - [Cloud Run Jobs Executor With Overrides](/run/docs/reference/iam/roles#run.jobsExecutorWithOverrides)\n - [Cloud Run Viewer](/run/docs/reference/iam/roles#run.viewer)\n - [Logs Viewer](/logging/docs/access-control#logging.viewer) For more information about assigning roles to a user account, see [Managing access using IAM](/run/docs/securing/managing-access).\n- Set up [Application Default Credentials](/docs/authentication/provide-credentials-adc).\n\nRun a Cloud Run job using Mainframe Connector\n---------------------------------------------\n\nTo run a Cloud Run job using Mainframe Connector,\nfollow these steps:\n\n1. To trigger a Cloud Run job from your Mainframe, use the\n [`cloud run job execute` command](/mainframe-connector/docs/api-reference#cloud-run-job-execute) from your Mainframe Job Control Language\n (JCL) file:\n\n ```\n //STEP01 EXEC BQSH\n //STDIN DD *\n cloud run job execute JOB_NAME\n /*\n ```\n\n Replace \u003cvar translate=\"no\"\u003eJOB_NAME\u003c/var\u003e with the Cloud Run job that you\n want to run.\n\n You can run the `cloud run job execute` command in the synchronous and\n asynchronous mode. If you want to trigger a job in synchronous mode and print\n job logs as the job progresses, then use the previous command with the\n `--tail_logs` flag.\n2. To view the logs for a specific Cloud Run job execution, use\n the [`cloud run job logs` command](/mainframe-connector/docs/api-reference#cloud-run-job-logs) from your Mainframe JCL file:\n\n ```\n //STEP01 EXEC BQSH\n //STDIN DD *\n cloud run job logs EXECUTION_ID\n /*\n ```\n\n Replace \u003cvar translate=\"no\"\u003eEXECUTION_ID\u003c/var\u003e with the execution ID of the\n Cloud Run job.\n3. (Optional) To cancel a Cloud Run job, use the\n [`cloud run job cancel` command](/mainframe-connector/docs/api-reference#cloud-run-job-cancel) from your Mainframe JCL file:\n\n ```\n Example JCL\n //STEP01 EXEC BQSH\n //STDIN DD *\n cloud run job cancel EXECUTION_ID\n /*\n ```\n\n Replace \u003cvar translate=\"no\"\u003eEXECUTION_ID\u003c/var\u003e with the execution ID of the\n Cloud Run job that you want to cancel."]]