IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

convert 9(9) to S9(9)


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
MSTP

New User


Joined: 21 Jun 2007
Posts: 30
Location: Baltimore

PostPosted: Sat Oct 29, 2011 2:00 am
Reply with quote

I am trying to convert a value in the file which is in the format of 9(9) which needs to be converted into S9(9). Please help me out here.

INPUT

015162234
015177350
013607226

OUTPUT

01516223D
01517735{
01360722F

thanks
Prasad.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Sat Oct 29, 2011 2:37 am
Reply with quote

What have you tried? You need to check in the manual (link at the top of the page) for datatypes. You have an unsigned zoned decimal which needs to go to a signed zoned decimal.
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 577
Location: USA

PostPosted: Sat Oct 29, 2011 2:49 am
Reply with quote

MSTP,
See if below helps...

Code:
//STEP0001     EXEC PGM=SORT                   
//SYSOUT   DD SYSOUT=*                         
//SORTIN   DD *                                 
015162234                                       
015177350                                       
013607226                                       
//SORTOUT  DD SYSOUT=*                         
//SYSIN    DD *                                 
  OPTION COPY                                   
  OUTREC OVERLAY=(1,9,ZD,TO=ZDC,LENGTH=9)       
/*                                             

OUTPUT
Code:
01516223D
01517735{
01360722F

Thanks,
Back to top
View user's profile Send private message
MSTP

New User


Joined: 21 Jun 2007
Posts: 30
Location: Baltimore

PostPosted: Sat Oct 29, 2011 3:09 am
Reply with quote

sqlcode1 it worked like a charm.Thanks for your help.
By any chance can you point out to me the different data type formats.

Prasad.
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 577
Location: USA

PostPosted: Sat Oct 29, 2011 3:21 am
Reply with quote

MSTP,
Turn HEX ON and see the difference between input and output yourself.

Input has F for positive and your expected output wants C for positive sign.

Thanks
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Sat Oct 29, 2011 3:50 am
Reply with quote

Does this lead you to what you want?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Keep leading zero(s) after convert fl... SYNCSORT 7
No new posts Convert single row multi cols to sing... DFSORT/ICETOOL 6
No new posts convert file from VB to FB and use tr... DFSORT/ICETOOL 8
No new posts Convert HEX to Numeric DB2 3
Search our Forums:

Back to Top