IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Need to handle -ve sign that comes from the Input file


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
manisam

New User


Joined: 24 Sep 2006
Posts: 3
Location: Chennai..India

PostPosted: Mon May 28, 2007 8:33 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon May 28, 2007 9:37 pm
Reply with quote

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
View user's profile Send private message
manisam

New User


Joined: 24 Sep 2006
Posts: 3
Location: Chennai..India

PostPosted: Tue May 29, 2007 3:37 pm
Reply with quote

____________________________________________________

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue May 29, 2007 6:00 pm
Reply with quote

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
View user's profile Send private message
harikiran.mc

New User


Joined: 18 Jan 2007
Posts: 17
Location: CHENNAI

PostPosted: Sat Nov 15, 2008 3:56 pm
Reply with quote

May I know what is FUN01....
Is it related to TABLSPEC 10 01 01 03 01???
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top