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
 
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: 7314

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
This topic is locked: you cannot edit posts or make replies. Incrementing current time field by 30... arunsoods DFSORT/ICETOOL 11 Thu Oct 26, 2017 3:22 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Partial color change of a field in CI... waseem0424 CICS 5 Fri Sep 29, 2017 7:56 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
No new posts Remove leading spaces from numeric field rexx77 SYNCSORT 6 Wed Sep 06, 2017 2:15 am

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