Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to move number type to packed decimal

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
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    Post subject: How to move number type to packed decimal
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

Site Director


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

PostPosted: Fri Aug 10, 2007 8:29 am    Post subject:
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    Post subject: Re: How to move number type to packed decimal
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    Post subject:
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    Post subject: Re: How to move number type to packed decimal
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Increment number for every group of r... srajendran2 DFSORT/ICETOOL 7 Thu Nov 09, 2017 10:31 pm
No new posts how can i move s9(9) to s9(9) usage comp HARENDRA CHOUDHARY COBOL Programming 3 Mon Nov 06, 2017 12:10 am
No new posts Move from Comp3 variable to Edited Va... Revathy.nair0485 COBOL Programming 7 Fri Nov 03, 2017 3:30 pm
No new posts Extend the decimal values in DIVISION Balaryan DFSORT/ICETOOL 3 Thu Oct 05, 2017 4:05 pm
No new posts Setting Font Type for XMIT satish.ms10 All Other Mainframe Topics 3 Fri Sep 15, 2017 10:01 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us