View previous topic :: View next topic
|
Author |
Message |
kaushik8205
New User
Joined: 10 Nov 2006 Posts: 49 Location: Canada
|
|
|
|
Hi,
Is it possible to include physical file name as part of header record of the file?
Also is it also possible to get the generation number of GDG in the header record along with the file name.
Regards,
Kaushik |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
yep,
cut&paste.
if you don't like that solution,
this silly requirement has only been asked about 100 times,
and a search thru the DFSORT and/or REXX forums will offer many solutions. |
|
Back to top |
|
|
kaushik8205
New User
Joined: 10 Nov 2006 Posts: 49 Location: Canada
|
|
|
|
Dick!!
your solution is indeed quite silly.
REXX is not a solution as this has to be production installable code.
I did search DFSORT forum for solution of dynamically picking up file with generation but could not find one. If you could point to any of the 100 discussions it would be great. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
Quote: |
your solution is indeed quite silly. |
You comment is completely inappropriate
do You know home many thousandths of lines of REXX code are in productions ???
Quote: |
If you could point to any of the 100 discussions it would be great. |
why should we waste time on people with Your attitude ? |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
What is the point of this anyway? You sending the data somewhere?
Whay don't you put a "logical" name, business/data date, system date, time on your trailer. How does it benefit you to put the the DSN on?
To do it properly with the DSN is a lot of effort, and without the date/time information as well, again, what does this get you?
Silly through and through. The "paste" method at least ensures you get what you want with no possible programming errors. |
|
Back to top |
|
|
kaushik8205
New User
Joined: 10 Nov 2006 Posts: 49 Location: Canada
|
|
|
|
enrico - Depends from system to sytem what language code can be installed, I did not word it properly. My bad. And silly solution was "cut & paste".
And if you don't want to waste time, you can sit and relax, there others who can help
Thanks Superk! Dick suggestion of REXX is good, its that we do not install REXX codes in production in our system. |
|
Back to top |
|
|
kaushik8205
New User
Joined: 10 Nov 2006 Posts: 49 Location: Canada
|
|
|
|
Not sure Bill, but this has come as a requirement and we are still debating on advantage of having file generation in the header. Header already has the attributes you have mentioned. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
You purport to have COBOL, PL/I, and SAS among your skills. It would be a trivial thing to write a few lines of code in any of these to get the necessary information and place it in the header. Granted that these few lines would have to be maintained by software engineers, they probably couldn't understand a sort control deck either. |
|
Back to top |
|
|
kaushik8205
New User
Joined: 10 Nov 2006 Posts: 49 Location: Canada
|
|
|
|
Good suggestion, I will try doing it in PL/I next time
for now link provided by superk was good enough to suffice the the requirement. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Be very careful. If you use the IDCAMS/Sort approach to get the name of a generation for your file header, bear in mind that you will then have two different sources for the "same" information.
One source is the catalog, the other source is the JCL.
From the catalog you end up with a new file. Which goes into your program creating the file with the Header you require.
Now, recreate a file from last week. So you need to back-up your gdg-name file
Now get the JCL wrong. The catalog doesn't know you did that. So you have to check that the name you've put on the header is the same name that is used for the file.
It is the sort of fiddly/niggly little thing that gets "overlooked" in System Testing etc. "Oh, that's always wrong - it's just the way the system works".
Now, what use is the actual name of the dataset, on your system, to whoever it is who is receiving your file? What are they going to do to verify it? How? Are they going to take a "guess" at what the next generation would be since they know the previous generation? Are they going to get it right when it "rolls" back to one? Is someone going to tell them if a generation or two has been scrapped due to a problem?
Of course, if the downstream system is reading the file from your DASD, then no need to check (or to have) the thing in the header.
If there is a single positive thing this gives your downstream system, OK. But you have to do it properly. else they don't even get that single thing. |
|
Back to top |
|
|
|