![]() ![]() The remaining single column entries, such as Limits Processing, are not supported in free-format. There is, however, one new keyword, KEYED, which replaces the old “A” and “K” entries in the Record Address type field. These are basically those that used to appear in the keyword area of the F-spec, and since these are basically unchanged I won’t deal with them here. Once the device has been specified then next come the device specific keywords. If no device is specified then the compiler assumes a default of DISK. The next entry following the name must be the device keyword, or alternatively LIKEFILE. Here’s the original fixed form version of a printer file definition:ĭcl-f SLSRPT0055 Printer OflInd(pageFull) ĭcl-f MthSalesSummary Printer ExtDesc('SLSRPT0055') I can’t help wishing that the compiler had not been as strict about this and had simply allowed EXTDESC and provided EXTFILE(*EXTDESC) as the default whenever it was used. The downside is that you need to specify both the EXTFILE and EXTDESC keywords as you can see in the example below. Of course it would be even nicer if we could also use meaningful record names, or indeed use the file name for all I/O operations on single format files, but I digress. How much better it is to be able to use a meaningful file name. This is often worse in the case of print files where, for example, a monthly sales summary report might have a highly meaningful name such as SLSRPT0055. I really like this because it has always bothered me that determining the function of a file in a program invariably requires the use of some secret decoder ring. In the past we were stuck with using a traditional 10-character system name for our files, but no such limit applies in the new RPG. BIG file names! Or perhaps, to be more precise, the option to use meaningful file names. ![]() The name of the file follows and here we encounter our first new feature. It might have been nice to be able to spell out “file” as an alternative, but I’m happy enough with just the “f”. ![]() Now, for the first time ever, I am coding file definitions without prompting and without referencing the manual.Īs with all the new declarations, file definitions begin with the characters “dcl-” for files, followed by “f”. I am reminded of this almost every time I dive into coding, since F-specs remained as the only thing I ever needed the prompter for once I started to use RDi for all my development work. All of the programmers we have taught RPG to over the last few years have also had similar problems coming to grips with with F-specs. Those nasty little single column codes drove me crazy. While the changes in data definition introduced by the new free-form RPG support are great, I have to admit that it was probably the free-form file specifications that raised the biggest cheer from me. ![]() The Geezer’s Guide to Free-Form RPG, Part 5: File Definitions ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |