Page 1 of 1

Overlay a display file record format with the subfield of a data structure

Posted: Thu Sep 04, 2025 1:44 pm
by LUCAG
Hello everyone, to your knowledge is it possible to define in freeform a data structure that overlays the record format of a display file?
In practice, I have a display file called VIDEO1, which contains a REC1 record format. REC1 has three input fields if1, if2, if3 and two output fields of1, of2.

After defining

Code: Select all

Dcl-F VIDEO1 WORKSTN INDDS(dspf1) usropn;
how can i define something like

Code: Select all

dcl-ds rec1ds likerec(REC1:*all); 
but in a way that rec1ds.if1 and IF1 share the same memory and the same content?

Re: Overlay a display file record format with the subfield of a data structure

Posted: Thu Sep 04, 2025 4:33 pm
by Scott Klement
Can you explain why you want to do this?