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
 

 

convert 9(9) to S9(9)

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

New User


Joined: 21 Jun 2007
Posts: 29
Location: Baltimore

PostPosted: Sat Oct 29, 2011 2:00 am    Post subject: convert 9(9) to S9(9)
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7308

PostPosted: Sat Oct 29, 2011 2:37 am    Post subject: Reply to: convert 9(9) to S9(9)
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: 578
Location: USA

PostPosted: Sat Oct 29, 2011 2:49 am    Post subject:
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: 29
Location: Baltimore

PostPosted: Sat Oct 29, 2011 3:09 am    Post subject:
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: 578
Location: USA

PostPosted: Sat Oct 29, 2011 3:21 am    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7308

PostPosted: Sat Oct 29, 2011 3:50 am    Post subject: Reply to: convert 9(9) to S9(9)
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    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 Convert current to hex value gopurs DFSORT/ICETOOL 4 Wed Feb 15, 2017 5:40 am
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Convert +9999999999999.99 to S9(12)V9(3) vnktrrd DFSORT/ICETOOL 8 Thu Nov 17, 2016 8:15 pm
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm
No new posts convert PD to ZD ram_vizag DFSORT/ICETOOL 5 Sat Nov 05, 2016 3:06 am


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