on 03-06-2015 7:17 PM
Hi there,
PowerDesigner Help tells '-n' format switch 'extracts the last n characters. Blanks or zeros are added to the right to fill the width and justify the output to the left'.
I need to left-zeros-pad the variable REFRNO. But for now I can only blanks pad with this syntax: %-2.2:REFRNO%
Do you know where and what is the switch to force zeros padding instead of blanks padding? The help is not clear about that.
Many thanks,
Daniel
Hi,
This must be an error in documentation, only spaces are added to pad a variable.
In an other hand, you could define a template (in a copy of the xdb so that it is recognise in DBMS.Script category) this way
At <YourDBMS>::Profile\Reference\, create new templates "myRefrNo" containing
<<
.set_value(expected, "0000000000%REFRNO%", new)
%.-5:expected%
>>
=> this gives you a new "variable" myRefrNo equal to 5digit length REFRNO, that you can use in the script part (in reference category) of your DBMS.
Marc
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.