|
From: Blair Wyman <blairw@us.ibm.com> "Leif Svalgaard" <leif@leif.org> > wrote: > > Blair, here you get a second chance. > > I'm stumped on what's wrong with his option list. > > He is trying to read a keyed file in Mi using the SEPT calls: > > > > AFAIK, this option list format was never publicly documented, and it's > apparently yet another of those many things that have been > garbage-collected from my storage-constrained brain... > > In fact, the old wetware isn't what it used to be Андрей figured it out on his own: > Hi Leif. > Structure which is sended by yours occurs not valid. > Was: > The control list for keyed access is: > X'01' + bin(2)length + "format name" + > X'08' + bin(2)length + bin(4)number_of_keyed_fields + > X'07' + bin(2)length + key_fields + X'FF' > > I corrected. It's working. > > True structure: > X'01' + bin(2)length + "format name" + > ---- offset ----- pos(19) > X'08' + bin(2)length + bin(4)number_of_keyed_fields + > X'07' + bin(2)length + key_fields + X'FF' > was > DCL DD LIST-KEYS CHAR(28); > DCL DD ENTRY-ID1 CHAR(1) DEF(LIST-KEYS) POS(1) INIT(X'01'); > DCL DD ENTRY-L1 BIN(2) DEF(LIST-KEYS) POS(2) INIT(10); > DCL DD RCDFMT CHAR(10) DEF(LIST-KEYS) POS(4) INIT ('EMP_REC '); > DCL DD ENTRY-ID2 CHAR(1) DEF(LIST-KEYS) POS(14) INIT(X'08'); > DCL DD ENTRY-L2 BIN(2) DEF(LIST-KEYS) POS(15) INIT(4); > DCL DD NKEYS BIN(4) DEF(LIST-KEYS) POS(17) INIT(1); > DCL DD ENTRY-ID3 CHAR(1) DEF(LIST-KEYS) POS(21) INIT(X'07'); > DCL DD ENTRY-L3 BIN(2) DEF(LIST-KEYS) POS(22) INIT(4); > DCL DD MYKEY CHAR(4) DEF(LIST-KEYS) POS(24) INIT("0002"); > DCL DD END-LIST CHAR(1) DEF(LIST-KEYS) POS(28) INIT(X'FF'); should be: > DCL DD LIST-KEYS CHAR(33); > DCL DD ENTRY-ID1 CHAR(1) DEF(LIST-KEYS) POS(1) INIT(X'01'); > DCL DD ENTRY-L1 BIN(2) DEF(LIST-KEYS) POS(2) INIT(10); > DCL DD RCDFMT CHAR(10) DEF(LIST-KEYS) POS(4) INIT('EMP_REC '); > > DCL DD ENTRY-ID2 CHAR(1) DEF(LIST-KEYS) POS(19) INIT(X'08'); > DCL DD ENTRY-L2 BIN(2) DEF(LIST-KEYS) POS(20) INIT(4); > DCL DD NKEYS BIN(4) DEF(LIST-KEYS) POS(22) INIT(1); > > DCL DD ENTRY-ID3 CHAR(1) DEF(LIST-KEYS) POS(26) INIT(X'07'); > DCL DD ENTRY-L3 BIN(2) DEF(LIST-KEYS) POS(27) INIT(4); > DCL DD MYKEY CHAR(4) DEF(LIST-KEYS) POS(29) INIT("0002"); > > DCL DD END-LIST CHAR(1) DEF(LIST-KEYS) POS(33) INIT(X'FF'); it is still a mystery what the extra 5 bytes just before POS(19) do.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.