How do I convert a number into a six character string with padded zeroes using
DCL?
I have a sequence number with leading zeroes held in a file. I open the file
and read this number, which is considered a string e.g. "000030". When I
increment this number it gets converted to an integer i.e 30. Before writing
this back to the file I n
eed to replace the leading zeroes.
There does not appear to be a lexical function to replace the zeroes only
f$edit to remove them.
(9847) Text-formatting DCL Lexical Functions? F$FAO?
Re: (9847) Text-formatting DCL Lexical Functions? F$FAO?
Code: Select all
$ x = f$fao("!6ZL", f$integer("000030") + 1 )
$ show symbol x
X = "000031"
$