These days, virtually everyone knows how to add hex codes in their source code to add color to their source. Examples of hex characters that may be used are x'22' for white or high intensity and x'38' for pink. This same technique works to add color to command prompts.
While creating the source for your command, place a hex character as the first byte of the PROMPT parameter. After compiling the command, you will have colored prompt text within your command. The sample code in 9 shows where to place the hex code (indicated by an x) to colorize your command. Warning: after you enter the hex code in the source, don't prompt on that statement or the entire contents within the prompt parameter will be converted to hex.
While creating the source for your command, place a hex character as the first byte of the PROMPT parameter. After compiling the command, you will have colored prompt text within your command. The sample code in Figure 9 shows where to place the hex code (indicated by an x) to colorize your command. Warning: after you enter the hex code in the source, don't prompt on that statement or the entire contents within the prompt parameter will be converted to hex.
- Todd Fisher
TechTalk: Colorized Commands
Figure 9: Colored Command Source
CMD PROMPT('x Command Title') PARM KWD(FLD) TYPE(*CHAR) LEN(10) + PROMPT('x Input parameter')
Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.
IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn:
LATEST COMMENTS
MC Press Online