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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 31 Tue Dec 06, 2016 8:04 pm
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 15 Thu Dec 01, 2016 8:28 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm


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