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
 

 

DATE SELECT: embeded sql in cobol program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
mauvis

New User


Joined: 27 Jul 2007
Posts: 11
Location: india

PostPosted: Tue Aug 07, 2007 2:20 pm    Post subject: DATE SELECT: embeded sql in cobol program
Reply with quote

Hi ,

I am new to this site..and hope fully will remain active..

my question is

i have one embeded sql in cobol program as following

EXEC SQL
SELECT
(DATE (:WS-DB2-DATE) + :WS-MONTHS MONTHS)
INTO
:HLD-ERQ-EXP-DT
FROM
SYSIBM.SYSDUMMY1
END-EXEC.
. . . . . . . . . . . . . . . . .

where WS-DB2-DATE is X(10) and WS-MONTHS may contain any thing in between 1 to 6

please explain me how it works..
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Tue Aug 07, 2007 2:39 pm    Post subject:
Reply with quote

Quote:
(DATE (:WS-DB2-DATE) + :WS-MONTHS MONTHS)
Have you looked up the pieces of this?
What does DATE() do?
What does the MONTHS do?
If you knew that, the rest would be simple....
Do you need help finding a manual?
Do you want somebody to look up the answer for you?
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: Tue Aug 07, 2007 7:37 pm    Post subject:
Reply with quote

Hello Mauvis, and welcome to the forums,

If you are learning your way around this site, the manuals most often used are linked to the top of each web page as "Manuals". There is also a "Search" feature (see below).

What you have is an SQL statement that takes advantage of a DB2 feature.

When you are going to ask a question, it is good practice to search the forums for an existing answer (this has been discussed before). If you find what you need by searching, you will save time waiting on an answer from the forum.

Please search and/or refer to the DB2 manuals and post back if there is anything not clear. It is probably more important to learn how to use this site and the documentation than it is to have someone just spout back answers.
Back to top
View user's profile Send private message
mauvis

New User


Joined: 27 Jul 2007
Posts: 11
Location: india

PostPosted: Wed Aug 08, 2007 12:03 am    Post subject:
Reply with quote

thanks a lot dick scherrer...
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: Wed Aug 08, 2007 2:35 am    Post subject:
Reply with quote

You're welcome and good luck icon_smile.gif
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 -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm


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