Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

The date need to be udated in Header

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Pavan101

New User


Joined: 09 Mar 2009
Posts: 13
Location: Bombay

PostPosted: Fri Oct 08, 2010 5:54 pm    Post subject: The date need to be udated in Header
Reply with quote

Hi All,

There is a date filed in File's Header, it's position from column 2 to 7, as part of my query, I have to change this date by latest date and rest of all the records need to be copied as same.
Back to top
View user's profile Send private message

Pavan101

New User


Joined: 09 Mar 2009
Posts: 13
Location: Bombay

PostPosted: Fri Oct 08, 2010 6:25 pm    Post subject:
Reply with quote

please anyone reply on it, if any more information is needed please send reply
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Fri Oct 08, 2010 6:30 pm    Post subject: Reply to: The date need to be udated in Header thrugh JCL
Reply with quote

Quote:
please anyone reply on it, if any more information is needed please send reply


pestering for a reply after 30 minutes is everywhere considered bad manners

remember... replying is
on voluntary base,
on our time
free of charge
interest of the question

if You had searched the forums You would have found many many samples on different ways of updating headers and trailers

it would be also useful for you to read and meditate on
How To Ask Questions The Smart Way
http://catb.org/~esr/faqs/smart-questions.html
to make the most out of the questions You ask
Back to top
View user's profile Send private message
Pavan101

New User


Joined: 09 Mar 2009
Posts: 13
Location: Bombay

PostPosted: Fri Oct 08, 2010 6:50 pm    Post subject:
Reply with quote

I apologize, I would be thinking is there any more inputs are required from my site,
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 645
Location: Pennsylvania

PostPosted: Fri Oct 08, 2010 6:54 pm    Post subject:
Reply with quote

Quote:
I would be thinking is there any more inputs are required from my site,


You are right. More input would be required. What did you come up with?

A shot in the dark.... Sample Input, and Sample Output (please use code button to perserve data position)
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2171
Location: @my desk

PostPosted: Fri Oct 08, 2010 8:27 pm    Post subject:
Reply with quote

Quote:
Sample Input, and Sample Output (please use code button to perserve data position)
and the date format along with input/output file attributes.
Back to top
View user's profile Send private message
Pavan101

New User


Joined: 09 Mar 2009
Posts: 13
Location: Bombay

PostPosted: Sat Oct 09, 2010 5:45 pm    Post subject: Reply to: The date need to be udated in Header
Reply with quote

I explore some more clearly....

There is one GDG, in the header of GDG along with date some other information are retained, as per my requirement i need to change the Header date by current Date(0YYMMDD) format but i am having the source code of that program, which is using this GDG therefore I have to change the Header's date by JCL only however i am planing to include a new step that will change the Header's Date,

I have following requirements....
a. How can i read the particular Header date through JCl
B. How can i change this particular date by current date
c. As per the requirement i have to use same GDG version only

Input:--
The GDG record length is 255
Header's date position is 2 to 9 format (0YYMMDD)
please give me some advise on it, Thanks in advance
Back to top
View user's profile Send private message
Pavan101

New User


Joined: 09 Mar 2009
Posts: 13
Location: Bombay

PostPosted: Sat Oct 09, 2010 5:52 pm    Post subject:
Reply with quote

Sorry i am not having the source code of program. this task need to be done through JCl...
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Sat Oct 09, 2010 6:08 pm    Post subject: Reply to: The date need to be udated in Header
Reply with quote

if you had searched a a bit the forums in
jcl section for SYNCSORT
dfsort for IBM DFSORT
You would have found quite a few, rathe lots of topics on how to substitute a value in a record

once You know/tell
the record format
the record length,
the offset/position,lenght,format,content to identify the records to be changed
the offset/position,lenght,format,old-content,new-content to identify the conditional change to me made
the offset/position,lenght,format,new-content to identify the change to be made regardless

Are you using SYNCSORT or DFSORT ???

run the code below and post the output from SYSOUT
Code:
//SORTSTEP EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD *
ABC
//SORTOUT  DD SYSOUT=*
//SYSIN    DD *
  SORT     FIELDS=COPY
Back to top
View user's profile Send private message
Pavan101

New User


Joined: 09 Mar 2009
Posts: 13
Location: Bombay

PostPosted: Sat Oct 09, 2010 7:56 pm    Post subject:
Reply with quote

The Record length of GDG file is 255 bytes
It's record format is FB
Required field Date(YYMMDD) is 6 bytes long that need to be replaced with Current date...
The position of Date field in GDG is from column number 2 to 7..
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2171
Location: @my desk

PostPosted: Sun Oct 10, 2010 1:15 am    Post subject: Reply to: The date need to be udated in Header
Reply with quote

Quote:
the offset/position,lenght,format,content to identify the records to be changed
Quote:
Are you using SYNCSORT or DFSORT ???
Do you find it difficult to answer these?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Sun Oct 10, 2010 1:20 am    Post subject: Reply to: The date need to be udated in Header
Reply with quote

if You keep posting what You feel like instead of what we ask
You are just wasting everybody' s time...

for example You keep talking about headers, but then You say
Quote:
Required field Date(YYMMDD) is 6 bytes long that need to be replaced with Current date...

which means that You do not care about <headers>; if You had, You would have given a way to identify them

also in IT the terminology is essential, from a data management point of view
the fact that a dataset is a GDG generation is irrelevant and does not make any difference
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
This topic is locked: you cannot edit posts or make replies. Get correct date and time when curren... balaji81_k DB2 24 Fri Oct 14, 2016 10:40 pm
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm
No new posts Add system date inside of a PS file a... pramitdas DFSORT/ICETOOL 5 Sun Aug 28, 2016 12:06 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us