-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Description
This is maybe a niche issue, but I am trying to debug a stored procedure by using SYSTOOLS.LPRINTF() to print to the job log.
One of the fields I am printing is a text field that HAS to be right aligned (left padded with spaces). In the job log, it was showing as not right aligned, and I was trying to figure out why, until I tried printing the HEX() of the field, which revealed that it did have the space characters, and it was just the display that was not including them.
DECLARE seg_PMCU CHAR(12);
SET seg_PMCU = LPAD('MED', 12, ' ');
CALL SYSTOOLS.LPRINTF('--- DEBUGGING --------------------------------------');
CALL SYSTOOLS.LPRINTF('BRANCH ['|| seg_PMCU ||']');
CALL SYSTOOLS.LPRINTF('BRANCH ['|| HEX(seg_PMCU) ||']');
When viewing the joblog from a 5250 session, the spaces are shown
| Context | Version |
|---|---|
| Code for IBM i version | 2.18.0 |
| Visual Studio Code version | 1.106.3 |
| Operating System | win32_x64 |
Active extensions
COBOL (cobol): 25.11.20
Code for IBM i Walkthroughs (vscode-ibmi-walkthroughs): 0.5.0
Configuration Editing (configuration-editing): 1.0.0
Db2 for IBM i (vscode-db2i): 1.15.1
Debugger for Java (vscode-java-debug): 0.58.3
Emmet (emmet): 1.0.0
Error Lens (errorlens): 3.26.0
Git (git): 1.0.0
Git Base (git-base): 1.0.0
GitHub (github): 0.0.1
GitHub Authentication (github-authentication): 0.0.2
GitHub Copilot Chat (copilot-chat): 0.33.4
IBM i Debug (ibmidebug): 3.0.2
IBM i Project Explorer (vscode-ibmi-projectexplorer): 2.12.3
JSON Language Features (json-language-features): 1.0.0
JavaScript Debugger (js-debug): 1.105.0
Language Support for Java(TM) by Red Hat (java): 1.50.0
Merge Conflict (merge-conflict): 1.0.0
Microsoft Account (microsoft-authentication): 0.0.1
Node Debug Auto-attach (debug-auto-launch): 1.0.0
RPGLE (vscode-rpgle): 0.33.3
Rainbow CSV (rainbow-csv): 3.23.0
Server Ready Action (debug-server-ready): 1.0.0
Source Orbit (vscode-sourceorbit): 1.4.1
Terminal Suggest for VS Code (terminal-suggest): 1.0.1
TypeScript and JavaScript Language Features (typescript-language-features): 1.0.0
anycode (anycode): 0.0.75
Remote system
| Setting | Value |
|---|---|
| IBM i OS | V7R5M0 |
| Tech Refresh | 6 |
| CCSID Origin | 37 |
| Runtime CCSID | 37 |
| Default CCSID | 37 |
| SSHD CCSID | ? |
| cqsh | true |
| SQL | Enabled |
| Source dates | Disabled |
Enabled features
| /usr/bin | /QOpenSys/pkgs/bin | /QSYS.lib/ILEDITOR.lib | /QSYS.LIB | /QIBM/ProdData/IBMiDebugService/bin | /QOpenSys/QIBM/ProdData/JavaVM/jdk80 | /QOpenSys/QIBM/ProdData/JavaVM/jdk17 | /QOpensys/pkgs/lib/jvm |
|---|---|---|---|---|---|---|---|
| attr | bash | GETNEWLIBL.PGM | QZDFMDB2.PGM | startDebugService.sh | 64bit | 64bit | openjdk-11 |
| iconv | chsh | ||||||
| setccsid | ls | ||||||
| tar | md5sum | ||||||
| uname | sort | ||||||
| stat |
Shell env
BUILDLIB=QGPL
CURLIB=QGPL
HOME=/home/PMICHAL
HOST=10.100.0.13
LIBLS=CBUTILITY JDFSRC WBSSRCJDE QRPG JDFOBJ WBSOBJJDE INSTALL WEEKLY WBSPROJDE QGPL WBSGPL QTEMP
LOGIN=pmichal
LOGNAME=pmichal
MAIL=/var/spool/mail/pmichal
OLDPWD=/home/PMICHAL
PASE_USRGRP_LIMITED=N
PATH=/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin
PWD=/home/PMICHAL
SHELL=/QOpensys/pkgs/bin/bash
SHLVL=1
SSH_CLIENT=10.100.3.123 63227 22
SSH_CONNECTION=10.100.3.123 63227 10.100.0.13 22
TZ=<EST>5<EDT>,M3.2.0,M11.1.0
USER=pmichal
USERNAME=pmichal
WORKDIR=/home/PMICHAL
_=/QOpenSys/usr/bin/envVariants
{
"american": "#@$",
"local": "#@$"
}Metadata
Metadata
Assignees
Labels
No labels