Query 400 – Problem appending data from 1 file to another.

65 pts.
Tags:
AS/400
Query/400
In Query 400 i am trying to append File B to File A. (5=Add to member).

Each time i run the 2nd query for File B it gives me "Query output definition does not match file <FILENAME> in <LIBRARYNAME>". I notice that file A is of Type CHAR and file B is of Type ZONED. Would this prevent an append from taking place?

I have given the File field descriptions below and also the Define Result fields for File B.

Can you tell me what criteria in the define result fields display may work to allow an append. Regards, John.

File A

(Field Description) Field   Type     Length Length Position    Usage   Heading ESTRF CHAR    8                8         24    Both     Transaction

File B

(Field Description) Field Type    Length Length Position Usage Heading XVAL ZONED 8 2              8 24         Both   Trans Value

Define Result Fields

(For File B) Field Expression        Column Heading Len Dec XVAL VALUE(centvl,8) Trans Value           8    2



Software/Hardware used:
iSeries400, OS400 V5R4M5 L00

Answer Wiki

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

I beleive that in order to do an option 5, add to member, the record formats of the second result file, must exactly match the existing file. The field names, sizes, and types must all match.

For the second query try using the digits function convert XVAL to a character field named ESTRF.

Field Expression
ESTRF digits(XVAL)

Discuss This Question: 1  Reply

 
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
  • ASWDEVELOPER
    if you make the extracted layout from FILEB match FILEA, you can output the result to FILEC, then CPYF FILEC to FILEA using the *NOCHK parameter ...
    405 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