Physical / Logical file definitions

Tags:
IBM DB2
RPG
RPGLE
Can a logical file have fields that differ in definition of type than the physical? I've got a physical file with fields defined as: FLD1 A 20 1 20 FLD2 S 8 0 21 28 FLD3 S 11 2 29 39 and the logical defined as: FLD1 A 20 1 20 FLD2 P 8 0 21 25 FLD3 P 11 2 26 31 Will the data process between the two any differently?

Answer Wiki

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

I have tested on our machine, it works fine, nothing is different.

===========================================================

PF and LF fields can be different. That’s one of the points of why LFs are useful in the first place. Yes, there are naturally differences. There are conversions that must happen between data types — conversions always take time and sometimes can cause loss of precision.

One use of different data types is to have a LF that presents packed or binary numeric fields as zoned digits. This can provide much nicer values for FTP. (But decimal positions and negative values take work.)

Tom

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
  • PaulCHsu
    I have tested on our machine, it works fine, nothing is different.
    0 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