View previous topic :: View next topic
|
Author |
Message |
Musab Ahmed
New User
Joined: 10 Dec 2012 Posts: 37 Location: India
|
|
|
|
Hello All,
I have a requirement to convert a particular field from CHAR to PACKED DECIMAL. The input file is FB, 22 record length. I need to convert the fields from 8 to 22 into a packed decimal field of same length.
Could anyone please guide me?
input:
Code: |
----+----1----+----2--
**********************
1 2010A -321342.00
1 2010A -21659.00
1 2010A -269326.00
1 2010A -2326.00
|
|
|
Back to top |
|
|
boyti ko
New User
Joined: 03 Nov 2014 Posts: 78 Location: Malaysia
|
|
|
|
Try to use
in your SORT parameter. |
|
Back to top |
|
|
Musab Ahmed
New User
Joined: 10 Dec 2012 Posts: 37 Location: India
|
|
|
|
Thanks it worked |
|
Back to top |
|
|
Musab Ahmed
New User
Joined: 10 Dec 2012 Posts: 37 Location: India
|
|
|
|
is the reverse possible that is converting PD to SFF. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
What does the manual say? The manual is there for a purpose - use it. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
No, the reverse is not possible. You'd use an EDIT to get the same output from a packed-decimal input. |
|
Back to top |
|
|
Musab Ahmed
New User
Joined: 10 Dec 2012 Posts: 37 Location: India
|
|
|
|
Thanks Bill. It works. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3049 Location: NYC,USA
|
|
|
|
However, try searching before you even think of posting such questions as there has been already many topics already discussed. The forum preserves it for such duplicate questions and future references otherwise then there is no point saving old topics, so make a use of that. |
|
Back to top |
|
|
|