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
 
Getting Current Date and Time into JCL instream variables.

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
krsenthil85

New User


Joined: 31 Aug 2007
Posts: 55
Location: bangalore

PostPosted: Wed Feb 20, 2008 8:06 pm    Post subject: Getting Current Date and Time into JCL instream variables.
Reply with quote

* I am adding some header in the dataset through jcl.
* This header contains the date and time part.
* My code is seems like shown below.

Code:
//SHDR1    EXEC PGM=aaaa                                             
//PANDD1   DD  DSN=sdaf.asdf.SOURCE,                               
//             DISP=SHR                                                 
//SYSPRINT DD  SYSOUT=H                                                 
//SYSOUT   DD  SYSOUT=H                                                 
//EZTVFM   DD  SPACE=(4096,(1000,1000),RLSE),                           
//             UNIT=SYSDA                                               
//FILEIN   DD  DSN=PROD.xxxx.xxxx                         
//             DISP=SHR                                                 
//FILEOUT  DD  DSN=PROD.xxxx.xxxx1                     
//             DISP=(NEW,CATLG,DELETE),                                 
//             DCB=(BLKSIZE=7500,LRECL=200,RECFM=FB),                   
//             SPACE=(CYL,(10,50),RLSE),                               
//             UNIT=SYSDA                                               
//SYSIN    DD  *                                                       
        PARM DEBUG (STATE FLOW)                                         
       FILE    FILEIN  FB(200, 27900)                                   
            FILE-IN-REC                                   W 200   A     
      **                                                                 
        FILE    FILEOUT FB(200, 27900)                                   
            FILE-OUT-REC                                  W 200   A     
      **                                                                 
            WS-HEADER-REC                                 W  200  A     
            WS-HEADER-TITLE      WS-HEADER-REC               06   A     
            WS-HEADER-TYPE       WS-HEADER-REC           +06 01   A     
            WS-HEADER-INSUCO     WS-HEADER-REC           +07 04   A     
            WS-HEADER-TIME       WS-HEADER-REC           +11 06   A     
               WS-HDR-HH         WS-HEADER-TIME              02   A     
               WS-HDR-MIN        WS-HEADER-TIME          +02 02   A     
               WS-HDR-SS         WS-HEADER-TIME          +04 02   A     
            WS-HEADER-DATE       WS-HEADER-REC           +17 08   A     
               WS-HDR-MON        WS-HEADER-DATE              02   A     
               WS-HDR-DD         WS-HEADER-DATE          +02 02   A     
               WS-HDR-YYYY       WS-HEADER-DATE          +04 04   A     
                **                                                                 
       JOB INPUT FILEIN                                                 
     **                                                                 
           MOVE 'HEADER' TO     WS-HEADER-TITLE                         
           MOVE 'N'      TO     WS-HEADER-TYPE                         
           MOVE '4696'   TO     WS-HEADER-INSUCO                       


Now I have to get the system date and time in the corresponding variables.
Back to top
View user's profile Send private message

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Wed Feb 20, 2008 8:22 pm    Post subject:
Reply with quote

Why not use one of EZT's system-defined fields (after removing the slashes):
Quote:
General Fields
SYSDATE is an eight-byte alphabetic field that contains the system date at the start of CA-Easytrieve/Plus execution. The DATE option of the Options Table (Appendix C), determines the format of the date. A slash (/) separates the month, day, and year components of the date, such as MM/DD/YY.
SYSDATE-LONG is a 10-byte alphabetic field that contains the system date, including the century, at the start of CA-Easytrieve/Plus execution. The DATE option of the Options Table (Appendix C), determines the format of the date. A slash (/) separates the month, day, and year components of the date, such as MM/DD/CCYY.
SYSTIME is an eight-byte alphabetic field that contains the system time at the start of CA-Easytrieve/Plus execution. A period (.) separates the data into hours, minutes, and seconds, such as HH.MM.SS.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. 00D3003B - time outs in DB2 when invo... chavinash2004 DB2 2 Mon Oct 09, 2017 4:39 pm
No new posts VSAM RLS Wait time blayek JCL & VSAM 2 Mon Oct 02, 2017 9:05 pm
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm
No new posts Comparing 2 Files using Current time arunsoods SYNCSORT 9 Fri Sep 22, 2017 6:00 pm
No new posts Validate the Date girishb2 DFSORT/ICETOOL 9 Tue Sep 19, 2017 1:12 am

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