For a homework assignment I have to load in 2 files, in one of the files there is a "p". I'm not sure what this means. I've done some research and I found that when you write a pic clause a "P" means that the value is scaled up. I don't know what it means in my case and how i can use this 'p'. It is also giving me an 'illegal character in numeric field' error.
These are what the numbers in the data file represent.
Pos 1-3 Account number (Prime key)
Pos 4-10 Account Balance (2 decimals, signed)
Pos 11-17 Overdraft Amount (2 decimals)
Pos 18-18 Account Type
This is how i wrote my pic clause.
05 OM-ACCT-NUM PIC X(3).
05 OM-AMOUNT PIC 9(5)V99.
05 OM-OD-AMOUNT PIC 9(5)V99.
05 OM-ACCT-TYPE PIC X.
This is the data file...as you can see on the 4th line and 8th line there is a 'p'.
Pinned topic Input File Help!! 'p' in input data file.
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2013-03-20T00:42:58Z at 2013-03-20T00:42:58Z by BillWoodger
SystemAdmin 110000D4XK403 Posts
Re: Input File Help!! 'p' in input data file.2013-03-17T22:52:44ZThis is the accepted answer. This is the accepted answer.Just found the solution...Silly mistake. I had to declare my PIC clause like this...
05 OM-AMOUNT PIC S9(5)V99.
The "S" in the PIC clause means that it is a signed field.
brataj 100000816340 Posts
Re: Input File Help!! 'p' in input data file.2013-03-18T19:53:41ZThis is the accepted answer. This is the accepted answer.
- SystemAdmin 110000D4XK
BillWoodger 270005Q076142 Posts