View previous topic :: View next topic
Author
Message
Yugaswaroopini New User Joined: 21 Dec 2007Posts: 10 Location: India
Hi,
I have requirement in which i need to copy selected member names [names only and not the content] from a PDS into a PS. I understood that IEBPTPCH utility can copy all the members along with the contents in a ps.
Can anybody help me to copy only selected member names [names only and not the content] from a PDS into a PS.
Thanks.
Back to top
expat Global Moderator Joined: 14 Mar 2007Posts: 8797 Location: Welsh Wales
If all you want is a list of the members in a PDS, try IEHLIST and edit the output to your requirements.
Back to top
Escapa Senior Member Joined: 16 Feb 2007Posts: 1399 Location: IL, USA
or this using REXX
Code:
X = OUTTRAP("MEMLST.")
"LISTDS '"SRCPDS"' MEMBERS"
X = OUTTRAP("OFF")
Back to top
Yugaswaroopini New User Joined: 21 Dec 2007Posts: 10 Location: India
@ Expat:
Kindly provide an example.
Back to top
expat Global Moderator Joined: 14 Mar 2007Posts: 8797 Location: Welsh Wales
@Yugaswaroopini
Kindly RTFM / STFW
Back to top
Escapa Senior Member Joined: 16 Feb 2007Posts: 1399 Location: IL, USA
expat wrote:
@Yugaswaroopini
STFW
Or just the forum also.
@Yugaswaroopini
There are several example at this forum for the same. You got the keyword with you given by expat. What more you want. You are a hit away from the solution.
Back to top
V S Amarendra Reddy Active User Joined: 13 Sep 2006Posts: 216 Location: USA
Try this JCL: Assumed 80 bytes record length and FB as record format.
Code:
//S1 EXEC PGM=IKJEFT01
//SYSTSPRT DD DSN=&&T1,DISP=(,PASS),SPACE=(TRK,(1,1),RLSE),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0)
//SYSTSIN DD *
LISTDS 'dataset' MEM
/*
//SORT EXEC PGM=ICEMAN,COND=(0,NE)
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=&&T1,DISP=(OLD,PASS)
//SORTOUT DD DSN=output dataset,DCB=(RECFM=FB,LRECL=80,BLKSIZE=0),
// SPACE=(TRK,(1,1),RLSE)
//SYSIN DD *
OPTION COPY,SKIPREC=8
OUTFIL BUILD=(3,8,80:X),OMIT=(1,2,CH,NE,C' ')
/*
Back to top
enrico-sorichetti Superior Member Joined: 14 Mar 2007Posts: 10873 Location: italy
why not search the forums,
the issue has been discussed so many times that has become quite boring
Back to top
Anil Kumar Govindula New User Joined: 06 Aug 2008Posts: 9 Location: India
Try this:
Code:
//STEP1 EXEC PGM=IEBPTPCH
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=TEST.INPUT.PDS,DISP=SHR
//SYSUT2 DD DSN=TEST.OUTPUT.PS1,DISP=SHR
//SYSIN DD *
PUNCH TYPORG=PO
/*
//STEP2 EXEC PGM=EZTPA00
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSSNAP DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//EZTVFM DD UNIT=SYSALLDA,SPACE=(CYL,(100,100),RLSE)
//FILEIN1 DD DSN=TEST.OUTPUT.PS1,DISP=SHR
//FILE0T1 DD DSN=TEST.OUTPUT.PS2,DISP=SHR
//SYSIN DD *
FILE FILEIN1
FI1-DESC 02 11 A
FI1-SPACE 13 02 A
FI1-MEMNAME 15 08 A
FILE FILEOT1
FO1-MEMNAME 01 08 A
JOB INPUT(FILEIN1)
PERFORM READ-WRITE
STOP
READ-WRITE.PROC
DO WHILE (NOT EOF FILEIN1)
IF FI1-DESC EQ 'MEMBER NAME'
FO1-MEMNAME EQ FI1-MEMNAME
PUT FILEOT1
END-IF
GO TO JOB
END-DO
END-PROC
/*
Back to top
Escapa Senior Member Joined: 16 Feb 2007Posts: 1399 Location: IL, USA
Anil Kumar Govindula, Its too complicated than required.
And not everybody will have Ezytrieve
Back to top
GaganGarg Active User Joined: 31 Mar 2010Posts: 134 Location: India
Hi,
U can use the following JCL:
Code:
//IKJEFT01 EXEC PGM=IKJEFT01
//SYSTSPRT DD DSN=&&LIST1,
// DISP=(NEW,PASS,DELETE),
// SPACE=(TRK,(5,5),RLSE),
// DCB=(RECFM=FB,LRECL=80)
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSTSIN DD *
LISTDS 'OPERA12.XXXX.JCLLIB' MEMBERS
/*
//***********************************************************
//ICETL EXEC PGM=ICETOOL,COND=(0,LT)
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=&&LIST1,DISP=SHR
//OUT DD DSN=&&LIST2,DISP=(NEW,PASS,DELETE),
// SPACE=(CYL,(9,9),RLSE),
// DCB=(LRECL=80,RECFM=FB)
//OUT2 DD DSN=OPERA12.XXXX.MEMBER.LIST,DISP=SHR
//TOOLIN DD *
COPY FROM(IN) USING(LIST)
COPY FROM(OUT) TO(OUT2) USING(BULD)
/*
//LISTCNTL DD *
OPTION COPY
INREC IFTHEN=(WHEN=GROUP,
BEGIN=(1,11,CH,EQ,C'--MEMBERS--'),
END=(1,5,CH,EQ,C'READY'),
PUSH=(65:SEQ=4))
OUTFIL FNAMES=OUT,REMOVECC,
INCLUDE=(65,4,FS,EQ,NUM,AND,
(1,11,CH,NE,C'--MEMBERS--',AND,1,5,CH,NE,C'READY')),
BUILD=(1:3,8,80:X)
/*
//BULDCNTL DD *
INCLUDE COND[color=red]=(1,4,SS,EQ,C'ITMP')[/color]
/*
Highlighted Text will help you to select the particular members.
Get back to me in case of any problem.
Back to top
enrico-sorichetti Superior Member Joined: 14 Mar 2007Posts: 10873 Location: italy
please learn to use the code tag...
it will preserve the alignment
and makes things jcl/code easier to understand
Back to top
GaganGarg Active User Joined: 31 Mar 2010Posts: 134 Location: India
I just copy pasted the text, automatically it gets converted to mainframe screenshot. sorry for the inconvenience.
@ Yugaswaroopini
Code:
INCLUDE COND=(1,4,SS,EQ,C'ITMP')
This option will let you to copy the desired members. Hope u canget this, otherwise revert back if you face any problem
Thanks
Back to top
enrico-sorichetti Superior Member Joined: 14 Mar 2007Posts: 10873 Location: italy
Clicking on the Code button
it will enclose the selected text with the tags
if no selection is present
the first click will insert the opening [ code ] tag
after You have entered some text
a second click will insert the closing [ /code ]
using the preview button it will show how the message will look like
Back to top
Please enable JavaScript!