View previous topic :: View next topic
|
Author |
Message |
sriram_motamarri Warnings : 1 New User
Joined: 14 Sep 2006 Posts: 11 Location: Chennai
|
|
|
|
My Ezytrieve Program is to convert some numbers in input file to other
Input file is like below
5508{ 01D
I defined these two fields as
File declaration
Field-1 5 N 0
Field-2 3 N 0
In Program
If Field-1 = 55080
Field-1 = 55095 I want it as 5509E
End-if
In the out file i am getting as 55095.
Please tell me how i can get 5509E |
|
Back to top |
|
|
Douglas Wilder
Active User
Joined: 28 Nov 2006 Posts: 305 Location: Deerfield IL
|
|
|
|
Code: |
Num Neg Unsigned Plus
--- ---- -------- ----
0 DO } F0 0 C0 {
1 D1 J F1 1 C1 A
2 D2 K F2 2 C2 B
3 D3 L F3 3 C3 C
4 D4 M F4 4 C4 D
5 D5 N F5 5 C5 E
6 D6 O F6 6 C6 F
7 D7 P F7 7 C7 G
8 D8 Q F8 8 C8 H
9 D9 R F9 9 C9 I |
For math input unsigned numbers are treated the same as plus signed. Usually converting the sign nibble (the left nibble of the right most byte) from F unsigned to C Plus signed is not needed.
Easytrieve does not usually output the plus signed numbers for numeric, unless they are packed or binary (and often not even then). If you really need them converted you may need to test and convert the sign nibble of these numbers by treating them as alpha fields. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
CA-Easytrieve/Plus Reference Guide wrote: |
Signed/Unsigned Rules
.
.
.
2. For non-negative, zoned decimal numbers on the left side of an Assignment statement, CA-Easytrieve/Plus sets an F sign. Otherwise, it manipulates the number in packed decimal format.
3. Packed decimal numbers are manipulated in packed decimal format. |
Try this:
Code: |
Field-1 5 P 0
Field-2 3 P 0 |
|
|
Back to top |
|
|
|