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
 
JCL for FTP and Database Load

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
sripriya

New User


Joined: 19 Apr 2005
Posts: 26

PostPosted: Tue Mar 07, 2006 3:15 pm    Post subject: JCL for FTP and Database Load
Reply with quote

Hi all,

I need a JCL which FTPs the files from the server and loads it into the database.

Sripriya.
Back to top
View user's profile Send private message

Rupesh.Kothari

Member of the Month


Joined: 27 Apr 2005
Posts: 464

PostPosted: Tue Mar 07, 2006 6:07 pm    Post subject: Re: JCL for FTP and Database Load
Reply with quote

Hi,

Quote:
I need a JCL which FTPs the files from the server and loads it into the database.


could you please elaborate menaing of " loads into database"


If u want to download file from server to flat file please find the JCL

Code:
//FTP10  EXEC  PGM=FTP,PARM='(TIMEOUT 720'                     
//OUTPUT   DD SYSOUT=*                                         
//SYSPRINT DD SYSOUT=*                                         
//INPUT    DD *                                                 
Ip address                                                     
userid                                                         
password                                                         
CD path                                                       
get server file name 'mainframe file naem' (REPLACE
QUIT


I hope it helps

Regards
Rupesh
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: Tue Mar 07, 2006 6:46 pm    Post subject: Re: JCL for FTP and Database Load
Reply with quote

Code:

//STEP0001 EXEC PGM=FTP,PARM='server.name (Exit=8'               
//NETRC    DD   DISP=SHR,DSN=&SYSUID..NETRC                       
//OUTPUT   DD   SYSOUT=*                                           
//T1       DD   DSN=&&T1,DISP=(,PASS),             
//         UNIT=(SYSDA),SPACE=(CYL,(100,100),RLSE),
//         RECFM=FB,LRECL=80                   
//Tn       DD   DSN=&&Tn,DISP=(,PASS),             
//         UNIT=(SYSDA),SPACE=(CYL,(100,100),RLSE),
//         RECFM=FB,LRECL=80
//INPUT    DD   *
sendsite                                                           
ascii                                                             
cd directory
get filename1.ext //dd:T1
get filenamen.ext //dd:Tn
qui                                                               
/*     
//*               
//STEP0002 EXEC ORALDR,SSN=PGEN,PARM='PARFILE=/DD/PARMS'       
//TNSNAMES DD   *                                             
XXXNN =                                                       
(DESCRIPTION =                                                 
    (ADDRESS = (PROTOCOL = TCP)(HOST=hostname)(PORT = 1521))   
     (CONNECT_DATA =                                           
       (SERVICE_NAME = XXXXXXXX))                             
 )                                                             
/*                                                             
//BADDD    DD   SYSOUT=*                                       
//DSCDD    DD   SYSOUT=*                                       
//LOGDD    DD   SYSOUT=*                                       
//PARMS    DD   *                                             
USERID=                                                       
USER/PASSWORD                                                 
CONTROL=/DD/LDRCTL LOG=/DD/LOGDD DIRECT=FALSE                 
/*                                                             
//LDRCTL   DD   *                                   
LOAD DATA                                           
INFILE /DD/LDRDATA                                 
BADFILE /DD/BADDD                                   
REPLACE                                             
INTO TABLE table                                   
(fld     Position(01:80) Char)                     
/*                                                 
//LDRDATA  DD   DSN=&&T1,DISP=(OLD,DELETE)         
//         DD   DSN=&&Tn,DISP=(OLD,DELETE)         
//*                                                 
Back to top
View user's profile Send private message
sripriya

New User


Joined: 19 Apr 2005
Posts: 26

PostPosted: Wed Mar 08, 2006 11:26 am    Post subject: Re: JCL for FTP and Database Load
Reply with quote

Hi,

Thank u very much for the sufficient information.

Sripriya.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts Moving UDB database to Db2 on z/OS Keith Hooley DB2 4 Wed Sep 27, 2017 12:38 am
No new posts Db2 load job abending in SORT mistah kurtz DB2 4 Mon Jun 05, 2017 3:58 pm
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts Copy load modules and alias vasanthz IBM Tools 5 Thu Apr 20, 2017 6:31 am

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