PMS Information Systems
Welcome to PMS Information Systems - IBM i (AS/400) Forum !!!

Get Answers for all your queries on IBM i (AS/400).

Join the forum, it's quick and easy

PMS Information Systems
Welcome to PMS Information Systems - IBM i (AS/400) Forum !!!

Get Answers for all your queries on IBM i (AS/400).
PMS Information Systems
Would you like to react to this message? Create an account in a few clicks or log in to continue.

File Zoned Decimal has been changed to Packed Decimal in RPG

Go down

File Zoned Decimal has been changed to Packed Decimal in RPG  Empty File Zoned Decimal has been changed to Packed Decimal in RPG

Post  maran Thu Feb 09, 2012 6:45 pm

There are instances when RPG changes a zoned decimal field to packed decimal. How to override this??

The program version F-spec zoned decimal fields will always be presented as packed decimal within the program itself. RPG does this because packed is a better encoding method on the AS/400 for performing arithmetic operations. You can override this by specifying an externally described data structure for the file used in the F-spec. The following example shows how this is done in an RPG IV program:

FMyFile IF E K Disk

D MyFileDs E DS ExtName( MyFile )

This externally described data structure causes RPG to use zoned decimal for all fields defined as zoned decimal in your program.
maran
maran
Admin

Posts : 442
Join date : 2009-07-24

https://pmsinformationsystem.forumotion.net

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum