Running CA Datacom/DB SQL we are getting a space in column 1 of the output, is there a way to remove this while using DBSQLPR?
search cancel

Running CA Datacom/DB SQL we are getting a space in column 1 of the output, is there a way to remove this while using DBSQLPR?

book

Article ID: 19033

calendar_today

Updated On:

Products

Datacom DATACOM - AD Ideal CIS COMMON SERVICES FOR Z/OS 90S SERVICES DATABASE MANAGEMENT SOLUTIONS FOR DB2 FOR Z/OS COMMON PRODUCT SERVICES COMPONENT Common Services CA ECOMETER SERVER COMPONENT FOC Easytrieve Report Generator for Common Services INFOCAI MAINTENANCE IPC UNICENTER JCLCHECK COMMON COMPONENT Mainframe VM Product Manager CHORUS SOFTWARE MANAGER CA ON DEMAND PORTAL CA Service Desk Manager - Unified Self Service PAM CLIENT FOR LINUX ON MAINFRAME MAINFRAME CONNECTOR FOR LINUX ON MAINFRAME GRAPHICAL MANAGEMENT INTERFACE WEB ADMINISTRATOR FOR TOP SECRET Xpertware

Issue/Introduction

Description:

Running CA Datacom/DB SQL we are getting a space in column 1 of the output before the first data field, and we would like to use the file as input to other programs. Is there a command or options setting to remove this in the DBSQLPR execution?

Solution:

All of the output files from DBSQLPR (output, options, official messages, etc.) have a blank as the first character of the format string for the Print command. This is not changeable via options or commands, so the only thing you can do to eliminate that first-column space is to add a step following the DBSQLPR execution to copy the file to another file and bypass the blank column, and copy the data starting in column 2.

You can use any file manipulation tool or SORT to do that. Here is a z/OS sample of how to copy it using IEBGENER:

//GENER    EXEC  PGM=IEBGENER,REGION=0M
//SYSIN    DD   *
GENERATE MAXFLDS=1
RECORD FIELD=(reclen,2,,1)      <-- change reclen to your record length of the output file 
/*
//SYSPRINT DD  SYSOUT=*
//SYSUT1   DD  DISP=SHR,DSN=Your file from DBSQLPR,BUFNO=40
//SYSUT2   DD  DSN=Your new output file,DISP=(NEW,CATLG),
//         UNIT=3390,SPACE=(CYL,(99,99)),BUFNO=40,
//         LRECL=reclen,RECFM=FB,BLKSIZE=0   <-- change reclen to your record length 
//

Using the BUFNO parameter makes this process faster. On a test system, copying nearly 4 million records of 450 bytes added about 7-10 seconds to the total job run time.

Environment

Release: DATABB00200-14-Datacom/AD
Component: