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
 

 

Edit mask in Move Edited.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Java & MQSeries
View previous topic :: :: View next topic  
Author Message
rahulvv

New User


Joined: 05 Apr 2006
Posts: 3
Location: Mumbai, India

PostPosted: Mon Oct 12, 2009 11:56 am    Post subject: Edit mask in Move Edited.
Reply with quote

Hi,

Could someone help me with the difference in the statements 1 and 2:
1. MOVE EDITED operand1 TO operand2 (EM=value)
2. MOVE EDITED operand1 (EM=value) TO operand2

Please avoid giving the programming guide definition as I have gone thru them.

My usual code would look like:

Code:

DEFINE DATA                             
LOCAL                                   
01 #DAT (A8)                             
01 #DATE (D)                             
END-DEFINE                               
*                                       
#DAT := '10122009'                       
MOVE EDITED #DAT   TO #DATE (EM=MMDDYYYY)
WRITE #DATE                             
END                                     


And this would work fine.
But if I code
Code:
 MOVE EDITED #DAT (EM=MMDDYYYY)  TO #DATE


this would not even stow.

Could anybody please explain to me the reason?
How exactly does the EM work?

Thanks,

Rahul
Back to top
View user's profile Send private message

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Mon Oct 12, 2009 5:24 pm    Post subject:
Reply with quote

Sorry, I really tried to phrase my own answer, but then I looked at the manual (Statements --> MOVE) and noticed that Software-AG phrased it in a better way.

O.
Back to top
View user's profile Send private message
atulbagewadikar

New User


Joined: 15 Jun 2006
Posts: 26

PostPosted: Wed Oct 14, 2009 1:05 pm    Post subject: Reply to: Edit mask in Move Edited.
Reply with quote

Hi Rahul,

Why don't you try this way? See the changes and try to find how it works now?

I believe you will find out your answer after this.

Code:
DEFINE DATA LOCAL                                                       
1 #DAT (N8)                                                             
1 REDEFINE #DAT                                                         
  2 #DAT-A (A8)                                                         
1 #DAT-A-10 (A10)                                                       
1 #DATE (D)                                                             
END-DEFINE                                                               
#DAT := 20090729                                                         
*                                                                       
MOVE EDITED #DAT-A TO #DATE (EM=YYYYMMDD)                               
*                                                                       
MOVE EDITED #DATE (EM=YYYY/MM/DD) TO #DAT-A-10                           
*                                                                       
WRITE '=' #DAT-A-10 '=' #DATE                                           
END           


Output

Code:
MORE                                                                           
Page     1                                                   09-10-14  18:32:33
                                                                               
#DAT-A-10: 2009/07/29 #DATE: 09-07-29                   
Back to top
View user's profile Send private message
Steve Robinson

New User


Joined: 14 Nov 2009
Posts: 12
Location: U.S.

PostPosted: Sat Nov 14, 2009 11:42 pm    Post subject:
Reply with quote

Could someone help me with the difference in the statements 1 and 2:
1. MOVE EDITED operand1 TO operand2 (EM=value)
2. MOVE EDITED operand1 (EM=value) TO operand2


Statement 2 takes operand1 and applies the specified edit mask to create operand2.

Statement 1 is actually a "de edit" operation. It takes operand1 and removes the editing characters specified in the edit mask to create operand2. Careful. If the editing characters do not exist in operand1 you will get an error message.

steve
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 -> Java & MQSeries All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
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
No new posts Mass comment and edit elixir1986 IBM Tools 3 Thu Mar 02, 2017 10:09 pm
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 8 Wed Jan 25, 2017 8:24 pm
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 0 Wed Jan 25, 2017 8:23 pm


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