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

using symbolics in the destination file name of FTP


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

New User


Joined: 03 Jul 2015
Posts: 10
Location: United States

PostPosted: Fri Feb 14, 2025 10:32 am
Reply with quote

Hi, I have a requirement to add a dynamic name in the destination file name of the FTP instruction. I tried searching, but got only for source filename. Any help would be much appreciated. I tried the below but it did not resolve the symbolics.

Code:

PUT 'TEST.MAINFRAM.FILENAME.FTP' &DEST
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1379
Location: Bamberg, Germany

PostPosted: Fri Feb 14, 2025 10:37 am
Reply with quote

Use JCL SYMBOLS, it's pretty easy. However the Jobclass must have it allowed.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3084
Location: NYC,USA

PostPosted: Fri Feb 14, 2025 12:26 pm
Reply with quote

Or JPn?
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1379
Location: Bamberg, Germany

PostPosted: Fri Feb 14, 2025 12:41 pm
Reply with quote

JPn is SORT syntax, JCL SYMBOLS would be more convenient if allowed. I agree that both could be used.
Back to top
View user's profile Send private message
gpnavinkumar

New User


Joined: 03 Jul 2015
Posts: 10
Location: United States

PostPosted: Fri Feb 14, 2025 12:42 pm
Reply with quote

As I told, I tried with source file, it worked. But if it is in destination it is not working.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3084
Location: NYC,USA

PostPosted: Fri Feb 14, 2025 12:52 pm
Reply with quote

Show us the code what have you tried and what’s the error that describes “not working” state.
Back to top
View user's profile Send private message
gpnavinkumar

New User


Joined: 03 Jul 2015
Posts: 10
Location: United States

PostPosted: Fri Feb 14, 2025 2:59 pm
Reply with quote

Hi, I tried the below and the file was ftp ed to destination path with file name as "&PARM" instead of NAVIN.txt

Code:

//SETPARM      SET PARM=NAVIN.txt

PUT 'TEST.NAVIN.FTP.FILE' &PARM
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3084
Location: NYC,USA

PostPosted: Fri Feb 14, 2025 5:52 pm
Reply with quote

So what I/ we are suggesting is to use a SORT step before this to produce PUT card using SORT using JPn.

I think use of symbols can be used but if I recall correctly it doesn’t work inside the proc..

Please check
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2191
Location: USA

PostPosted: Sun Feb 16, 2025 10:02 pm
Reply with quote

gpnavinkumar wrote:
Hi, I tried the below and the file was ftp ed to destination path with file name as "&PARM" instead of NAVIN.txt

Code:

//SETPARM      SET PARM=NAVIN.txt

PUT 'TEST.NAVIN.FTP.FILE' &PARM

Two essential elements are missing: EXPORT SYMLIST, and SYMBOLS=EXECSYS.
Additionally, using the names like PARMxxx, VARnnn, etc. is very harmful
Code:
 . . . . .
// EXPORT SYMLIST=*
. . . . . . . .
// SET OUTFILE=NAVIN.txt
. . . . . . .
//??????   DD *,SYMBOLS=EXECSYS
PUT 'TEST.NAVIN.FTP.FILE' &OUTFILE
Back to top
View user's profile Send private message
gpnavinkumar

New User


Joined: 03 Jul 2015
Posts: 10
Location: United States

PostPosted: Tue Feb 18, 2025 6:04 pm
Reply with quote

Hi, Thanks for your reply.
I tried the below and got JCL error, could you please help?:
Code:

//#MASTER INCLUDE MEMBER=NGP           
//        EXPORT SYMLIST=*             
//#MASTER INCLUDE MEMBER=TEST1         
//*                                   
.
.
.
//*                                                               
//STEP030  EXEC TCPIPFTP,PARM='(EXIT'                             
//APVFIA    DD DSN=ADMX.&PARM..YBAPV,DISP=SHR           
//APVOUT   DD *,SYMBOLS=EXECSYS                                   
//FTPSTEP.INPUT DD DSN=CONTROL.ADMN.NG$WAD.PARM(SERVER),DISP=SHR 
//      DD *                                                     
CD 'LIDP COMMON/NAVIN'                                           
PUT //DD:APVFIA &PARM                                             
QUIT                                                             


