Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: How to copy the member names of a pds into a ps
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: 8593
Location: Back in jolly old England

PostPosted: Mon May 10, 2010 3:03 pm    Post subject:
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    Post subject:
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    Post subject: Reply to: How to copy the member names of a pds into a ps
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: 8593
Location: Back in jolly old England

PostPosted: Mon May 10, 2010 3:55 pm    Post subject:
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    Post subject:
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: 189
Location: INDIA

PostPosted: Mon May 10, 2010 4:02 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Mon May 10, 2010 4:06 pm    Post subject: Reply to: How to copy the member names of a pds into a ps
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    Post subject: might work with the below ezytrieve
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    Post subject:
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: 132
Location: India

PostPosted: Mon May 10, 2010 5:16 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Mon May 10, 2010 5:19 pm    Post subject: Reply to: How to copy the member names of a pds into a ps
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: 132
Location: India

PostPosted: Mon May 10, 2010 5:36 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Mon May 10, 2010 5:43 pm    Post subject: Reply to: How to copy the member names of a pds into a ps
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
No new posts Single COPY CICS TS datasets and when... Kyle Carroll CICS 2 Tue Oct 11, 2016 9:47 pm
No new posts dataset copy question - REPRO or some... atulxp TSO/ISPF 2 Wed Aug 03, 2016 10:56 pm
No new posts Variable for cursor names ravikumar15 DB2 5 Sun Jul 17, 2016 7:08 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us