Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Need to handle -ve sign that comes from the Input file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
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    Post subject: Need to handle -ve sign that comes from the Input file
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

Site Director


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

PostPosted: Mon May 28, 2007 9:37 pm    Post subject:
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    Post subject: Re: Need to handle -ve sign that comes from the Input file
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

Site Director


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

PostPosted: Tue May 29, 2007 6:00 pm    Post subject:
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    Post subject: Reply to: Need to handle -ve sign that comes from the Input
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    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts display the sign only if the value is... useit DFSORT/ICETOOL 3 Wed Oct 04, 2017 5:53 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us