TSO current time

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
Som_TCS
Member
Posts: 9
Joined: Thu Jan 08, 2009 4:44 pm
Location: Chennai / Kolkata

TSO current time

Post by Som_TCS » Sat Aug 29, 2009 6:29 pm

Hi,

I have an requirement to write TSO Current time into a file through JCL. U can use any kind of utility. I know it can be done very easily thru COBOL. But I can't use COBOL.

Can anyone help me to do that?

> Just to write Current time into a file.

Thanks
Somenath

MrSpock
Active Member
Posts: 273
Joined: Wed Jun 27, 2007 5:37 pm

Post by MrSpock » Sun Aug 30, 2009 1:18 am

SORT?
EZACFSM1?
REXX?
CLIST?
SQL?
Easytrieve?
SAS?

Som_TCS
Member
Posts: 9
Joined: Thu Jan 08, 2009 4:44 pm
Location: Chennai / Kolkata

Post by Som_TCS » Wed Sep 02, 2009 10:18 am

SORT

MrSpock
Active Member
Posts: 273
Joined: Wed Jun 27, 2007 5:37 pm

Post by MrSpock » Wed Sep 02, 2009 5:22 pm

What is the required RECFM and LRECL of the output dataset?

What format does the time need to be in? What position in the output does it need to be placed?

Som_TCS
Member
Posts: 9
Joined: Thu Jan 08, 2009 4:44 pm
Location: Chennai / Kolkata

Post by Som_TCS » Tue Sep 08, 2009 3:02 pm

RECFM = FB , LRECL = 80 , start pos = 1

********************************************************************
1
date&time<------space --->
********************************************************************

data&time = CYYMMDDHHMMSS

User avatar
Frank Yaeger
Moderator
Posts: 812
Joined: Sat Feb 18, 2006 5:45 am
Location: San Jose, CA
Contact:

Post by Frank Yaeger » Wed Sep 09, 2009 8:46 pm

Assuming you want one record in the output file with:

ccyymmddhhmmss

here's a DFSORT job that will do that:

Code: Select all

//S1    EXEC  PGM=SORT
//SYSOUT    DD  SYSOUT=*
//SORTIN DD *
//SORTOUT DD DSN=...  output file &#40;FB/80&#41;
//SYSIN    DD    *
  OPTION COPY
  OUTFIL REMOVECC,NODETAIL,
    HEADER1=&#40;DATENS=&#40;4MD&#41;,TIMENS=&#40;24&#41;&#41;
/*
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort

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