View previous topic :: View next topic
|
Author |
Message |
Mukesh Pandey
Active User
Joined: 11 Nov 2008 Posts: 143 Location: India
|
|
|
|
//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 |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
just change the DISP to DISP=(MOD,CATLG,DELETE)
Gerry |
|
Back to top |
|
|
Mukesh Pandey
Active User
Joined: 11 Nov 2008 Posts: 143 Location: India
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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 |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
try this
Code: |
$$FILEM SET PAD=''
$$FILEM DSC INPUT=DD01,
$$FILEM CPYMBR=(MK*,
$$FILEM M02*),
$$FILEM OUTPUT=DD01O
|
Gerry |
|
Back to top |
|
|
|