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: 1717
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: 7241

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: 1610
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 File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts Conversion of a VB file to FB. isssal DFSORT/ICETOOL 1 Mon Oct 31, 2016 10:23 pm
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am
No new posts EBCDIC to ASCII conversion using OCOPY mistah kurtz All Other Mainframe Topics 5 Tue Sep 06, 2016 2:26 pm
No new posts Comparex utility to Syncsort conversion mistah kurtz SYNCSORT 11 Fri Jul 22, 2016 1:53 pm


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