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
 

 

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 SMTP the current generation number of... Jyothi Kulunde JCL & VSAM 4 Thu May 04, 2017 4:08 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts SORT JSON type of data maxsubrat DFSORT/ICETOOL 8 Wed Apr 19, 2017 6:01 pm
No new posts Edit large number of datasets (QSAM) zh_lad TSO/ISPF 3 Tue Apr 04, 2017 6:08 pm
No new posts how to mask the phone number kumarinfy DB2 4 Mon Apr 03, 2017 5:23 pm


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