IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

how to write in cobol 01 - jan, 02 - feb ........


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
teji4

New User


Joined: 26 Oct 2007
Posts: 9
Location: bangalore

PostPosted: Thu Jan 17, 2008 6:12 pm
Reply with quote

How to write in cobol program

insted of 01 it will come as Jan
02 it will come as Feb

upto 12 it will come as Dec.( only 3 characteres)

with out using evaluate and if statement.

how to find this?

pls let me know any one.
Back to top
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Thu Jan 17, 2008 6:15 pm
Reply with quote

Using DB2's date functions would work. You could do a select and cast to turn it into the month name.
Back to top
View user's profile Send private message
teji4

New User


Joined: 26 Oct 2007
Posts: 9
Location: bangalore

PostPosted: Thu Jan 17, 2008 6:23 pm
Reply with quote

Hi stodolas,

i am asking about using cobol statement with out using db2
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Thu Jan 17, 2008 7:05 pm
Reply with quote

teji4 wrote:
Hi stodolas,

i am asking about using cobol statement with out using db2


Use a table lookup with the month as the subscript.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 2
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
Search our Forums:

Back to Top