× 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.



Hi Dale
It sounds like that you have LVLCHK *YES on the logicals that the programs use.

Alan Shore
Programmer/Analyst, Direct Response
E:AShore@xxxxxxxx
P:(631) 200-5019
C:(631) 880-8640
"If you're going through Hell, keep going" - Winston Churchill

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of dale janus
Sent: Thursday, November 01, 2012 9:18 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: Are level checks still useful?

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






--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.


Disclaimer: This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. Any views or opinions presented are solely those of the author and do not necessarily represent those of the company.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.