|
Hi Meza
In embedded SQL, host variables for numeric fields should be Signed
Numeric.
In working storage, define the numeric fields as:-
10 HOST-FLRBACFTE PIC S9(01)V9(02) COMP-3.
10 HOST-FLRBACSCR PIC S9(01)V9(02) COMP-3.
10 HOST-FLRBACCEB PIC S9(01)V9(02) COMP-3.
10 HOST-FLRAICFTE PIC S9(01)V9(02) COMP-3.
10 HOST-FLRAICSCR PIC S9(01)V9(02) COMP-3.
Hope, this will solve your problem.
Regards
-----------------------------------------------------------
A. Sivasubrahmanian
Project Leader - Insurance Division
Wipro Technologies
Bangalore, India
Phone: (M) +91 98860 55279
(O) +91 80 8520408 x-4364
Email: sivasubrahmanian.ananthakrishnan@xxxxxxxxx
URL: www.wipro.com
World's First SEI CMM - 5 Company
World's First PCMM - 5 Company
-----------------------------------------------------------
-----Original Message-----
From: cobol400-l-bounces@xxxxxxxxxxxx
[mailto:cobol400-l-bounces@xxxxxxxxxxxx] On Behalf Of D Meza
Sent: Tuesday, September 30, 2003 9:06 AM
To: cobol400-l@xxxxxxxxxxxx
Subject: Question: AS400 Table/File Definition-Errors
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
_______________________________________________
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.
**************************Disclaimer************************************
Information contained in this E-MAIL being proprietary to Wipro Limited is
'privileged' and 'confidential' and intended for use only by the individual
or entity to which it is addressed. You are notified that any use, copying
or dissemination of the information contained in the E-MAIL in any manner
whatsoever is strictly prohibited.
***************************************************************************
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.