MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Move sign right to left using dfsort

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
Magesh_J
Intermediate


Joined: 21 Jun 2014
Posts: 259
Topics: 54

PostPosted: Fri Jul 21, 2017 3:54 pm    Post subject: Move sign right to left using dfsort Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12357
Topics: 75
Location: San Jose

PostPosted: Fri Jul 21, 2017 4:43 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Magesh_J
Intermediate


Joined: 21 Jun 2014
Posts: 259
Topics: 54

PostPosted: Fri Jul 21, 2017 4:46 pm    Post subject: Reply with quote

Thanks Kolusu,

Regards
Magesh
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group