Dave,
Since a binary length is always positive, you could use the very first
bit to indicate what version you are looking at. Here is a version that
uses a character-string to do that.
Here are my definitions:
TXTINPT DSECT
USING TXTINPT,R10 ESTABLISH REG 10 AS BASE
TXTBLID DS CL8'DAVESDAT'
TXTVER DS CL4'V1R1' VERSION
TXTSREQU DS CL1 SCRIPTING REQUEST CODE
TXTSRETN DS CL1 SCRIPTING RETURN CODE
TXTSSTRL DS H SCRIPTING INPUT/OUTPUT STRING LENGTH
TXTSSTRG DS 256CL1 SCRIPTING INPUT/OUTPUT STRING
ORG TXTINPT
TXTSTRL DS H LEGACY INPUT/OUTPUT STRING LENGTH
TXTSTRG DS 256CL1 LEGACY INPUT/OUTPUT STRING
Here is the init-coding
CLC =C'DAVESDAT',TXTBLID IS IT MY STRUCTURE
JNE APARENTLY_OLDFORMAT
That way there is no lying to the HLASM and no jugling the register of a
DSECT.
Also: future extensions could use the TXTVER-field to indicate what
format they are and thus making it easier to be compatible.
Best
Martin