|
Tommy, <snip> I wonder what the first three positions of .Data are for. I converted the hex of "11090E" (in one of my tests) to decimal and its 1,116,430. A bit too large to mean the size of the buffer I'm gathering. </snip> I was not reading all of your code properly. Byte 2 is row (x'09'=09) and byte 3 is column (x'0E'=14), the placement of the field on the screen. I just had not noticed where you extract those values right after the read. Anyway, speaking of the read, it's my suggestion that you invest some time into "Retrieve Field Information (QsnRtvFldInf)". Looking it over, it looks like it will give you the returned data length you need to know. Here is code I added to get this API to return the field information. DSMAPI: ... *------------------------------------------------------------- * QsnRtvDtaLen(): Get length of input data in input buffer *------------------------------------------------------------- D RTVFLDINF PR 10I 0 EXTPROC('QsnRtvFldInf') D INPBUFHANDLE 10I 0 D FIELD_ID 10I 0 CONST D FIELD_INF 32767A OPTIONS(*VARSIZE) D INF_DATALEN 10I 0 CONST D ENV 10I 0 OPTIONS(*OMIT: *NOPASS) CONST D ERRORCODE 32767A OPTIONS(*OMIT: *NOPASS: *VARSIZE) ... DQSNFLDINF DS * Data structure for QsnRtvFldInf API. D QSNFIRET 10I 0 D QSNFIAVL 10I 0 D QSNFITYPE 1A D QSNFIROW 10I 0 D QSNFICOL 10I 0 // returns the number bytes returned in the field D QSNFIFDTAL 10I 0 D QSNFIR1 11A D QSNFIDTA * KRCTNLDSM: ... D FLDINF DS LIKEDS(QSNFLDINF) // ... // Retreive Data IF NOT PROTECTALL; READMDT(QSN_CC1_NULL:QSN_CC1_NULL:MAXFIELDS:INBUFFER:CMDBUFFER:0 :*OMIT); INPUTPOINTER=RETRIEVEDATA(INBUFFER:*OMIT:*OMIT); INPUTLENGTH=RETRIEVEDTALEN(INBUFFER:*OMIT:*OMIT) - %SIZE(INPUTDATA.ROW) - %SIZE(INPUTDATA.COL) - 1; IF INPUTDATA.AID = QSN_F3 OR INPUTDATA.AID = QSN_F12; RETURN *ON; ENDIF; RC = RTVFLDINF(INBUFFER:1:FLDINF:%LEN(FLDINF):0:*OMIT); Thank you, Matt Tyler WinCo Foods, LLC
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.