×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Hi,

The code that i have is this one:

H BNDDIR('QC2LE') actgrp('QILE') DFTACTGRP(*NO)
** int sprintf( char *buffer, const char *format [, argument] ... );
D sprintf4        PR            10I 0 ExtProc('sprintf')
D  szRecvVar                      *   VALUE Options(*STRING)
D  szFormat                       *   VALUE Options(*STRING)
D  szData1                        *   VALUE OPTIONS(*STRING)
D  szData2                        *   VALUE OPTIONS(*STRING: *NOPASS)
D  szData3                        *   VALUE OPTIONS(*STRING: *NOPASS)
D  szData4                        *   VALUE OPTIONS(*STRING: *NOPASS)
 *
D api_error       S             21A
 ** Variáveis utilizadas na SndPgmMsg API
D szMsgID         S              7A   Inz('CPF9898')
D szMsgFile       S             20A   Inz('QCPFMSG   QSYS' )
D szMsgText       S            255A
D nMsgLen         S             10I 0
D szMsgType       S             10A
D szToPgmQ        S             10A
D nToPgmQ         S             10I 0
D szMsgKey        S              4A
 ** A pointer to the receiving buffer, used by sprintf
D pBuffer         S               *
D szBuffer        S                   Like(szMsgText)
**  Tells the APIs how long the buffers are that are being used.
D nBufLen         S             10I 0
 ** The structure returned by the QusRMBRD API.
D szMbrd0100      DS                  INZ
D  nBytesRtn                    10I 0
D  nBytesAval                   10I 0
D  szFileName                   10A
D  szLibName                    10A
D  szMbrName                    10A
D  szFileAttr                   10A
D  szSrcType                    10A
D  dtCrtDate                    13A
D  dtLstChg                     13A
D  szMbrText                    50A
D  bIsSource                     1A
 *
D  RecCount                     10I 0
D  DltRecCnt                    10I 0
D  DataSpaceSz                  10I 0
D  AccpthSz                     10I 0
D  NbrBasedOnMbr                10I 0
 *
D pMbrText        S               *
 ** Source file name
D szSrcFile       S             10A
D szSrcLib        S             10A
D szSrcMbr        S             10A
**----------------------------------------------------------------
** Parâmetros de input da QUSRMBRD API
**----------------------------------------------------------------
 ** Formato a ser devolvido
D szFmt           S              8A   Inz('MBRD0200')
** Nome do ficheiro e da biblioteca
D szQualName      S             20A
** Whether or not to ignore overrides (0=Ignore, 1 = Apply)
D bOvr            S              1A   Inz('0')
**----------------------------------------------------------------
 **  Chamar este programa com  3 parâmetros:
 **
 **   (Nome do ficheiro) (Nome da biblioteca) (Nome do Membro)
 **----------------------------------------------------------------
C     *ENTRY        PLIST
C                   Parm                    szSrcFile
C                   Parm                    szSrcLib
C                   Parm                    szSrcMbr
C                   if        %Parms < 3
C                   Eval      szMsgText = 'CE3-Invalid parameter list'
C                   else
**----------------------------------------------------------------
**  Faz o call ao QusRMBRD para obter os atributos dos membros
 **----------------------------------------------------------------
C                   Eval      szQualName = szSrcFile + szSrcLib
C                   Eval      nBufLen = %size(szMbrD0100)
**----------------------------------------------------------------
C                   Call(E)   'QUSRMBRD'
C                   Parm                    szMbrD0100
C                   Parm                    nBufLen
C                   Parm                    szFmt
C                   Parm                    szQualName
C                   Parm                    szSrcMbr
C                   Parm                    bOvr
**----------------------------------------------------------------
**  If RTFMBRD failed, we tell the FTP client that it failed.
 **----------------------------------------------------------------
C                   if        %Error
C                   Eval      szMsgText = 'CE3-RTVMBRD Failed'
 **  Otherwise, just keep on going!
C                   else
C                   Eval      szBuffer= *ALLX'00'
C                   Eval      pBuffer  = %addr(szBuffer)
C                   eval      szMbrText = %TrimR(szMbrText)+X'00'
C                   eval      pMbrText = %addr(szMbrText)
**----------------------------------------------------------------
 **  Use the C runtime sprintf() to concatenate everything nicely