Error:
Code:

STMT NO. MESSAGE                                                           
       3 IEFC002I INCLUDE GROUP NGP WAS EXPANDED USING PRIVATE LIBRARY T.NG
       6 IEFC002I INCLUDE GROUP TEST1 WAS EXPANDED USING PRIVATE LIBRARY T.
      13 IEFC001I PROCEDURE TCPIPFTP WAS EXPANDED USING SYSTEM LIBRARY SYS1
      34 IEFC023I SYSIN OVERRIDE ERROR 

32 XXCHECKER  EXEC PGM=&CHKPGM,COND=(000,EQ,FTPCHK)             
   XX*                                                           
   IEFC653I SUBSTITUTION JCL - PGM=STOP,COND=(000,EQ,FTPCHK)     
33 XXCHKPGM   EXPORT EXPSET=                            GENERATED
34 //      DD *                                                                                     
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10896
Location: italy

PostPosted: Tue Feb 18, 2025 6:18 pm
Reply with quote

Quote:
I tried the below and got JCL error
...
...
...


NOPE...

Quote:
XXCHECKER EXEC PGM=&CHKPGM


looks like you got a questionable message from your jcl checker

most often jcl checkers signal inexistent errors when dealing with application data
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2191
Location: USA

PostPosted: Tue Feb 18, 2025 9:10 pm
Reply with quote

gpnavinkumar wrote:
Hi, Thanks for your reply.
I tried the below and got JCL error, could you please help?:

Error:
Code:

STMT NO. MESSAGE                                                           
       3 IEFC002I INCLUDE GROUP NGP WAS EXPANDED USING PRIVATE LIBRARY T.NG
       6 IEFC002I INCLUDE GROUP TEST1 WAS EXPANDED USING PRIVATE LIBRARY T.
      13 IEFC001I PROCEDURE TCPIPFTP WAS EXPANDED USING SYSTEM LIBRARY SYS1
      34 IEFC023I SYSIN OVERRIDE ERROR 

32 XXCHECKER  EXEC PGM=&CHKPGM,COND=(000,EQ,FTPCHK)             
   XX*                                                           
   IEFC653I SUBSTITUTION JCL - PGM=STOP,COND=(000,EQ,FTPCHK)     
33 XXCHKPGM   EXPORT EXPSET=                            GENERATED
34 //      DD *                                                                                     


Sorry for this repeated question: DID YOU TRY TO READ IBM'S EXPLANATION for the mentioned error IEFC023I SYSIN OVERRIDE ERROR ???
Quote:
Explanation

The system found an incorrect DD statement that attempted to override a sysin (DD * or DD DATA) statement in a PROC. This error can occur in the following scenarios:

- A DD statement is specified to override a DD statement that is part of a concatenated sysin data set, and the overriding DD statement is coded with a blank operand (or parameter) field.
- The specified (or defaulted) step name was not found in the job.
- The step name refers to the EXEC of a procedure.
- The DD overrides for sysin data was specified in an order that is different from the corresponding steps in the procedure.


Besides of this problem, YOU MUST FOLLOW THE RULES OF CODING from my previous message //EXEC SYMLIST=*, and SYMBOLS=EXECSYS
Code:
//      DD *,SYMBOLS=EXECSYS                                                     
CD 'LIDP COMMON/NAVIN'                                           
PUT //DD:APVFIA &PARM                                             
QUIT 
Back to top
View user's profile Send private message
gpnavinkumar

New User


Joined: 03 Jul 2015
Posts: 10
Location: United States

PostPosted: Thu Feb 20, 2025 11:56 am
Reply with quote

It worked. Thank you very much. Sorry thought it was a Dataset statement then only I realized it was a sysin statement. Thanks a lot and appreciate your help!!
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 Sort card to know that creation date ... DFSORT/ICETOOL 9
No new posts Convert CSV to flat file. DFSORT/ICETOOL 6
No new posts Multiple INSPECTS on a big size file COBOL Programming 6
No new posts Create a specific record/file based o... SYNCSORT 8
No new posts Can BPXBATCH update TAPE file COBOL Programming 3
Search our Forums:

Back to Top