View previous topic :: View next topic
|
Author |
Message |
prakash404
New User
Joined: 09 Mar 2010 Posts: 12 Location: chennai
|
|
|
|
Hi Friends,
I have a file having one field as DATE field. Now my requirement is that when ever this file is getting created i need to take the current time stamp and subtract with some 2 hours then we need to take the date alone from the o/p time stamp and insert this date in DATE field.
Suppose my job is running at 24.03.2010.01.30.30
now i need to supptract 2hrs from the above time stampi.e,
24.03.2010.01.30.00 - 2 hrs =23.03.2010.23.30.00
now i need to take date alone 23.03.2010.23.30.00
now move this date 23.03.2010 into DATE FIELD. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Well, your post is about as clear as mud.
What are we supposed to be doing with the new data, displaying it, writing it to another file or what.
And why have you posted this in the JCL forum.
Once more let us clarify exactly what JCL is.
it is Job Control Language.
By itself it does nothing. It is used to invoke the chosen program and to define which datasets are to be used by the DD names associated with the chosen program.
JCL does not have magical powers that solve all problems, JCL is merely the vehicule for telling the processor which program you want it to execute.
So, if you might just care to tell us which program you wish the JCL to execute, we might be able to help you |
|
Back to top |
|
|
prakash404
New User
Joined: 09 Mar 2010 Posts: 12 Location: chennai
|
|
|
|
I am asking whether we can do this through any utility by running the job rather than going for a cobol progam.
I clearly mentioned that i need to send this final date value to a DATE field inside the file. |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
Hi Expat,
Can you please delete
ibmmainframes.com/viewtopic.php?t=47627
Above link looks repetition of this topic...
Prakash, do not post same question at multiple places.
it wastes peoples time and increases confusion. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
Can you please delete |
since I was around I did it |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Which probably explains why I couldn't |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
enrico-sorichetti wrote: |
Quote: |
Can you please delete |
since I was around I did it |
but link is still opening for me.. |
|
Back to top |
|
|
prakash404
New User
Joined: 09 Mar 2010 Posts: 12 Location: chennai
|
|
|
|
It was deleted ,Now think abt solution |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
prakash404 wrote: |
It was deleted ,Now think abt solution |
Yes, I have thought about it and sure that it will work.
Your attitude does leave a little to be desired. This is a help forum, not a demand a solution forum. Just because your posting contains very little useful information and you do not get an immediate solution you start throwing your toys out of the pram, so instead, how about doing it properly ...............
File is RECFM and LRECL
Date / time stamp is at location xxx, format is ZD / PD / BI whatever
Requirement is to update the date field if it changes by subtracting two hours from .......... Here you say the current time stamp - would that be the time currently in the data or the current system time. Unless you specify the facts we don't know.
Output is the same file / a new file.
I have tried to do this by ........
I have researched a solution by ......
I am not allowed to use the following languages / utilities
I am allowed to use the following languages / utilities
Maybe if you take the time to help us by giving good information you may get a good response. |
|
Back to top |
|
|
prakash404
New User
Joined: 09 Mar 2010 Posts: 12 Location: chennai
|
|
|
|
Sorry to all for my previous post,My intension is not to demand/command u guys.
My input file is having LREC as 130 and it is a FB
The time stamp is according to system time stamp.
I need the date in chatacters only.
Let me know if any other info i s required. |
|
Back to top |
|
|
prakash404
New User
Joined: 09 Mar 2010 Posts: 12 Location: chennai
|
|
|
|
Hi ,
I found how to get the current time stamp - 2 hours.
//STEP020 EXEC PLATDB21
//SYSUDUMP DD SYSOUT=*
//SYSCTL01 DD DUMMY
//SYSREC01 DD DSN=CURRENT.TIMESTMP,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL,(75,5),RLSE),
// DCB=(DSCB1,RECFM=FB,LRECL=80,BLKSIZE=0)
//SYSIN DD *
FASTUNLOAD
OUTPUT-FORMAT F
INPUT-FORMAT TABLE
DISPLAY-STATUS 100000
SHRLEVEL IGNORE
SQL-ACCESS EXTENSION
UNLDDN SYSREC
SELECT CURRENT TIMESTAMP - 2 HOURS
//*
Now i am having two Files
1) having records of length 130
2) having time stamp
now i need the final file as first 130 characters from first files and append with first 10 characters of second file
Can any one help in this issue? |
|
Back to top |
|
|
|