codefori / codefori/vscode-ibmi-renderer

Use of Relative Positioning Fields/Literals All Rendered on Line 1

Open
#23 4 comments 0 reactions 1 assignee Claimed by @worksofliam View on GitHub
enhancement
Dominant language
JavaScript
Stars
19
Forks
15
PR merge metrics
No merged PRs in 30d

Description

Both display files (DSPF) and printer files (PRTF) allow the use of relative positioning on the same line. For example, in a display file, one can omit the line number and specific `+nn`. This will position the current field/literal "nn" columns after the last end position; on the same line number.

In the attached example, the Code4i IBM i Renderer places all relatively positioned fields/literals on line 1 as shown below. Note that the column positioning of the fields/literals appears to be correct; it is just placing all of them on line 1.

![Image](https://github.com/user-attachments/assets/a2c6ca98-e192-4ab7-aa04-4d109c239140)

Whenever a relative position is used, the renderer needs to determine the ending position of the previous field/literal and then apply the appropriate offset to position the current element in on the same line. Below is an example of how the format should be rendered:

![Image](https://github.com/user-attachments/assets/6b54850f-743d-42ba-b210-b1365d93a9f8)

Example DDS DSPF source:

[code4iview.dspf.txt](https://github.com/user-attachments/files/20300505/code4iview.dspf.txt)


|Context|Version|
|-|-|
|Code for IBM i version|2.15.3|
|Visual Studio Code version|1.100.2|
|Operating System|win32_x64|

Active extensions

```
.NET Install Tool (vscode-dotnet-runtime): 2.3.3
COBOL (cobol): 25.4.30
Code Coverage for IBM i (code-coverage-ibmi): 0.1.7
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.12.0
Dev Containers (remote-containers): 0.413.0
ESLint (vscode-eslint): 3.0.10
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 Pull Requests (vscode-pull-request-github): 0.110.0
GitLens — Git supercharged (gitlens): 17.1.0
HTML CSS Support (vscode-html-css): 2.0.13
IBM i Debug (ibmidebug): 2.0.2
IBM i Notebooks (vscode-ibmi-notebooks): 0.0.6
IBM i Project Explorer (vscode-ibmi-projectexplorer): 2.12.3
IBM i Renderer (vscode-displayfile): 0.1.3
JSON Language Features (json-language-features): 1.0.0
Jira and Bitbucket (Atlassian Labs) (atlascode): 3.8.0
Merge Conflict (merge-conflict): 1.0.0
Node Debug Auto-attach (debug-auto-launch): 1.0.0
Nx Console (angular-console): 18.49.3
Path Intellisense (path-intellisense): 2.10.0
Prettier - Code formatter (prettier-vscode): 11.0.0
Reload (reload): 0.0.7
Source Orbit (vscode-sourceorbit): 1.0.2
TODO Highlight (vscode-todo-highlight): 1.0.5
Todo Tree (todo-tree): 0.0.226
TypeScript and JavaScript Language Features (typescript-language-features): 1.0.0
WSL (remote-wsl): 0.99.0
YAML (vscode-yaml): 1.18.0
```


Remote system

|Setting|Value|
|-|-|
|IBM i OS|V7R4M0|
|Tech Refresh|7|
|CCSID Origin|37|
|Runtime CCSID|37|
|Default CCSID|37|
|SSHD CCSID|?|
|cqsh|true|
|SQL|Enabled
|Source dates|Disabled

### Enabled features

|/QOpenSys/pkgs/bin|/usr/bin|/QSYS.lib/ILEDITOR.lib|/QSYS.LIB|/QIBM/ProdData/IBMiDebugService/bin|/QOpenSys/QIBM/ProdData/JavaVM/jdk80|
|-|-|-|-|-|-|
|bash|attr|GETNEWLIBL.PGM|QZDFMDB2.PGM|startDebugService.sh|64bit|
|chsh|iconv|||||
|find|setccsid|||||
|git|uname|||||
|grep||||||
|ls||||||
|md5sum||||||
|sort||||||
|stat||||||
|tar||||||
|tn5250||||||

Shell env

```bash
BUILDLIB=QGPL
CURLIB=QGPL
PASE_USRGRP_LIMITED=N
PATH=/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin
SHELL=/QOpenSys/pkgs/bin/bash
SHLVL=1
TZ=5,M3.2.0,M11.1.0
_=/QOpenSys/usr/bin/env
```

Variants

```json
{
"american": "#@$",
"local": "#@$",
"qsysNameRegex": {}
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.