CSI FTPBATCH command variables

New Message Reply Date view Thread view Subject view Author view Other groups

Subject: CSI FTPBATCH command variables
From: Frank Swarbrick (Frank.Swarbrick@efirstbank.com)
Date: Tue Apr 01 2008 - 19:22:21 EST


I'm playing around with command variables and have a few issues.

First, it appears that in order for FTPBATCH to recognise a VSE symbolic
parameter as a 'command variable' you have to first use it in a SETVAR
statement.  I say this because the following does not work:
// JOB FTP
// SETPARM RFILE=TEST
// EXEC FTPBATCH,SIZE=FTPBATCH,PARM='ID=03'
lopen
luser pepvse
lpass secret2
open 10.1.112.95
user pepvse
pass XXXXXXXX
dir &RFILE
dir &STRDATE
quit
/*
/&

While this does work:
// JOB FTP                                 
// SETPARM RFILE=TEST                      
// EXEC FTPBATCH,SIZE=FTPBATCH,PARM='ID=03'
setvar &DUMMY = &RFILE
lopen                                      
luser pepvse                               
lpass XXXXXXXX                              
open 10.1.112.95                           
user pepvse                                
pass secret2                               
dir &RFILE                                 
dir &STRDATE                               
quit                                       
/*                                         
/&                                         

The only difference between the two is the setvar statement in the one that
works.

Here is the output from the JCL that is not working:

FTPBATCH 01.05 F   20080221 16.22
ID=03
SETVAR &STRDATE = &CURDATE
SETVAR &STRTIME = &CURTIME
Commands being read from TRIAL  .CSI15F  .FTPBATCH.L:
End of commands read from FTPBATCH.L
IPA617I Processing EXTTYPES.L load request
IPA616I External types table has been loaded.                 
FTP302I Connected to TCP/IP Sysid 03 in S6 from F3            
FTP800I FTPDAEMN loaded at 0072D000 for FTPBATCH 00703C10     
FTP900I FTP Daemon: FTPBATCH listening on 10.0.201.50,4186    
IPA402D Application Startup FTP client(IPNAFTPC)              
IPA413I FTP command translation set to US_ENG_03              
Ready:                                                        
lopen                                                         
IPA404D Opening control connection to 10.0.201.50,4186        
L: 220-TCP/IP for VSE External FTPDAEMN 01.05 F 20080229 09.58
    Copyright (c) 1995,2006 Connectivity Systems Incorporated 
220 Ready for new user                                        
Local control connection opened                               
Ready:                                                        
luser pepvse                                                  
L: USER pepvse                                                
L: 331 User name okay, need password                          
Ready:                                                        
lpass                                                         
FTP909I PEPVSE in session with 127.0.0.1,4187                 
L: PASS XXXXXXXX                                              
L: 230 User logged in, proceed                                
Ready:                                                        
open 10.1.112.95                                              
IPA404I Opening control connection to 10.1.112.95,21          
F: 220-TCP/IP for VSE Internal FTPDAEMN 01.05 E 20061010 11.26
    Copyright (c) 1995,2006 Connectivity Systems Incorporated 
220 Ready for new user                                        
Foreign control connection opened                             
Ready:                                                        
user pepvse                                                   
F: USER pepvse                                                
F: 331 User name okay, need password                          
Ready:                                                        
pass                                                          
F: PASS XXXXXXXX                                      
F: 230 User logged in, proceed                        
Ready:                                                
dir &RFILE                                            
F: PORT 10,0,201,50,16,93                             
F: 200 Command okay                                   
F: LIST &RFILE                                        
F: 150 File status okay; about to open data connection
F: 226 Closing data connection                        
Ready:                                                
dir &STRDATE                                          
F: PORT 10,0,201,50,16,94                             
F: 200 Command okay                                   
F: LIST 04010820                                      
F: 150 File status okay; about to open data connection
F: 226 Closing data connection                        
Ready:                                                
quit                                                  
F: QUIT                                               
F: 221 FTPDaemn closing control connection            
FTP911I PEPVSE ended session with 127.0.0.1,4187      
L: QUIT                                         
FTP911I PEPVSE ended session with 127.0.0.1,4187
L: 221 FTPDaemn closing control connection      
FTP316I FTPDAEMN terminated.                    


And here is the output from the one that works:

FTPBATCH 01.05 F   20080221 16.22                             
ID=03                                                         
SETVAR &STRDATE = &CURDATE                                    
SETVAR &STRTIME = &CURTIME                                    
Commands being read from TRIAL  .CSI15F  .FTPBATCH.L:         
End of commands read from FTPBATCH.L                          
IPA617I Processing EXTTYPES.L load request                    
IPA616I External types table has been loaded.                 
FTP302I Connected to TCP/IP Sysid 03 in S6 from F3            
setvar &DUMMY = &RFILE                                        
FTP800I FTPDAEMN loaded at 0072D000 for FTPBATCH 00703C10     
FTP900I FTP Daemon: FTPBATCH listening on 10.0.201.50,4243    
IPA402D Application Startup FTP client(IPNAFTPC)              
IPA413I FTP command translation set to US_ENG_03              
Ready:                                                        
lopen                                                         
IPA404D Opening control connection to 10.0.201.50,4243        
L: 220-TCP/IP for VSE External FTPDAEMN 01.05 F 20080229 09.58
    Copyright (c) 1995,2006 Connectivity Systems Incorporated 
220 Ready for new user                                        
Local control connection opened                               
Ready:                                                        
luser pepvse                                                  
L: USER pepvse                                                
L: 331 User name okay, need password                          
Ready:                                                        
lpass                                                         
FTP909I PEPVSE in session with 127.0.0.1,4244                 
L: PASS XXXXXXXX                                              
L: 230 User logged in, proceed                                
Ready:                                                        
open 10.1.112.95                                              
IPA404I Opening control connection to 10.1.112.95,21          
F: 220-TCP/IP for VSE Internal FTPDAEMN 01.05 E 20061010 11.26
    Copyright (c) 1995,2006 Connectivity Systems Incorporated 
220 Ready for new user                                        
Foreign control connection opened                             
Ready:                                                        
user pepvse                                                   
F: USER pepvse                                                
F: 331 User name okay, need password                          
Ready:                                                        
pass                                                  
F: PASS XXXXXXXX                                      
F: 230 User logged in, proceed                        
Ready:                                                
dir &RFILE                                            
F: PORT 10,0,201,50,16,150                            
F: 200 Command okay                                   
F: LIST TEST                                          
F: 150 File status okay; about to open data connection
F: 226 Closing data connection                        
Ready:                                                
dir &STRDATE                                          
F: PORT 10,0,201,50,16,151                            
F: 200 Command okay                                   
F: LIST 04010820                                      
F: 150 File status okay; about to open data connection
F: 226 Closing data connection                        
Ready:                                                
quit                                                  
FTP911I PEPVSE ended session with 127.0.0.1,4244      
FTP911I PEPVSE ended session with 127.0.0.1,4244      
F: QUIT                                   
F: 221 FTPDaemn closing control connection
L: QUIT                                   
L: 221 FTPDaemn closing control connection
FTP316I FTPDAEMN terminated.                
FTP305I Connection has closed, successfully.
FTP306I Commands from SYSIPT COMPLETED      


Is this a documented 'feature', that a SETVAR using the symbolic parameter
is required?

I'm wanting to do something like this:
// JOB FTP                                                       
// SETPARM LUSER='fjs'                                           
// SETPARM LPASS='XXXXXXXX'                                      
// SETPARM RUSER='pepvse'                                        
// SETPARM RPASS='XXXXXXXX'                                       
// EXEC FTPBATCH,SIZE=FTPBATCH,PARM='ID=03'                      
setvar &DUMMY = &LUSER + &LPASS + &RUSER + &RPASS
lopen                                                            
luser &LUSER                                                     
lpass &LPASS                                                     
open 10.1.112.95                                                 
user &RUSER                                                      
pass &RPASS                                                      
quit                                                             
/*                                                               
/&                                                               

Except that it seems rather silly to need that SETVAR statement.  Anyway,
with that in place it works.  Here is the relevant output:

Ready:                                                        
lopen                                                         
IPA404D Opening control connection to 10.0.201.50,4295        
L: 220-TCP/IP for VSE External FTPDAEMN 01.05 F 20080229 09.58
    Copyright (c) 1995,2006 Connectivity Systems Incorporated 
220 Ready for new user                                        
Local control connection opened                               
Ready:                                                        
luser &LUSER                                                  
L: USER fjs                                                   
L: 331 User name okay, need password                          
Ready:                                                        
lpass                                                         
FTP909I FJS in session with 127.0.0.1,4296                    
L: PASS XXXXXXXX                                              
L: 230 User logged in, proceed                                
Ready:                                                        
open 10.1.112.95                                              
IPA404I Opening control connection to 10.1.112.95,21          
F: 220-TCP/IP for VSE Internal FTPDAEMN 01.05 E 20061010 11.26
    Copyright (c) 1995,2006 Connectivity Systems Incorporated 
220 Ready for new user                                        
Foreign control connection opened                             
Ready:                                                        
user &RUSER                                                   
F: USER pepvse                                                
F: 331 User name okay, need password                          
Ready:                                                        
pass                                                  
F: PASS XXXXXXXX                                      
F: 230 User logged in, proceed                        
Ready:                                                
dir                                                   
F: PORT 10,0,201,50,16,202                            
F: 200 Command okay                                   
F: LIST                                               
F: 150 File status okay; about to open data connection
ACCTIMP            Entry Seq VSAM                     
[more, deleted]
F: 226 Closing data connection

What I *really* want to do is have the SETPARM statements in a VSE PROC that
would be executed before the EXEC FTPBATCH.  This way we wouldn't have
passwords directly in the JCL where they could be viewed while the job is
running.  But I can't quite get this to work as I wish.  I thought I'd just
have a PROC called, say, FTPCREDS
// SETPARM PWRJOB,LUSER='fjs'                                           
// SETPARM PWRJOB,LPASS='XXXXXXXX'                                      
// SETPARM PWRJOB,RUSER='pepvse'                                        
// SETPARM PWRJOB,RPASS='XXXXXXXX'                                       


Then before EXEC FTPBATCH I'd have just this:
// EXEC PROC=FTPCREDS

But FTPBATCH does not appear to recognise the symbolic parameters when done
this way.

I'd like to use PWRJOB parms, because if I don't then I have to do something
like this:
// SETPARM LUSER=
// SETPARM LPASS=
// SETPARM RUSER=
// SETPARM RPASS=
// EXEC PROC=FTPCREDS,LUSER,LPASS,RUSER,RPASS

Where the PROC contains this:
// SETPARM LUSER='fjs'     
// SETPARM LPASS='XXXXXXXX'
// SETPARM RUSER='pepvse'  
// SETPARM RPASS='XXXXXXXX' 

Yuck.  Though it does work.

Anyway, if I haven't bored everyone, any comments?

Frank


New Message Reply Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b25 : Fri May 16 2008 - 12:20:06 EDT