-
Problem
Meine Frage ist für euch wahrscheinlich sehr schnell und leicht zu beantworten. Aber ich brauche Hilfe (Blutiger Anfänger ). Und zwar muss ich ein Programm (oder Qry is egal) erstellen, mit dem ich jeden morgen die Größe inklisive der enthaltenen Datensätze von 3 Dateien ausdrucken kann. Ich hab nur keine Ahnung wie ich anfangen soll. BITTE UM SCHNELLE ANTWORT.
MFG Daniel
Morgen. Ich habe so ein ähnliches Problem wie der giant. Allerdings muss ich das mit der Hilfe eines RGP-Programms Realisieren. Datei stellt sich mir die Frage, woher ich die Größe und die Anzahl der Sätze auslesen kann. Wäre nett wenn mir jemand helfen könnte.
DANKE
-
aktive sätze
hallo AleX
1. den befehl rtvmbrd benutzen
2. das api qusrmbrd mit dem format mbrd0200
lg
hans-joachim
-
API Beispiel
Hallo,
vielleicht hilft auch noch dieses Beispiel:
API *-*QUSRMBRD
*****Posted by:*Jamie Flanary **Contact
The QUSRMBRD (Retrieve Member Description) API returns descriptive
information about a member in a file.
D szMsgText S 255A
** 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 RmtFile 1A
D LglPhyFile 1A
D ODPSharing 1A
D filler2 2A
D RecCount 10I 0
D DltRecCnt 10I 0
D DataSpaceSz 10I 0
D AccpthSz 10I 0
D NbrBasedOnMbr 10I 0
**----------------------------------------------------------------
** Input Parameters for the program.
**----------------------------------------------------------------
** Source file name
D szSrcFile S 10A
D szSrcLib S 10A
D szSrcMbr S 10A
**----------------------------------------------------------------
** Input Parameters to the QUSRMBRD API
**----------------------------------------------------------------
** Format to be returned
D szFmt S 8A Inz('MBRD0200')
** Qualified source file and library name
D szQualName S 20A
** Whether or not to ignore overrides (0=Ignore, 1 = Apply)
D bOvr S 1A Inz('0')
**----------------------------------------------------------------
** Call this program with 3 parameters:
** Parm(QRPGLESRC myLibr ORDENTRY)
** srcfile srclib srcmbr
**----------------------------------------------------------------
C *ENTRY PLIST
C Parm szSrcFile
C Parm szSrcLib
C Parm szSrcMbr
**----------------------------------------------------------------
** Call QusRMBRD to retrieve the specified source member's
**----------------------------------------------------------------
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 = 'RTVMBRD Failed'
C endif
C return
-
Hmmm....
Also mit APIs kenn ich mich net so aus. Aer trotzdem danke. Ich werde mal weitertesten.
-
Dann ruf aus dem RPG ein CLP auf dass wiederum den RTVMBRD verwendet.
-
Cl Programm
Hallo AleX,
hier ein CL Beispielprogramm:
CL program using RTVMBRD:
PGM *(&LIB &FILE &MBR)
/* GET NUMBER OF RECORDS IN A FILE MEMBER */
/* IF NO MEMBER IS SPECIFIED **FIRST IS USED */
/* IF RETRIEVE FAILS -000000001 IS RETURNED IN &RCDS */
DCL **&LIB ***CHAR 10
DCL **&FILE **CHAR 10
DCL **&MBR ***CHAR 10
DCL **&RCDS **CHAR 10
DCL **&RCDSN *DEC (10 0)
IF (&MBR *EQ ' ') (CHGVAR &MBR '*FIRST ')
RTVMBRD ***FILE(&LIB/&FILE) MBR(&MBR) NBRCURRCD(&RCDSN)
MONMSG ***(CPF3000 CPF9800) EXEC(CHGVAR &RCDSN -1)
CHGVAR *&RCDS *&RCDSN
ENDPGM
Similar Threads
-
By Stoeberl in forum NEWSboard Programmierung
Antworten: 8
Letzter Beitrag: 10-01-07, 10:58
-
By Stoeberl in forum NEWSboard Programmierung
Antworten: 11
Letzter Beitrag: 26-10-06, 10:07
-
By ChrisX in forum IBM i Hauptforum
Antworten: 1
Letzter Beitrag: 11-10-06, 15:31
-
By Flappes in forum IBM i Hauptforum
Antworten: 0
Letzter Beitrag: 06-10-06, 08:39
-
By KL_RPG in forum NEWSboard Drucker
Antworten: 5
Letzter Beitrag: 12-05-06, 15:07
Berechtigungen
- Neue Themen erstellen: Nein
- Themen beantworten: Nein
- You may not post attachments
- You may not edit your posts
-
Foren-Regeln
|
Erweiterte Foren Suche
Google Foren Suche
Forum & Artikel Update eMail
AS/400 / IBM i
Server Expert Gruppen
Unternehmens IT
|
Kategorien online Artikel
- Big Data, Analytics, BI, MIS
- Cloud, Social Media, Devices
- DMS, Archivierung, Druck
- ERP + Add-ons, Business Software
- Hochverfügbarkeit
- Human Resources, Personal
- IBM Announcements
- IT-Karikaturen
- Leitartikel
- Load`n`go
- Messen, Veranstaltungen
- NEWSolutions Dossiers
- Programmierung
- Security
- Software Development + Change Mgmt.
- Solutions & Provider
- Speicher – Storage
- Strategische Berichte
- Systemmanagement
- Tools, Hot-Tips
Auf dem Laufenden bleiben
|
Bookmarks