Which GDG generation will be FTP'ed?



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Which GDG generation will be FTP'ed?

Postby apjohn1986 » Fri Mar 01, 2013 5:52 pm

Hi Guys,

I have two steps in my job. first step PS05 is creating a new version of the GDG 'TABCCI.INVOICE.REPORT(+1)'. second step is as follows,

//PS10 EXEC PGM=FTP,REGION=4M,PARM='(EXIT',COND=(0,NE)
//INPUT DD DSN=HLCNTL.PROD.CNTLLIB(CIBS037A),DISP=SHR
//OUTPUT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=X


below is the data in INPUT file
CD Folder1
PUT 'TABCCI.INVOICE.REPORT(+1)' report.txt


for example if the step PS05 is creating version G0001V00, then what version will be FTP'ed? is it G0001V00 or G0002V00.

Please clarify this.
Thanks,
John
apjohn1986
 
Posts: 16
Joined: Mon Jan 31, 2011 12:26 pm
Has thanked: 3 times
Been thanked: 0 time

Re: Which GDG generation will be FTP'ed?

 

Re: Which GDG version will be FTP'ed?

Postby Robert Sample » Fri Mar 01, 2013 6:46 pm

This should be easy for you to test, and you should be testing it as part of the unit test (or system test) process at your site.

When using a JCL statement, you use the same relative generation number throughout the job since that number is interpreted by JES throughout the job. However, since the FTP commands are not in JCL but rather in an input file passed to the FTP started task, using the (+1) in the PUT command will cause FTP to attempt to send the generation G0002V00 and not G0001V00. Since G0002V00 does not exist, this will cause a problem in the FTP.

These users thanked the author Robert Sample for the post:
apjohn1986 (Mon Mar 04, 2013 8:26 pm)
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 222 times

Re: Which GDG version will be FTP'ed?

Postby steve-myers » Fri Mar 01, 2013 8:27 pm

As Mr. Sample says, TEST, TEST, TEST!

In my opinion, you are better off not using GDGs with FTP. I think something like this will work OK -
//A       EXEC PGM=...
//NEWGDG   DD  DISP=(NEW,CATLG),DSN=GDG(+1),...
//B       EXEC PGM=FTP,PARM='...'
//SYSIN    DD  *
USER ...
cd ...
put GDG(+1) ...
What you showed probably will work the first time it is run, but I'm pretty certain it will not work the second time unless the mainframe server is shut down and restarted before your example is run the second time.

The reason for my pessimistic analysis is the first time you use a relative GDG generation, either in JCL or dynamic allocation, the relationship between the relative generation and the true data set name is fixed for the life of the job. An FTP server on a mainframe is a single mainframe job. A remote client using the mainframe FTP server multiple times does not define a new JOB for each use.

These users thanked the author steve-myers for the post:
apjohn1986 (Mon Mar 04, 2013 8:26 pm)
steve-myers
Global moderator
 
Posts: 1885
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 197 times

Re: Which GDG version will be FTP'ed?

Postby MrSpock » Fri Mar 01, 2013 9:32 pm

I always say, why not allocate the GDG to a DDNAME and just use a "put" from the DDNAME instead?
User avatar
MrSpock
Global moderator
 
Posts: 810
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 2 times

Re: Which GDG version will be FTP'ed?

Postby NicC » Sat Mar 02, 2013 9:43 am

Are you creating a new version or generation?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: Which GDG version will be FTP'ed?

Postby apjohn1986 » Mon Mar 04, 2013 12:27 pm

@Robert Sample & @steve-myers, we don't have access to test file transfer. that's why i asked that in forum instead of testing it. Thanks for your valuable responses.

@MrSpock, Thanks.

@NicC, i am creating new generation only. sorry for that wrong keyword used at title.
Thanks,
John
apjohn1986
 
Posts: 16
Joined: Mon Jan 31, 2011 12:26 pm
Has thanked: 3 times
Been thanked: 0 time

Re: Which GDG generation will be FTP'ed?

Postby Robert Sample » Mon Mar 04, 2013 3:23 pm

we don't have access to test file transfer
This is complete and utter BS. You do NOT have to test the actual file transfer; set up a GDG on your system and test the FTP commands going from one LPAR to another, or from z/OS to your generic FTP server, or somewhere. If you cannot do any test FTP at all, then why are you even posting here? If you can do a test FTP, then saying you don't have access to test file transfer is lying to this forum.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 222 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post