× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hello,  I do this:

D  JvR03DtaLen                  10i 0 Inz( %Size( JvR03Dta ))  
D  JvR03Dta                     26a  
D  JvR03DtaDte                  26z   Overlay( JvR03Dta:01 )  


Then


JvR03DtaDte = %TimeStamp; 

And it works


Saludos, 

Leonel Mejía Chinchilla 
Administrador de Seguridad de Sistemas 
Gerencia de Tecnología y Operaciones Regionales 
BAC | Credomatic Network 



Martin Saunders <martin.saunders@xxxxxxxxxxxxxxxx> 
Sent by: rpg400-l-bounces+lmejia=credomatic.com@xxxxxxxxxxxx
12/01/2007 04:15 a.m.
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
rpg400-l@xxxxxxxxxxxx
cc

Subject
Journal API QjoRetrieveJournalEntries






All,

I am using the QjoRetrieveJournalEntries API to retrieve some information 
about 
what is being printed from our system from the job accounting journal 
(QACGJRN). Basically I am trying to create a total number of pages printed 

summarised by device file name and printer over a complete week. I copied 
the 
prototypes, data structures and the program looping logic from Carsten 
Flensburg's examples on systeminetwork.com. I am populating the key 
structures 
for start and end receivers covering the week I need (key structure 1). (I 
am 
doing this because I suspected, based on reading some posts in the 
archives, 
that using *CURCHAIN may have been the cause of my problem - it wasn't). I 
am 
passing timestamps for midnight on the first day of the first week and 
midnight 
on the first day of the second week in key structures 3 and 5. In key 
structure 
7 I am specifying '*ALL' for the journal codes and in key structure 8 I am 

specifying 'SP' for the entry type. I am setting the number of keys 
(JeNbrVarRcd) to 5.

The program writes out the details for 38 spooled file/printer 
combinations to 
the output file but after this it just loops and increments the page count 
for 
these 38 records (looks like it is just retrieving the same journal 
entries 
again and again).

The keys are set up here (apart from the receiver range which I checked in 

debug and is correct):
C                   Eval      JcNbrCod    = 1 
C                   Eval      JcJrnCodVal(1) = '*ALL' 
C                   Eval      JcNbrTyp    = 1 
C                   Eval      JcEntTyp(1) = 'SP' 
C                   Eval      JvR03Dta = %Char(%TimeStamp(%Date(%EditC(
C                                        FromYMD: 'X'): *YMD0))) 
C                   Eval      JvR05Dta = %Char(%TimeStamp(%Date(%EditC(
C                                        ToYMD: 'X'): *YMD0))) 


This is the call to the API
C                   Eval      JeNbrVarRcd = 5 
** 
C                   DoU       JhConInd    = '0'           Or
C                             AeBytAvl    > *Zero 
** 
C                   CallP     RtvJrnE( JeRcvVar 
C                                    : %Size( JeRcvVar ) 
C                                    : 'QACGJRN   *LIBL ' 
C                                    : 'RJNE0200' 
C                                    : JrnEntRtv  + 
C                                      JrnVarR01  + 
C                                      JrnVarR03  + 
C                                      JrnVarR05  + 
C                                      JrnVarR07  + 
C                                      JrnVarR08 
C                                    : ApiError 
C                                    ) 

I am hoping that someone may be able to point me in the direction of where 
to 
look next. The iseries is at V5R2.

Thanks in advance for any suggestions.

Martin


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.