MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Picking limited members of a PDS among many in a PDS
Goto page Previous  1, 2
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
slade
Intermediate


Joined: 07 Feb 2003
Posts: 266
Topics: 1
Location: Edison, NJ USA

PostPosted: Wed Sep 03, 2003 1:31 am    Post subject: Reply with quote

Here's something I've used many times:

Start w/something like the following (Note that the "X"s should be in col 72).
Code:

    //***********************************************
    //STEPCPY  EXEC PGM=IEBCOPY,REGION=4M

    //SYSUT1    DD DISP=SHR,DSN=AC.PROD.PROCLIB
    //SYSUT2    DD DISP=SHR,DSN=JSLEIG.TEST.COBOL
    //SYSPRINT  DD SYSOUT=*
    //SYSIN     DD *
      COPY     INDD=SYSUT1,OUTDD=SYSUT2
      SELECT   MEMBER=        ,            X
                              ,            X

Then take your member list and line up the 1st letter of the member name immediately after the '=' of "MEMBER=" above. You'll have something like this:

    //***********************************************
    //STEPCPY  EXEC PGM=IEBCOPY,REGION=4M

    //SYSUT1    DD DISP=SHR,DSN=AC.PROD.PROCLIB
    //SYSUT2    DD DISP=SHR,DSN=JSLEIG.TEST.COBOL
    //SYSPRINT  DD SYSOUT=*
    //SYSIN     DD *
      COPY     INDD=SYSUT1,OUTDD=SYSUT2
      SELECT   MEMBER=        ,             X
                      MEMBER1
                      MBR2
                      MEMBR3
                      MEM4
                      ETC
                              ,             X
                           
Now you use ISPF line cmds to create a syntactically correct SYSIN file.
I'll use cols 1&2 to illustrate the cmds used.

1) Move "MEMBER1" into the SELECT stmt:

m     SELECT   MEMBER=        ,             X
o                     MEMBER1

This results in:

      SELECT   MEMBER=MEMBER1 ,             X

Don't worry about the trailing spaces in the member name. They get fixed later.

2) Now move the comma/X line to all the members but the last:

oo                    MBR2
                      MEMBR3
oo                    MEM4 
m                             ,             X

This replicates the comma/X line in the three member lines and they look like this:

                      MBR2    ,             X
                      MEMBR3  ,             X
                      MEM4    ,             X

Now SYSIN looks like:

      SELECT   MEMBER=MEMBER1 ,             X
                      MBR2    ,             X
                      MEMBR3  ,             X
                      MEM4    ,             X
                      ETC

All that's required now is to somehow get rid of the spaces before the comma.

You do that by labeling the line containing the 1st member name as ".a" and the line containing the last comma as ".b". Then type this on the cmd line:

c all ' ,' ', ' .a .b

as may times as required to delete all those spaces (you should get an error msg when there are none left).

This leaves you with:

    //***********************************************
    //STEPCPY  EXEC PGM=IEBCOPY,REGION=4M

    //SYSUT1    DD DISP=SHR,DSN=AC.PROD.PROCLIB
    //SYSUT2    DD DISP=SHR,DSN=JSLEIG.TEST.COBOL
    //SYSPRINT  DD SYSOUT=*
    //SYSIN     DD *
      COPY     INDD=SYSUT1,OUTDD=SYSUT2
      SELECT   MEMBER=MEMBER1,              X
                      MBR2,                 X
                      MEMBR3,               X
                      MEM4,                 X
                      ETC

Simple, huh? Mr. Green
Actually, it takes longer to explain than to do. Just don't forget the "X" in col 72.

Regards, Jack.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12399
Topics: 75
Location: San Jose

PostPosted: Wed Sep 03, 2003 5:46 am    Post subject: Reply with quote

Jack,

You can simply code SELECT for every member and by coding so you don't have to worry about the comma as well as the X in the 72 column.My posted solution is generating the SELECT statements for all the members

If it was to be done with ISPF commands , I would block all the member name list with XX and use the following command

Code:

 c  '  '  'SELECT MEMBER=' X 2 ALL



kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
slade
Intermediate


Joined: 07 Feb 2003
Posts: 266
Topics: 1
Location: Edison, NJ USA

PostPosted: Wed Sep 03, 2003 2:35 pm    Post subject: Reply with quote

kolusu,

Yeah, I saw that AFTER I submitted my post (you hadn't posted when I started Confused ). I always saw the "comma" approach and assumed that was the only way to do it. It's good to know there's a simpler way. Thanx.

BTW, I prefer the "overlapped move" approach to propagating the
SELECT MEMBER= to all members being moved.
Code:

m          SELECT MEMBER=
oo                       MEMBER1
                         MEMBER2
                            .
                            .
                            .
oo                       MEMBERn

Jack
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group