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
 
conversion from char to packed decimal

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: conversion from char to packed decimal
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    Post subject:
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    Post subject:
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    Post subject:
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: 1848
Location: UK

PostPosted: Fri Apr 08, 2016 5:14 pm    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Fri Apr 08, 2016 6:16 pm    Post subject: Reply to: conversion from char to packed decimal
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    Post subject:
Reply with quote

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

Senior Member


Joined: 21 Sep 2010
Posts: 1747
Location: NY,USA

PostPosted: Sat Apr 09, 2016 5:14 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Select numeric portion from CHAR data... balaji81_k DB2 6 Sat Aug 19, 2017 1:51 am
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Joinkeys with decimal scdinesh DFSORT/ICETOOL 3 Fri Feb 10, 2017 4:46 am
No new posts Converting decimal to numeric using I... Balaryan DFSORT/ICETOOL 4 Thu Feb 02, 2017 11:27 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm


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