MVSFORUMS.com A Community of and for MVS Professionals
View previous topic :: View next topic
Author
Message
Magesh_J Intermediate Joined: 21 Jun 2014 Posts: 259 Topics: 54
Posted: Fri Jul 21, 2017 3:54 pm Post subject: Move sign right to left using dfsort
Hi,
I have an input, where sign appears @ last and the sign is always appears @ fixed position.
Code:
345678.00-
12345679.00
output is left justified.
Code:
-345678.00
12345679.00
Code which i tried, please advise if there exist an alternate method.
Code:
INREC IFTHEN=(WHEN=(12,1,CH,EQ,C'-'),
OVERLAY=(1:1,11,UFF,MUL,-1,EDIT=(SIIIIIIIT.TT),
SIGNS=(,-),1:1,12,JFY=(SHIFT=LEFT)))
OPTION COPY
Thanks
Magesh
Back to top
kolusu Site Admin Joined: 26 Nov 2002 Posts: 12358 Topics: 75 Location: San Jose
Posted: Fri Jul 21, 2017 4:43 pm Post subject:
Magesh_J ,
Hmm I am not sure as to why you need to multiply with -1. All you need is simply the edit the field with edit mask and then left justify it
something like this
Code:
//SYSIN DD *
OPTION COPY
INREC OVERLAY=(01:01,12,SFF,EDIT=(SIIIIIIII.TT),SIGNS=(,-),
01:01,12,JFY=(SHIFT=LEFT,LENGTH=12))
//*
_________________ Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
www.linkedin.com/in/kolusu
Back to top
Magesh_J Intermediate Joined: 21 Jun 2014 Posts: 259 Topics: 54
Posted: Fri Jul 21, 2017 4:46 pm Post subject:
Thanks Kolusu,
Regards
Magesh
Back to top
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum