MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

IBM File Manager - Conditional Copy JCL

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
tcurrier
Intermediate


Joined: 10 Feb 2006
Posts: 188
Topics: 68

PostPosted: Sat Apr 26, 2008 9:17 am    Post subject: IBM File Manager - Conditional Copy JCL Reply with quote

Hello,

We've been told that our shop is converting in the near future from using FILEAID to IBM File Manager for our production batch jobs.

I'm trying to get a few examples of the basic jobs that we would be using that we would have to convert. I found some 'straight copy' JCL below, which unconditionally copies an entire file from one to another (in this case, the input file is actually a PDS member).

Does anyone have an example of a 'conditional copy', only copying records if byte 10-12 = 'ABC', for example ?


Thanks ....

Code:
//FILEMGR   EXEC PGM=FMNMAIN                 
//SYSPRINT  DD SYSOUT=*                     
//FMNTSPRT  DD SYSOUT=*                     
//SYSTERM   DD SYSOUT=*                     
//SYSIN     DD *                             
$$FILEM DSC DSNIN=H2501T4.TOMC.JOBLIB9,     
$$FILEM MEMBER=FILEAIDX,                     
$$FILEM PACK=ASIS,                           
$$FILEM POSITION=0,                         
$$FILEM DISP=OLD,                           
$$FILEM DSNOUT=H2501S.T.TC.FILEMGR.COPY.TEST
/*                                           
Back to top
View user's profile Send private message
Terry_Heinze
Supermod


Joined: 31 May 2004
Posts: 391
Topics: 4
Location: Richfield, MN, USA

PostPosted: Sat Apr 26, 2008 9:23 am    Post subject: Reply with quote

I don't have a File Manager solution, but for a copy that simple, I'd be willing to bet that your sort product would be the fastest (and probably simplest).
_________________
....Terry
Back to top
View user's profile Send private message Send e-mail
tcurrier
Intermediate


Joined: 10 Feb 2006
Posts: 188
Topics: 68

PostPosted: Sat Apr 26, 2008 10:58 am    Post subject: Reply with quote

Thanks.... I'm sure that sort would work fine.... I was just looking for some File Manager examples....
Back to top
View user's profile Send private message
tcurrier
Intermediate


Joined: 10 Feb 2006
Posts: 188
Topics: 68

PostPosted: Sat Apr 26, 2008 12:30 pm    Post subject: Reply with quote

After a little more searching, I did find this example :

Code:
//STEP1    EXEC PGM=FILEMGR                   
//SYSPRINT DD SYSOUT=*                         
//SYSOUT   DD SYSOUT=*                         
//DDIN     DD *                               
DEF                                           
ABC                                           
XYZ                                           
/*                                             
//DDOUT    DD DSN=H2501S.T.TC.FILEMGR4.TEST1, 
//         DISP=(OLD,KEEP,KEEP)               
//*        DISP=(,CATLG),MGMTCLAS=WORKD,       
//*        SPACE=(TRK,(1)),                   
//*        DCB=(RECFM=FB,LRECL=80,BLKSIZE=0)   
//DDOU2    DD DSN=H2501S.T.TC.FILEMGR4.TEST2, 
//         DISP=(OLD,KEEP,KEEP)               
//*        DISP=(,CATLG),MGMTCLAS=WORKD,       
//*        SPACE=(TRK,(1)),                   
//*        DCB=(RECFM=FB,LRECL=80,BLKSIZE=0)   
//SYSIN    DD *                                 
$$FILEM DSC INPUT=DDIN,                         
$$FILEM     PROC=*                             
*FASTPROC                                       
 OUTFIL FNAMES=DDOUT,INCLUDE=(1,3,CH,EQ,C'ABC')
 OUTFIL FNAMES=DDOU2,INCLUDE=(1,3,CH,EQ,C'XYZ',
        OR,1,2,CH,EQ,C'DEF')                   
/*                                             
//             
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group