View previous topic :: View next topic
|
Author |
Message |
shanmugapriya j
New User
Joined: 28 Dec 2006 Posts: 9 Location: chennai
|
|
|
|
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 |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
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 |
|
|
shanmugapriya j
New User
Joined: 28 Dec 2006 Posts: 9 Location: chennai
|
|
|
|
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 |
|
|
shanmugapriya j
New User
Joined: 28 Dec 2006 Posts: 9 Location: chennai
|
|
|
|
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 |
|
|
|