[NEWSboard IBMi Forum]
  1. #1
    Registriert seit
    May 2017
    Beiträge
    12

    Source vom Typ IRP?

    Hallo,

    ich habe hier auf der Maschine (V5R4) eine Source vom Typ IRP (Intermediate representation source)
    Es gibt auch ein entsprechendes Programmobjekt (Compiler: Stand 5738SS1 V2R2M0)
    Kann man aus der Source ein Objekt neu erstellen?

    Zu IRP habe ich im Netz folgendes gefunden:
    (https://www.scss.tcd.ie/SCSSTreasure...troduction.pdf)
    "In the early days of the AS/400, the program model was called the Original Program Model (OPM). MI instructions were generated in a fairly direct manner. The OPM source was generated into an Intermediate Representation of a Program (IRP). Next, the IRP had to be converted into MI instructions. This was done by the Program Resolution Monitor (PRM) and resulted in an OPM program template"

    Gruß BR

  2. #2
    Registriert seit
    Nov 2003
    Beiträge
    2.304
    Wie sieht diese Quelle denn aus (ein paar Zeilen als Beispiel)?

    Zitat Zitat von BRoemer Beitrag anzeigen
    ich habe hier auf der Maschine (V5R4) eine Source vom Typ IRP (Intermediate representation source)

  3. #3
    Registriert seit
    May 2017
    Beiträge
    12
    0031.00 /* Declare entry parameters and data */
    0032.00
    0033.00 DCL SPCPTR PSPLFNAME§ PARM; /* Spool file name ptr */
    0034.00 DCL DD PSPLFNAME CHAR(10) BAS(PSPLFNAME§); /* Spool file name */
    0035.00 DCL SPCPTR PJOBNAM§ PARM; /* Job name pointer */
    0036.00 DCL DD PJOBNAM CHAR(10) BAS(PJOBNAM§); /* Job name */
    0037.00 DCL SPCPTR PJOBNBR§ PARM; /* Job number pointer */
    0038.00 DCL DD PJOBNBR CHAR(6) BAS(PJOBNBR§); /* Job number */
    0039.00 DCL SPCPTR TOMBR§ PARM; /* Output member name ptr */
    0040.00 DCL SPCPTR OUTFILE§ PARM; /* Output file name ptr */
    0041.00 DCL SPCPTR OUTLIB§ PARM; /* Output file lib ptr */
    0042.00 DCL SPCPTR CTLCHAR§ PARM; /* Control character ptr */
    0043.00 DCL SPCPTR DLTSPLF§ PARM; /* Delete spool file ptr */
    0044.00 DCL SPCPTR STATS§ PARM; /* Return statistics ptr */
    0045.00 DCL DD STATS CHAR(16) BAS(STATS§) BDRY(16); /* Return statistics */
    0046.00 DCL DD COPIED BIN(4) UNSGND DEF(STATS) POS(1);
    0047.00 DCL DD NOT_COPIED BIN(4) UNSGND DEF(STATS) POS(5);
    0048.00 DCL DD DELETED BIN(4) UNSGND DEF(STATS) POS(9);
    0049.00 DCL DD NOT_DELETED BIN(4) UNSGND DEF(STATS) POS(13);
    0050.00
    0051.00 DCL OL *ENTRY (PSPLFNAME§,
    0052.00 PJOBNAM§,
    0053.00 PJOBNBR§,
    0054.00 TOMBR§,
    0055.00 OUTFILE§,
    0056.00 OUTLIB§,
    0057.00 CTLCHAR§,
    0058.00 DLTSPLF§,
    0059.00 STATS§) PARM EXT; /* Entry parameter list */
    0060.00
    0061.00 /* List API generic header structure */
    0062.00
    0063.00 DCL SYSPTR LSTSPCSYS§; /* System pointer to user space */
    0064.00 DCL SPCPTR LSTSPC§; /* Pointer to user space */
    0065.00 DCL DD GENHDR CHAR(140) BAS(LSTSPC§) BDRY(16); /* List structure */
    0066.00 DCL DD GHSPCSIZ BIN(4) DEF(GENHDR) POS(105); /* Total data space size */
    0067.00 DCL DD GHLSTOFS BIN(4) DEF(GENHDR) POS(125); /* Offset to list section */
    0068.00 DCL DD GHLSTENT BIN(4) DEF(GENHDR) POS(133); /* Number of list entries */
    0069.00 DCL DD GHENTSIZ BIN(4) DEF(GENHDR) POS(137); /* Size of each entry */
    0070.00
    0071.00 DCL SYSPTR QTEMPSYS§ BASPCO POS(65); /* Context system pointer for QTEMP */
    0072.00
    0073.00 DCL DD RSP CHAR(34); /* Template for resolving system pointers */
    0074.00 DCL DD RSPTYP CHAR(2) DEF(RSP) POS(1) INIT(X'1934'); /* Object type *USRSPC */
    0075.00 DCL DD RSPOBJ CHAR(30) DEF(RSP) POS(3); /* Object name */
    0076.00 DCL DD RSPAUT CHAR(2) DEF(RSP) POS(33) INIT(X'0000'); /* Authority */
    0077.00
    0078.00 /* List spooled files data structure */
    0079.00
    0080.00 DCL SPCPTR LSPLFDTA§;
    0081.00 DCL DD LSPLFDTA CHAR(81) BAS(LSPLFDTA§) BDRY(16); /* List data structure */
    0082.00 DCL DD LSDUSR CHAR(10) DEF(LSPLFDTA) POS(1); /* Spool file user name */
    0083.00 DCL DD LSDOUTQ CHAR(10) DEF(LSPLFDTA) POS(11); /* Output queue name */
    0084.00 DCL DD LSDOUTL CHAR(10) DEF(LSPLFDTA) POS(21); /* Output queue library */
    0085.00 DCL DD LSDFORM CHAR(10) DEF(LSPLFDTA) POS(31); /* Form type */
    0086.00 DCL DD LSDUSRD CHAR(10) DEF(LSPLFDTA) POS(41); /* User-specified data */
    0087.00 DCL DD LSDIJID CHAR(16) DEF(LSPLFDTA) POS(51); /* Internal job ID */
    0088.00 DCL DD LSDISID CHAR(16) DEF(LSPLFDTA) POS(67); /* Internal spool file ID */
    0089.00
    0090.00 /* Define parms and data for calling QUSRSPLA */
    0091.00
    0092.00 DCL SYSPTR QUSRSPLA INIT('QUSRSPLA',TYPE(PGM,1)); /* Ptr to QUSRSPLA */
    0093.00
    0094.00 /* Retrieve spooled files attributes data structure */
    0095.00
    0096.00 DCL DD RSPLADTA CHAR(80) BDRY(16);
    0097.00 DCL SPCPTR RSPLADTA§ INIT(RSPLADTA);
    0098.00 DCL DD LSAJOB CHAR(10) DEF(RSPLADTA) POS(41); /* JOB NAME */
    0099.00 DCL DD LSAUSR CHAR(10) DEF(RSPLADTA) POS(51); /* USER ID */
    0100.00 DCL DD LSAJOB# CHAR(6) DEF(RSPLADTA) POS(61); /* JOB NUMBER */
    0101.00 DCL DD LSASPLFN CHAR(10) DEF(RSPLADTA) POS(67); /* SPOOLED FILE NAME */
    0102.00 DCL DD LSASPLF# BIN(4) DEF(RSPLADTA) POS(77); /* SPOOLED FILE NUMBER */
    0103.00
    0104.00 DCL DD RSPVARLEN BIN(4) INIT(X'00000050'); /* Return variable length 80 */
    0105.00 DCL SPCPTR RSPVARLEN§ INIT(RSPVARLEN);
    0106.00
    0107.00 DCL DD RSPFMTNAM CHAR(8) INIT('SPLA0100'); /* Format name for API */
    0108.00 DCL SPCPTR RSPFMTNAM§ INIT(RSPFMTNAM);
    0109.00
    0110.00 DCL DD RSPJOBNAM CHAR(26) INIT('*INT ');
    0111.00 DCL SPCPTR RSPJOBNAM§ INIT(RSPJOBNAM); /* Job name is *INT */
    0112.00
    0113.00 DCL SPCPTR RSPIJID§; /* Internal job ID */
    0114.00
    0115.00 DCL SPCPTR RSPISID§; /* Internal spool ID */
    0116.00
    0117.00 DCL DD RSPSPLFNAM CHAR(10) INIT('*INT '); /* SPLFNAM is *INT */
    0118.00 DCL SPCPTR RSPSPLFNAM§ INIT(RSPSPLFNAM);
    0119.00
    0120.00 DCL DD RSPSPLF# BIN(4) INIT(X'00000000'); /* Only one spool file */
    0121.00 DCL SPCPTR RSPSPLF#§ INIT(RSPSPLF#);
    0122.00
    0123.00 DCL OL SPLAPARM (RSPLADTA§,
    0124.00 RSPVARLEN§,
    0125.00 RSPFMTNAM§,
    0126.00 RSPJOBNAM§,
    0127.00 RSPIJID§,
    0128.00 RSPISID§,
    0129.00 RSPSPLFNAM§,
    0130.00 RSPSPLF#§); /* Parm list for QUSRSPLA */
    0131.00
    0132.00 /* Define parms and data for calling CPYALLSPL3 */
    0133.00
    0134.00 DCL SYSPTR CPYALLSPL3 INIT('CPYALLSPL3',TYPE(PGM,1));
    0135.00
    0136.00 DCL SPCPTR CPJOB§; /* Pointers to current list values */
    0137.00 DCL SPCPTR CPUSR§;
    0138.00 DCL SPCPTR CPJOB#§;
    0139.00 DCL SPCPTR CPSPLFN§;
    0140.00 DCL DD CPSPLF# PKD(4,0);
    0141.00 DCL SPCPTR CPSPLF#§ INIT(CPSPLF#);
    0142.00
    0143.00 DCL DD CPCPLGL CHAR(1) INIT('0'); /* Logical variables for return stats */
    0144.00 DCL SPCPTR CPCPLGL§ INIT(CPCPLGL); /* File copied */
    0145.00 DCL DD CPNCPLGL CHAR(1) INIT('0');
    0146.00 DCL SPCPTR CPNCPLGL§ INIT(CPNCPLGL); /* File not copied */
    0147.00 DCL DD CPDLLGL CHAR(1) INIT('0');
    0148.00 DCL SPCPTR CPDLLGL§ INIT(CPDLLGL); /* File deleted */
    0149.00 DCL DD CPNDLLGL CHAR(1) INIT('0');
    0150.00 DCL SPCPTR CPNDLLGL§ INIT(CPNDLLGL); /* File not deleted */
    0151.00
    0152.00 DCL OL SPLF3PARM (CPJOB§,
    0153.00 CPUSR§,
    0154.00 CPJOB#§,
    0155.00 CPSPLFN§,
    0156.00 CPSPLF#§,
    0157.00 TOMBR§,
    0158.00 OUTFILE§,
    0159.00 OUTLIB§,
    0160.00 CTLCHAR§,
    0161.00 DLTSPLF§,
    0162.00 CPCPLGL§,
    0163.00 CPNCPLGL§,
    0164.00 CPDLLGL§,
    0165.00 CPNDLLGL§); /* Parms for CPYALLSPL3 */
    0166.00
    0167.00 DCL CON *ALL CHAR(4) INIT('*ALL');
    0168.00
    0169.00 /* Program entry point */
    0170.00
    0171.00 ENTRY * (*ENTRY) EXT;
    0172.00
    0173.00 /* Resolve to the user space and resize it */
    0174.00
    0175.00 CPYBLAP RSPOBJ,'SPLSPC',' '; /* User space name */
    0176.00 RSLVSP LSTSPCSYS§,RSP,QTEMPSYS§,*; /* Resolve pointer to SPLSPC */
    0177.00 SETSPPFP LSTSPC§,LSTSPCSYS§; /* SPCPTR to list space */
    0178.00 ADDSPP LSPLFDTA§,LSTSPC§,GHLSTOFS; /* Point to start of list data */
    0179.00 CMPNV(B) GHLSTENT,0/ZER(RETURN); /* No entries selected - return */
    0180.00 MODS LSTSPCSYS§,GHSPCSIZ;
    0181.00
    0182.00 /* Process the spooled file list from the user space */
    0183.00
    0184.00 DO_LIST:
    0185.00
    0186.00 SETSPP RSPIJID§,LSDIJID; /* Point to current list job ID */
    0187.00 SETSPP RSPISID§,LSDISID; /* Point to current list spool ID */
    0188.00 CALLX QUSRSPLA,SPLAPARM,*; /* Call retrieve SPLF attributes */
    0189.00
    0190.00 /* Test the spooled file name */
    0191.00
    0192.00 CMPBLAP(B) PSPLFNAME,*ALL,' '/EQ(END01);
    0193.00 CMPBLA(B) PSPLFNAME,LSASPLFN/NEQ(GETNEXT);
    0194.00 END01:
    0195.00
    0196.00 /* Test the job name */
    0197.00
    0198.00 CMPBLAP(B) PJOBNAM,*ALL,' '/EQ(END02);
    0199.00 CMPBLA(B) PJOBNAM,LSAJOB/NEQ(GETNEXT);
    0200.00 END02:
    0201.00
    0202.00 /* Test the job number */
    0203.00
    0204.00 CMPBLAP(B) PJOBNBR,*ALL,' '/EQ(END03);
    0205.00 CMPBLA(B) PJOBNBR,LSAJOB#/NEQ(GETNEXT);
    0206.00 END03:
    0207.00
    0208.00 /* Process the current list entry */
    0209.00
    0210.00 SETSPP CPJOB§,LSAJOB; /* Point to the current list values */
    0211.00 SETSPP CPUSR§,LSAUSR;
    0212.00 SETSPP CPJOB#§,LSAJOB#;
    0213.00 SETSPP CPSPLFN§,LSASPLFN;
    0214.00 CPYNV CPSPLF#,LSASPLF#; /* Convert from BIN(4) to PKD(4,0) */
    0215.00
    0216.00 CALLX CPYALLSPL3,SPLF3PARM,*; /* Process the spool file entry */
    0217.00
    0218.00 CMPBLA(B) CPCPLGL,'1'/NEQ(TNCPY); /* Add to copied file count */
    0219.00 ADDN(S) COPIED,1;
    0220.00
    0221.00 TNCPY: /* Add to not-copied file count */
    0222.00 CMPBLA(B) CPNCPLGL,'1'/NEQ(TDLT);
    0223.00 ADDN(S) NOT_COPIED,1;
    0224.00
    0225.00 TDLT: /* Add to deleted file count */
    0226.00 CMPBLA(B) CPDLLGL,'1'/NEQ(TNDLT);
    0227.00 ADDN(S) DELETED,1;
    0228.00
    0229.00 TNDLT: /* Add to not-deleted file count */
    0230.00 CMPBLA(B) CPNDLLGL,'1'/NEQ(GETNEXT);
    0231.00 ADDN(S) NOT_DELETED,1;
    0232.00
    0233.00 /* Select next list entry or exit */
    0234.00
    0235.00 GETNEXT:
    0236.00 SUBN(S) GHLSTENT,1; /* Decrement entries to process */
    0237.00 ADDSPP LSPLFDTA§,LSPLFDTA§,GHENTSIZ; /* Point to next list entry */
    0238.00 CMPNV(B) GHLSTENT,0/HI(DO_LIST);
    0239.00
    0240.00 /* Normal exit point */
    0241.00
    0242.00 RETURN:
    0243.00 RTX *; /* Return to caller */
    0244.00
    0245.00 PEND; /* End of source */

  4. #4
    Registriert seit
    Feb 2001
    Beiträge
    20.207
    Das ist nativer MI-Code der per API auch in ein OPM-Programm überführt werden kann.
    Einen Compiler dirkekt gibt es nicht.

    Ich habe allerdings mal einen kostenpflichtigen MI-Compiler (mit ein paar Features) entwickelt der immer noch funktioniert.
    Dienstleistungen? Die gibt es hier: http://www.fuerchau.de
    Das Excel-AddIn: https://www.ftsolutions.de/index.php/downloads
    BI? Da war doch noch was: http://www.ftsolutions.de

  5. #5
    Registriert seit
    May 2017
    Beiträge
    12
    Danke für den Hinweis.

    Wie heißt das API?
    Ist es das QPRCRTPG ?

  6. #6
    Registriert seit
    Nov 2003
    Beiträge
    2.304
    Ja. Vielleicht habt ihr schon den Compiler auf der Maschine. Suche mal nach CRTMI oder CRTMIPGM.

    Zitat Zitat von BRoemer Beitrag anzeigen
    Wie heißt das API?
    Ist es das QPRCRTPG ?

  7. #7
    Registriert seit
    Feb 2001
    Beiträge
    20.207
    Ja, das ist das API.
    Schreib ein Programm, dass die Quelle in ein großes Feld einliest und lass das Objekt compilieren.

    Mein CRTMIPGM (heißt genauso wie der Link) kann halt ein wenig mehr.
    Dienstleistungen? Die gibt es hier: http://www.fuerchau.de
    Das Excel-AddIn: https://www.ftsolutions.de/index.php/downloads
    BI? Da war doch noch was: http://www.ftsolutions.de

Similar Threads

  1. ILE RPG Source in PGU übertragen
    By -Totti in forum IBM i Hauptforum
    Antworten: 7
    Letzter Beitrag: 10-04-18, 14:11
  2. Wo ist die Source zu einem Pogramm?
    By Tschabo in forum NEWSboard Programmierung
    Antworten: 3
    Letzter Beitrag: 03-06-16, 08:58
  3. Load source Tagget
    By tt0ny in forum IBM i Hauptforum
    Antworten: 0
    Letzter Beitrag: 04-06-14, 14:59
  4. Source PRTF
    By Liebhoff in forum IBM i Hauptforum
    Antworten: 1
    Letzter Beitrag: 20-03-03, 16:30
  5. Fehlende Source
    By Helwo in forum NEWSboard Server Software
    Antworten: 3
    Letzter Beitrag: 16-08-01, 21:22

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • You may not post attachments
  • You may not edit your posts
  •