Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts SSH - known_hosts file configuration vasanthz All Other Mainframe Topics 2 Wed Jul 26, 2017 2:10 am
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us