Salesforce

How to get the "DBTOOL SQL Width & Date Scan w/Report Option" with ABL?

« Go Back

Information

 
TitleHow to get the "DBTOOL SQL Width & Date Scan w/Report Option" with ABL?
URL Name000044627
Article Number000132587
EnvironmentProduct: OpenEdge
Version: All Supported Versions
OS: All Supported Platforms
Question/Problem Description
How to get the "DBTOOL SQL Width & Date Scan w/Report" Option with ABL?
How to list the current SQL-WIDTH vs ABL Format size for all character fields of Tables in a database?
How to fetch the current SQL-WIDTH of fields?
How to troubleshoot why the DBTOOL SQL-WIDTH report fails with "Unable to upgrade record"?
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution
The following example code does not report on the actual or rather maximum current field width of a given character field, iow  table.fields approaching or anywhere near the limit 31,991.  
In order to do so refer to Article  How to report on character fields where the length of data exceeds the SQL-WIDTH value?   
 
/* fieldrep.p */ 

DEFINE STREAM s_log. 

OUTPUT STREAM s_log TO VALUE(".\fieldwdth01.txt") APPEND UNBUFFERED. 

FOR EACH _file WHERE _owner = "pub" AND _tbl-type = "T", 
    EACH _field OF _file 
          WHERE _field._Data-Type = "CHARACTER" NO-LOCK: 
    PUT stream s_log UNFORMATTED 
                       _file-name "." _field-name "; " _field._width "; " _field._format SKIP. 
END. 

OUTPUT STREAM s_log CLOSE.
 
From the resulting output, fields that need attention are:
  1. SQL-Width LE twice the ABL format
  2. Fields with their associated SQL-WIDTH that are approaching the 31,991 field limit.
Workaround
Notes
Keyword Phrase
Last Modified Date1/25/2022 4:05 PM

Powered by