View previous topic :: View next topic
|
Author |
Message |
avinashgup
New User
Joined: 03 Aug 2007 Posts: 19 Location: Naperville
|
|
|
|
Hi,
I saw a FTP JCL where the control card was passed in two steps. The first was with DDNAME INPUT and the other was with OINPUT. But only the first control card from INPUT gets picked and not the latter one.
Can someone please explain why.
Here is the sample JCL.
STEP010 EXEC PGM=FTP, PARM='(EXIT=01)'
SYSPRINT DD SYSOUT=*
OUTPUT DD SYSOUT=*
INPUT DD DSN=TEST.CONTROL(CONTROLS),DISP=SHR
OINPUT DD DSN=TEST.CONTROL2,DISP=SHR |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Suggest you also post the content of TEST.CONTROL(CONTROLS). |
|
Back to top |
|
|
avinashgup
New User
Joined: 03 Aug 2007 Posts: 19 Location: Naperville
|
|
|
|
The contents of TEST.CONTROL(CONTROLS) are
100.100.201.200
anonymous
welcome1
cd staging_in
put 'TEST.FILE' test.txt
quit
Also contents of TEST.CONTROL2 dataset is same as above except there is a date stamp added to the destination file viz
100.100.201.200
anonymous
welcome1
cd staging_in
put 'TEST.FILE' test_20090910.txt
quit
But when the job executes the OUTPUT sysout shows that TEST.CONTROL(CONTROLS) gets executed and the job doesnt execute the contents of the
control card TEST.CONTROL2 |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
That would cause 2 "sessions". . .
To accomplish sending the second file with the date info, a second PUT could be placed in the first command series.
It may be that test.control2 can be concatenated to the input dd rather than having a separate ddname. . . |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
FTP batch JCL does not recognize OINPUT as a DD name, from what I can tell in the manual -- plus my experience with FTP. Merely providing a DD statement to a program does not mean the program will recognize the DD statement, open it, read it, write it, close it, or do anything at all with it. It is merely there. The system is therefore behaving exactly as expected -- you gave FTP an unknown DD statement, so FTP does nothing with it.
Perhaps you could tell us from where you found out about OINPUT? |
|
Back to top |
|
|
avinashgup
New User
Joined: 03 Aug 2007 Posts: 19 Location: Naperville
|
|
|
|
Thanks for the response. Even I had not see the usage of OINPUT as a DDNAME with FTP. I was just browsing through one of the jcls where i located this. And I was curious to know if there was anything valid as OINPUT.
You were referring to manual. Can you please send me the link of any FTP manual for MVS systems. Thanks once again. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
Back to top |
|
|
MBabu
Active User
Joined: 03 Aug 2008 Posts: 400 Location: Mumbai
|
|
|
|
I would guess that someone just changed the name of something they were working with from //INPUT to //OINPUT instead of changing it into a comment (//*INPUT). Not smart since the data sets it refers to still get allocated and need to be there but I can imagine someone doing that quick-and-dirty and forgetting to go back and change it. The only reason I'm guessing that is that the "O" might stand for "old" or "original" - I've seen people do that sort of rename before. Obviously some people don't tend to worry about extra ddnames in JCL; just look at all the examples here and elsewhere that blindly add //SYSOUT to everything. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Sounds like the "old input" (OINPUT) specified the date (which would continually add files to the remote if housekeeping was not done).
Possibly the process was changed so that the target system would always use the same filename as input rather than need to know the date in the filename as well as ensuring that only one of these files would be on the target at any one time? |
|
Back to top |
|
|
|