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



Bruce,
 
Thank you so much.  I understand now.  I've tried it and it works. Thanks Again.
Have a nice day!
 
D. Meza
 
"R. Bruce Hoffman, Jr." <rbruceh@xxxxxxxxxxxxx> wrote:
----- Original Message ----- 
From: "D Meza" 
To: "COBOL Programming on the iSeries/AS400" 
Sent: Wednesday, October 08, 2003 4:33 PM
Subject: Re: Question: Major Differences Between COBOL/400 and ILECOBOL


> If the precompiler accepts only two levels and it accepted host-com-key as
the first level, would it accept more than just two fields, if they were all
at the 10 level? keeping the file reference only at two levels?

The only reason your example would accept two fields, is because you only
showed to fields in your example...
The level numbers have nothing to with the number of accepted fields.

01 structDef.
02 fielda pic xxx.
02 fieldb pic xxx.
02 fieldc pic xxxx.
02 fieldd pic xx.

If the file is defined as CREATE TABLE F (FIELDA CHAR(3), FIELDB CHAR(3),
FIELDC CHAR(4), FIELDD CHAR(2))
then SELECT * INTO :structDef FROM F should work. The level number 02 could
just as easily be 23 or 44, or as in your example, 10.

Also, to clarify the 2 levels concept, using the above structure, you can
retrieve selected fields as follows:

SELECT fieldb, fieldd INTO :structDef.fieldb, :structDef.fieldd FROM f

This statement is at least, isolated from structure changes other than the
complete removal of those two fields from the file.
It's those qualified names in SQL that actually enforce the 2 level rule.
The precompiler just can't see more than two and they need to be "adjacent"
to one another, not separated by another level id.


===========================================================
R. Bruce Hoffman, Jr.
-- IBM Certified Specialist - iSeries Administrator
-- IBM Certified Specialist - RPG IV Developer

"When I die, I want to die like my grandmother who died peacefully
in her sleep. Not screaming like all the passengers in her car."

- Author Unknown

_______________________________________________
This is the COBOL Programming on the iSeries/AS400 (COBOL400-L) mailing list
To post a message email: COBOL400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/cobol400-l
or email: COBOL400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/cobol400-l.


---------------------------------
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search

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.