View previous topic :: View next topic |
Author |
Message |
vini Intermediate
Joined: 12 Jan 2004 Posts: 240 Topics: 48 Location: Maryland
|
Posted: Fri Feb 02, 2007 3:05 pm Post subject: FTP/Put Source File Name |
|
|
This might sound like a weird question ... is there a way to use a symbolic in a file name despite using quotes or is it asking for the impossible ?
Example:
PUT 'AAA.BBB.&TESTRGN.FTPOUT'
Not attempted this yet because I dont think this is valid as am sure the quotes will hard-code the name and throw an error in this case as is. Right ? |
|
Back to top |
|
 |
superk Advanced

Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Fri Feb 02, 2007 3:30 pm Post subject: |
|
|
I think you can answer your question by asking yourself - what is going to resolve the variable? What is going to know what &TESTRGN is? The program (PGM=FTP)? Nope, there's nothing in there that would know what to do with it. Maybe the receiving FTP site? Possibly, I suppose depending on the software used. Obviously, some program somewhere would have to know what the variable &TESTRGN means. |
|
Back to top |
|
 |
vini Intermediate
Joined: 12 Jan 2004 Posts: 240 Topics: 48 Location: Maryland
|
Posted: Fri Feb 02, 2007 3:45 pm Post subject: |
|
|
superk.
I dont think I explained it well ..I need the ®ION substituted by its value before I use it in the PUT within quotes ...even then it may be impossible I guess !
AAA.BBB.®ION.FTPOUT
PUT 'AAA.BBB.SYSTEST.FTPOUT'
Based on in which region (int,sys,acc,prod) the JCL is scheduled it should pick the appropriate file based on the value of the symbolic in the JCL. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Fri Feb 02, 2007 5:06 pm Post subject: |
|
|
vini,
You can use EZACFSM1 to generate with symbols. Assign unique names for int,sys,acc,prod.
then you can use &JOBNAME symbolic to in the ftp dataset names
ex:
Code: |
//STEP0100 EXEC PGM=EZACFSM1
//SYSIN DD *
AAA.BBB.&JOBNAME..FTPOUT
PUT 'AAA.BBB.SYSTEST.FTPOUT'
//SYSOUT DD SYSOUT=*
|
Here is the list of Dynamic System Symbols
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA1E241/2.2.2
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Fri Feb 02, 2007 5:38 pm Post subject: |
|
|
or invoke a Rexx program to do the FTP and let it resolve what you need. |
|
Back to top |
|
 |
vini Intermediate
Joined: 12 Jan 2004 Posts: 240 Topics: 48 Location: Maryland
|
Posted: Tue Feb 06, 2007 2:34 pm Post subject: |
|
|
Kolusu,
I am not sure how your suggestion will work because based on that I should use the JOBNAME EZACFSM1 symbolic as part of the file name.
We follow Job Naming conventions here..more so because we do the formal testing using Job schedulers, the reason I cannot use INTTEST , SYSTEST etc as Job Names in JCLs.
I have a found a workaround solution to the problem where I edit the portion of the file name in the PUT parm card (being generated programatically) everytime the job fails in test as the PROD file is being referred in parm card owing to the hard-coded file name.
Thanks.
Vini |
|
Back to top |
|
 |
|
|