**----------------------------------------------------------------
C                   CallP     sprintf4(pBuffer :
C                                   'CX3%s%s%s%s' :
C                                   szSrcType  :
C                                  bIsSource  :
C                                   dtLstChg   :
C                                   pMbrText )
**  The formatted response text gets sent as msg data
C                   Eval      szMsgText = %str(pBuffer)
C                   endif
C                   endif
**  Tell the API how long the message text (actually Msgdata) is.
C                   Eval      nMsgLen = %Len(%trimr(szMsgText))
**----------------------------------------------------------------
 **  SndPgmMsg MSGID(CPF9898) MSGF(QSYS/QCPFMSG) TOPGMQ(*PRV) +
 **               MSGDTA(szMsgText)  MSGTYPE(*ESCAPE)
 **----------------------------------------------------------------
C                   Call      'QMHSNDPM'
C                   Parm      'CPF9898'     szMsgID
C                   Parm                    szMsgFile
C                   Parm                    szMsgText
C                   Parm                    nMsgLen
C                   Parm      '*ESCAPE'     szMsgType
C                   Parm      '*PGMBDY'     szToPgmQ
C                   Parm      1             nToPgmQ
C                   Parm                    szMsgKey
C                   Parm                    api_error
** Note, we return here to improve performance for subsequent calls
 ** The program will end when the FTP server's job itself ends.
 ** If you are uncomfortable with this, uncomment the *INLR line:
C****               MOVE      *ON           *INLR
C                   return





Please respond to RPG programming on the AS400 / iSeries
       <rpg400-l@xxxxxxxxxxxx>

Sent by:    rpg400-l-bounces@xxxxxxxxxxxx


To:    "'RPG programming on the AS400 / iSeries'" <rpg400-l@xxxxxxxxxxxx>
cc:
Subject:    RE: QUSRMBRD API


Luis
 what is the problem ?

Is it that the program isn't working or are you asking how the
member got to have a blank change date ?

If you do a DSPFD FILE({lib}/{file}) TYPE(*MBRLIST) OUTPUT(*OUTFILE)
does the member have a Last change date (MLCHGD)?

If it doesn't then it could be that the file/member is very old
and doesn't have one.
Remember that attributes/features have been added at new releases
of OS/400.

I have created a working version based on your program and it appears
to work ok.

HTH

Mike

>Subject: QUSRMBRD API
>
>Can anyone help me with this ?
>
>Can anyoner tell me, why the "dtLstChg" information came with "blanks" in
>       the QUSRMBRD api ?


--



**********************************************************************
The information transmitted is intended only for use by the addressee and may 
contain confidential and/or privileged material. Any review,
re-transmission, dissemination or other use of it, or the taking of any action 
in reliance upon this information by persons and/or entities other than
 the intended recipient is prohibited. If you received this in error, please 
inform the sender and/or addressee immediately and delete the material.
Thank you

**********************************************************************

--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.





Luis Martins
Finibanco, S.A.
Tel.: 21 0002331 - Fax: 21 3114509
http://www.finibanco.pt

__________________________________________________

Esta mensagem e quaisquer ficheiros anexos são confidenciais, destinando-se
ao uso exclusivo da pessoa e/ou entidade a que se dirigem. Caso não se lhe
destine, ou não seja responsável pelo seu encaminhamento ao destinatário,
informamos que a recebeu por engano. Qualquer utilização, distribuição,
reencaminhamento ou outra forma de revelação a terceiros, impressão ou
cópia são expressamente proibidos; sendo que agradecemos que destrua a
mensagem de imediato, informando o seu emissor ou o Finibanco do sucedido.
Não obstante o Finibanco utilizar software anti-vírus como precaução, não é
possível garantir que a presente mensagem e eventuais ficheiros anexos não
contêm vírus, pelo que não consideramos da responsabilidade desta
instituição eventuais consequências inerentes. Alerta-se, ainda, que as
mensagens transmitidas por este meio podem ser interceptadas, corrompidas,
perdidas, destruídas ou entregues com atraso ao destinatário.





This thread ...


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

This mailing list archive is Copyright 1997-2026 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.