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
 

 

Include physical filename in Header of file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Include physical filename in Header of file
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    Post subject:
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    Post subject:
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

Moderator Team Head


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

PostPosted: Fri Sep 14, 2012 11:35 pm    Post subject: Reply to: Include physical filename in Header of file
Reply with quote

Dick's suggestion is how I do it.

Here's a similar question:

http://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

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Fri Sep 14, 2012 11:36 pm    Post subject: Reply to: Include physical filename in Header of file
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Fri Sep 14, 2012 11:52 pm    Post subject: Reply to: Include physical filename in Header of file
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    Post subject:
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    Post subject:
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: 1738
Location: Bloomington, IL

PostPosted: Sat Sep 15, 2012 12:05 am    Post subject:
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    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Sat Sep 15, 2012 6:00 am    Post subject: Reply to: Include physical filename in Header of file
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


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