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

Date append


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
prakash404

New User


Joined: 09 Mar 2010
Posts: 12
Location: chennai

PostPosted: Wed Mar 24, 2010 11:32 am
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Mar 24, 2010 12:27 pm
Reply with quote

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

New User


Joined: 09 Mar 2010
Posts: 12
Location: chennai

PostPosted: Wed Mar 24, 2010 12:39 pm
Reply with quote

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

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Wed Mar 24, 2010 12:40 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Mar 24, 2010 12:42 pm
Reply with quote

Quote:
Can you please delete

since I was around I did it icon_biggrin.gif
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Mar 24, 2010 12:43 pm
Reply with quote

Which probably explains why I couldn't icon_eek.gif
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Wed Mar 24, 2010 12:43 pm
Reply with quote

enrico-sorichetti wrote:
Quote:
Can you please delete

since I was around I did it icon_biggrin.gif

but link is still opening for me..
Back to top
View user's profile Send private message
prakash404

New User


Joined: 09 Mar 2010
Posts: 12
Location: chennai

PostPosted: Wed Mar 24, 2010 12:55 pm
Reply with quote

It was deleted ,Now think abt solution
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Mar 24, 2010 1:46 pm
Reply with quote

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

New User


Joined: 09 Mar 2010
Posts: 12
Location: chennai

PostPosted: Wed Mar 24, 2010 2:53 pm
Reply with quote

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

New User


Joined: 09 Mar 2010
Posts: 12
Location: chennai

PostPosted: Wed Mar 24, 2010 3:47 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts How to append a PS file into multiple... JCL & VSAM 3
No new posts Need help to append a date&tsp at... DFSORT/ICETOOL 9
Search our Forums:

Back to Top