View previous topic :: View next topic
|
Author |
Message |
gpnavinkumar
New User
Joined: 03 Jul 2015 Posts: 10 Location: United States
|
|
|
|
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 |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1379 Location: Bamberg, Germany
|
|
|
|
Use JCL SYMBOLS, it's pretty easy. However the Jobclass must have it allowed. |
|
Back to top |
|
 |
Rohit Umarjikar
Global Moderator

Joined: 21 Sep 2010 Posts: 3084 Location: NYC,USA
|
|
|
|
Or JPn? |
|
Back to top |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1379 Location: Bamberg, Germany
|
|
|
|
JPn is SORT syntax, JCL SYMBOLS would be more convenient if allowed. I agree that both could be used. |
|
Back to top |
|
 |
gpnavinkumar
New User
Joined: 03 Jul 2015 Posts: 10 Location: United States
|
|
|
|
As I told, I tried with source file, it worked. But if it is in destination it is not working. |
|
Back to top |
|
 |
Rohit Umarjikar
Global Moderator

Joined: 21 Sep 2010 Posts: 3084 Location: NYC,USA
|
|
|
|
Show us the code what have you tried and what’s the error that describes “not working” state. |
|
Back to top |
|
 |
gpnavinkumar
New User
Joined: 03 Jul 2015 Posts: 10 Location: United States
|
|
|
|
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 |
|
 |
Rohit Umarjikar
Global Moderator

Joined: 21 Sep 2010 Posts: 3084 Location: NYC,USA
|
|
|
|
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 |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2191 Location: USA
|
|
|
|
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 |
|
 |
gpnavinkumar
New User
Joined: 03 Jul 2015 Posts: 10 Location: United States
|
|
|
|
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 |
|
 |
enrico-sorichetti
Superior Member

Joined: 14 Mar 2007 Posts: 10896 Location: italy
|
|
|
|
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 |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2191 Location: USA
|
|
|
|
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 |
|
 |
gpnavinkumar
New User
Joined: 03 Jul 2015 Posts: 10 Location: United States
|
|
|
|
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 |
|
 |
|