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
 

 

how to convert hexadecimal to decimal format

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
shanmugapriya j

New User


Joined: 28 Dec 2006
Posts: 9
Location: chennai

PostPosted: Fri Mar 19, 2010 12:17 pm    Post subject: how to convert hexadecimal to decimal format
Reply with quote

Hi I want to convert the x(18) to s(13) v 9(4) comp-3.
For e.g ; below is the input file
5085|100013|9770|baseint|2010-03-03 06.02.51|0|0|0|14900.0|N|

which has to convert to EBCDIC format to load in to table.

I want to convert 14900.0 to s(13) v 9(4) comp-3 format.
Can any one help in this please.
Back to top
View user's profile Send private message

Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Fri Mar 19, 2010 2:01 pm    Post subject:
Reply with quote

This looks | delimited file.
What is LRECL and RECFM of file?
You need to give datatype of each field and maximum possible lengths.

How should be output? should it be | delimited again? what should be LRECL\RECFM of output file?
Back to top
View user's profile Send private message
shanmugapriya j

New User


Joined: 28 Dec 2006
Posts: 9
Location: chennai

PostPosted: Fri Mar 19, 2010 2:08 pm    Post subject:
Reply with quote

Rec length is 350 and RECFM FB . output will be RECL of 78
Using program to unstring the "|" then moving alll the variables from x ( ) to 9( ) . after that moving the 9( ) to s9() comp or something else.

all the variables are moving properly except the Digits variable.
Back to top
View user's profile Send private message
shanmugapriya j

New User


Joined: 28 Dec 2006
Posts: 9
Location: chennai

PostPosted: Fri Mar 19, 2010 2:53 pm    Post subject:
Reply with quote

Got the answer, we have to compute the variable

Where
05 WS-COST-AMT PIC X(18).
05 WS-COST-AMT1 PIC S9(13)V9(4).
05 WS-OCOST-AMT PIC S9(13)V9(04) COMP-3.

After delimiting the "|"

COMPUTE WS-COST-AMT1 = FUNCTION NUMVAL(WS-COST-AMT)
MOVE WS-COST-AMT1 TO WS-OCOST-AMT
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
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
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm


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