Repository navigation
PF8: Production data, Db2, COBOL interoperability - #1
Merged
Merged
Conversation
- Version 0.9.0: VERSION, zfpc --version, ppcs390x -iZ und Logo, ZosPortVersion
und Eyecatcher FPC_ZOS_VERSION (ASCII/EBCDIC) in jedem Programm (FPC-Patch
0043), Kopfzeile im Start-Skript von zos-ld; CHANGELOG.md
- FPC-Patch 0042: cwstring ließ sich mit dem Start-Compiler FPC 3.2.2 nicht
übersetzen ({$elseif} nach {$ifdef}); Basis-Commit in fpc/BASE
- CI (.github/workflows/ci.yml, scripts/ci-build.sh): FPC klonen, Patchserie
anwenden, nativer FPC main + ppcs390x, RTL und 337 Package-Units bis zum
Objekt (Distributions-llc, ZFPC_CI=1), Soll-Liste ci/package-failures.txt,
pf-Programme mit -Cn, Python-Skripte; im Container vollständig durchgelaufen
(~8 min). Job "zos" für einen Self-Hosted-Runner (Variable ZOS_RUNNER,
Zugangsdaten nur aus Secrets, scripts/ci-zos.sh + ci/zos-tests.txt); auf
z/OS noch nicht getestet
- z/OS-Skripte auch unter Linux ohne WSL (scripts/zos-hostenv.sh: ssh/sftp,
/tmp); zos-ld im Linux-Modus mit ssh-Attrappe geprüft
- PRODUKTION.md: freigegebene Compilerschalter (-O2 Standard, -O4 nicht
freigegeben wegen tw41865g/h, -Cr/-Co/-gl empfohlen, -Ct bei Rekursion,
-gc -gh nur Fehlersuche), Versionen, Release-Ablauf, CI-Einrichtung
- Skripte ausführbar (Dateimodus)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EPRbtCyWfDPbr8mS8FXmY8
…pybook -> Pascal - EBCDIC-Codepages: Datasets und zosebcdic nicht mehr fest IBM-1047. Global über ZOS_CCSID oder SetDefaultCcsid, je Datei über ",ccsid=NNN" im Namen oder SetTextCcsid (FPC-Patch 0044, runtime/zosdsn.c). 21 CECP-Codepages: 1047, 37, 273, 277, 278, 280, 284, 285, 297, 500, 871, 1140-1149 (Euro auf X'A4' der ISO-8859-1-Seite). Tabellen erzeugt aus den IBM-Zuordnungen der ICU (scripts/gen-ccsid.py, Prüfsummen); 1047 ist gleich der früher auf z/OS mit iconv gemessenen Tabelle. Portable Unit zosccsid (Pascal-Tabellen). - Unit zosdecimal: TDecimal (63 Stellen, eigener Scale, + - * / Rest, Rundung abschneiden/kaufmännisch/Banker, ohne Gleitkomma), gepackt und gezont (alle SIGN-Varianten) lesen/schreiben mit Prüfung wie S0C7, Int64/Currency/String; zosdecimalbcd für TBCD. - scripts/copybook2pas.py: Copybook -> Pascal-Unit (packed records aus Byte-Feldern mit den COBOL-Offsets, Get_/Set_ je Feld, Stufe 88 als Konstanten + Is_/Set_, OCCURS/ODO, REDEFINES als varianter Record, SYNC mit Füllbytes, FILLER, PIC N, HFP/IEEE für COMP-1/2, Initialize_, LayoutOk); Laufzeit-Unit zoscobol. - Tests auf x86_64: dectest 110/110, ccsidtest 17/17, cobtest 60/60, C-Prüfstand für zosdsn.c 131/131 (tests/c, Attrappen der z/OS-Header), tests/test_ccsid.py, tests/test_copybook2pas.py; CI-Schritt x86 (tests/run-x86.sh). Für z/OS übersetzt, dort noch nicht ausgeführt (pf8/README.md: Aufruf und Erwartung). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EPRbtCyWfDPbr8mS8FXmY8
- Unit zosdb2cli: CLI-Funktionen (SQLAllocHandle ... SQLGetDiagRec, SQLEndTran, SQLFreeHandle, SQLTables/SQLColumns), Konstanten nach ODBC 3 + Db2, Klassen TDb2Connection/TDb2Statement mit Parametern (Text, BIGINT, DOUBLE, DECIMAL als Text <-> TDecimal, NULL), SQLGetData-Spaltenwerten und EDb2Error (SQLSTATE, SQLCODE, alle Diagnosesätze). Auf z/OS gegen DSNAO64C, sonst unixODBC. - z/OS-Typgrößen in rtl/zosdb2cli_zos.inc: NICHT gemessen (Annahme LP64, 4-Byte-Handles); pf8/db2probe_c.c misst sie und gibt die Datei neu aus, prüft die Prototypen per _Generic und die Konstanten (gegen die unixODBC-Header geprüft: alles OK). - zfpc --db2 / ZOS_DB2=1: zos-ld bindet ZOS_DB2HLQ.SDSNMACS(DSNAO64C) mit, das Start-Skript setzt STEPLIB und DSNAOINI (ZOS_DB2_STEPLIB, ZOS_DB2_INI); zos-batch.sh: ZOS_BATCH_STEPLIB; gen-zosmap.py: Db2-Header (ZOS_DB2_INCLUDE) für mögliche #pragma map der CLI-Namen. - pf8/db2test.pas (13 Prüfungen: DDL, Parameter, NULL, DECIMAL, Commit/Rollback, SQLSTATE): lokal gegen SQLite über unixODBC 13/13 (CI-Schritt x86); dsnaoini.txt, db2test.jcl, dsnacli-bind.jcl; Anleitung pf8/README.md. Auf z/OS noch nicht getestet. SQLDB-Connector nicht umgesetzt (Weg beschrieben). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EPRbtCyWfDPbr8mS8FXmY8
… Pascal (CEL4RO64) - Recherche: LE bietet ab z/OS 3.1 (bzw. per APAR) CEL4RO31/CEL4RO64 (zweite LE-Umgebung der anderen AMODE in derselben Task). Layout von CEL4RO64 aus Eclipse OpenJ9 (j9cel4ro64.h); für CEL4RO31 kein frei zugängliches Layout -> nicht umgesetzt, Weg in pf8/README.md. - Pascal -> AMODE 31: Unit zoscall31 (TCall31Session.Call(name, Bereiche)), runtime/zosc31.c (Prozess + Pipes, Protokoll), Brücke pf8/zpcall31.s (HLASM, AMODE 31, ohne LE: GETMAIN LOC=31, LOAD, OS-Parameterliste mit Hochbit, BASSM, BPX1RED/BPX1WRT). Daten über die Copybook-Records aus copybook2pas. - AMODE 31 -> Pascal: LE-konformer HLASM-Stub pf8/zp64call.s (CEEENTRY, RO64-Kontrollblock, CAA+1024 -> +8), COBOL-Hauptprogramm zpcob2.cbl, Pascal-DLL call64lib.pas, Batch-JCL call64.jcl. - Testprogramme ZPASM1 (HLASM), ZPCOB1 (COBOL, COPY KUNDE), call31test.pas; Bau auf z/OS mit pf8/build31.sh (as, ld, cob2). Start-Skript: ZOS_RUN_ENV. - Lokal getestet: call31test 11/11 gegen die Brücken-Attrappe tests/c/fake_zpcall31.c (CI-Schritt x86), call64lib über einen Lade-Treiber. HLASM, COBOL und CEL4RO64 auf z/OS noch nicht getestet; Grenzen (Kopien, Enclave je Aufruf, kein AMODE 24, keine Zeiger in Bereichen) dokumentiert. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EPRbtCyWfDPbr8mS8FXmY8
- README.md: Meilenstein PF8, neue Werkzeuge, Verweise auf PRODUKTION.md und CHANGELOG.md, zfpc --version/--db2 - CLAUDE.md (Stand): PF8 knapp, was lokal getestet ist und dass auf z/OS noch nichts davon gelaufen ist - pf8/README.md: Prüfliste für die ersten Läufe auf z/OS Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EPRbtCyWfDPbr8mS8FXmY8
…SQLINTEGER - FPC-Patch 0045: odbcsql bindet auf z/OS statisch gegen DSNAO64C (external 'dsnao64c') und nimmt die CLI-Typen aus rtl/zosdb2cli_zos.inc (dieselben wie zosdb2cli); odbcconn benutzt dort odbcsql statt des dynamischen Laders und vergleicht das Umgebungs-Handle mit SQL_NULL_HENV (ganzzahlige Handles). - zos-ld: "clib dsnao64c/dsnao64w" bindet das Db2-Sidedeck und setzt STEPLIB/ DSNAOINI im Start-Skript (wie zfpc --db2); build-packages.sh baut odbc und fcl-db/src/sqldb/odbc (340 Package-Units, Soll-Liste unverändert). - pf8/sqldbtest.pas (10 Prüfungen über TSQLQuery/TSQLTransaction): lokal gegen SQLite 10/10, CI-Schritt x86; für z/OS übersetzt, dort noch nicht gelaufen. - Allgemeiner FPC-Fehler gefunden: odbcsql SQLINTEGER = clong ist auf 64-Bit- Unix 8 Byte, der Treiber schreibt 4 (SQLGetDiagRec liefert -4294967295 statt 1 unter Linux); Issue-Text, Patch 0008 und Reproduzierer in fpc/upstream/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EPRbtCyWfDPbr8mS8FXmY8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds PF8 (Production – Business Data, Db2, COBOL Interop), the final phase of the z/OS Pascal port. It provides comprehensive support for COBOL copybook integration, packed/zoned decimal arithmetic, EBCDIC code page handling, Db2 ODBC/CLI access, and AMODE-31 program interoperability.
Key Changes
COBOL Copybook Support
scripts/copybook2pas.py: New tool that converts COBOL copybooks to Pascal units with exact field offsets matching COBOL programs. Supports:Decimal Arithmetic (
rtl/zosdecimal.pp,rtl/zosdecimalbcd.pp)EBCDIC Code Page Support
rtl/zosccsid.pp: ISO-8859-1 ↔ EBCDIC conversion for CECP code pages (1047, 37, 273, 277, 278, 280, 284, 285, 297, 500, 871, 1140-1149)scripts/gen-ccsid.py: Generates conversion tables from ICU dataruntime/zosccsid.handrtl/zosccsid.inc: Pre-computed tables for C and PascalZOS_CCSIDenvironment variable or,ccsid=NNNin dataset namesCOBOL Field Access (
rtl/zoscobol.pp)Db2 ODBC/CLI Support (
rtl/zosdb2cli.pp)https://claude.ai/code/session_01EPRbtCyWfDPbr8mS8FXmY8