RUNSQLSTM ALTER TABLE

120 pts.
Tags:
AS/400 V5R3M0
SQL tables
SQL/400
i'm trying to run SQl statment in batch job to alter Table CCSID to 420 but i have error Reason code 10 
Hani 


Software/Hardware used:
AS400 V5R3M0

Answer Wiki

Thanks. We'll let you know when a new response is added.

Message . . . . : Change to field INAME may result in data loss.
Cause . . . . . : A change to field INAME in file DWLOAD in library
TEST may cause data loss. The reason code is 8. The reason codes and
their meanings are as follows:
01 – The field will be dropped.
02 – The new length is shorter than the current length.
03 – The new precision is shorter than the current precision.
04 – The new scale is shorter than the current scale.
05 – The new data type is floating point and the current data type is not
floating point with the same length.
06 – The current data type is floating point and the new data type is not
floating point with the same length.
07 – The new attribute is not nullable and the current attribute is
nullable.
08 – The new CCSID is different from the current CCSID.
09 – The new data type is date, time, or timestamp and the current data
type is character, DBCS-open, or DBCS-either.
10 – The new data type is character, DBCS-either, or DBCS-only and the
current data type is DBCS-open, or the new data type is character or
DBCS-only and the current data type is DBCS-either.
Recovery . . . : If the changes to field INAME are not desired, change
the specified attributes of field INAME and try the function again.

Discuss This Question: 4  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    i have error Reason code 10 The reason code is not useful unless we have the error message identifier. Please post the error message including the message identifier. Tom
    125,585 pointsBadges:
    report
  • Hanisadeq
    Message . . . . : Change to field INAME may result in data loss. Cause . . . . . : A change to field INAME in file DWLOAD in library TEST may cause data loss. The reason code is 8. The reason codes and their meanings are as follows: 01 - The field will be dropped. 02 - The new length is shorter than the current length. 03 - The new precision is shorter than the current precision. 04 - The new scale is shorter than the current scale. 05 - The new data type is floating point and the current data type is not floating point with the same length. 06 - The current data type is floating point and the new data type is not floating point with the same length. 07 - The new attribute is not nullable and the current attribute is nullable. 08 - The new CCSID is different from the current CCSID. 09 - The new data type is date, time, or timestamp and the current data type is character, DBCS-open, or DBCS-either. 10 - The new data type is character, DBCS-either, or DBCS-only and the current data type is DBCS-open, or the new data type is character or DBCS-only and the current data type is DBCS-either. Recovery . . . : If the changes to field INAME are not desired, change the specified attributes of field INAME and try the function again
    120 pointsBadges:
    report
  • TomLiotta
    That's much more useful (though you still didn't show the message identifier, but it probably isn't needed if the full message data is shown -- it might still be needed.) Next, that shows reason code 8, not reason code 10. However, neither case is a problem unless it actually results in data loss that you cannot accept. By changing the CCSID, you are potentially changing how much space is needed to store the value. If you don't also change the size of the column, some of the data might be truncated. It's up to you to decide if any values in the column will be larger than the size of the column after the CCSID changes. What is the error severity? What severity did you specify for the ERRLVL() parameter of the RUNSQLSTM command? Tom
    125,585 pointsBadges:
    report
  • Hanisadeq
    ERRLVL 30 MSG ID SEV RECORD TEXT SQL0952 30 1 Position 1 Processing of the SQL statement ended. Reason code 10.
    120 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following