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

Packed decimal to Alphanumeric


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kris_madras
Warnings : 1

New User


Joined: 04 Jul 2005
Posts: 31

PostPosted: Wed May 05, 2021 12:21 am
Reply with quote

Hi,
I have input feed in the form pic s9(7)v9(2) comp-3.
I need to move this input to output variable X(9).
Also need to remove leading zeroes in the decimal portion.
Please suggest.

Input -1: 1234.00
Output expected : xxx123400 (x is space)

Input -2: 0.58
Output expected : xxxxxxx58 (x is space)

Input -3: 2345.67
Output expected : xxx234567 (x is space)

Input 4-: 0.00
Output expected : xxxxxxxxx (x is space)

Thanks
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Wed May 05, 2021 1:51 am
Reply with quote

Hi

What have you tried please?

Also what do you expect if your input is less than zero?

Can you also double check if 0.00 is input you need output as spaces?
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2024
Location: USA

PostPosted: Wed May 05, 2021 9:36 pm
Reply with quote

FYI:

COBOL Programming Guide

COBOL Language Reference
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts PD not working for unsigned packed JO... DFSORT/ICETOOL 5
No new posts Def PD not working for unsigned packe... JCL & VSAM 3
No new posts Need Help with Packed Decimal Signs DFSORT/ICETOOL 4
No new posts Select a DB2 value in a specific deci... DB2 4
Search our Forums:

Back to Top