Sunday, February 6, 2011

EZACFSM1 - To add date in the dataset/text file during the job run.

//STEP040  EXEC  PGM=EZACFSM1                              
//SYSPRINT DD  *                                           
//SYSIN    DD  DSN=TCCPU.DLPXV2.PARMLIB(BKBBFLE),                                                                   

//             DISP=SHR                                    
//SYSOUT   DD  DSN=TCCPU.DLPXV2.FTPOUT6,                   
//             DISP=(NEW,CATLG,DELETE),                    
//             UNIT=SYSDA,                                 
//             SPACE=(CYL,(1,1),RLSE),                     
//             DCB=RECFM=FB                                
//                                                         
TCCPU.DLPXV2.PARMLIB(BKBBFLE):

PUT 'TCUAC.DB175.TNT.COUNT.UKSI' CBI02_CTRL_FILE_&DAY&MON&LYR4..TXT  
QUIT                                                                 


//STEP050  EXEC  PGM=FTP,                                   
//             PARM='(EXIT=16'                              
//SYSPRINT DD  SYSOUT=*                                     
//OUTPUT   DD  SYSOUT=*                                     
//*                                                         
//INPUT    DD  DSN=TCCPU.DLPXV2.PARMLIB(CLRLOGON),          
//             DISP=SHR                                     
//         DD  DSN=TCCPU.DLPXV2.FTPOUT6,                    
//             DISP=SHR                                     


TCCPU.DLPXV2.PARMLIB(CLRLOGON) - will have the login details of the server and TCCPU.DLPXV2.FTPOUT6 will have the file name with date as per the previous EZ' utility.



(For my information:


Hi Team,
1. We got a requirement to send a file from mainframe to (any) server (txt file format or any format). Txt file name should have rundate (eg:   OB_FILE_29012009.TXT).
Thought to write a program to obtain this naming convention. But, we have identified a Utility program (EZACFSM1) - a translation utility,  where we can get the rundate value to the file name like our &symbolic parameter.
This utility program is very useful to get the Current Date,Current month, Current Year, Sequence Number , so on...
Test job : TCCPU.DLPXV2.FTP(FTPDATE).
2. This utility can also be used with JCL to create the dataset with current date & time, Sequence number. etc  at the time of creation.
)

No comments:

Post a Comment