|
I have a program that's doing some funky stuff... It's not a new program,
but it needed a recompile and ever since is behaving very badly. I've had
it in debug, and this is what I've tracked it to... A 14 byte character
array w/ 998 elements is getting loaded with at least the first 146 bytes of
the job's LDA when the program reads a record from a dataqueue. The
dataqueue has nothing to do with the character array. When a value is put
in the array, it is then overlaid by the value of the *LDA the next time the
receive dtaq command is executed... Nothing is overlapping in the D
Specs... No sub-fields w/ the same name... Any thoughts?
This is the code that's executed where things go astray...
C* Read Record from Data Queue
C MOVE *ZEROS WAIT 5 0
C CALL 'QRCVDTAQ'
C PARM QNAME
C PARM QLIB
C PARM QLEN
C PARM DATA
C PARM WAIT
This is the D spec of the array "E"...
D E S 14 DIM(998)
This is the array prior to the receive dtaq cmd...
E CHAR(14) DIM(998)
(1-998) ' '
VALUE IN HEX '4040404040404040404040404040'X
This is the array after the rcvdtaq cmd...
E CHAR(14) DIM(998)
(1) 'A01267 0000'
VALUE IN HEX 'C1F0F1F2F6F740404040F0F0F0F0'X
(2-7) '00000000000000'
VALUE IN HEX 'F0F0F0F0F0F0F0F0F0F0F0F0F0F0'X
(8) '00000000 '
VALUE IN HEX 'F0F0F0F0F0F0F0F0404040404040'X
(9) ' 00'
VALUE IN HEX '404040404040404040404040F0F0'X
(10) '00000000000000'
VALUE IN HEX 'F0F0F0F0F0F0F0F0F0F0F0F0F0F0'X
(11) '000000 '
VALUE IN HEX 'F0F0F0F0F0F04040404040404040'X
(12-998) ' '
VALUE IN HEX '4040404040404040404040404040'X
This is the *LDA...
Value
Offset *...+....1....+....2....+....3....+....4....+....5
0 'A01267 0000000000000000000000000000000000000000'
50 '00000000000000000000000000000000000000000000000000'
100 '000000 0000000000000000000000 '
150 ' '
200 ' '
250 ' 001'
300 '890000000000000000000000000 Y 000000000000000'
350 '00070020000000000000000000000000000000010000000000'
400 '000000 000000000000000000000000000000000000000000'
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.