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

How to copy the member names of a pds into a ps


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Yugaswaroopini

New User


Joined: 21 Dec 2007
Posts: 10
Location: India

PostPosted: Mon May 10, 2010 2:50 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Mon May 10, 2010 3:03 pm
Reply with quote

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
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Mon May 10, 2010 3:10 pm
Reply with quote

or this using REXX
Code:


X = OUTTRAP("MEMLST.")         
"LISTDS '"SRCPDS"' MEMBERS"   
X = OUTTRAP("OFF")             
Back to top
View user's profile Send private message
Yugaswaroopini

New User


Joined: 21 Dec 2007
Posts: 10
Location: India

PostPosted: Mon May 10, 2010 3:42 pm
Reply with quote

@ Expat:

Kindly provide an example.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Mon May 10, 2010 3:55 pm
Reply with quote

@Yugaswaroopini

Kindly RTFM / STFW
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Mon May 10, 2010 4:01 pm
Reply with quote

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
View user's profile Send private message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 216
Location: USA

PostPosted: Mon May 10, 2010 4:02 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Mon May 10, 2010 4:06 pm
Reply with quote

why not search the forums,
the issue has been discussed so many times that has become quite boring
Back to top
View user's profile Send private message
Anil Kumar Govindula

New User


Joined: 06 Aug 2008
Posts: 9
Location: India

PostPosted: Mon May 10, 2010 4:27 pm
Reply with quote

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
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Mon May 10, 2010 4:29 pm
Reply with quote

Anil Kumar Govindula, Its too complicated than required.
And not everybody will have Ezytrieve
Back to top
View user's profile Send private message
GaganGarg

Active User


Joined: 31 Mar 2010
Posts: 134
Location: India

PostPosted: Mon May 10, 2010 5:16 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Mon May 10, 2010 5:19 pm
Reply with quote

please learn to use the code tag...
it will preserve the alignment
and makes things jcl/code easier to understand
Back to top
View user's profile Send private message
GaganGarg

Active User


Joined: 31 Mar 2010
Posts: 134
Location: India

PostPosted: Mon May 10, 2010 5:36 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Mon May 10, 2010 5:43 pm
Reply with quote

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
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts Need COBOL COPY Help in MVS Environment COBOL Programming 4
No new posts Issue after ISPF copy to Linklist Lib... TSO/ISPF 1
No new posts DB2 Table - Image copy unload IBM Tools 2
No new posts How to copy the -1 version of a membe... TSO/ISPF 4
Search our Forums:

Back to Top