I have a book entitled (e-RPG Building AS/400 Web appliations with RPG) by Bradley V. Stone. The book comes with a CD of source code. My question is: Where do I put the source code on the AS/400. The CD contains: Binder Language Copy Source DDS source HTML source Module source RPG source I put the binder language in source file qbndsrc. The DDS in qddssrc. The RPG in qrpglesrc. The copy source in qsrvsrc. Where does the HTML source, Module source go? Also, did I put the other source in the right source physical files?
Software/Hardware used:
ASKED:
August 21, 2009 3:32 PM
UPDATED:
August 27, 2009 3:24 PM
What goes in QSRVSRC?
Here’s what I have in qcpysrc:
File . . . . . . QCPYSRC
Library . . . . AS400CGI Position to . . . . .
Type options, press Enter.
2=Edit 3=Copy 4=Delete 5=Display 6=Print 7=Rename
8=Display description 9=Save 13=Change text 14=Compile 15=Create module…
Opt Member Type Text
P.CONVERT RPGLE Source for #CtoN (character to numeric)
P.HTTPSTD RPGLE Source for #WrStout, #RdStin, #GetEnv
P.ITEMLIST RPGLE Source for #WrStout, #GetEnvQS, #CvtDB
P.LISTCARS RPGLE Source for #CvtDB
——————————————————————————————————————-
Is the type correct (RPGLE)? Here’s some of the code:
D #WrStout PR
D PR_WrStout 1024 VALUE
*
D #GetEnvQS PR
D PR_EnvRec 1024
D PR_EnvLen 9B 0
*
D #CvtDB PR
D PR_RcvRec 1024 VALUE
D PR_RcvLen 9B 0
D PR_CvtStat 9B 0
D PR_RcvDS@ *
Here’s what I have in qbndsrc:
File . . . . . . QBNDSRC
Library . . . . AS400CGI Position to . . . . .
Type options, press Enter.
2=Edit 3=Copy 4=Delete 5=Display 6=Print 7=Rename
8=Display description 9=Save 13=Change text 14=Compile 15=Create module…
Opt Member Type Text
F.CONVERT
F.HTTPSTD
F.ITEMLIST
F.LISTCARS
What would the type be?
Here’s the code for F.HTTPSTD:
*************** Beginning of data ***************
STRPGMEXP
EXPORT SYMBOL(#WrStOut)
EXPORT SYMBOL(#RdStin)
EXPORT SYMBOL(#GetEnv)
ENDPGMEXP
****************** End of data ******************
We put our html source into the file HTMLSRC.
One of my former shops called it that, too.
Mike L.
The default source physical file for binder language source members is QSRVSRC because binder language is used to build service programs (or *SRVPGM objects). The type for those source members should be BND.
The copy members should be put in the source file named in your RPG program source. Open one of those program source members and find a /COPY directive. It should have the source file name listed there. If there is no source file name, just the copy member name, then the copy source needs to be in the same file as the program source.
You can separate you module source from your program source if you like, but you don’t have to. They can be placed in the same source file, as long as you don’t have a program and a module with the same name.
If you are going to be using the CGIDEV2 development tools (and IMHO you should), you should put the HTML source in the IFS. There are WYSIWYG development tools for HTML that will drastically improve your productivity over using SEU to edit HTML source. However, none of these tools can work with OS/400 source file members.
———————————–
Where does the book tell you to put it ??
———————————–
Put it there
The book does not tell you where to put the source that comes on a CD. It just says to FTP the source to AS/400 source files.
A source file is just what its name implies. It is place to store your source code. You can call it anything you want. Each “member” in the file is a program source listing.
There are certian names that have been used over the years such as QRPGSRC for RPG source, QRPGLESRC for RPGLE source, QCLSRC for CL and CLLE source and QCBLSRC for COBOL to name a few. This naming convention led to names like QSRVSRC for service program source code also known as binder language.
This is really basic information for programming on the AS400/iSeries/i5/IBM Power systems. If you do not understand this, and it sounds as if you don’t, then you should start with something a little simpler than creating web pages on the i5 which some what different than creating pages for windows or other PC platforms.
Try these links:
http://www.scottklement.com/rpg/howtolearn.html
http://www.geocities.com/itpweb1/400/html/
http://www.texas400.com/tutas400toc.html
As well as a host of others found at:
http://www.google.com/search?hl=en&q=rpg+tutorial+as400&aq=1sx&oq=rpgle+tut&aqi=g-s1g-sx6