Thread: PL/I

PL/I FIXED BIN vs COBOL COMP sync headaches

Started by James • user3 replies82 viewsLast activity 1 month ago
Post #1
0 votes
James
Reputation
524
Posts: 30
Joined: May 2, 2024, 8:00 AM
Posted: Jul 2, 2026, 9:09 AM

Passing a FIXED BIN(31) from PL/I into a COBOL PIC S9(9) COMP field. Values look shifted on the COBOL side for some calls and fine for others.

Is this usually alignment of the containing structure, or should I be suspicious of halfword vs fullword elsewhere in the block?

Post #2
1 votes
Marty
Reputation
412
Posts: 58
Joined: Aug 12, 2024, 9:14 AM
Posted: Jul 2, 2026, 1:09 PM

Map both sides. FIXED BIN(31) and S9(9) COMP are usually fine as elementary items. When it is intermittent, I bet on structure padding before the field, not the integer type itself.

Post #3
0 votes
James
Reputation
524
Posts: 30
Joined: May 2, 2024, 8:00 AM
Posted: Jul 4, 2026, 11:09 AM

Padding. Again. We added an explicit filler to force the same offset. Lesson refuses to stick.

You must be signed in to reply to this thread