IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

A query on the Filemanager code


IBM Mainframe Forums -> Compuware & Other Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Mukesh Pandey

Active User


Joined: 11 Nov 2008
Posts: 143
Location: India

PostPosted: Wed Apr 06, 2011 1:42 am
Reply with quote

//TSSTC15 EXEC PGM=FILEMGR
//DD01 DD DSN=PUBLIC.TEMP.STR,
// DISP=SHR
//DD01O DD DSN=PUBLIC.BATCH.FILE2,
// DISP=(NEW,CATLG,DELETE),
// RECFM=FB,LRECL=99,
// SPACE=(CYL,(10,5),,,ROUND)
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
*+* FMC2FM: Beginning of File Manager statement output *+*
$$FILEM SET PAD=' '
$$FILEM DSC INPUT=DD01,
$$FILEM MEMBER=MK*,
$$FILEM OUTPUT=DD01O
$$FILEM SET PAD=' '
$$FILEM DSC INPUT=DD01,
$$FILEM MEMBER=M02*,
$$FILEM OUTPUT=DD01O
/*

PUBLIC.TEMP.STR is a PDS with memebrs MKMBR and M02MBR

After successfull execution of the job the file PUBLIC.BATCH.FILE2 has data present in M02MBR only and the data present in the member MKMBR is skipped.

Desired result -- The file PUBLIC.BATCH.FILE2 should have data of both the members MKMBR and M02MBR


Please suggest the modification in the above code to achieve the desired result.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Wed Apr 06, 2011 6:40 am
Reply with quote

Hi,

just change the DISP to DISP=(MOD,CATLG,DELETE)


Gerry
Back to top
View user's profile Send private message
Mukesh Pandey

Active User


Joined: 11 Nov 2008
Posts: 143
Location: India

PostPosted: Wed Apr 06, 2011 5:58 pm
Reply with quote

Hi Gcicchet,

Thanks for your reply.

The functionality of components in our applications are migrating from file aid to file manager and hence i am testing the above job.

i.e the job produces the desired result ( The file PUBLIC.BATCH.FILE2 has data of both the members MKMBR and M02MBR
) when we use pgm=FILEAID with the below sysin statements.

SYSIN DD *
$$ DD01 COPY MS=MK, PADCHAR='C'
$$ DD01 COPY MS=M02, PADCHAR='C'
/*

Our requirement is to change the functionality from FILEAID to FILEMGR and the DISP=(NEW,CATLG,DELETE) is desireble in the output file as it is.

Need Suggestion how this can be achieved with the FILEMGR since FILEAID is already working and our end goal is to achieve the same functionality with FILEMGR.

Thanks in advance.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Apr 06, 2011 6:12 pm
Reply with quote

gcicchet wrote:
just change the DISP to DISP=(MOD,CATLG,DELETE)

Did you try this suggestion

If so, did it work or not work

If not, why not
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu Apr 07, 2011 7:37 am
Reply with quote

Hi,

try this
Code:
$$FILEM SET PAD=''               
$$FILEM DSC INPUT=DD01,         
$$FILEM CPYMBR=(MK*,             
$$FILEM         M02*),           
$$FILEM OUTPUT=DD01O             



Gerry
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Compuware & Other Tools

 


Similar Topics
Topic Forum Replies
No new posts Cond parameter and Rc code of a proce... JCL & VSAM 5
No new posts File Status Error code 39 when Proces... COBOL Programming 2
No new posts Cobol code- to find a string in a str... COBOL Programming 3
No new posts DB2: Need helping below DB2 query DB2 13
No new posts DB2 SQL query to read and update data... DB2 12
Search our Forums:

Back to Top