diff --git a/QPROTOSRC/CPY01.RPGINC b/QPROTOSRC/CPY01.RPGINC new file mode 100644 index 0000000..1338905 --- /dev/null +++ b/QPROTOSRC/CPY01.RPGINC @@ -0,0 +1,2 @@ + C MOVE 1 WKVAR1 30 + C MOVE 2 WKVAR2 30 \ No newline at end of file diff --git a/QPROTOSRC/CPYBK1.RPG b/QPROTOSRC/CPYBK1.RPG new file mode 100644 index 0000000..717eb4a --- /dev/null +++ b/QPROTOSRC/CPYBK1.RPG @@ -0,0 +1,7 @@ + *================================================================ + * COPYBOOK1 - Simple Variables (OPM RPG) + *================================================================ + * Define customer number field + C CUSTNO COMP 0 99 + * Define customer name field + C CNAME COMP ' ' 99 \ No newline at end of file diff --git a/QPROTOSRC/CPYBK2.RPG b/QPROTOSRC/CPYBK2.RPG new file mode 100644 index 0000000..5c599aa --- /dev/null +++ b/QPROTOSRC/CPYBK2.RPG @@ -0,0 +1,4 @@ + C SHWCST BEGSR + C CUSTNO DSPLY + C CNAME DSPLY + C ENDSR \ No newline at end of file diff --git a/QPROTOSRC/VAR1.RPG b/QPROTOSRC/VAR1.RPG new file mode 100644 index 0000000..09189b7 --- /dev/null +++ b/QPROTOSRC/VAR1.RPG @@ -0,0 +1 @@ + C MOVEL'ABC' WKVAR 25 \ No newline at end of file diff --git a/QRPGSRC/ADDN.RPG b/QRPGSRC/ADDN.RPG new file mode 100644 index 0000000..4994069 --- /dev/null +++ b/QRPGSRC/ADDN.RPG @@ -0,0 +1,3 @@ + /COPY CPY01 + C WKVAR1 ADD WKVAR2 WKVAR3 30 + C SETON LR \ No newline at end of file diff --git a/QRPGSRC/CSTNAME.SQLRPG b/QRPGSRC/CSTNAME.SQLRPG new file mode 100644 index 0000000..73204fe --- /dev/null +++ b/QRPGSRC/CSTNAME.SQLRPG @@ -0,0 +1,9 @@ + C MOVEL0 CUSTID 50 + C/COPY VAR1 + C/EXEC SQL + C+ SELECT CUSTNM + C+ INTO :WKVAR + C+ FROM CUSTTBL + C+ WHERE CUSTID = :CUSTID + C/END-EXEC + C SETON LR \ No newline at end of file diff --git a/QRPGSRC/CUSTINFO.RPG b/QRPGSRC/CUSTINFO.RPG new file mode 100644 index 0000000..73c81cf --- /dev/null +++ b/QRPGSRC/CUSTINFO.RPG @@ -0,0 +1,9 @@ + C/COPY CPYBK1 + C *ENTRY PLIST + C PARM PARMIN 10 + C Z-ADD12345 CUSTNO 90 + C MOVEL'JOHN DO' CNAME 25 + C EXSR SHWCST + C *IN99 DSPLY + C SETON LR + C/COPY CPYBK2 \ No newline at end of file diff --git a/QRPGSRC/Rules.mk b/QRPGSRC/Rules.mk index 76fef7e..60eb0d4 100644 --- a/QRPGSRC/Rules.mk +++ b/QRPGSRC/Rules.mk @@ -1 +1,4 @@ COU200.PGM: COU200.RPG COUNTRY.FILE COU200D.FILE +CSTNAME.PGM: CSTNAME.SQLRPG QPROTOSRC/VAR1.RPG +CUSTINFO.PGM: CUSTINFO.RPG QPROTOSRC/CPYBK1.RPG QPROTOSRC/CPYBK2.RPG +ADDN.PGM: ADDN.RPG QPROTOSRC/CPY01.RPGINC \ No newline at end of file