To fubd previous months' end dates with system date as i/p

This is a Mainframe COBOL forum - you can post your queries on Mainframe COBOL, VS COBOL II, COBOL/370 , Enterprise COBOL

Moderators: dbzTHEdinosauer, Moderator Group

Post Reply
jasand
Member
Posts: 1
Joined: Tue Jul 27, 2010 11:04 am

To fubd previous months' end dates with system date as i/p

Post by jasand » Tue Jul 27, 2010 12:26 pm

Hi,

Please let me know how to get the o/p for the below requirement.
I need to manipulate the system run date and get last two month's end dates.

For eg: If today is June 1st or 3rd,
then the output file (FB/80) should hold 'May' and 'April' month end dates.

The output file should hold a single record as below,
ABCDEFGXX0000053110043010

where
ABCDEFG - constant
XX - a parm value (alphabetic)
0000 - constant
053110 - date field (MMDDYY - May month's end date)
043010 - date field (MMDDYY - April month's end date)

Thanks.

krishnanramesh
Member
Posts: 4
Joined: Sun Jul 04, 2010 12:54 pm
Location: chennai

Post by krishnanramesh » Fri Aug 13, 2010 7:48 am

y u need parm value? and other constant?

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Fri Aug 13, 2010 8:23 am

well, since we are only concerned with months, a simple internal cobol table would suffice.
determining Feb end date would require a calculation.

there are LE routines that you could call for date manipulations.
there are some cobol intrinsic functions that you could use. (COBOL II)

you could also perform a search on this website,
I believe there are some threads concerning date calculations.

krishnanramesh,
this is not a chatroom, don't use chat language.
This is a technical website; we use completed english.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others