You dont have to simulate PC applications in your 5250 RPG programs. Heres a utility that will demonstrate how you can integrate executable PC programs using RPG IV.
Fred, its come to my attention that the customer service department is failing to keep up with its workload. What are you going to do about it?
What do you mean, What am I going to do about it? Im a programmer, not the vice president of customer service! Shouldnt this be his problem?
Normally, Id have to agree with you, but the problem in this case is that the customer service reps are having to enter the customers orders on the AS/400 and then hot-key over to the word processing software on their PCs to enter the notes. This is eating up too much time.
Why are they doing that? We developed a really cool screen to enter their notes on the AS/400. It even does word wrapping! Thats what they should be using.
They claim its not good enough because they need to use special templates for their notes, and anyway, they cant use those fancy fonts with your program the way they can with a PC package. Cant you give them something on the AS/400 that will do the same thing as the PC program?
That scenario isnt really so far away from reality. After all, the users are going to use whichever tool they have available that best meets their needs. If it means having to maintain two systems, you can bet theyll do it. What we need is an easy method for running PC applications from within RPG applications and then storing that data with the AS/400 database record. This article will present a utility that lets you write your own applications and take advantage of some of the AS/400s new features. Youll be able to
integrate your RPG IV applications more tightly with executable PC programs and the data they produce. Incidentally, if you want a native AS/400 word wrapper screen, check out the article Word Wrap Utility (MC, February 1998). This program is a great utility for handling text word wrapping, and its all ready for you to use with your own native applications. (Its also the one I was poking fun at in the previous scenario!)
An Idea Is Born
This idea actually came about as a combination of two events. One was reading Ted Holts article RPG IV and the IFS (MC, December 1997). The other was a chance find on the Internet while doing research for another article. After reading Teds article, I was overwhelmed by the possibilities the Integrated File System (IFS) opened up to the AS/400 community. Imagine being able to read from and write to PC data files! I had that in the back of my mind as something to check into sometime when I came across a reference to a newly added piece of information in the QDCRDEVD API. This API returns device information such as name and device type. As of V3R2 and V3R7 of the operating system, it will also return the Internet Protocol (IP) address of remotely attached PCs. While it wasnt exactly a lightbulb going off over my head, it did give me pause, and out of that, this utility was born.
Before We Get Started
For this utility to work, you will need to have the IBM Incoming Remote Command Server Daemon, CWBRXD.EXE, installed on your PC. This is installed automatically when Client Access/400 is installed. In addition, your AS/400 must be at V3R2, V3R7, or later. You may also need to install some PTFs, depending on the current
PTF level of your system. Refer to Figure 1 for a list of those PTFs.
What It Does
This utility demonstrates a customer information maintenance program. It is not intended as a ready-to-use application, although it could be with some minor tweaking. The user keys in a customer number and presses Enter on the first panel. He is presented with a panel to enter such relevant information as name, address, and credit limit. If he wants to enter notes for this customer, he indicates whether or not to retrieve previous notes (if any) from a folder on the AS/400 or from an AS/400 database. He can also select whether or not to save the notes in a database or inside a folder.
When the user presses the Enter key, he is presented with a window like the one shown in Figure 2. Here, he enters the drive where the notes should be created. This will be the letter of the drive that was mapped using the Windows 95/NT Map Network Drive function (more on this later). He also enters a file name, up to 10 characters, and selects the type of file it will be, either Rich Text Format (*.RTF) or plain text (*.TXT).
After pressing the Enter key, he sees the PCs WORDPAD.EXE program open with a file of the name he selected, like the one shown in Figure 3. A previously existing file will be filled with the old data. If its a new file, the user will see a blank screen in which to begin text entry. He now types his notes and, when hes done, saves the file just as he normally would any PC fileby clicking on File and Save on the toolbar. Control then returns to the AS/400 customer information screen, where the user presses the Enter key to save the record and move on to the next one.
Behind the Scenes
Thats what the user sees, and its pretty simple. Behind the scenes, however, a lot was going on:
A folder on the AS/400 was mapped to a drive letter on the users PC when he first logged on.
The IBM Incoming Remote Command Server Daemon (CWBRXD) was started when Windows 95/NT first started.
The IP address of the PC was retrieved using the QDCRDEVD API.
A stream file was opened or created in the IFS, using an external procedure call.
If the user chose to retrieve note records from an AS/400 database, those records were read and then written to the stream file in the IFS, using an external procedure call.
The file name and type (*.RTF or *.TXT) were used to build a PC command to start the WORDPAD.EXE program.
The Run Remote Command (RUNRMTCMD) command was run using the QCMDEXC API. The IP address retrieved earlier was used as the destination of the command.
When RUNRMTCMD was initiated, the command string parameter was passed to the Incoming Remote Command Server Daemon on the PC, where it was turned into an executable PC command.
The WORDPAD.EXE program was opened with the file name chosen by the
After the text was saved from WORDPAD on the PC, control returned to the AS/400 RPG IV program. If the user elected to save the data in a folder, processing returned to the customer information entry panel. If the user elected to save his data in an AS/400 database, external procedures were called to open the stream file, read from it, and write the data from the stream file to the AS/400. The final step then was to call the Unlink external procedure to delete the stream file from the directory it was created in.
OK, thats a lot of information, so lets take a closer look at the most important parts of the program logic. In order for this technique to work, you will need to take two steps on every PC that will use it: You must map a network drive, and you must set up the Incoming Remote Command Server to run every time Windows starts.
Mapping a network drive means that you want your PC to assign a drive letter to a folder on the AS/400. This is what we used to call shared folders under PC Support. To do this, right-click on the Network Neighborhood icon on your Windows 95/NT desktop and select Map Network Drive. You can also get to this by opening the Windows Explorer client and selecting Map Network Drive from the Tools dropdown menu.
You will be presented with a panel like the one shown in Figure 4. In this example, I mapped drive F to the base directory on MCRISC, the name of my AS/400. You can map it to any directory you want. (Caution: If you have a directory path other than HOME specified in your user profile, you should map the drive to that path.) If you check Reconnect at logon, this drive will map to this drive letter and directory every time Windows 95/NT starts.
The Incoming Remote Command Server program can be started in a couple of ways. This server program, by the way, was automatically placed in your C:WindowsSystem directory when Client Access/400 was installed. The name of the server program is CWBRXD.EXE. You can choose to use the Windows Explorer program to copy it into your Startup folder, where it will be executed each time Windows 95/NT starts, or you can set the Client Access properties to automatically accept incoming remote commands. To use the former method, open up Control Panel and double-click the Client Access icon. Click the Remote Command tab, and click the Automatically Start Incoming Remote Command box (see Figure 5). This will ensure that CWBRXD.EXE is called each time Windows 95/NT starts. You must also click on the Add button from this panel to add your default system information to the Remote Command Server Daemon. If
user.
On the PC
you already have a user ID and password specified here, you will need to change the RUNRMTCMD command string so it will pass the user ID and password to Windows 95/NT. If you are using the default for these parameters (i.e., asterisks in the fields), then you can leave the command string as it is.
Inside Your RPG IV Application
The RPG IV program used by this utility (see Figure 6) doesnt do anything too much out of the ordinary, so I wont spend a lot of time going over it. I basically used Teds routines, line for line, as he presented them in his RPG IV and the IFS article. I also reused his IFS prototypes copy book presented in the same article.
The changes I made were to combine them all into one program using subprocedures. I added one new external procedure, Unlink. This is also from the UNIX- Type APIs chapter in the API Reference manual that the other external procedures came from (Read, Write, Open, Close). Unlink is used to unlink, or delete, a stream file from the host. If you havent downloaded a copy of the IFSPROTOS copy book from MCs Web site, you will need to. It is part of the RPG IV and the IFS utility example. You can find it in the December 1997 Downloadable Code section of MCs Web site. Place it in a library or source file your RPG IV program can access during the creation process. The display file and physical files used to display and hold the data are shown in Figures 7 and 8.
The one really new function here is the use of the QDCRDEVD API to retrieve the IP address of the PC. You can see how this works in subprocedure RTVNETADS. I pass the device name of the PC, retrieved from the System Data Structure, to the procedure. The QDCRDEVD API is called using format DEVD0600. A whole wealth of information is returned in that format, but I am interested in only the IP address, so I substring it out of the receiver variable. It begins in position 877. The IP address is returned by the procedure, and it is used in the RUN_PC_CMD subroutine to build the RUNRMTCMD command string.
When the user saves the customer record, the path he keyed in on the prompt window is retained with the record. This serves two purposes: If the notes data was left in the stream file, there will be a path back to the file for access at a later time; and if the data was stored in a database, there will be a record of where the stream file was created. When the customer notes are displayed at some future time, that path will be used to fill in the prompt window, so a stream file of the same name can be created to place the notes into. To the user, it will appear as if the notes word processing file was there the entire time.
Stay in Step
One thing I want to point out is the syntax of the command string used to start the WORDPAD.EXE program. Notice that I used the START /w string before the path. I could have simply passed the WORDPAD path and program name to RUNRMTCMD, and it would have run fine. I chose to do it this way because, by using the /w parameter with the Windows 95/NT Start command, I am telling the PC to suspend all other applications from running while this program is running. In other words, the user will be input-inhibited on the AS/400 while entering text into the WORDPAD program.
This keeps the logical progression of tasks in sync for the user (i.e., start a new customer record, enter the notes, save the record). If the AS/400 task werent suspended, the PC program could be running independently of the AS/400 program and the data could get out of sync. You can experiment with this yourself by typing START /w and the path of one of your own PC programs from the Windows 95/NT Run command box. This is also a good way to make sure you specify the path name correctly.
The Key
In this example, I chose to use the WORDPAD word processing program and save my text as an *.RTF type. I did this so that, when I write the data back to an AS/400 database, all the special fonts and highlighting are preserved. If you look at that data record, you can see the text you typed surrounded by all the control information required by each font. While you can write some routines to strip those control characters off, it is easier to create the file as a *.TXT file type. This way, only text is stored in your database. It all depends on how you intend to use the data. You may simply want to store the data with the database record and use the WORDPAD.EXE program to display or print it so you can retain all special fonts and formatting.
What If You Dont Use TCP/IP?
In this example, I used the RUNRMTCMD command to start the PC word processing program. The same technique can be used with the Start PC Command (STRPCCMD) for those PCs you have connected using twinax or other direct connections. In that case, you dont need to retrieve the IP address. You will need to change the command literal to specify the correct parameters for STRPCCMD. They are different from RUNRMTCMD.
The World at Your Fingertips
Ive only scratched the surface here, and Im sure you can find many ways to enhance and improve on this idea. After all, you can do so much more than simply use a word processor. Although my example shows how to write text-only data, you can also use these techniques for reading from and writing to the IFS to read and write binary data. This will allow you to store images, spreadsheets, and wave files in the IFS.
Imagine bringing up a customer inquiry screen and seeing a photo of that customer along with hearing a voice recording and viewing personal information. How about storing sensitive financial spreadsheet information from Excel in an AS/400 database and using OS/400 object-level security to protect it? Lets see a PC server match that level of security! The door is open to you. I am extremely interested in seeing what fantastic new uses you can come up with for this once you step through that door.
Referenc
e
s
AS/400 System API Reference V3R7 (SC41-3801, CD-ROM QBKAVD00) Network Station Support for Telnet (V3R2) (IBM APAR SA61841) Network Station Support for Telnet (V3R7) (IBM APAR SA61583)
V3R2 V3R7
SF38688 SF38357 SF38885 SF38535 SF38886 SF38536
Figure 1: You may need to install PTFs to get the new features of the QDCRDEVD API
Figure 4: Mapping a network drive
*================================================================
* To Compile:
*
* CRTBNDRPG PGM(XXX/PC001RG) DFTACTGRP(*NO) BNDDIR(QC2LE)
*================================================================
FPc001df CF E Workstn
FCstmst UF A E K Disk
FCstnote UF A E K Disk
/copy xxx/ Qrpglesrc,ifsprotos
D Unlink PR 10i 0 ExtProc(unlink)
D filename * value
D RtvNetAds PR 20A
D Device 10A CONST
D CrtBldIfs PR 12A
D FileName 12A CONST
D RdIfsFil PR 12A
D FileName 12A CONST
D Apost C Const()
D CodePage S 10u 0 inz(819)
D Cr C const(x0D)
D Create S 1A INZ(0)
D Data_Rec S 256A
D Eol C Const(x0D25)
D Error_Flag S 1A INZ(0)
D Extension S 4A INZ(.RTF)
D File S 16
D FileName S 16
D File_Ext S 12A INZ
D File_Path S 16A INZ
D Fp S 10i 0
D I_Net_Adr S 20A Inz
D Lf C const(x25)
D N S 5 0
D Oflag S 10i 0
D Omode S 10u 0
D R S 5 0
D Rc S 10i 0
D RmtCmd S 150 INZ
D Rmt_Len S 15 5 INZ(150)
D Rmt_Lit1 C Const(RUNRMTCMD CMD()
D Rmt_Lit2 C Const() RMTLOCNAME()
D Run_Cmd S 150 INZ
D Work150 S 150 INZ
D Wordpad_Lit C Const(Start /w C:Progra~1Access~1-
D Wordpad.exe)
D SDS
D Device 244 253
** MAIN
*C Dow *In03 = *Off
C Exfmt Pc001
C If *In03 = *On
C Eval * Inlr = *On
C Return
C Endif
C If Cust# > 0
C Exsr Get_Cust
C Exsr Dtl_Scn
C Clear Cust#
C Endif
C Enddo
** Get_Cust - Get Customer Info
*C Get_Cust Begsr
C Eval Notes = 0
C Eval Save = 1
C Eval Doc_Typ = 2
C Eval Create = *On
C Eval File_Name = *Blanks
C Eval File_Ext = *Blanks
C Cust# Chain Cstmst 99
C If *In99 = *Off
* .
* . Load Screen Fields From Database
* .
C Eval Drive = Note_Drive
C Eval File_Name = NFile_Name
C Eval Doc_Typ = NFile_Type
C Endif
C Endsr *---------------------------------------------------------
* Dtl_Scn - Display Detail Screen
*C Dtl_Scn Begsr
C Dow *In03 = *Off
*
C Exfmt Pc002
C If *In03 = *On Or *In12 = *On
C If *In03 = *On
C Eval * Inlr = *On
C Return
C Endif
C Leave
C Endif
*
C If Notes > 0
* Retrieve IP Address
C Eval I_Net_Adr = RtvNetAds(Device)
C Eval I_Net_Adr = %trim(I_Net_Adr)
C Eval Run_Cmd = Wordpad_Lit
C Eval File_Path =
C Exsr Window
C Eval Notes = 0
C Else
C Exsr Del_Old_Rec
C If Save = 2
C Eval Error_Flag = RdIfsFil( File_Ext)
C Endif
C Exsr Update_Rec
C Leave
C Endif
*
C Enddo
C Endsr
** Window - Display Path Window
*C Window Begsr
C Exfmt Pc00w1
C If *In12 = *Off
C If Doc_Typ = 1
C Eval Extension = .TXT
C Else
C Eval Extension = .RTF
C Endif
C File_Name Cat Extension:0 File_Ext
C If Notes = 2
C Eval Create = *On
C Endif
C Eval Error_Flag = CrtBldIfs( File_Ext)
* Build PC Command String
C If Error_Flag = *Off
C Eval File_Path = Drive + : + File_Ext
C Run_Cmd Cat File_Path:1 Work150
C Eval Run_Cmd = % Triml(Work150)
C Exsr Run_PC_Cmd
C Endif
C Endif
C Endsr
** Run_Pc_Cmd - Run PC Command
*C Run_Pc_Cmd Begsr
C Rmt_Lit1 Cat Run_Cmd:0 RmtCmd
C Cat Rmt_Lit2:0 RmtCmd
C Cat I_Net_Adr:0 RmtCmd
C Cat Apost:0 RmtCmd
C Cat Apost:1 RmtCmd
C Cat *IP):0 RmtCmd
C Call QCMDEXC
C Parm RmtCmd
C Parm Rmt_Len
C Endsr
** Upd_Rec - Add/Update Customer Info
*C Update_Rec Begsr
C Cust# Chain Cstmst 99
C Eval Cust_No = Cust#
* .
* . Load Database From Screen Fields
* .
C Eval NFile_Name = File_Name
C Eval NFile_Type = Doc_Typ
C Eval Note_Drive = Drive
*
C If *In99 = *Off
C Update Rcstmst
C Else
C Write Rcstmst
C Endif
C Endsr
** Del_Old_Rec - Delete Old Note Records
*C Del_Old_Rec Begsr
C Cust# Chain Cstnote 99
C Dow *In99 = *Off
C Delete Rcnote
C Cust# Reade Cstnote 99
C Enddo
C Endsr
** RtvNetAds - Subprocedure To Retrieve PCs IP Address
*P RtvNetAds B Export
D RtvNetAds PI 20A
D Inp_Device 10A Const
D Apierr DS
D Bytprv 1 4B 0 Inz(216)
D Bytavl 5 8B 0 Inz
D Errid 9 15A Inz
D Rsvd 16 16A Inz
D Errdta 17 216A Inz
D Net_Address S 20A INZ
D Format S 8A Inz(DEVD0600)
D Rcvar S 5000A Inz
D Varlen S 4B 0 Inz(5000)
C Eval Device = Inp_Device
C Call QDCRDEVD
C Parm Rcvar
C Parm Varlen
C Parm Format
C Parm Device
C Parm Apierr
C If BytAvl = 0
C Eval Net_Address = %Subst(Rcvar:877:16)
C Endif
C Return Net_Address
P RtvNetAds E
** CrtBldIfs - Subprocedure To Create/Build IFS File
*P CrtBldIfs B Export
D CrtBldIfs PI 12A
D FileName 12A Const
C Eval File = %trim(FileName) + x00
C If Create = *On
C Eval Oflag = O_Creat + O_Codepage +
C O_Rdwr
C Eval Omode = S_Irwxu + S_Iroth
C Eval Fp = Open(%addr(File): Oflag:
C omode: CodePage)
C Eval Rc = Close(Fp)
C Endif
C Eval Data_Rec = *Blanks
C Eval Oflag = O_Wronly + O_Textdata
C Eval Fp = Open(%addr(File): Oflag)
C If Fp < 0
C Eval Error_Flag = *On
C Return Error_Flag
C Endif
* Read File By Customer Number and Write To IFS File
C Cust# Chain Cstnote 99
C Dow *In99 = *Off
C Eval Data_Rec = Text + EOL
C Eval Rc = Write(Fp: %Addr(Data_Rec):
C %Len(%Trimr(Data_Rec)))
C Cust# Reade Cstnote 99
C Enddo
C Eval Rc = Close(fp)
C Return Error_Flag
P CrtBldIfs E
** RdIfsFil - Subprocedure To Read The IFS File & Build DB
*P RdIfsFil B Export
D RdIfsFil PI 12A
D FileName 12A Const
D CharsRead S 10i 0
D CurChar S 1
D Eof C const(x00)
C Eval Oflag = O_Rdonly + O_Textdata
C Eval File = %trim(FileName) + x00
C Eval Fp = open(%addr(File): Oflag)
C If Fp < 0
C Eval Error_Flag = *On
C Return Error_Flag
C Endif
C Eval R = 0
C Eval N = 0
C Eval Data_Rec = *Blanks
C Exsr GetChar
C Dow CurChar <> Eof
C Select
C When R = 256
C Exsr Write_Note
C Eval R = *zero
C Eval Text = *blanks
C When CurChar = Cr
C Exsr Write_Note
C Eval R = *zero
C Eval Text = *blanks
C When CurChar = Lf
C Exsr Write_Note
C Eval R = *zero
C Eval Text = *blanks
C Other
C Eval R = R + 1
C Eval %Subst(Text: R: 1) = CurChar
C Endsl
C Exsr GetChar
C Enddo
C Exsr Write_Note
C CallP Close(Fp)
* Remove File From Folder Using The Unlink Procedure
C CallP Unlink(%addr(File))
C Return Error_Flag
** GetChar - Process IFS Record, One Character At A Time
*C GetChar begsr
* If input buffer is empty, or all characters have been
* processed, refill the input buffer.
C If N = CharsRead
C Eval Data_Rec = *Blanks
C Eval CharsRead = Read(Fp:
C %Addr(Data_Rec): 256)
C Eval N = *Zero
C Endif
* Get the next character in the input buffer.
c If CharsRead <= 0
C Eval CurChar = Eof
C Else
C Eval N = N + 1
C Eval CurChar = % Subst(Data_Rec: N: 1)
C Endif
C Endsr
** Write_Note - Write Customer Note Record
*C Write_Note Begsr
C Eval Note_Cust# = Cust#
C Write Rcnote
C Endsr
P RdifsFil E
A****************************************************************
A*
A* To Compile:
A* CRTDSPF FILE(xxx/PC001DF) SRCFILE(xxx/QDDSSRC) +
A* SRCMBR(PC001DF)
A*
A****************************************************************
A DSPSIZ(24 80 *DS3)
A PRINT
A CA03(03 EXIT)
A CA12(12 RETURN)
A R PC001
A 1 4USER
A 1 27Customer Master Update
A DSPATR(HI)
A DSPATR(UL)
A 1 62DATE
A EDTCDE(Y)
A 3 4Customer #...........:
A CUST# 8Y 0B 3 28CHECK(FE ER)
A EDTCDE(Z)
A DSPATR(HI)
A 24 4F3=Exit
A COLOR(BLU)
A R PC002
A 1 4USER
A 1 27Customer Master Update
A DSPATR(HI)
A DSPATR(UL)
A 1 62DATE
A EDTCDE(Y)
A 3 4Customer #...........:
A CUST# 8Y 0O 3 28EDTCDE(Z)
A DSPATR(HI)
A 5 4Name.................:
A CFNAME 15A B 5 28DSPATR(HI)
A CLNAME 30A B 5 45DSPATR(HI)
A 6 4Address Line 1.......:
A CADRS1 40A B 6 28DSPATR(HI)
A 7 4Address Line 2.......:
A CADRS2 40A B 7 28DSPATR(HI)
A 8 4City.................:
A CCITY 40A B 8 28DSPATR(HI)
A 9 4State................:
A CSTATE 2A B 9 28DSPATR(HI)
A 10 4Zip + 4..............:
A CZIP 5Y 0B 10 28CHECK(RZ)
A EDTCDE(Z)
A DSPATR(HI)
A 10 34-
A CZIP4 4Y 0B 10 36CHECK(RZ)
A DSPATR(HI)
A 12 4Telephone............:
A TELE 10A B 12 28DSPATR(HI)
A 13 4Fax..................:
A FAX 10A B 13 28DSPATR(HI)
A 14 4E-Mail...............:
A EMAIL 40A B 14 28DSPATR(HI)
A 17 4Credit Limit.........:
A CRDLMT 16Y 0B 17 28CHECK(FE)
A CHECK(RZ)
A EDTCDE(Z)
A DSPATR(HI)
A 19 4Customer Notes:
A NOTES 1A B 19 21DSPATR(HI)
Figure 6: The RPG IV program
A VALUES(0 1 2)
A 19 240=No Notes
A 19 52Save Notes In?:
A SAVE 1A B 19 68DSPATR(HI)
A VALUES(1 2)
A 19 701=Folder
A 20 241=Get Notes From Folder
A 20 702=Database
A 21 242=Get Notes From Database
A 24 4F3=Exit
A COLOR(BLU)
A 24 56F12=Return/No Update
A COLOR(BLU)
A R PC00W1
A WINDOW(*DFT 13 60)
A RMVWDW
A USRRSTDSP
A 2 14Enter/Verify Notes File Path
A DSPATR(HI)
A DSPATR(UL)
A 6 16Drive Letter.:
A DSPATR(HI)
A DRIVE 1A B 6 31
A 7 16File Name....:
A DSPATR(HI)
A FILE_NAME 8A B 7 31
A 8 16File Type....:
A DSPATR(HI)
A DOC_TYP 1A B 8 31
A 8 341=Text
A 9 342=Rich Text Format
A 11 3F12=Return
A COLOR(BLU)
***************************************************************
*
* To Compile:
* CRTPF FILE(xxx/CSTMST) SRCFILE( xxx/QDDSSRC) +
* MBR(CSTMST)
*
***************************************************************
A R RCSTMST TEXT(CUSTOMER MASTER)
A CUST_NO 8 0 TEXT(CUSTOMER #)
A FIRST_NAME 15 TEXT(FIRST NAME)
A LAST_NAME 30 TEXT(LAST NAME)
A ADDRESS_1 40 TEXT(ADDRESS LINE 1)
A ADDRESS_2 40 TEXT(ADDRESS LINE 2)
A CITY 40 TEXT(CITY)
A STATE 2 TEXT(STATE)
A ZIP 5 0 TEXT(ZIP)
A ZIP4 4 0 TEXT(ZIP + 4)
A TELEPHONE 10 TEXT(TELEPHONE #)
A FAX_NO 10 TEXT(FAX NUMBER)
A E_MAIL 40 TEXT(E-MAIL ADDRESS)
A CREDIT_LMT 16 2 TEXT(CREDIT LIMIT)
A NOTE_DRIVE 1 TEXT(DRIVE)
A NFILE_NAME 8 TEXT(NOTES FILE NAME)
A NFILE_TYPE 1 TEXT(DOCUMENT TYPE)
*
A K CUST_NO
***************************************************************
*
* To Compile:
* CRTPF FILE(xxx/CSTNOTE) SRCFILE(xxx/QDDSSRC) +
* MBR(CSTNOTE)
*
***************************************************************
A R RCNOTE TEXT(CUSTOMER MASTER NOTES)
Figure 7: Display file used by the RPG IV program
A NOTE_CUST# 8 0 TEXT(CUSTOMER #)
A TEXT 256 TEXT(NOTE TEXT)
*
A K NOTE_CUST#
Figure 8: Physical files used to store data for the RPG IV program
LATEST COMMENTS
MC Press Online