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
 

 

Converted Unsigned Field to Signed Field

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

New User


Joined: 17 Apr 2008
Posts: 26
Location: Oviedo, FL

PostPosted: Thu Feb 16, 2012 6:56 pm    Post subject: Converted Unsigned Field to Signed Field
Reply with quote

Hi, i am trying to convertd an unsigned field 9(6) position 46 to a signed field s9(6) using the ifthen and overlay. The result of what i have below does not place a sign in the field. Your help would be appreciated.
The hex values of my input and output are the same (input field=000014)
Code:
input             output
F F F F F F       F F F F F C
0 0 0 0 1 4       0 0 0 0 1 4



Code:
SORT FIELDS=(COPY)                                                 
INREC IFTHEN=(WHEN=(23,1,CH,EQ,C'5'),                               
              OVERLAY=(46:46,6,ZD,MUL,+1,TO=ZD,LENGTH=6),HIT=NEXT) 
OUTFIL FILES=1,LRECL=381,REMOVECC,                                 
       OUTREC=(1:1,61,                                             
              90:62,49,                                             
             160:111,165,                                           
             325:276,40,                                           
             365:C' ',                                             
             366:316,16)
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7308

PostPosted: Thu Feb 16, 2012 7:37 pm    Post subject: Reply to: Converted Unsigned Field to Signed Field
Reply with quote

Consulting the manual (link at the top of the page) rapidly reveals a ZDC which has "C" for positive and "D" for negative. You don't need the multiplication, just the TO=ZDC, from reading, but I haven't tried it - something exciting for you to do....
Back to top
View user's profile Send private message
jr3011

New User


Joined: 17 Apr 2008
Posts: 26
Location: Oviedo, FL

PostPosted: Thu Feb 16, 2012 7:42 pm    Post subject: Reply to: Converted Unsigned Field to Signed Field
Reply with quote

Worked perfectly as you predicted.. Thanks alot for your help !
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 SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts outrec field outside range Danielle.Filteau SYNCSORT 10 Sat Mar 04, 2017 2:37 am
No new posts 2 byte YEAR from Y'DATE2' field tecnokrat DFSORT/ICETOOL 2 Tue Feb 07, 2017 12:05 pm
No new posts Sort two file having same field, one ... himanshu malik DFSORT/ICETOOL 7 Thu Feb 02, 2017 10:09 am


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