Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Passing Date in the file name for FTP

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IBM Tools
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    Post subject: Passing Date in the file name for FTP
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Thu Nov 06, 2008 6:44 pm    Post subject: Reply to: Passing Date in the file name for FTP
Reply with quote

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

Moderator


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

PostPosted: Thu Nov 06, 2008 6:44 pm    Post subject:
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    Post subject: Reply to: Passing Date in the file name for FTP
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

Moderator Team Head


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

PostPosted: Thu Nov 06, 2008 7:11 pm    Post subject: Reply to: Passing Date in the file name for FTP
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    Post subject: Reply to: Passing Date in the file name for FTP
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: 2180
Location: @my desk

PostPosted: Thu Nov 06, 2008 8:18 pm    Post subject:
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

Moderator Team Head


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

PostPosted: Thu Nov 06, 2008 10:21 pm    Post subject: Reply to: Passing Date in the file name for FTP
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> IBM Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us