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

conversion from char to packed decimal


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

New User


Joined: 10 Dec 2012
Posts: 37
Location: India

PostPosted: Fri Apr 08, 2016 1:12 pm
Reply with quote

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
View user's profile Send private message
boyti ko

New User


Joined: 03 Nov 2014
Posts: 78
Location: Malaysia

PostPosted: Fri Apr 08, 2016 2:46 pm
Reply with quote

Try to use
Code:
SFF,TO=PD
in your SORT parameter.
Back to top
View user's profile Send private message
Musab Ahmed

New User


Joined: 10 Dec 2012
Posts: 37
Location: India

PostPosted: Fri Apr 08, 2016 5:01 pm
Reply with quote

Thanks it worked
Back to top
View user's profile Send private message
Musab Ahmed

New User


Joined: 10 Dec 2012
Posts: 37
Location: India

PostPosted: Fri Apr 08, 2016 5:12 pm
Reply with quote

is the reverse possible that is converting PD to SFF.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Fri Apr 08, 2016 5:14 pm
Reply with quote

What does the manual say? The manual is there for a purpose - use it.
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: Fri Apr 08, 2016 6:16 pm
Reply with quote

No, the reverse is not possible. You'd use an EDIT to get the same output from a packed-decimal input.
Back to top
View user's profile Send private message
Musab Ahmed

New User


Joined: 10 Dec 2012
Posts: 37
Location: India

PostPosted: Sat Apr 09, 2016 11:01 am
Reply with quote

Thanks Bill. It works.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3049
Location: NYC,USA

PostPosted: Sat Apr 09, 2016 5:14 pm
Reply with quote

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
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 Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts 10 byte RBA conversion DB2 2
No new posts 10 byte RBA conversion -non applicati... JCL & VSAM 1
No new posts Exclude rows with > than x occurre... DFSORT/ICETOOL 6
Search our Forums:

Back to Top