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
 

 

identify the position of SIGN?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
useit

Active User


Joined: 05 Oct 2006
Posts: 144

PostPosted: Tue Sep 27, 2011 5:03 pm    Post subject: identify the position of SIGN?
Reply with quote

hi,

i have a field which is of S9(4). when we view it thru copy book it will display as +1000, -2000,+4000,-3000, respectively,

i have to replce -ve value with zero. but problem here is i dont know the position to replace the sign.since sign will be stored internlly,if i know the position i can replce using below sort card.


OUTREC IFTHEN=(WHEN=(pos???,1,CH,EQ,C'-'),
OVERLAY=(pos:C'+0 ')


is there any wayy we can identify and replace -ve value with zero?

Regds,
useit
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Tue Sep 27, 2011 5:30 pm    Post subject: Reply to: identify the position of SIGN?
Reply with quote

S9(4) doesn't tell us much. Is it zoned, packed, or binary?

Whichever, define it in your sort card, test it for less than zero, if it is, it is negative so make it zero, else leave it alone because it is positive.
Back to top
View user's profile Send private message
elango_K

New User


Joined: 18 Aug 2011
Posts: 44
Location: India

PostPosted: Tue Sep 27, 2011 9:00 pm    Post subject:
Reply with quote

Use Sub string to identify the 'Minus sign' and replace it with Zero using FINDREP.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Tue Sep 27, 2011 9:06 pm    Post subject:
Reply with quote

elango_K wrote:
Use Sub string to identify the 'Minus sign' and replace it with Zero using FINDREP.


A poor idea since it isn't know what format the data is in, there may not be byte for the sign!![/b]
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 Sep 27, 2011 10:25 pm    Post subject:
Reply with quote

Hello,

Also, there is no minus-sign to test for. The "-" diesnt really exist, but is added by the code that displays the value.

Quote:
OUTREC IFTHEN=(WHEN=(pos???,1,CH,EQ,C'-'),
OVERLAY=(pos:C'+0 ')
Can't be done as per your post, there is no actual "-". S9(4) means a bit or some number of bits will be the sign (depending on the data definition (binary, packed-decimal, zoned-decimal).

Show the value of this field in hex without using the copybook display.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Identify error records krsenthil85 DFSORT/ICETOOL 11 Thu Apr 28, 2016 9:45 pm
No new posts ISREDIT - Position Cursor on the Comm... Tarique Anwer TSO/ISPF 5 Wed Feb 03, 2016 12:44 pm
No new posts Identify comp/comp-3 data from file bipinpeter CLIST & REXX 8 Thu Jan 14, 2016 2:27 pm
No new posts Adjust Heading Position in Easytrieve thesumitk CA Products 4 Mon Dec 21, 2015 3:26 pm
No new posts Identify the last schedule change of ... rikdeb CA Products 2 Tue Sep 29, 2015 8:11 pm


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