IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Passing Date in the file name for FTP


IBM Mainframe Forums -> IBM Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Meekha

New User


Joined: 06 Nov 2008
Posts: 3
Location: India

PostPosted: Thu Nov 06, 2008 6:36 pm
Reply with quote

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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Nov 06, 2008 6:44 pm
Reply with quote

check this post
ibmmainframes.com/viewtopic.php?t=35652
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Thu Nov 06, 2008 6:44 pm
Reply with quote

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

New User


Joined: 06 Nov 2008
Posts: 3
Location: India

PostPosted: Thu Nov 06, 2008 6:51 pm
Reply with quote

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

Global Moderator


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

PostPosted: Thu Nov 06, 2008 7:11 pm
Reply with quote

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

New User


Joined: 06 Nov 2008
Posts: 3
Location: India

PostPosted: Thu Nov 06, 2008 7:39 pm
Reply with quote

Hi Superk,

The date will be supplied from the OPC scheduler when it executes the job. We will be providing a symbolic parameter like

Code:
GL0066=%OYMD1


The value will be taken from the OPC Scheduler.

Thanks,
Meekha
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Thu Nov 06, 2008 8:18 pm
Reply with quote

But still I m not clear with this . How eventually ur FTP control statements will get affected by this?
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Thu Nov 06, 2008 10:21 pm
Reply with quote

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

New User


Joined: 22 Feb 2008
Posts: 70
Location: Turkey

PostPosted: Sat Dec 06, 2008 4:45 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IBM Tools

 


Similar Topics
Topic Forum Replies
No new posts Binary File format getting change whi... All Other Mainframe Topics 5
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
Search our Forums:

Back to Top