Dbcenter; Dbcjustify; Dbleft - IBM SC34-5764-01 Manual

Cics transaction server for vse/esa
Table of Contents

Advertisement

DBCENTER

DBCENTER(string,length
returns a string of length length with string centered in it, with pad characters added as necessary to make
up length. The default pad character is a blank. If string is longer than length, it is truncated at both ends
to fit. If an odd number of characters are truncated or added, the right-hand end loses or gains one more
character than the left-hand end.
The option controls the counting rule. Y counts SO and SI within mixed strings as one each. N does not
count the SO and SI and is the default.
Here are some EBCDIC examples:
DBCENTER('<.A.B.C>',4)
DBCENTER('<.A.B.C>',3)
DBCENTER('<.A.B.C>',10,'x')
DBCENTER('<.A.B.C>',10,'x','Y')
DBCENTER('<.A.B.C>',4,'x','Y')
DBCENTER('<.A.B.C>',5,'x','Y')
DBCENTER('<.A.B.C>',8,'<.P>')
DBCENTER('<.A.B.C>',9,'<.P>')
DBCENTER('<.A.B.C>',10,'<.P>')
DBCENTER('<.A.B.C>',12,'<.P>','Y') ->

DBCJUSTIFY

DBCJUSTIFY(string,length
formats string by adding pad characters between nonblank characters to justify to both margins and length
of bytes length (length must be nonnegative). Rules for adjustments are the same as for the JUSTIFY
function. The default pad character is a blank.
The option controls the counting rule. Y counts SO and SI within mixed strings as one each. N does not
count the SO and SI and is the default.
Here are some examples:
DBCJUSTIFY('<><AA BB><CC>',20,,'Y')
DBCJUSTIFY('<>< AA
BB>< CC>',20,'<XX>','Y')
DBCJUSTIFY('<>< AA
BB>< CC>',21,'<XX>','Y')
DBCJUSTIFY('<>< AA
BB>< CC>',11,'<XX>','Y')
DBCJUSTIFY('<>< AA
BB>< CC>',11,'<XX>','N')

DBLEFT

DBLEFT(string,length
returns a string of length length containing the leftmost length characters of string. The string returned is
,
pad
,option
->
' <.B> '
->
' <.B>'
->
'xx<.A.B.C>xx'
->
'x<.A.B.C>x'
->
'<.B>'
->
'x<.B>'
->
' <.A.B.C> '
->
' <.A.B.C.P>'
->
'<.P.A.B.C.P>'
'<.P.A.B.C.P>'
,
pad
,option
->
'<AA>
<BB>
->
'<AAXXXXXXBBXXXXXXCC>'
->
'<AAXXXXXXBBXXXXXXCC> '
->
'<AAXXXXBB> '
->
'<AAXXBBXXCC> '
,
pad
,option
)
)
<CC>'
)
Appendix C. Double-Byte Character Set (DBCS) Support
405

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Rexx

Table of Contents