|
Hello Jeff, You wrote: >If the answer to every CL enhancement request is 'use REXX', why are we >being asked in the first place? I'm simply pointing out that there are alternatives available on your existing system that satisfy the requirements. We've had Rexx on the AS/400 for 10 years. In that time CL has had only two programming enhancements: 1/ %BINARY for hadling 2-byte and 4-byte integers 2/ ILE CL (and Rexx has had none -- because few of you want to use it and most of you wouldn't know it existed) While there are some areas where CL is better than Rexx, there are many more where Rexx is better than CL. It is another tool that you should all be familiar with. While I would appreciate some CL enhancements, specifically: 1/ Remove the ridiculous restriction of not being able to reprocess a file that has reached EOF (CPF0864). I should be able to reposition using POSDBF and re-read the file, or close it, open it, and reprocess it, after EOF has occurred. 2/ Allow multiple file declarations so I can use a DSPF and a DB file in the same program. (Al Barsa raised an objection regarding this because he felt it would break existing code. That's crap! If it is done properly it will be transparent to the program. Here is one suggested approach -- are you listening Rochester? Add a new parameter to the RCVF, SNDF, and SDNRCVF commands called FILE with a default value of *ONLY. This allows existing CL programs to function as expected. The CL compiler will complain if FILE(*ONLY) is used when there is more than one DCLF statement in the source. New code using multiple files is written like: DCLF FILE(DBFILE) DCLF FILE(DSPFILE) LOOP: RCVF FILE(DBFILE) MONMSG MSGID(CPF0864) EXEC(send no more data message) SNDRCVF FILE(DSPFILE) /* Process user input */ GOTO LOOP EOF: New code using a single file can be written in the same manmer as we currently do: DCLF FILE(DBFILE) LOOP: RCVF MONMSG CPF0864 EXEC(GOTO EOF) /* Process record */ GOTO LOOP EOF: Not difficult conceptually. Not difficult to implement. Won't break existing code. 3/ Decent control constructs (UNTIL, WHILE, FOR) UNTIL COND() EXEC(DO) /* Do stuff */ ENDDO WHILE COND() EXEC(DO) /* Do stuff */ ENDDO FOR FROM() TO() BY() EXEC(DO) /* Do stuff */ ENDDO 4/ Allow binary values on the VALUE keyword of DCL so I can use locality of reference to keep the RCVVARLEN size synchronised with the RCVVAR size. For example: DCL VAR(&RCVVAR) TYPE(*CHAR) LEN(76) DCL VAR(&RCVVARLEN) TYPE(*CHAR) LEN(4) VALUE(%BIN(76)) HOWEVER, I would forgo most of the above enhancements in exchange for decent file I/O in Rexx and a Rexx compiler. >That's like saying "What do you want in future RPG enhancements?" and >for every suggestion made the response is 'use C'. No it's not! For one thing C is a much harder language to learn and program in than RPG (in fact C is harder than any language except Assembly). Rexx is no harder than CL and in many ways easier. However there are similarities. There a number of requests for RPG enhancements (dynamic arrays and MODS, binary search, etc) that can be easily satisfied using C or the C APIs. I do not want Toronto wasting time and money implementing things in RPG that can already be done with a little effort on the part of a programmer. I'd rather they expended effort on engineering improvements. As a programmer you should be familiar with many tools (i.e., languages). Restricting yourself to CL and RPG is like a carpenter restricted to using a hammer and a saw. While there are many tasks for which those are the only tools needed, there are many more that cannot be accomplished without a good set of chisels and a drill, and still others for which specialised tools are needed. The trouble is that most AS/400 programmers are not "Programmers" per se, they are merely "RPG Programmers". They panic when faced with something new, they don't know any other programming languages and aren't interested in learning them on their own time to improve their general programming knowledge, nor do they have a decent programming library (I'll bet less than 5% have even heard of Donald Knuth, Larry Constantine, Rebecca Wirfs-Brock, Richard Gabriel, Kent Beck, Jon Bentley, P J Plauger, Erich Gamma, etc. never mind read any of their books and applied them to RPG). Regards, Simon Coulter. -------------------------------------------------------------------- FlyByNight Software AS/400 Technical Specialists http://www.flybynight.com.au/ Phone: +61 3 9419 0175 Mobile: +61 0411 091 400 /"\ Fax: +61 3 9419 0175 mailto: shc@flybynight.com.au \ / X ASCII Ribbon campaign against HTML E-Mail / \ --------------------------------------------------------------------
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.