Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Simulate the start and end date check above using Cobol

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

New User


Joined: 09 Dec 2005
Posts: 30
Location: Pune

PostPosted: Tue Jul 24, 2007 11:46 am    Post subject: Simulate the start and end date check above using Cobol
Reply with quote

SELECT *
FROM DBAX1.TCDHXX_MED_CLM_DET
WHERE INTEG_PART_ID = '00XXX'
AND BENEFIT_START_DT <= CURRENT DATE
AND (BENEFIT_END_DT + 90 DAYS) >= CURRENT DATE ;

Is there a way to simmulate the start and end date check above using Cobol?
This is because Benefit start and end dates are coming in the copybook in YYYYMMDD format.

Should I have a separate date validation routine for this check?
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 Jul 24, 2007 1:14 pm    Post subject:
Reply with quote

Intrinsic functions?
Something like
if FUNCTION INTEGER-OF-DATE(BENEFIT_START_DT) le INTEGER-OF-DATE(CURRENT DATE) and
FUNCTION INTEGER-OF-DATE(BENEFIT_END_DT) + 90 ge INTEGER-OF-DATE(CURRENT DATE)
Back to top
View user's profile Send private message
srini_igsi
Currently Banned

New User


Joined: 09 Dec 2005
Posts: 30
Location: Pune

PostPosted: Tue Jul 24, 2007 2:11 pm    Post subject:
Reply with quote

Thanks William. I am just looking out for this kind of logic only. Hope this would work. Let me give a try and get back.
Back to top
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Tue Jul 24, 2007 6:39 pm    Post subject:
Reply with quote

You can do that query straight away in COBOL. The CURRENT_DATE is a DB2 keyword and it should work fine in your query. If you want to use your date from a copybook you need to convert it to a DB2 acceptable date format. 'CCYY-MM-DD' before using the COBOL field in the query.
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
No new posts Linkage editor is part of COBOL, z/OS... ankit.jain COBOL Programming 4 Fri Apr 20, 2018 4:17 pm
This topic is locked: you cannot edit posts or make replies. Difference between EQUAL and EQUAL TO... jithinraghavan COBOL Programming 3 Thu Apr 19, 2018 2:22 am
This topic is locked: you cannot edit posts or make replies. GDG gen check using REXX raghuraman123 CLIST & REXX 6 Wed Apr 18, 2018 9:18 pm
No new posts Call COBOL or PLI with a click from w... vaibhav gs All Other Mainframe Topics 1 Mon Apr 16, 2018 7:29 pm
No new posts COBOL MVS options BiswajitDG COBOL Programming 8 Fri Apr 06, 2018 12:35 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us