Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 10327
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: 2285
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: 4650
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: 2285
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: 4650
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 Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us