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

The date need to be udated in Header


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Oct 08, 2010 6:30 pm
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
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
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: 792
Location: Pennsylvania

PostPosted: Fri Oct 08, 2010 6:54 pm
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: 2481
Location: @my desk

PostPosted: Fri Oct 08, 2010 8:27 pm
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
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Sat Oct 09, 2010 6:08 pm
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
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: 2481
Location: @my desk

PostPosted: Sun Oct 10, 2010 1:15 am
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Sun Oct 10, 2010 1:20 am
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 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 Need help to append a date&tsp at... DFSORT/ICETOOL 9
No new posts Fetch data from programs execute (dat... DB2 3
Search our Forums:

Back to Top