IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Getting Current Date and Time into JCL instream variables.


IBM Mainframe Forums -> CA Products
Post new topic   This topic is locked: you cannot edit posts or make replies.
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
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: 2146
Location: At my coffee table

PostPosted: Wed Feb 20, 2008 8:22 pm
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. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts To get the the current time DFSORT/ICETOOL 13
No new posts RC query -Time column CA Products 3
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts C Compile time time stamps Java & MQSeries 10
Search our Forums:

Back to Top