View previous topic :: View next topic
|
Author |
Message |
Meekha
New User
Joined: 06 Nov 2008 Posts: 3 Location: India
|
|
|
|
Hi,
I need to FTP a file from another server and the file name should be created dynamically based on the current date (date from the scheduler). Please help. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
How does your card look like? And what about the format of date in the file-name.
Please post the FTP card using "Code" button given here. You can use "Preview" to make sure that the post looks as you expected and then "Submit" |
|
Back to top |
|
|
Meekha
New User
Joined: 06 Nov 2008 Posts: 3 Location: India
|
|
|
|
Hi Arun,
Its a very simple FTP Step - my only problem is I need to give a file name which is dynamically generated with the current date.
Thanks,
Meekha |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Meekha, let's go back to the beginning. You said:
Quote: |
... the file name should be created dynamically based on the current date (date from the scheduler).
|
How does your scheduler supply this value to the JCL? Will it be in the form of a variable? Can your scheduler directly update a PDS member for your FTP step and add the proper date there? |
|
Back to top |
|
|
Meekha
New User
Joined: 06 Nov 2008 Posts: 3 Location: India
|
|
|
|
Hi Superk,
The date will be supplied from the OPC scheduler when it executes the job. We will be providing a symbolic parameter like
The value will be taken from the OPC Scheduler.
Thanks,
Meekha |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
But still I m not clear with this . How eventually ur FTP control statements will get affected by this? |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
I'm no OPC expert, but I believe that it can edit and replace any designated values in a target JCL datastream before submitting that data to the Internal Reader for execution.
I would suggest that the poster contact his OPC Support Team to work this out.
In the meantime, since I don't see how this topic is a JCL issue, I'm moving it into the IBM Tools forum. Maybe there's an OPC expert out there who might know how this is done. |
|
Back to top |
|
|
ozgurseyrek
New User
Joined: 22 Feb 2008 Posts: 70 Location: Turkey
|
|
|
|
Code: |
//FTPPUT1 EXEC PGM=FTP,PARM='(EXIT TIMEOUT 99'
//STEPLIB DD DSN=TCPIP.SEZATCP,DISP=SHR
//SYSTCPD DD DSN=TCPIP.TCPPARMS(...),DISP=SHR
//SYSFTPD DD DSN=TCPIP.TCPPARMS(...),DISP=SHR
//SYSMDUMP DD SYSOUT=A
//SYSPRINT DD SYSOUT=*
//DD01 DD DISP=SHR,DSNAME=DatasetName
//OUTPUT DD SYSOUT=*
//INPUT DD DSN=...,DISP=SHR
// DD *
TYPE A
LOCSITE SBDATACONN=(IBM-1026,IBM-1254)
PUT //DD:DD01 TheSampleFile&CHHMM..TXT |
you can use that sample FTP step. It is transfering dataset to the Windows FTP server and naming it by the including current Hour and Minute.
(&CHHMM is a TWS parameter) |
|
Back to top |
|
|
|