View previous topic :: View next topic |
Author |
Message |
sankar narayanan Beginner
Joined: 16 Oct 2007 Posts: 29 Topics: 12
|
Posted: Tue May 13, 2008 2:38 am Post subject: using current date in SYSIN |
|
|
Hi,
My requirement is to use the current system date in the SYSIN card instead of hardcoding the date. Example
//SYSIN DD *
$$DD01 UPDATE IF=(28,EQ,C'20080506'),R=(28,C'20080513')
/*
So instead of mentioning the date I need to have current date and current date-6 in the condition mentioned above. Can someone help me to achieve this? |
|
Back to top |
|
|
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Tue May 13, 2008 3:27 am Post subject: |
|
|
run a little rexx program to generate the cards in the step before. Which utility are you talking about, anyway? _________________ Utility and Program control cards are NOT, repeat NOT, JCL. |
|
Back to top |
|
|
sankar narayanan Beginner
Joined: 16 Oct 2007 Posts: 29 Topics: 12
|
Posted: Tue May 13, 2008 4:06 am Post subject: |
|
|
I am using fileaid |
|
Back to top |
|
|
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Tue May 13, 2008 4:24 am Post subject: |
|
|
I do not have access to a FileAid manual/online help so I cannot tell if it has a current date symbol or not. If it does not then you will have to generate your SYSIN cards in a prior step as I said earlier. _________________ Utility and Program control cards are NOT, repeat NOT, JCL. |
|
Back to top |
|
|
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Tue May 13, 2008 7:23 am Post subject: |
|
|
Right - I found I have a FileAid manual - no mention of symbols representing the date so you will have to write something to prepare the SYSIN records for you. There are examples on the forum of SORT doing this for you and probably rexx examples as well and cOBOL and Easytrieve examples. _________________ Utility and Program control cards are NOT, repeat NOT, JCL. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Tue May 13, 2008 10:03 am Post subject: |
|
|
sankar narayanan,
The following DFSORT JCL will give you the desired results. It compares the date at pos 28 to current date(ccyymmdd) -6 days and if found will replace it with current date(ccyymmdd)
Code: |
//STEP0100 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
20080504
20080505
20080506
20080507
20080508
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=(28,8,CH,EQ,DATE1-6),
OVERLAY=(28:DATE1))
|
Hope this helps...
Cheers _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
|
|