View previous topic :: View next topic
|
Author |
Message |
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hello All,
I want to generate acl for retrieveing 500 elements
file1 :
RETRIEVE ELEMENT 'aaaaaaaa'
FROM ENVIRONMENT 'HOMEI'
SYSTEM 'HOME'
SUBSYSTEM 'AT'
TYPE 'CPYCOB'
STAGE 'I'
TO DSNAME 'A40661.£MENDV.SRC'
MEMBER 'aaaaaaaa'
File2:
KBOLME07
KBOLM022
I want outfile as
RETRIEVE ELEMENT 'KBOLME07'
FROM ENVIRONMENT 'HOMEI'
SYSTEM 'HOME'
SUBSYSTEM 'AT'
TYPE 'CPYCOB'
STAGE 'I'
TO DSNAME 'A40661.£MENDV.SRC'
MEMBER 'KBOLME07'
RETRIEVE ELEMENT 'KBOLM022'
FROM ENVIRONMENT 'HOMEI'
SYSTEM 'HOME'
SUBSYSTEM 'AT'
TYPE 'CPYCOB'
STAGE 'I'
TO DSNAME 'A40661.£MENDV.SRC'
MEMBER 'KBOLM022'
Please provide me the sort card to acheive this |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
Why use sort for this?
This looks more like something you'd achieve with recursive edit macro.
First, clear workspace, fetch and append member & edit for first entry in file 2, then repeat the fetch/append/edit until all entries in file 2 are done.
Garry. |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Garry,
I need to repeat it for thousands of element so want some quick way rather than manually doing it |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
I'm not suggesting doing it manually. I'd write a REXX/ISPF program to loop through file 2 reading in, from dataset,
Code: |
RETRIEVE ELEMENT 'aaaaaaaa'
FROM ENVIRONMENT 'HOMEI'
SYSTEM 'HOME'
SUBSYSTEM 'AT'
TYPE 'CPYCOB'
STAGE 'I'
TO DSNAME 'A40661.£MENDV.SRC'
MEMBER 'aaaaaaaa'
|
Write this to a work dataset and invoke an edit macro which will
Code: |
CHANGE ALL 'aaaaaaaa' parm |
Now, for each remaining item in file 2, append
Code: |
RETRIEVE ELEMENT 'aaaaaaaa'
FROM ENVIRONMENT 'HOMEI'
SYSTEM 'HOME'
SUBSYSTEM 'AT'
TYPE 'CPYCOB'
STAGE 'I'
TO DSNAME 'A40661.£MENDV.SRC'
MEMBER 'aaaaaaaa'
|
The EDIT MACRO will leave any existing changes in the work dataset as they are and just update the one just appended. At the end you have control cards for all the items in file2, regardless of how many.
Garry. |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hello Garry,
I am new to rexx tahts why request for sort card |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Ekta,
You can use a DFSORT job like this:
Code: |
//STEP01 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN= your.input.file2
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
OUTFIL BUILD=(C'RETRIEVE ELEMENT ''',1,8,C'''',/,
C'FROM ENVIRONMENT ''HOMEI''',/,
C'SYSTEM ''HOME''',/,
C'SUBSYSTEM ''AT''',/,
C'TYPE ''CPYCOB''',/,
C'STAGE ''I''',/,
C'TO DSNAME ''A40661.£MENDV.SRC''',/,
C'MEMBER ''',1,8,C'''')
|
|
|
Back to top |
|
|
|