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 of comp-3 data

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
dharmaraok

New User


Joined: 10 Mar 2011
Posts: 30
Location: india

PostPosted: Tue Feb 11, 2014 6:12 pm    Post subject: conversion of comp-3 data
Reply with quote

I am having date value in the below comp-3 format

101
413
(y/m/d)

when i move the value to 01 ws-a pic 9(6) .
I am getting the output as
output : 14011

the value "3" is not displaying.

Could you please let me how to achieve this.
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7251

PostPosted: Tue Feb 11, 2014 6:27 pm    Post subject: Reply to: conversion of comp-3 data
Reply with quote

That is not PACKED-DECIMAL/COMP-3, that is a BCD field (like packed, but with no sign nybble).

Code:
01  deal-with-bcd.
    05  your-field-in PIC X(3).
    05  FILLER COMP-3 PIC V9 VALUE ZERO.
01  FILLER REDEFINES  deal-with-bcd.
    05  your-fieldout COMP-3 PIC 9(6)V9.


Define your source field as PIC XXX/X(3), do the two obvious MOVEs, ending with the value you want.
Back to top
View user's profile Send private message
dharmaraok

New User


Joined: 10 Mar 2011
Posts: 30
Location: india

PostPosted: Mon Feb 17, 2014 2:26 pm    Post subject:
Reply with quote

Thanks !! its Working
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 0 Mon Jan 02, 2017 11:16 am
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am


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