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

Using symbolics in FTP


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
radhakrishnan82

Active User


Joined: 31 Mar 2005
Posts: 435
Location: chennai, India

PostPosted: Sat Feb 26, 2011 3:19 pm
Reply with quote

How do we use symbolics in FTP parm card. I tried, its giving me FTP error local file not found. Please help with an alternative or corrective solution to use symbolics.

Code:

//JOBCARD
//*                         
//    SET TRAM='X1203'
//*
//STEP100 EXEC PGM=FTP,PARM='/(EXIT TI 600',REGION=1100K     
//SYSPRINT DD SYSOUT=*                                       
//OUTPUT   DD SYSOUT=*                                       
//SYSUDUMP DD SYSOUT=*                                       
//INPUT    DD DISP=SHR,DSN=XXXXX.YYYYYY.ZZZZZZ.PARM
//*   



File :XXXXX.YYYYYY.ZZZZZZ.PARM

Code:

directory name
Password                                                   
MKDIR \FFFFFFFF\2011\TEST                           
   CD \TAXREPORT\2011\02\26\TRAC\TEST1\TEST2               
PUT 'VVVVV.REPORT.YYYYYYY.TEST.&TRAM' TEST_02.txt   
DIR                                                         
QUIT       





Code:
EZA1736I  PUT 'VVVVV.REPORT.YYYYYYY.TEST.&TRAM' TEST_02.txt
EZA1685W Invalid local file identifier                               
EZA1735I Std Return Code = 27000, Error Code = 00018                 
EZA1701I >>> QUIT                                                   
221           
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Sat Feb 26, 2011 6:49 pm
Reply with quote

JCL symbolics have to be used IN THE JCL:

Code:

//JOBCARD
//*                         
//    SET TRAM='X1203'
//*
//STEP100 EXEC PGM=FTP,PARM='/(EXIT TI 600',REGION=1100K     
//SYSPRINT DD SYSOUT=*                                       
//OUTPUT   DD SYSOUT=*                                     
//INPUT    DD DISP=SHR,DSN=XXXXX.YYYYYY.ZZZZZZ.PARM
//NETRC    DD DISP=SHR,DSN=HLQ.NETRC
//FTPDSN   DD DISP=SHR,DSN=VVVVV.REPORT.YYYYYYY.TEST.&TRAM
//*



File :XXXXX.YYYYYY.ZZZZZZ.PARM

Code:
                                                 
MKDIR \FFFFFFFF\2011\TEST                           
CD \TAXREPORT\2011\02\26\TRAC\TEST1\TEST2               
PUT //DD:FTPDSN TEST_02.txt   
DIR                                                         
QUIT
Back to top
View user's profile Send private message
radhakrishnan82

Active User


Joined: 31 Mar 2005
Posts: 435
Location: chennai, India

PostPosted: Sat Feb 26, 2011 7:07 pm
Reply with quote

Thanks, Superk. If I have more than one directory name and the files then how will I use this.

For eg.,

Code:
directory name
Password                                                   
MKDIR \FFFFFFFF\2011\\02\26\TEST                           
CD \TAXREPORT\2011\02\26\TEST\TEST-01               
PUT 'VVVVV.REPORT.YYYYYYY.TEST.&TRAM' TEST_02.txt   
MKDIR \FFFFFFFF\2011\02\26TEST1                           
CD \TAXREPORT\2011\02\26\TEST1\TEST-01               
PUT 'VVVVV.REPORT.YYYYYYY.TEST3.&TRAM' TEST_02.txt   
MKDIR \FFFFFFFF\2011\02\26TEST2                           
CD \TAXREPORT\2011\02\26\TEST2\TEST-01               
PUT 'VVVVV.REPORT.YYYYYYY.TEST1.&TRAM' TEST_02.txt   
MKDIR \FFFFFFFF\2011\02\26TEST2                           
CD \TAXREPORT\2011\02\26\TEST2\TEST-01               
PUT 'VVVVV.REPORT.YYYYYYY.TEST2.&TRAM' TEST_02.txt   
DIR                                                         
QUIT       


Can I give multiple INPUT's and FTPDSN's. Pls help me in this case.
Back to top
View user's profile Send private message
radhakrishnan82

Active User


Joined: 31 Mar 2005
Posts: 435
Location: chennai, India

PostPosted: Sat Feb 26, 2011 7:09 pm
Reply with quote

Quote:
Can I give multiple INPUT's and FTPDSN's. Pls help me in this case.

