-
Hi nochmals, da die Firma ausgeblendet wird, kannst Du mich einfach anmailen, ich helfe weiter.
Rolf.Krause@Leica-Microsystems.com
Gruß
-
Achtung Franz Kaltenleithner,
bitte mich nochmals anschreiben. Deine Email-Adresse ist nicht in Ordnung. Kann keine Antwort schreiben.
Gruß
-
Hi,
*entstaub* ich muss das Thema nochmal ausgraben. Ich habe den Quelltext von Schulz versucht zu compilen, aber ich hab da noch ein paar kleine Probleme. Vielleicht kann mir einer helfen.
Nachdem ich im oberen Teil die Codezeilen zurechtgerückt habe, waren die Fehler schonmal minimiert. Aber warum sind in der CTDS 285 Zeilen? Ich habe 302 gezählt und wenn ich das so eintrage lässt sich das Programm auch wandeln.
Beim Ausführen kommt dann folgender Fehler:
Zwischendarstellung des Programms (IRP) enthält 2 Fehler. Wahrscheinlich
Compiler-Fehler.
Ich hoffe, dass ihr mir helfen könnt
-
Gib beim Compilieren *LIST als Option an, dann kannst du den Fehler im Spool sehen.
-
Hab ich gemacht. Ich muss aber zu meiner Schande gestehen, dass mir die ganzen Aussagen nicht weiterhelfen.
Hier mal mein Quelltext. Vielleicht ist ja nen Fehler durch das Zurechtschieben entstanden. Mit der Zeit lässt das Verständnis für RPGIII nach.
Code:
*================================================= ===============
* This program creates MI program RTVQRYF in library QGPL. The =
* program can be moved from library QGPL to any library you =
* choose =
* =
* THE SOURCE STATEMENTS FOR THE MI PROGRAM ARE FOUND IN ARRAY =
* MI. LOOK AT COMMENTS IN THE MI SOURCE FOR INFORMATION ON THE =
* PARAMETERS YOU NEED TO PASS WHEN CALLING THE RTVQRYF UTILITY. =
*================================================= ===============
E MI 1 302 80
I DS
I B 1 40#SRCLN
I I 'RTVQRYF QGPL' 5 24 #PGMLB
I 25 74 #TEXT
I I 'QMISRC QGPL' 75 94 #SRCFL
I I 'RTVQRYF' 95 104 #MBR
I 105 117 #CHGDT
I 105 105 #CENT
I 106 107 #YY
I 108 111 #MMDD
I 112 117 #HMS
I 118 137 #PRTFL
I B 138 1410#STRPG
I 142 151 #AUT
I 152 327 #OP
I B 328 3310#NOOPT
I DS
I 1 120TIMDAT
I 1 6 HHMMSS
I 7 10 MMDD
I 11 12 YY
C TIME TIMDAT
C MOVELMMDD DD 2
C MOVE MMDD MM 2
C MOVELMM MMDD
C MOVE DD MMDD
C MOVE '1' #CENT
C MOVE YY #YY
C MOVE MMDD #MMDD
C MOVE HHMMSS #HMS
C CALL 'QPRCRTPG'
C PARM MI
C PARM 21920 #SRCLN
C PARM #PGMLB
C PARM ' ' #TEXT
C PARM #SRCFL
C PARM #MBR
C PARM #CHGDT
C PARM ' ' #PRTFL
C PARM 0 #STRPG
C PARM '*USE' #AUT
C PARM ' ' #OP
C PARM 0 #NOOPT
C MOVE *ON *INLR
**
/*================================================= ==================*/
/* Program....... RTVQRYF */
/* Description... Retrieve list of files used by query */
/* --------------------------------------------------------------- */
/* Parameter description Type Length */
/* */
/* Query name (required) Character 10 */
/* Library containing query (Name required) Character 10 */
/* Input file list structure Character 1280 */
/* */
/* The 1280 byte file list structure is used */
/* to return the list of files used as input to */
/* the query. The strucure is a 32 element */
/* array of 40 bytes. The format is a 10 byte */
/* file name, 10 byte library name, 10 byte */
/* member name and 10 byte record format name. */
/* The member name could be returned as special */
/* value *FIRST, in which case you must */
/* retrieve specific member name information */
/* if needed. */
/* */
/* Output file structure Character 30 */
/* */
/* The 30 byte output file structure is used */
/* to return the output file of the query. */
/* The format is a 10 byte file name, 10 byte */
/* library name and 10 byte member name. The */
/* member name could be returned as special */
/* value *FIRST or *FILE, in which case you */
/* must retrieve the specific member name */
/* information if needed. If the query does */
/* not produce an output file, special value */
/* *NONE will be returned at the beginning */
/* of the structure. If the output file is */
/* the default QQRYOUT, special value *DFT */
/* will be returned at the beginning of */
/* the structure. */
/* */
/* Return code (0=Normal, 1=Abend) Character 1 */
/*================================================= ==================*/
ENTRY *(ENTRY_PLIST) EXT ;
/*================================================= ==================*/
/* Entry parameters */
/*================================================= ==================*/
DCL SPCPTR Query@
PARM ;
DCL DD Query
CHAR(10)
BAS(Query@) ;
DCL SPCPTR Query_Library@
PARM ;
DCL DD Query_Library
CHAR(10)
BAS(Query_Library@) ;
DCL SPCPTR Query_Input_Files@
PARM ;
DCL DD Query_Input_Files
CHAR(1280)
BAS(Query_Input_Files@) ;
DCL SPCPTR Query_Output_File@
PARM ;
DCL DD Query_Output_File
CHAR(30)
BAS(Query_Output_File@) ;
DCL SPCPTR Return_Code@
PARM ;
DCL DD Return_Code
CHAR(1)
BAS(Return_Code@) ;
DCL OL ENTRY_PLIST(Query@,
Query_Library@,
Query_Input_Files@,
Query_Output_File@,
Return_Code@)
PARM
EXT
MIN(5) ;
/*================================================= ==================*/
/* System pointers for library and query definition */
/*================================================= ==================*/
DCL SYSPTR Library# ;
DCL SYSPTR Query# ;
/*================================================= ==================*/
/* Query definition data */
/*================================================= ==================*/
DCL SPCPTR Query_Data@ ;
DCL SPCPTR Query_Number_Input_Files@ ;
DCL DD Query_Number_Input_Files
BIN(2)
BAS(Query_Number_Input_Files@) ;
/*================================================= ==================*/
/* Template for system pointer resolution */
/*================================================= ==================*/
DCL DD Object
CHAR(34) ;
DCL DD Object_Type
CHAR(2)
DEF(Object)
POS(1) ;
DCL DD Object_Name
CHAR(30)
DEF(Object)
POS(3) ;
DCL DD Object_Authority
CHAR(2)
DEF(Object)
POS(33)
INIT(X'0000') ;
/*================================================= ==================*/
/* Template for query definition input file */
/*================================================= ==================*/
DCL SPCPTR Query_Input_Files_Template@ ;
DCL DD Query_Input_Files_Template
CHAR(80)
BAS(Query_Input_Files_Template@) ;
DCL DD Query_Input_Files_Template_File_Name
CHAR(10)
DEF(Query_Input_Files_Template)
POS(3) ;
DCL DD Query_Input_Files_Template_Library_Name
CHAR(10)
DEF(Query_Input_Files_Template)
POS(15) ;
DCL DD Query_Input_Files_Template_Member_Name
CHAR(10)
DEF(Query_Input_Files_Template)
POS(27) ;
DCL DD Query_Input_Files_Template_Format_Name
CHAR(10)
DEF(Query_Input_Files_Template)
POS(39) ;
/*================================================= ==================*/
/* Template for query definition output file */
/*================================================= ==================*/
DCL SPCPTR Query_Output_File_Template@ ;
DCL DD Query_Output_File_Template
CHAR(112)
BAS(Query_Output_File_Template@) ;
DCL DD Query_Output_File_Template_File_Name
CHAR(10)
DEF(Query_Output_File_Template)
POS(5) ;
DCL DD Query_Output_File_Template_Library_Name
CHAR(10)
DEF(Query_Output_File_Template)
POS(17) ;
DCL DD Query_Output_File_Template_Member_Name
CHAR(10)
DEF(Query_Output_File_Template)
POS(29) ;
/*================================================= ==================*/
/* Work variables */
/*================================================= ==================*/
DCL DD Next_File_Offset
BIN(2)
AUTO ;
DCL DD Query_Number_Input_Files_Work
BIN(2) ;
DCL SPCPTR Query_Data_Offset@ ;
DCL DD Query_Data_Offset
BIN(4)
BAS(Query_Data_Offset@) ;
DCL SPCPTR Query_Output_Type@ ;
DCL DD Query_Output_Type
CHAR(1)
BAS(Query_Output_Type@) ;
/*================================================= ==================*/
/* Exception monitor */
/*================================================= ==================*/
DCL EXCM *
EXCID(H'0000')
BP(.Exit) ;
/*================================================= ==================*/
/* Default to error condition */
/*================================================= ==================*/
CPYBLA Return_Code,'1' ;
/*================================================= ==================*/
/* Initialize input files structure to blanks */
/*================================================= ==================*/
CPYBREP Query_Input_Files,' ' ;
/*================================================= ==================*/
/* Initialize output file name to blanks */
/*================================================= ==================*/
CPYBREP Query_Output_File,' ' ;
/*================================================= ==================*/
/* Resolve pointer to library */
/*================================================= ==================*/
CPYBLA Object_Type,X'0401' ;
CPYBLAP Object_Name,Query_Library,' ' ;
RSLVSP Library#,Object,*,* ;
/*================================================= ==================*/
/* Resolve pointer to query definition */
/*================================================= ==================*/
CPYBLA Object_Type,X'1911' ;
CPYBLAP Object_Name,Query,' ' ;
RSLVSP Query#,Object,Library#,* ;
/*================================================= ==================*/
/* Point to beginning of associated space for query definition */
/*================================================= ==================*/
SETSPPFP Query_Data@,Query# ;
/*================================================= ==================*/
/* Check for output file */
/*================================================= ==================*/
SETSPPO Query_Data@,260 ;
CPYBWP Query_Output_Type@,Query_Data@ ;
CMPBLA(B) Query_Output_Type,'3'/NEQ(.No_Output_File) ;
/*================================================= ==================*/
/* Retrieve offset to output file */
/*================================================= ==================*/
SETSPPO Query_Data@,380 ;
/*================================================= ==================*/
/* Point to beginning of output file template area */
/*================================================= ==================*/
CPYBWP Query_Data_Offset@,Query_Data@ ;
CMPBLA(B) Query_Data_Offset,
X'00000000'/EQ(.Dft_Output_File) ;
SETSPPO Query_Data@,Query_Data_Offset ;
CPYBWP Query_Output_File_Template@,Query_Data@ ;
CPYBLA Query_Output_File(1:10),
Query_Output_File_Template_File_Name ;
CPYBLA Query_Output_File(11:10),
Query_Output_File_Template_Library_Name ;
CPYBLA Query_Output_File(21:10),
Query_Output_File_Template_Member_Name ;
B .Get_Input_Files ;
/*================================================= ==================*/
/* Query does not have an outfile */
/*================================================= ==================*/
.No_Output_File: ;
CPYBLA Query_Output_File,'*NONE' ;
B .Get_Input_Files ;
/*================================================= ==================*/
/* Query uses default outfile */
/*================================================= ==================*/
.Dft_Output_File: ;
CPYBLA Query_Output_File,'*DFT' ;
/*================================================= ==================*/
/* Retrieve offset to number of files used as input to query */
/*================================================= ==================*/
.Get_Input_Files: ;
SETSPPO Query_Data@,558 ;
/*================================================= ==================*/
/* Retrieve number of files used as input to query */
/*================================================= ==================*/
CPYBWP Query_Number_Input_Files@,Query_Data@ ;
CPYNV Query_Number_Input_Files_Work,
Query_Number_Input_Files ;
/*================================================= ==================*/
/* Point to beginning of input file list */
/*================================================= ==================*/
/*================================================= ==================*/
.Dft_Output_File: ;
CPYBLA Query_Output_File,'*DFT' ;
/*================================================= ==================*/
/* Retrieve offset to number of files used as input to query */
/*================================================= ==================*/
.Get_Input_Files: ;
SETSPPO Query_Data@,558 ;
/*================================================= ==================*/
/* Retrieve number of files used as input to query */
/*================================================= ==================*/
CPYBWP Query_Number_Input_Files@,Query_Data@ ;
CPYNV Query_Number_Input_Files_Work,
Query_Number_Input_Files ;
/*================================================= ==================*/
/* Point to beginning of input file list */
/*================================================= ==================*/
SETSPPO Query_Data@,560 ;
/*================================================= ==================*/
/* Loop through list of input files */
/*================================================= ==================*/
CPYNV Next_File_Offset,1 ;
.Loop01: ;
CMPNV(B) Query_Number_Input_Files_Work,0/EQ(.End01) ;
CPYBWP Query_Input_Files_Template@,Query_Data@ ;
CPYBLA Query_Input_Files(Next_File_Offset:10),
Query_Input_Files_Template_File_Name ;
ADDN(S) Next_File_Offset,10 ;
CPYBLA Query_Input_Files(Next_File_Offset:10),
Query_Input_Files_Template_Library_Name ;
ADDN(S) Next_File_Offset,10 ;
CPYBLA Query_Input_Files(Next_File_Offset:10),
Query_Input_Files_Template_Member_Name ;
ADDN(S) Next_File_Offset,10 ;
CPYBLA Query_Input_Files(Next_File_Offset:10),
Query_Input_Files_Template_Format_Name ;
ADDN(S) Next_File_Offset,10 ;
SUBN(S) Query_Number_Input_Files_Work,1 ;
ADDSPP Query_Data@,Query_Data@,80 ;
B .Loop01 ;
.End01: ;
/*================================================= ==================*/
/* Set normal return code */
/*================================================= ==================*/
CPYBLA Return_Code,'0' ;
.Exit: ;
DEACTPG * ;
RTX * ;
/*================================================= ==================*/
/* End of program return */
/*================================================= ==================*/
/*'/*'/*"/*"*/; PEND;;;
-
Und schon ist der Urlaub vorbei. Ich wünsche noch eine gesundes neues Jahr.
Das Programm lässt mich noch nicht los. Leider bin ich nicht weiter gekommen. Es wäre toll, wenn sich nochmal jemand meines Problems annimmt. Bitte *liebguck*
-
Salve!
Also ich habe mal die RPG-Zeilen einfach mit copy und paste in ne RPG-Quelle reingeschoben und gewandelt.
Hat auf Anhieb geklappt. (Nur ein 10er Fehler wegen keine Sätze zur Initialisierung, das kann man so lassen)
Von daher verstehe ich Dein Problem nicht.
Machs mal so wie Fuerchau gesagt hat und sag uns mal was den als Fehler ausgeworfen wird?
Wobei wie gesagt, bei mir ging es auf Anhieb.
kuempi
-
ja, lesen muss man können sagte Werner immer.
Also das zu erstellende MI macht Zicken?
Wenn du das RPG laufen lässt.. dann kommt der Fehler oder wie?
*peiltgeradenix*
k.
-
Genau das wollte ich gerade schreiben Beim Ausführen tritt der Fehler erst auf...
-
*seufz*
ahhh nun hab ichs.
ich meine den gleichen Fehler....
Zwischendarstellung des Programms (IRP) enthält 2 Fehler. Wahrscheinlic
Compiler-Fehler.
Funktionsprüfung. CPF6301 nicht überwacht durch CLMIRPG bei Anweisung
3300, Instruktion X'003C'.
mal schauen
*grübel*
-
sodele,
ich weiss gar nicht, wo ich anfangen soll.
alsooooooo....
Die Quelle von User Schulz ist Schrott glaube ich.
Da stimmt einiges vorne und hinten nicht.
Die Grundidee für dieses "Programm" scheint von hier entnommen zu sein: System i - i5 - iSeries - AS400 - AS/400 Programming Tips
Wenn ich mir das anschaue, besteht die Technik ja wohl darin, den als DS im RPG angehängten Text an das interne Api zu übergeben, damit daraus ein MI erstellt wird.
Leider ist in der Quelle von Schulz schon mindestens ein Fehler drin, bezüglich der Sourcelänge.
E MI 1 285 80
C PARM 21920 #SRCLN
da müsste meiner Meinung nach nicht 21920 sondern 22800 stehen.
Auf Deine Modifizierte Quelle wird dieser Fehler nun mitgeschleppt
PHP-Code:
E MI 1 302 80
C PARM 21920 #SRCLN
statt 21920 müsste es atm 24160 heissen.
Will sagen, der Api kriegt sich da nicht ein irgendwo.
Nun habe ich mal versucht die Zahlen zu ändern, passiert der gleiche Schrott.
Ich rate Dir, das Projekt zu vergessen.
Da das vermutlich aber für Dich nicht in Frage kommt, schlage ich Dir folgende Vorgehensweise vor:
Mach Dir erst mal ein eigenen CRTMI-Command.
Alle notwendigen Quellen findest Du hier: APIs by Example: A Machine Interface (MI) Compiler | System iNetwork
Dann hätteste Du ein lecker CMD mit CL und RPG und beides auf Ilebasis.
Damit kann man dann weiter rumspielen.
Zum Beispiel dann den verkorksten Text von User Schulz mal nehmen, als MI-SRC (einfach nur ne Textsource) mit coppyfloppy als Member abstellen und dann mal schauen, ob da raus ein MI gemacht wird.
Letzteres bezweifel ich irgendwie, speziell die letzte Zeile sieht mir komisch aus, aber da kenne ich mich zu wenig aus.
Gefunden habe ich den ganzen MI-Quatsch hier: Programming Tips for System i, i5, iSeries (AS/400) Consultants - Contract Programmers, Programming, Contractors, Consulting, Software, Development, and Support. SQL, RPG, Books, Java, Atlanta
Das scheint mir eine gute Referenz zu sein.
Sodele, ich bin raus aus dem Pot, würde aber gerne mal hören wenn es klappt oder nicht eben.
Kuempi
-
Na gut, danke dir für deine Mühen. Ich werd mir das ganze Mal angucken.
Similar Threads
-
By Frank Ziegler in forum IBM i Hauptforum
Antworten: 14
Letzter Beitrag: 10-12-06, 10:21
-
By Kaufmann in forum IBM i Hauptforum
Antworten: 6
Letzter Beitrag: 29-11-06, 18:07
-
By Azubiiiiii in forum IBM i Hauptforum
Antworten: 6
Letzter Beitrag: 03-08-06, 09:44
-
By Hubert Brethauer in forum IBM i Hauptforum
Antworten: 6
Letzter Beitrag: 05-05-06, 12:37
-
By antonkuh in forum IBM i Hauptforum
Antworten: 1
Letzter Beitrag: 24-04-06, 10:37
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