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 Setting Font Type for XMIT satish.ms10 All Other Mainframe Topics 3 Fri Sep 15, 2017 10:01 pm
No new posts Move from Comp3 variable to Edited Va... sreekusr COBOL Programming 8 Thu Aug 10, 2017 4:20 pm
No new posts Profile changed to NUMBER ON STD (fro... Martylin TSO/ISPF 1 Thu Aug 03, 2017 9:14 am
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm
No new posts SMTP the current generation number of... Jyothi Kulunde JCL & VSAM 4 Thu May 04, 2017 4:08 pm

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