Like in case FTPDSN1,FTPDSN2,....
I didnt try this since I dont have a development server. ONly UAT server is available. If you can confirm this, then i will use happily!

Thanks for all your help, superk.
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Sat Feb 26, 2011 7:22 pm
Reply with quote

You can create as many different DD names, associated with as many different datasets, as you want to, obviously within the limitations of JCL.

If that won't work, then you'll have to pass the JCL symbolic through a program as a parameter (,PARM='&TRAM') to have it resolved properly into its actual value. Then, you'll have to use the output of that program within your FTP control cards.
Back to top
View user's profile Send private message
radhakrishnan82

Active User


Joined: 31 Mar 2005
Posts: 435
Location: chennai, India

PostPosted: Sat Feb 26, 2011 8:01 pm
Reply with quote

Thanks, Superk. I require a final clarification. Please update me whether you are mentioning like the one below.

Code:
//STEP100 EXEC PGM=FTP,PARM='/(EXIT TI 600',REGION=1100K     
//SYSPRINT DD SYSOUT=*                                       
//OUTPUT   DD SYSOUT=*                                     
//INPUT1    DD DISP=SHR,DSN=XXXXX.YYYYYY.ZZZZZZ.PARM
//INPUT2    DD DISP=SHR,DSN=XXXXX.YYYYYY.ZZZZZZ.PARM1 -(for different directory)
//INPUT3    DD DISP=SHR,DSN=XXXXX.YYYYYY.ZZZZZZ.PARM2
//INPUT4    DD DISP=SHR,DSN=XXXXX.YYYYYY.ZZZZZZ.PARM3
//NETRC    DD DISP=SHR,DSN=HLQ.NETRC
//FTPDSN1   DD DISP=SHR,DSN=VVVVV.REPORT.YYYYYYY.TEST.&TRAM
//FTPDSN2   DD DISP=SHR,DSN=VVVVV.REPORT.YYYYYYY.TEST1.&TRAM
//FTPDSN3   DD DISP=SHR,DSN=VVVVV.REPORT.YYYYYYY.TEST2.&TRAM
//FTPDSN4   DD DISP=SHR,DSN=VVVVV.REPORT.YYYYYYY.TEST3.&TRAM -for different file
//*
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Sat Feb 26, 2011 8:40 pm
Reply with quote

Sigh.

Radhakrishnan, you can't just make things up. For the FTP program, there are the two required DD's, INPUT (or SYSIN) and OUTPUT (or SYSOUT). There are the optional DD's (SYSPRINT, NETRC and FTPDATA), and then there are the user-defined DD's.

I really hope that you meant to post this:

Code:

//STEP100 EXEC PGM=FTP,PARM='/(EXIT TI 600',REGION=1100K     
//SYSPRINT DD SYSOUT=*                                       
//OUTPUT   DD SYSOUT=*                                     
//INPUT    DD DISP=SHR,DSN=XXXXX.YYYYYY.ZZZZZZ.PARM
//         DD DISP=SHR,DSN=XXXXX.YYYYYY.ZZZZZZ.PARM1
//         DD DISP=SHR,DSN=XXXXX.YYYYYY.ZZZZZZ.PARM2
//         DD DISP=SHR,DSN=XXXXX.YYYYYY.ZZZZZZ.PARM3
//NETRC    DD DISP=SHR,DSN=HLQ.NETRC
//<somedd1> DD DISP=SHR,DSN=VVVVV.REPORT.YYYYYYY.TEST.&TRAM
//<somedd2> DD DISP=SHR,DSN=VVVVV.REPORT.YYYYYYY.TEST1.&TRAM
//<somedd3> DD DISP=SHR,DSN=VVVVV.REPORT.YYYYYYY.TEST2.&TRAM
//<somedd4> DD DISP=SHR,DSN=VVVVV.REPORT.YYYYYYY.TEST3.&TRAM
//*
Back to top
View user's profile Send private message
radhakrishnan82

Active User


Joined: 31 Mar 2005
Posts: 435
Location: chennai, India

PostPosted: Sun Feb 27, 2011 7:29 am
Reply with quote

Yes..This is what Iam expecting. Thanks much, Superk.
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 -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Resolve symbolics - other than starti... JCL & VSAM 4
No new posts Resolve 2 symbolics in a JCL ' one in... JCL & VSAM 3
No new posts Override all symbolics from JCL JCL & VSAM 11
No new posts Replace symbolics in a file - Rexx in... CLIST & REXX 1
No new posts Continuation of symbolics in a PROC JCL & VSAM 5
Search our Forums:

Back to Top