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

How to move number type to packed decimal


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
LinkinPark
Warnings : 1

New User


Joined: 20 Nov 2005
Posts: 44
Location: DALIAN,CHINA

PostPosted: Fri Aug 10, 2007 8:09 am
Reply with quote

date w 7 n value 2002111
date-julian w 4 p 0

while

move date to date-julian

Why not get correct value in date-julian ?
i want the value of date-julian is X'2002111C', how can I code it ?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Aug 10, 2007 8:29 am
Reply with quote

Hello,

What is in date-julian after the move?
Back to top
View user's profile Send private message
bijumon

New User


Joined: 14 Aug 2006
Posts: 20
Location: Pune,India

PostPosted: Fri Aug 10, 2007 9:31 am
Reply with quote

Hi,


If you are using MOVE statement to move data from
date to date-julian, then it is an alphanumeric move that is taking place, this does not do a type conversion, instead of using the move statement try using the assignment operatior, i.e., '='

date-julian = date

This will do a type converted assignment.

Regards,
------------
Biju
Back to top
View user's profile Send private message
LinkinPark
Warnings : 1

New User


Joined: 20 Nov 2005
Posts: 44
Location: DALIAN,CHINA

PostPosted: Tue Aug 14, 2007 6:34 am
Reply with quote

it works well instead of using move statement,
so is there any other difference between MOVE statement and assigment
operotr '=' ?

Thank you very much
Back to top
View user's profile Send private message
bijumon

New User


Joined: 14 Aug 2006
Posts: 20
Location: Pune,India

PostPosted: Tue Aug 14, 2007 9:43 am
Reply with quote

You are welcome :)

Major difference is that it does not do a type conversion, and the other difference that i know is like, you cant use assignment operator, i.e, '='
to assign the built in constant values, like:

WS-TEST-ALPHA = SPACES
WS-TEST-NUM = ZEROES

instead you will have to use MOVE.
:)
Back to top
View user's profile Send private message
noorkh

New User


Joined: 06 Mar 2006
Posts: 76
Location: Chennai

PostPosted: Fri Aug 17, 2007 6:55 pm
Reply with quote

But while assigning any statement be careful it will not give any warning or abend but it will simply truncate your data and move it to output field.

So be cautious about assignment statement.
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 -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts Generate random number from range of ... COBOL Programming 3
No new posts Increase the number of columns in the... IBM Tools 3
Search our Forums:

Back to Top