Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Configura Cloud Logging
Mainframe Connector può inviare a Cloud Logging messaggi di log in formato JSON contenenti informazioni sul contesto. Il contesto include il nome del job, l'ID job, la data del job, il nome del passaggio e altre variabili fornite da z/OS.
In questo modo puoi trovare i log per job specifici e creare avvisi. Inoltre,
quando esegui il deployment di Mainframe Connector su Cloud Run,
Google Kubernetes Engine o Compute Engine, i log vengono raccolti dall'agente Cloud Logging e visualizzati in Logs Explorer.
Per configurare Mainframe Connector in modo che scriva in Cloud Logging, imposta le variabili di ambiente LOG_PROJECT e LOG_ID nel JCL che avvia il job. Ad esempio, LOG_PROJECT=mainframe-connector-proj
e LOG_ID=my-mfc. Il nome del log LOG_NAME è dedotto da LOG_PROJECT e LOG_ID. In questo esempio sarà projects/mainframe-connector-proj/logs/my-mfc.
Il tipo di risorsa è sempre globale perché il log è un log creato dall'utente
e non un log del servizio cloud. Durante l'avvio,
Mainframe Connector mostra un messaggio che indica se
Cloud Logging è configurato.
Attiva le statistiche sul carico
La funzionalità di statistiche sul carico registra ogni comando eseguito utilizzando
Mainframe Connector in una tabella SQL. Per attivare la funzionalità delle statistiche sul caricamento, crea una tabella utilizzando il seguente comando e aggiungi il flag --stats_table TABLE_NAME al comando cp, dove TABLE_NAME è il nome della tabella SQL.
Un set di dati MVS contenente un archivio COBOL per il set di dati a cui fa riferimento un DD INFILE. Puoi utilizzare il modello DD con alcune limitazioni. Per ulteriori informazioni, consulta le limitazioni di utilizzo dei dati di directory COPYBOOK.
INFILE
Un set di dati MVS contenente un set di dati COBOL da caricare in Cloud Storage.
FILE CHIAVE
Un set di dati MVS contenente un Google Cloud file della chiave JSON dell'account di servizio IAM.
OUTFILE
Un set di dati MVS contenente un set di dati COBOL da caricare da BigQuery.
QUERY
Un set di dati MVS contenente una query SQL standard di BigQuery. Il
file DD QUERY è un file FB con una dimensione del record logico (LRECL) di 80. Ciò significa
che ogni record nel file è lungo 80 byte.
STDIN
Input stream utilizzato per fornire comandi shell.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-09-03 UTC."],[],[],null,["# Mainframe Connector reference\n\nSet up Cloud Logging\n--------------------\n\nMainframe Connector can send JSON formatted log messages containing\ncontext information to Cloud Logging. The context includes job name, job ID,\njob date, step name, and other variables provided by z/OS.\n\nThis helps you find logs for specific jobs and create alerts. Additionally,\nwhen deploying Mainframe Connector on Cloud Run,\nGoogle Kubernetes Engine, or Compute Engine, the logs are collected by\nCloud Logging agent and they appear in Logs Explorer.\n\nTo configure Mainframe Connector to write to Cloud Logging, set the\n`LOG_PROJECT` and `LOG_ID` environment variables in the\nJCL that launches the job. For example, `LOG_PROJECT=mainframe-connector-proj`\nand `LOG_ID=my-mfc`. The log name `LOG_NAME` is derived\nfrom `LOG_PROJECT` and `LOG_ID`. In this example, it will\nbe `projects/mainframe-connector-proj/logs/my-mfc`.\n\nThe resource type is always *global* as the log is a user-created log\nrather than a log from the cloud service. During startup,\nMainframe Connector displays a message indicating whether\nCloud Logging is configured.\n\nEnable load statistics\n----------------------\n\nThe load statistics feature logs every command that you execute using\nMainframe Connector in a SQL table. To enable the load statistics\nfeature, create a table using the following command and add the\nflag `--stats_table `\u003cvar translate=\"no\"\u003eTABLE_NAME\u003c/var\u003e to the `cp`\ncommand, where \u003cvar translate=\"no\"\u003eTABLE_NAME\u003c/var\u003e is the name of the SQL table. \n\n CREATE TABLE\n `[PROJECT_ID].[DATASET_NAME].[TABLE_NAME]` (\n timestamp TIMESTAMP,\n job_id STRING,\n job_name STRING,\n job_date DATE,\n job_time TIME,\n job_step_name STRING,\n job_type STRING,\n source STRING,\n destination STRING,\n job_json STRING,\n rows_read INT64,\n rows_written INT64,\n rows_affected INT64,\n rows_inserted INT64,\n rows_deleted INT64,\n rows_updated INT64,\n rows_unmodified INT64,\n rows_before_merge INT64,\n rows_loaded INT64,\n bq_job_id STRING,\n bq_job_project STRING,\n bq_job_location STRING,\n statement_type STRING,\n query STRING,\n execution_ms INT64,\n queued_ms INT64,\n bytes_processed INT64,\n slot_ms INT64,\n slot_utilization_rate FLOAT64,\n slot_ms_to_total_bytes_ratio FLOAT64,\n shuffle_bytes FLOAT64,\n shuffle_bytes_to_total_bytes_ratio FLOAT64,\n shuffle_spill_bytes FLOAT64,\n shuffle_spill_bytes_to_shuffle_bytes_ratio FLOAT64,\n shuffle_spill_bytes_to_total_bytes_ratio FLOAT64,\n shuffle_spill_gb FLOAT64,\n bq_stage_count INT64,\n bq_step_count INT64,\n bq_sub_step_count INT64,\n bq_stage_summary STRING)\n PARTITION BY job_date\n CLUSTER BY job_name, job_id, job_step_name\n OPTIONS (\n partition_expiration_days=1000,\n description=\"Log table for mainframe jobs\",\n require_partition_filter=true)\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_NAME\u003c/var\u003e: the name of the project in which you want to execute the command.\n- \u003cvar translate=\"no\"\u003eDATASET_NAME\u003c/var\u003e: the name of the dataset file.\n- \u003cvar translate=\"no\"\u003eTABLE_NAME\u003c/var\u003e: the name of the SQL table in which you want to log the details.\n\nDataset names\n-------------\n\nYou can use the following [dataset definition (DD) files](https://www.ibm.com/docs/en/zos-basic-skills?topic=concepts-jcl-statements-what-does-dd-statement-do) in your BQSH JCL\nprocedure. Ensure that all [MVS datasets](https://www.ibm.com/docs/en/zos/3.1.0?topic=tsoe-mvs-data-sets)\nreferenced by a DD file uses the [fixed block (FB)](https://www.ibm.com/docs/en/zos-basic-skills?topic=set-data-record-formats) record format."]]