View previous topic :: View next topic
|
Author |
Message |
Pavan101
New User
Joined: 09 Mar 2009 Posts: 13 Location: Bombay
|
|
|
|
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 |
|
|
Pavan101
New User
Joined: 09 Mar 2009 Posts: 13 Location: Bombay
|
|
|
|
please anyone reply on it, if any more information is needed please send reply |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
Pavan101
New User
Joined: 09 Mar 2009 Posts: 13 Location: Bombay
|
|
|
|
I apologize, I would be thinking is there any more inputs are required from my site, |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
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 |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
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 |
|
|
Pavan101
New User
Joined: 09 Mar 2009 Posts: 13 Location: Bombay
|
|
|
|
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 |
|
|
Pavan101
New User
Joined: 09 Mar 2009 Posts: 13 Location: Bombay
|
|
|
|
Sorry i am not having the source code of program. this task need to be done through JCl... |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
Pavan101
New User
Joined: 09 Mar 2009 Posts: 13 Location: Bombay
|
|
|
|
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 |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
|