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
 

 

MOVE S9(9) COMP-3 variable ..

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
shashank.dreams

New User


Joined: 04 Jan 2006
Posts: 13
Location: pune

PostPosted: Thu Apr 16, 2009 5:33 am    Post subject: MOVE S9(9) COMP-3 variable ..
Reply with quote

Hi,

I have a date field with declaration as S9(9) COMP-3 and format YYYYMMDD. I want to move it to another date field in such a way, so that i can get a format of YYYYMM. How i need to declare the target date field?

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

Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Thu Apr 16, 2009 5:48 am    Post subject: Reply to: MOVE S9(9) COMP-3 variable ..
Reply with quote

WS-YYYYMM needs to be defined as PIC S9(07) COMP-3.

To populate WS-YYYYMM, you must DIVIDE WS-YYYYMMDD BY 100 GIVING WS-YYYYMM.

In fact, that's the COBOL syntax....

Regards,
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. How to move a long alphanumeric data ... lind sh COBOL Programming 8 Mon Dec 05, 2016 7:51 pm
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
No new posts How can we create a flat file in JAVA... rakesh.v18 Java & MQSeries 7 Fri Sep 23, 2016 10:46 pm
No new posts Format to pipe delimited with variabl... pshongal SYNCSORT 6 Wed Sep 14, 2016 2:48 pm
This topic is locked: you cannot edit posts or make replies. Alphanumeric to Numeric move on UNIX mistah kurtz COBOL Programming 16 Wed Jul 27, 2016 8:47 pm


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