asm.RecordClassGenerator - B field generation error

General discussion on the JZOS batch launcher and toolkit
Post Reply
JohnMcKown
Posts: 39
Joined: Sat Nov 21, 2009 2:59 pm

asm.RecordClassGenerator - B field generation error

Post by JohnMcKown »

Me again. I've found two problems with fields which are "B" fields. The following works well:

VAR DS BL2

But the following generates invalid code:

VAR DS 8BL2

It generates:

private byte[][] = new byte[]]VAR_num];

I think it should generate

private byte[][] = new byte[2][VAR_num];

Or maybe?

private byte[][] - new byte[VAR_num][2];

Also the following causes a Java exception:

VAR DS BL.1

--
John McKown
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

John,

Thanks for reporting this. Despite our testing, I suspect that the assembler generator has not been put through its paces as much as the Cobol version. Your bug reports will help us to make it a better tool.
JohnMcKown
Posts: 39
Joined: Sat Nov 21, 2009 2:59 pm

Post by JohnMcKown »

Glad to help. I seem to have a Xanthian (fantasy series of books) magical talent for finding bugs. They come out to greet me like I was a long lost love. Or maybe I just do more weird things than most people <grin>.
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

Actually, it should really generate:

private byte[][] var = new byte[VAR_num][];

This will initialize the the cache variable to an array with VAR_num (8) nulls. As elements are cached, they will be byte[2] fields.
Post Reply