Skip to content

Commit

Permalink
Merge pull request #4 from p-behr/master
Browse files Browse the repository at this point in the history
Convert special characters in alias to underscore
  • Loading branch information
p-behr authored Jun 7, 2019
2 parents 9d8cba7 + f09ff6a commit 1ce221a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion qrpglesrc/CVTDDS.SQLRPGLE
Original file line number Diff line number Diff line change
Expand Up @@ -272,12 +272,19 @@

if sqlName = systemName
and columnText <> *blanks;
column = %scanrpl(' ' : '_' : %trim(columnText));
column = %trim(columnText);
elseif sqlName = systemName ;
column = %trim(sqlName) + '_SQL_NAME';
else;
column = sqlName;
endif;
// convert special characters to words and underscores
Exec SQL
SET :column = TRANSLATE( TRIM(REPLACE(:column , '%' , 'Pct'))
, '______'
, ' /-*&%'
);


defn = FormatFieldDefinition( columnType
: columnLength
Expand Down

0 comments on commit 1ce221a

Please sign in to comment.