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

Include physical filename in Header of file


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kaushik8205

New User


Joined: 10 Nov 2006
Posts: 49
Location: Canada

PostPosted: Fri Sep 14, 2012 9:27 pm
Reply with quote

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

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Sep 14, 2012 9:49 pm
Reply with quote

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

New User


Joined: 10 Nov 2006
Posts: 49
Location: Canada

PostPosted: Fri Sep 14, 2012 11:20 pm
Reply with quote

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

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Sep 14, 2012 11:35 pm
Reply with quote

Dick's suggestion is how I do it.

Here's a similar question:

www.ibmmainframes.com/viewtopic.php?t=50967&highlight=generation

Beyond that, if you could describe what constitutes " production installable code" it might help to narrow down the search criteria.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Fri Sep 14, 2012 11:36 pm
Reply with quote

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 ? icon_evil.gif
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Sep 14, 2012 11:52 pm
Reply with quote

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

New User


Joined: 10 Nov 2006
Posts: 49
Location: Canada

PostPosted: Fri Sep 14, 2012 11:54 pm
Reply with quote

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 icon_evil.gif

Thanks Superk! Dick suggestion of REXX is good, its that we do not install REXX codes in production in our system.
Back to top
View user's profile Send private message
kaushik8205

New User


Joined: 10 Nov 2006
Posts: 49
Location: Canada

PostPosted: Sat Sep 15, 2012 12:01 am
Reply with quote

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

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Sat Sep 15, 2012 12:05 am
Reply with quote

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

New User


Joined: 10 Nov 2006
Posts: 49
Location: Canada

PostPosted: Sat Sep 15, 2012 1:06 am
Reply with quote

Good suggestion, I will try doing it in PL/I next time icon_lol.gif

for now link provided by superk was good enough to suffice the the requirement.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Sat Sep 15, 2012 6:00 am
Reply with quote

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
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
Search our Forums:

Back to Top