View previous topic :: View next topic
|
Author |
Message |
manisam
New User
Joined: 24 Sep 2006 Posts: 3 Location: Chennai..India
|
|
|
|
I need to handle -ve sign that comes from the Input file,so that I can perform addtion and other processing(i.e Need to convert to EBCDIC format) as well as -ve sign that comes during processing(i.e 2000 - 2288) gives 28Q instead of -288
To handle -ve sign that comes during processing I declared follwing table and it is
TABLSPEC 10 01 01 03 01
..
..
IF WST54 IS ONTABLE
MOVE FUN01 TO WST54
MOVE C'-' TO WST41
ENDIF
..
..
END
Now 28Q was converted to -288..
To handle -ve character Do I need to delcare another table ?..or it can be handled in 1 Table...kindly advise how to declare and use 2 tables.or how to handle in 1 Table..
0 }
1 J
2 K
3 L
4 M
5 N
6 O
7 P
8 Q
9 R |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
I am unfamiliar with the term -ve.
Please post a few records that show (at least some) of the fields in question.
It looks as thoug you are processing zoned decimal numbers - these do not need a table to resolve. You need to specify the receiving field with the proper PIC to insert the minus sign.
Please let me know if i have misunderstood. |
|
Back to top |
|
|
manisam
New User
Joined: 24 Sep 2006 Posts: 3 Location: Chennai..India
|
|
|
|
____________________________________________________
I have modified the my query again to make it clear.Thanks
____________________________________________________
Clarification in QuikJob Program...
---------------------------------------
I need to handle Negative(-ve) sign that comes from the Input file,so that I can perform addtion and other processing(i.e Need to convert to EBCDIC format) as well as zone punch characters that comes during processing(i.e 2000 - 2288) gives 28Q( Q-zone punch character) instead of -288
To handle zone punch characters(i.e for -8 it zone punch character is Q and for -0 } ,-1 J,-2 K,.... ) that comes during processing I declared follwing table and it is
TABLSPEC 10 01 01 03 01
..
..
IF WST54 IS ONTABLE
MOVE FUN01 TO WST54
MOVE C'-' TO WST41
ENDIF
..
..
END
} 0
J 1
K 2
L 3
M 4
N 5
O 6
P 7
Q 8
R 9
Using the Above pgm I converted 28Q to -288 and wrote it to output file..
To handle Negative character that comes from Input ..Do I need to delcare another table ?..or it can be handled in 1 Table...kindly advise how to declare and use 2 tables.or how to handle in 1 Table..
0 }
1 J
2 K
3 L
4 M
5 N
6 O
7 P
8 Q
9 R |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If a field is defined as s9(3) and contains a value of 28Q, there is no need to do anything with it other than use it. It already has a valid negative sign. That is the way zoned decimal works. |
|
Back to top |
|
|
harikiran.mc
New User
Joined: 18 Jan 2007 Posts: 17 Location: CHENNAI
|
|
|
|
May I know what is FUN01....
Is it related to TABLSPEC 10 01 01 03 01??? |
|
Back to top |
|
|
|