MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

using current date in SYSIN

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
sankar narayanan
Beginner


Joined: 16 Oct 2007
Posts: 29
Topics: 12

PostPosted: Tue May 13, 2008 2:38 am    Post subject: using current date in SYSIN Reply with quote

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
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Tue May 13, 2008 3:27 am    Post subject: Reply with quote

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
View user's profile Send private message
sankar narayanan
Beginner


Joined: 16 Oct 2007
Posts: 29
Topics: 12

PostPosted: Tue May 13, 2008 4:06 am    Post subject: Reply with quote

I am using fileaid
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Tue May 13, 2008 4:24 am    Post subject: Reply with quote

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
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Tue May 13, 2008 7:23 am    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Tue May 13, 2008 10:03 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group