I need to copy one module from one PDS to other PDS, but the name had to be the same and the content had to be the same module n times inside.
Could you help me?
How to copy a module several times
-
- Posts: 2
- Joined: Thu Dec 12, 2019 4:49 pm
- Skillset: zOS and zHardware Specialist
- Referer: Google
-
- Global moderator
- Posts: 3025
- Joined: Sun Jul 04, 2010 12:13 am
- Skillset: JCL, PL/1, Rexx, Utilities and to a lesser extent (i.e. I have programmed using them) COBOL,DB2,IMS
- Referer: Google
- Location: Pushing up the daisies (almost)
Re: How to copy a module several times
Member names have to be unique. You could possibly use generation if the copied to dataset was a PDSE.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
Regards
Nic
-
- Global moderator
- Posts: 2105
- Joined: Thu Jun 03, 2010 6:21 pm
- Skillset: Assembler, JCL, utilities
- Referer: zos.efglobe.com
Re: How to copy a module several times
Just exactly what do you mean by "...and the content had to be the same module n times inside."?
Interpretation 1 - A library containing three copies of the same load module, but with 3 different names
Interpretation 2 - A single load module with several copies of one module with different names, since you cannot have 2 modules with one name.
The following JCL can achieve both interpretations.
Step A deletes any previous examples of two data sets.
Step B copies module PVX, with 3 load module names.
Step C builds load module PVXCOPY3, with several copies of module PVX.
Step D runs several TSO commands in batch to list the data set constructed in steps B and C. The LMATTR and LISTPDS commands are private TSO commands as is the PRINTDS program in step E.
Step E prints the output of step D. This is the output.
Interpretation 1 - A library containing three copies of the same load module, but with 3 different names
Interpretation 2 - A single load module with several copies of one module with different names, since you cannot have 2 modules with one name.
The following JCL can achieve both interpretations.
Code: Select all
//A EXEC PGM=IEFBR14
//XLOAD DD DISP=(MOD,DELETE),UNIT=SYSALLDA,SPACE=(TRK,0),
// DSN=&SYSUID..PVX.XLOAD
//SYSTSPRT DD DISP=(MOD,DELETE),UNIT=SYSALLDA,SPACE=(TRK,0),
// DSN=&SYSUID..PVX.SYSTSPRT
//B EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=*
//I DD DISP=(SHR,PASS),DSN=&SYSUID..PVX.LOAD
//O DD DISP=(,CATLG),UNIT=SYSDA,SPACE=(TRK,(2,2,1),RLSE),
// DSN=*.A.XLOAD
//SYSIN DD *
C I=I,O=O
S M=PVX
C I=I,O=O
S M=((PVX,PVXCOPY1))
C I=I,O=O
S M=((PVX,PVXCOPY2))
//C EXEC PGM=IEWL,PARM='MAP,LIST'
//SYSPRINT DD SYSOUT=*
//I DD DISP=(SHR,PASS),DSN=&SYSUID..PVX.LOAD
//SYSLMOD DD DISP=(OLD,PASS),DSN=*.A.XLOAD
//SYSLIN DD *
INCLUDE I(PVX)
CHANGE PVX(PVXCOPY1)
INCLUDE I(PVX)
CHANGE PVX(PVXCOPY2)
INCLUDE I(PVX)
ENTRY PVX
NAME PVXCOPY3
//D EXEC PGM=IKJEFT01
//STEPLIB DD DISP=SHR,DSN=&SYSUID..LOAD
//SYSTSPRT DD DISP=(,CATLG),UNIT=SYSDA,SPACE=(TRK,(1,1)),
// DCB=(RECFM=VB,LRECL=120,DSORG=PS),DSN=*.A.SYSTSPRT
//SYSTSIN DD *
LISTPDS (PVX.LOAD PVX.XLOAD)
LMATTR (PVX.XLOAD(PVX) PVX.XLOAD(PVXCOPY1) PVX.XLOAD(PVXCOPY2) +
PVX.XLOAD(PVXCOPY3))
//E EXEC PGM=PRINTDS
//STEPLIB DD DISP=SHR,DSN=&SYSUID..LOAD
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DISP=OLD,DSN=*.A.SYSTSPRT
Step A deletes any previous examples of two data sets.
Step B copies module PVX, with 3 load module names.
Step C builds load module PVXCOPY3, with several copies of module PVX.
Step D runs several TSO commands in batch to list the data set constructed in steps B and C. The LMATTR and LISTPDS commands are private TSO commands as is the PRINTDS program in step E.
Step E prints the output of step D. This is the output.
Code: Select all
READY
LISTPDS (PVX.LOAD PVX.XLOAD)
XXXXXX.PVX.LOAD ON VVVV34
-MEMBER- --TTRC-- ALIAS OF -SIZE- -----ATTRIBUTES----- AM RM AC SSI
PVX 0000042C 000F78 24 24 00
2 ALLOCATED DIRECTORY BLOCKS, 1 USED DIRECTORY BLOCKS
XXXXXX.PVX.XLOAD ON VVVV30
-MEMBER- --TTRC-- ALIAS OF -SIZE- -----ATTRIBUTES----- AM RM AC SSI
PVX 0000032C 000F78 24 24 00
PVXCOPY1 00000B2C 000F78 24 24 00
PVXCOPY2 0000132C 000F78 24 24 00
PVXCOPY3 00001B2C 002E68 24 24 00
1 ALLOCATED DIRECTORY BLOCKS, 1 USED DIRECTORY BLOCKS
READY
LMATTR (PVX.XLOAD(PVX) PVX.XLOAD(PVXCOPY1) PVX.XLOAD(PVXCOPY2) PVX.XLOAD(PVXCOPY3))
XXXXXX.PVX.XLOAD(PVX) EXECUTABLE,F-LEVEL,SIZE=F78,EP=0,AC=0,RMODE=24,AMODE=24
MODULE LINKED BY 5695PMB01 ON 12/13/19
NAME TYPE MODE ADDR LENGTH NAME MODE ADDR OFFSET
PVX SD 22 0 F78
XXXXXX.PVX.XLOAD(PVXCOPY1) EXECUTABLE,F-LEVEL,SIZE=F78,EP=0,AC=0,RMODE=24,AMODE=24
MODULE LINKED BY 5695PMB01 ON 12/13/19
NAME TYPE MODE ADDR LENGTH NAME MODE ADDR OFFSET
PVX SD 22 0 F78
XXXXXX.PVX.XLOAD(PVXCOPY2) EXECUTABLE,F-LEVEL,SIZE=F78,EP=0,AC=0,RMODE=24,AMODE=24
MODULE LINKED BY 5695PMB01 ON 12/13/19
NAME TYPE MODE ADDR LENGTH NAME MODE ADDR OFFSET
PVX SD 22 0 F78
XXXXXX.PVX.XLOAD(PVXCOPY3) EXECUTABLE,F-LEVEL,SIZE=2E68,EP=0,AC=0,RMODE=24,AMODE=24
MODULE LINKED BY 5695PMB01 ON 12/13/19
NAME TYPE MODE ADDR LENGTH NAME MODE ADDR OFFSET
PVX SD 22 0 F78
PVXCOPY1 SD 22 F78 F78
PVXCOPY2 SD 22 1EF0 F78
READY
END
-
- Similar Topics
- Replies
- Views
- Last post
-
-
How I am able to assemble an SMP/E module from ASSEM entry
by futohomok » Thu Mar 14, 2024 2:32 pm » in System programming - 0
- 2963
-
by futohomok
View the latest post
Thu Mar 14, 2024 2:32 pm
-
-
-
Find the version of a cobol program through its load module
by vinigim » Fri Oct 30, 2020 3:16 am » in IBM Cobol - 5
- 5136
-
by chaat
View the latest post
Sat Nov 07, 2020 8:40 am
-
-
- 12
- 3856
-
by RalphEagle
View the latest post
Fri Jul 30, 2021 1:00 pm
-
- 4
- 6130
-
by steve-myers
View the latest post
Sat May 15, 2021 1:58 am
-
-
How can I copy message queue files (LGMSG,SHMSG) in V9R1
by futohomok » Thu Jul 27, 2023 5:54 pm » in IMS DB/DC - 6
- 2036
-
by futohomok
View the latest post
Thu Aug 03, 2023 1:21 pm
-