Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions QPROTOSRC/CPY01.RPGINC
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
C MOVE 1 WKVAR1 30
C MOVE 2 WKVAR2 30
7 changes: 7 additions & 0 deletions QPROTOSRC/CPYBK1.RPG
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions QPROTOSRC/CPYBK2.RPG
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
C SHWCST BEGSR
C CUSTNO DSPLY
C CNAME DSPLY
C ENDSR
1 change: 1 addition & 0 deletions QPROTOSRC/VAR1.RPG
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
C MOVEL'ABC' WKVAR 25
3 changes: 3 additions & 0 deletions QRPGSRC/ADDN.RPG
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/COPY CPY01
C WKVAR1 ADD WKVAR2 WKVAR3 30
C SETON LR
9 changes: 9 additions & 0 deletions QRPGSRC/CSTNAME.SQLRPG
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions QRPGSRC/CUSTINFO.RPG
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions QRPGSRC/Rules.mk
Original file line number Diff line number Diff line change
@@ -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