|
Populating those "key" structures is always fun. First, never hard-code the length of the structure. Use something like %size(JEQRY) or whatever. Also you have a value of about 20 bytes represented in the structure, yet you tell it that you're passing only 12 bytes. Ain't gonna work. -Bob Cozzi www.RPGxTools.com RPG xTools - Enjoy programming again. -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Tony Carolla Sent: Thursday, October 20, 2005 11:49 AM To: RPG programming on the AS400 / iSeries Subject: Re: Journal APIs Thanks for the prototype! Whew... This is not an easy API to use! I am just trying to get the API to return data from a journal, so that I can see it, and begin the process of modifying my structures for receiving the data, etc. Unfortunately, I keep getting the CPF694B error -- Length of variable record for key not valid. This is the code I am using: D GetEntries PR ExtProc('QjoRetrieveJournalEntries') D szRtnBuffer 65535A OPTIONS(*VARSIZE) D nBufLen 10I 0 Const D JrnName 20A Const D szAPIFmt 8A Const D szJrnEntQry 32766A Const OPTIONS(*OMIT) D api_Error 65535A Options(*Omit) D QUSEC S 65535A Inz D RtnBuffer S 65535A Inz D BufLen S 10I 0 Inz(65535) D JName S 20A Inz('LOGJRN HOSPLOG ') D APIFmt S 8A Inz('RJNE0200') D JEQry DS Qualified D NumRecs 10I 0 Inz(1) D RecLen 10I 0 Inz(12) D KeyID 10I 0 Inz(6) D DataLen 10I 0 Inz(4) D Parm 10I 0 Inz(100) /Free *InLR=*On; GetEntries(RtnBuffer:Buflen:JName:APIFmt:JEQry:qusec); Return; /End-Free I want all entries from this journal, but If I omit the query parameter, the receiver variable returns nothing. I know this journal has entries in it. When I look in the error chunk (QUSEC), I keep seeing the CPF694B error. Any help or hints would be greatly appreciated. On 10/20/05, Bob Cozzi <cozzi@xxxxxxxxx> wrote: > > Tony, > In the RPGLAB,... > -- "Enter any 11-digit prime number to continue..." "In Hebrew SQL, how do you use right() and left()?..." - Random Thought "If all you have is a hammer, all your problems begin to look like nails"
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.