|
Hello,
I'm kinda desperate, I'm receiving errors when I define these 5 fields. I
think I'm defining them correctly, however, I get the same 5 compile errors
every time I compile my program.
When I do a Select on the Key of this table only and never reference these five
fields I do not get any errors and I see these fields listed properly in my
CBLSRC Cross reference listing:
FLRAICFTE 1339 DECIMAL(3,2) COLUMN (NOT NULL) IN TE
FLRAICSCR 1339 DECIMAL(3,2) COLUMN (NOT NULL) IN TE
FLRBACCEB 1339 DECIMAL(3,2) COLUMN (NOT NULL) IN TE
FLRBACFTE 1339 DECIMAL(3,2) COLUMN (NOT NULL) IN TE
FLRBACSCR 1339 DECIMAL(3,2) COLUMN (NOT NULL) IN TE
However, when I do an embedded sql Select on the "FLR" Table/File referencing
the key plus these five fields I get errors on the fields that I define in
working storage as Host Variables. I define these five fields just as they are
defined in a cobol copybook and they match the description of the ddssrc
description of the fields listed above: (note: my table is externally defined)
This is Working Storage:
10 HOST-FLRBACFTE PIC 9(01)V9(02) COMP-3.
10 HOST-FLRBACSCR PIC 9(01)V9(02) COMP-3.
10 HOST-FLRBACCEB PIC 9(01)V9(02) COMP-3.
10 HOST-FLRAICFTE PIC 9(01)V9(02) COMP-3.
10 HOST-FLRAICSCR PIC 9(01)V9(02) COMP-3.
This is how the fields are define in the DDSSRC:
A FLRBACFTE 3P 2 COLHDG('Baccl' 'Fte')
A FLRBACSCR 3P 2 COLHDG('Baccl' 'Score')
A FLRBACCEB 3P 2 COLHDG('Baccl' 'Ceeb')
A FLRAICFTE 3P 2 COLHDG('AIC' 'Fte')
A FLRAICSCR 3P 2 COLHDG('AIC' 'Score')
This is a copy of the exact code followed by the errors:
EXEC SQL
SELECT FLRKDIST, FLRKSTDT,
HOST-FLRBACFTE,
FLRBACSCR,
FLRBACCEB,
FLRAICFTE,
FLRAICSCR
INTO :HOST-FLRKDIST,:HOST-FLRKSTDT,:HOST-FLRBACFTE,
:HOST-FLRBACSCR,:HOST-FLRBACCEB,
:HOST-FLRAICFTE,:HOST-FLRAICSCR
FROM TERMSDTA/SFLRP
WHERE (FLRKDIST = :WS-USD501 AND
FLRKSSTDT = :WS-IEP-INPUT-STUDENT-ID)
END-EXEC.
These are the errors:
5722ST1 V5R1M0 010525 Create SQL COBOL Program
DIAGNOSTIC MESSAGES
MSG ID SEV RECORD TEXT
SQL0312 30 1356 Position 50 Variable HOST-FLRBACFTE not defined or no
usable.
SQL0312 30 1357 Position 20 Variable HOST-FLRBACSCR not defined or no
usable.
SQL0312 30 1357 Position 36 Variable HOST-FLRAICCEB not defined or no
usable.
SQL0312 30 1358 Position 20 Variable HOST-FLRAICFTE not defined or no
usable.
SQL0312 30 1358 Position 36 Variable HOST-FLRAICSCR not defined or no
usable.
Message Summary
Total Info Warning Error Severe Terminal
5 0 0 0 5 0
30 level severity errors found in source
1731 Source records processed
* * * * * E N D O F L I S T I N G * * *
Do you have any idea why I'm getting errors only on these five fields. I have
looked at the code and I just can't see anything wrong with the code. I've
looked at reference books and I just do not see it!. I'm very puzzled I really
don't know what to do.
I'm hoping its something simple that you can look at and see what the prolbem
is.
If you have a solution or an idea please let me know. Thanks for your help.
D Meza
New to SQL on AS400
---------------------------------
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-2025 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.