|
Hi,
In DDS for display, we can right-justify a character field by using the
CHECK(RB) keyword
ie. a input of 'ABCD ' would give us ' ABCD'.
Q. Is there a CHECK(LB) for left-justify?
if not, I would appreciate any suggestions on how to get the effect as
simple as possible, please..
Thanks.
KK Liu.
ps. sample code...
QDDSSRC/ TSTDSP
*************** Beginning of data *************************************
A DSPSIZ(24 80 *DS3)
A R DSPMSG
A CF12(12 'F12 pressed')
A 5 10'OBJECT :'
A OBJ 10 B 5 25
A MSG 20 O 20 25
A 23 28'F12=Cancel'
****************** End of data ****************************************
QCLSRC/ TSTDSPC
*************** Beginning of data *************************************
PGM
DCLF FILE(TSTDSP)
START:
SNDRCVF RCDFMT(DSPMSG)
IF COND(&IN12 = '1') THEN(GOTO END)
CHKOBJ OBJ(QSYS/&OBJ) OBJTYPE(*LIB)
MONMSG MSGID(CPF9810) EXEC(GOTO ERR)
MONMSG MSGID(CPF9801 CPF9815) EXEC(GOTO ERR)
CHGVAR VAR(&MSG) VALUE('Library exists')
GOTO START
ERR: CHGVAR VAR(&MSG) VALUE('No such Library')
GOTO START
END: ENDPGM
****************** End of data ****************************************
Then, CALL TSTDSPC and enter ' ABC ' at the screen.
Program bombs with CPF error because of the spaces in front....
Monitoring for error is not the solution!
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.