JCL to calculate age by subtracting 2 dates

In this Mainframe Forum - You can post your queries on JCL, OS/390 JCL, MVS JCL, z/OS JCL, JES2 & JES3

Moderators: Frank Yaeger, DikDude, Moderator Group

Post Reply
varad.raikar
Member
Posts: 6
Joined: Tue Oct 06, 2015 12:13 pm

JCL to calculate age by subtracting 2 dates

Post by varad.raikar » Tue Jun 14, 2016 10:26 pm

Hi

My input file is in below shown format. LRECL is 80

*******************************
19881201 20160614

first date is a DOB and the other is effective date . DOB<Eff Date always.

I need output as

*****************
27years 193days

Please help me build this JCL.

William Collins
Active Member
Posts: 732
Joined: Thu May 24, 2012 4:07 am

Post by William Collins » Thu Jun 16, 2016 11:05 pm

Have you looked at the documentation of the data functions your SORT product has available?

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