× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



We are in the slow, gradual process of changing from DDS to DDL. Actually, we are creating new files with ops navigator and usually not keeping the create specs. We just use navigator to change the file when needed. Mostly we need record ID and timestamp, or date fields added.

But we have lots of old files. Yesterday, we needed to add 2 fields to a file (a timestamp and a record id, both added with DDL in ops nav.) Since we are adding the fields to the end of the files, we figured this would be a good time to remove level check from the file. But it did not work.

Here is our process for adding new fields to a file. We have a library that contains all our RPG, DDL, CL etc. but no data. We add the new fields to the file (called DIRECT). We change to level check *no. This creates an empty file with the new fields.

We write a CL program to copy the data from production library to empty library using CPYF with *nochk. Then in the production library we delete all the logicals, rename the existing file to DIRECTOLD. Next CPYF from the empty library file (now filled with production data and new fields) to the production library, CRTFILE(*YES) then recreate the logicals.

When checking with DSPFD, both the file in the empty library and production library say:
Record format level check . . . . . . . . . : LVLCHK *NO

Yet when I run programs against the file DIRECT or its logicals, I get level check CPF4131errors.

So I had to recompile all the programs anyway.

We are a small shop with just 2 of us. We write all our own code, so we are quite sure that adding fields to the end of a record will not affect old programs.

I am RPG guy, my associate is PHP/WEB guy. He just kind of rolls his eyes at me when I jump through all these hoops to add fields. His PHP programs just keep on rolling, no matter what the file looks like.



So this long discourse asks two questions.

Why do my RPG programs (some RPG III, some ILE) insist on level check when the file says LVLCHK *NO?

And

Is level check still useful? The ability to quickly add fields to files seems to outweigh the comfort of your rpg programs knowing exactly what the file looks like. Especially when half (uhh, maybe not half but lots of them) of your programs are PHP.

---Dale







As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.