|
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? I would like your expert opinion ,would l the example I just mentioned legally pass the precompiler edits? I plan to follow your advice and not use "Select*". I'm just trying to figure out how the precompiler would treat mutiple (more than two) 10 level elements. I appreciate your input. Have a nice day! D Meza I thank you for your previous reply "R. Bruce Hoffman, Jr." <rbruceh@xxxxxxxxxxxxx> wrote: ----- Original Message ----- From: "D Meza" To: "COBOL Programming on the iSeries/AS400" Sent: Wednesday, October 08, 2003 10:25 AM Subject: Re: Question: Major Differences Between COBOL/400 and ILECOBOL > EXEC SQL > SELECT * > INTO :HOST-COM > FROM TEST/SCOMP > WHERE (SCOMCO = 'COMPANYNAME' and > SCOMSSN = '999999999') > END-EXEC. > > *Working Storage > 01 HOST-COM. > 05 HOST-COM-KEY. > 10 HOST-COMPNAME PIC X(11). > 10 HOST-COMSSN PIC X(09). there is a "difficulty" in the precompiler... it only accepts 2 levels in a structure target. In your example above, the precompiler can not accept host-com... it could accept host-com-key, and again, only if the two fields in that structure are the only two fields in the file. Select * is (IMO) not a recommended practice. It ties your program to the physcial structure of the data. When you do a COPY DD, DDR, DDS, etc... it starts with the record at an 05 level and the fields at an 06 level. If you then reference the 01 level structure, the precompiler will choke. =========================================================== 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 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.