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: 2453
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: 7311
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: 2572
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 Date conversion using SORT SYNCSORT 4
No new posts HOW TO OVERLAY A Packed decimal VALUE... DFSORT/ICETOOL 5
This topic is locked: you cannot edit posts or make replies. Assembler - Packed Decimals - PACK in... PL/I & Assembler 3
This topic is locked: you cannot edit posts or make replies. Write Character to Hexadecimal file w... COBOL Programming 8
No new posts Date Conversion Y2T to Y2W SYNCSORT 8
Search our Forums:

Back to Top