MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

FTP/Put Source File Name

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
vini
Intermediate


Joined: 12 Jan 2004
Posts: 240
Topics: 48
Location: Maryland

PostPosted: Fri Feb 02, 2007 3:05 pm    Post subject: FTP/Put Source File Name Reply with quote

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 ? Confused

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


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Fri Feb 02, 2007 3:30 pm    Post subject: Reply with quote

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


Joined: 12 Jan 2004
Posts: 240
Topics: 48
Location: Maryland

PostPosted: Fri Feb 02, 2007 3:45 pm    Post subject: Reply with quote

superk.

I dont think I explained it well ..I need the &REGION substituted by its value before I use it in the PUT within quotes ...even then it may be impossible I guess !

AAA.BBB.&REGION.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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Fri Feb 02, 2007 5:06 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Fri Feb 02, 2007 5:38 pm    Post subject: Reply with quote

or invoke a Rexx program to do the FTP and let it resolve what you need.
Back to top
View user's profile Send private message Visit poster's website
vini
Intermediate


Joined: 12 Jan 2004
Posts: 240
Topics: 48
Location: Maryland

PostPosted: Tue Feb 06, 2007 2:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group