Page 1 of 1

FTP Issue

PostPosted: Wed Jun 11, 2014 11:02 pm
by Vineet
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

Re: FTP Issue

PostPosted: Thu Jun 12, 2014 12:51 am
by Robert Sample
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).