FTP Issue



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

FTP Issue

Postby Vineet » Wed Jun 11, 2014 11:02 pm

Hi All,
I have a question regarding FTP which I am using in job. I have define Step like "//CPN73A6 EXEC PGM=FTP,COND=(4,LT),PARM=' (EXIT=12' ". Below is my requirement.

1. When execute the job & file is not present in the specfied dir. then job returns the MAXCC = 12. Is there a way that I can suppress the MAXCC = 12 & set that to MAXCC = 00 somethng similar to what we use in IDCAMS i.e. If MAXCC = 16 then SET MAXCC = 00.

2. If File is present in the specified dir. then copy the content to the Dataset, If file is not present then Create Empty Data Set. Below is an example.

GET /var/local/cmfextract/extract_data/test_ftp_file.dat 'NT.SMS.DTPR.TEST.DATA' (REPLACE

If test_ftp_file.dat is present in the specified path then copy the content to 'NT.SMS.DTPR.TEST.DATA'. If file is not present then ''NT.SMS.DTPR.TEST.DATA' to be created as an Empty Data Set

Note: Would prefer to have PARM = '(EXIT = 12'.

Thanks
Kind Rgd's
Vineet
 
Posts: 86
Joined: Tue Jun 19, 2007 11:38 am
Has thanked: 0 time
Been thanked: 0 time

Re: FTP Issue

Postby Robert Sample » Thu Jun 12, 2014 12:51 am

Terminology is your first problem. MAXCC is a term used with IDCAMS and pretty much ONLY with IDCAMS. Batch jobs executing steps have step condition codes / step abend codes, but these are NOT MAXCC -- period.

Second, what you want to do appears to be possible using various tools (OMVS shell script or Perl, for example) but NOT with FTP since FTP is dedicated to doing file transfers, not testing for file or directory being present / empty / whatever.

Third, in general when batch utilities such as FTP set a step condition code, you may test for it but you cannot change it.

Consult your site support group and find out what tool(s) are available to do what you want, then start coding with tool (or start learning the tool).
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post