How to ftp a data file modified by EZACFSM1

In this Mainframe Forum - You can post your queries on JCL, OS/390 JCL, MVS JCL, z/OS JCL, JES2 & JES3

Moderators: Frank Yaeger, DikDude, Moderator Group

Post Reply
dbdinc
Member
Posts: 17
Joined: Mon Aug 03, 2009 8:29 pm

How to ftp a data file modified by EZACFSM1

Post by dbdinc » Thu Aug 20, 2009 12:59 am

In JCL, I have used EZACFSM1 to modifiy the dataset's name to include the current date. That has been successful. What I need to know now is how to take that renamed file and, again, in JCL, to FTP the file to a server. When I use the following JCL, I get errors. What do I need to do to make this successful?

Code: Select all

//DATETEST JOB (XXXX,YYY),'INTERNET ONLY',MSGCLASS=A,MSGLEVEL=(1,1),
//         CLASS=B,USER=ABCD,PASSWORD=QQQQQ
//*
//STEP01   EXEC PGM=EZACFSM1
//SYSOUT   DD DSN=&&CNTL,DISP=(,PASS),
//         UNIT=SYSDA,SPACE=(CYL,(1,1),RLSE)
//SYSIN    DD *
  ALTER 'RFA195.DATA.FILE' -
    NEWNAME('RFA195.DATA.FILE.D&YR2&MON&DAY')
/*
//*
//LASTSTEP EXEC PGM=IDCAMS
//SYSPRINT DD   SYSOUT=*
//SYSIN    DD   DSN=&&CNTL,DISP=(OLD,DELETE)
//FTPSTD   EXEC  PGM=FTP
//*             PARM=('TIMEOUT 60 EXIT=12'
//*
//SYSPRINT DD SYSOUT=A
//OUTPUT   DD SYSOUT=*
//*
//*================================================================
//* DATA INPUT DD * ARE SERVER, USERID, PASSWORD, MVS DATASET, PCDSN
//* PARAMETERS ARE FOR PRESIDIUM LEARNING INC.
//*================================================================
//INPUT    DD *
myservername
mydomainname\userid
password
cd /mydirectoryname
bin
PUT 'RFA195.DIS.FILE.D&LYYMMDD' RFA195.D&LYYMMDD
QUIT                     /\             /\
//*                      ||             ||
*** errors outon this ===|| and this ===||
*** what needs to be placed at these points?
 

User avatar
Natarajan
Moderator
Posts: 537
Joined: Fri Oct 10, 2008 12:57 pm
Location: chennai
Contact:

dynamic date creation in jcl - EZACFSM1

Post by Natarajan » Thu Aug 20, 2009 12:36 pm

in this scenario, my suggestion is to use Internal reader to submit the job.
Example....

Code: Select all

//CDATE  JOB (DEV,TEST),'RUNJCL',CLASS=S,MSGCLASS=T,        
//         NOTIFY=&SYSUID,REGION=4096K
//* step1... you can have your existing step to change 
//*  the name of the PDS.
//STEP02   EXEC PGM=EZACFSM1                                    
//SYSOUT   DD SYSOUT=(*,INTRDR)                                 
//SYSIN    DD DATA,DLM=@@   
..... write new job here which will do FTP.
@@

The job after DLM=@@ will be submitted with new dataset name.
Natarajan
Chennai

dbdinc
Member
Posts: 17
Joined: Mon Aug 03, 2009 8:29 pm

Re: dynamic date creation in jcl - EZACFSM1

Post by dbdinc » Thu Aug 20, 2009 6:38 pm

Natarajan wrote:in this scenario, my suggestion is to use Internal reader to submit the job.
Example....

Code: Select all

//CDATE  JOB (DEV,TEST),'RUNJCL',CLASS=S,MSGCLASS=T,        
//         NOTIFY=&SYSUID,REGION=4096K
//* step1... you can have your existing step to change 
//*  the name of the PDS.
//STEP02   EXEC PGM=EZACFSM1                                    
//SYSOUT   DD SYSOUT=(*,INTRDR)                                 
//SYSIN    DD DATA,DLM=@@   
..... write new job here which will do FTP.
@@

The job after DLM=@@ will be submitted with new dataset name.
Thank you for replying. However, I did not understand what you suggested. Can you please provide me with more detail? Perhaps a complete job stream? I would appreciate it if you could do that.

User avatar
Natarajan
Moderator
Posts: 537
Joined: Fri Oct 10, 2008 12:57 pm
Location: chennai
Contact:

Post by Natarajan » Thu Aug 20, 2009 8:38 pm

Let me know, what you did not understand in that.
Natarajan
Chennai

dbdinc
Member
Posts: 17
Joined: Mon Aug 03, 2009 8:29 pm

Post by dbdinc » Fri Aug 21, 2009 2:39 am

Natarajan wrote:Let me know, what you did not understand in that.
I did not understand what you were hinting went where. But that is OK, because I got my job and JCL figured out and have been successful in doing the entire job.

Thank you.

User avatar
Natarajan
Moderator
Posts: 537
Joined: Fri Oct 10, 2008 12:57 pm
Location: chennai
Contact:

Post by Natarajan » Fri Aug 21, 2009 11:42 am

Is this solution worked out?
Natarajan
Chennai

dbdinc
Member
Posts: 17
Joined: Mon Aug 03, 2009 8:29 pm

Post by dbdinc » Mon Aug 24, 2009 6:58 pm

Natarajan wrote:Is this solution worked out?
Yes. Thank you

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others