search cancel

Can I set a field in a CA-Datacom/DB table to default to spaces if data is not explicitly entered during INSERT or ADDIT processing?

book

Article ID: 53907

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

When defining a character field in a table, is there a way for certain fields to default to spaces if nothing is put into the field through application programs?

Solution

By using the DBEDITS field attribute functionality of the Datadictionary, you can enable special CA-Datacom/DB processing for both data editing and default processing. For example, a field can be defined to allow nulls or not. It can also be set to use various defaults, based on the type of data stored in the field.

To add this functionality to a field, use the Batch Datadictionary FIELD maintenance transaction 4012, or follow this process through Datadictionary Online (DDOL):

  1. Select the menu option for DBMAINT mode.


<Please see attached file for image>

Figure 1

  • Select the menu option to maintain TABLEs.


<Please see attached file for image>

Figure 2

  • Select the menu option to DISPLAY FIELDS, then enter the desired table name information to be maintained.


<Please see attached file for image>

Figure 3

<Please see attached file for image>

Figure 4

  • Enter the line command ATT beside the character field you wish to change.


<Please see attached file for image>

Figure 5

  • Enter 'Y'  in the DBEDITS field, 'O' in the DEFAULT-INSERT field (to indicate a User-Defined default value exists), and the keyword SPACE or SPACES in the VALUE field.


<Please see attached file for image>

Figure 6

  • Apply as usual, and follow your standard table change promotion procedure.
  • Be aware that if you change the attributes of a field for an existing table, you need to review programs that maintain this table to ensure that your changes are compatible with your current processing.

    For further information about the values of the various FIELD attributes, please refer to the CA Datacom Datadictionary Attribute Reference Guide.
    For further information about Default values and FIELD edit criteria, please refer to the CA Datacom/DB Database and System Administrator Guide.
    For further information about using batch Datadictionary Maintenance transactions, please refer to the CA Datacom/DB Datadictionary Batch Guide.

Environment

Release:
Component: DB

Attachments

1558711370408000053907_sktwi1f5rjvs16s7o.gif get_app
1558711368516000053907_sktwi1f5rjvs16s7n.gif get_app
1558711366630000053907_sktwi1f5rjvs16s7m.gif get_app
1558711364716000053907_sktwi1f5rjvs16s7l.gif get_app
1558711362796000053907_sktwi1f5rjvs16s7k.gif get_app
1558711360809000053907_sktwi1f5rjvs16s7j.gif get_app