[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Hey Mr. Schelske !!! (was: Dynamic File Names in MVS)



Hi Steve,

Hope that subject line caught your attention ;).  I'm reposting this message 
since I got no response on the first post.  I know your one of the more active 
MVS gurus on this list, and I was wondering if you had tried anything like this 
in the past?  You were a great help to our team about a year ago, when I was 
working over at KB Toys.

Thanks again for all your help (past & present),

Chris

----------------------------------------------------------------------------------------------------------------------

Hello all,

I have a SQR (running in Windows) that writes to an output file, and 
dynamically creates the file name:

  let $Filename = {filepath} || 'EMP' || {BUSINESS_OBJECT}
  open $Filename as #Temp_File for-writing record=5000:vary status=#stat

{BUSINESS_OBJECT} is a number that is read from a control file that changes 
each time the program is run.

I'm moving this program to run on a MVS mainframe, and would like to continue 
generating the file name dynamically.  My concern is that I may not be able to 
do that, because file names are usually defined statically within the JCL.

I'm considering using the 'OPEN DSN:' syntax instead of 'OPEN DNN:'.  Something 
like this:

   let $Filename = 'DSN:' || 'EMP' || {BUSINESS_OBJECT}
  open $Filename as #Temp_File for-writing record=5000:vary status=#stat

Just wondering if anyone else has done something like this, and if they had any 
problems.  I suppose this means there would be no entry in the JCL for that 
particular output file.

Thanks for any help,
Chris