Use Cloud Run with Mainframe Connector

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, see Cloud Run documentation.

Before you begin

Run a Cloud Run job using Mainframe Connector

To run a Cloud Run job using Mainframe Connector, follow these steps:

  1. To trigger a Cloud Run job from your Mainframe, use the cloud run job run command from your Mainframe Job Control Language (JCL) file:

    //STEP01 EXEC BQSH
    //STDIN DD *
    cloud run job run JOB_NAME
    /*
    

    Replace JOB_NAME with the Cloud Run job that you want to run.

    You can run the cloud run job run command 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_logs flag.

  2. To view the logs for a specific Cloud Run job execution, use the cloud run job logs command from your Mainframe JCL file:

    //STEP01 EXEC BQSH
    //STDIN DD *
    cloud run job logs EXECUTION_ID
    /*
    

    Replace EXECUTION_ID with the execution ID of the Cloud Run job.

  3. (Optional) To cancel a Cloud Run job, use the cloud run job cancel command from your Mainframe JCL file:

    Example JCL
    //STEP01 EXEC BQSH
    //STDIN DD *
    cloud run job cancel EXECUTION_ID
    /*
    

    Replace EXECUTION_ID with the execution ID of the Cloud Run job that you want to cancel.