|
|
| Author |
Message |
pravi_1985
New User
Joined: 02 Sep 2006 Posts: 14 Location: Chennai
|
|
|
|
Hi,
Can someone guide me how to download a dataset, replcae a word in the dataset & again reload the datset into the program, all using JCL program. Can the replcaing be done by DFSORT ? please help me out. |
|
| Back to top |
|
 |
References
|
|
 |
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1184 Location: Chennai - India
|
|
|
|
Pravi,
Welcome to the forums.
| Quote: |
| Can the replcaing be done by DFSORT ? |
Yes.
What data do you want to replace and with what? Explain your requirement clearly. |
|
| Back to top |
|
 |
Moved: Tue Aug 19, 2008 12:20 pm by superk From JCL to DFSORT/ICETOOL |
Anuj D.
Global Moderator
Joined: 22 Apr 2006 Posts: 2241 Location: Mumbai, India
|
|
|
|
Hi,
| pravi_1985 wrote: |
| Can someone guide me how to download a dataset, replcae a word in the dataset & again reload the datset into the program, |
What does "download/reload" mean here ? Are you trying to get the DSN on "notepad" & then a replace ?
| Quote: |
| all using JCL program. |
It's contradictory, JCL is not a "program"..  |
|
| Back to top |
|
 |
pravi_1985
New User
Joined: 02 Sep 2006 Posts: 14 Location: Chennai
|
|
|
|
Hello Aaru,
Thanks for responding. I have few statements in the DSN say PRAVI.CNTL.JCL. 'RACF' is the word appearing in all those statements. I need to replace it by 'ACF2'. Can I do this by using DFSORT ?? If yes, then can you please give me the code.  |
|
| Back to top |
|
 |
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1184 Location: Chennai - India
|
|
|
|
Pravi,
| Quote: |
| I have few statements in the DSN say PRAVI.CNTL.JCL. |
How does your input file look like? Does it have DSN names in all the records?
You can use the FINDREP function of DFSORT to find and replace. Check if the PTF UK90013 is available. |
|
| Back to top |
|
 |
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 3564 Location: Brussels once more ...
|
|
|
|
| Have you considered using an ISPF macro, which has been suggested for the same question in the past, and there are a few good examples on the forum that I have seen. |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Moderator
Joined: 15 Feb 2005 Posts: 4621 Location: San Jose, CA
|
|
|
|
Pravi,
If you want to replace every occurrence of 'RACF' anywhere in your records with 'ACF2', you can use DFSORT's new FINDREP function available with z/OS DFSORT V1R5 PTF UK90013 (July, 2008). Assuming you want to replace the records in the original data set, you can use a DFSORT/ICETOOL job like this:
| Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=PRAVI.CNTL.JCL,DISP=SHR
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//OUT DD DSN=PRAVI.CNTL.JCL,DISP=OLD
//TOOLIN DD *
COPY FROM(IN) TO(T1) USING(CTL1)
COPY FROM(T1) TO(OUT)
/*
//CTL1CNTL DD *
OPTION COPY
INREC FINDREP=(IN=C'RACF',OUT=C'ACF2')
/*
|
Check the following to determine if you have the July, 2008 PTF:
http://ibmmainframes.com/viewtopic.php?t=33389
If you don't have z/OS DFSORT V1R5 PTF UK90013, ask your System Programmer to install it (it's free).
For complete details on the new FINDREP function and the other new functions available with PTF UK90013, see:
www.ibm.com/systems/support/storage/software/sort/mvs/ugpf/ |
|
| Back to top |
|
 |
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 670
|
|
|
|
Hi Frank,
are you saying you can now update PDS libraries without specifying the member names in the JCL ?
I can't test the new function FINDREP as it has not been installed.
Gerry |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Moderator
Joined: 15 Feb 2005 Posts: 4621 Location: San Jose, CA
|
|
|
|
| Quote: |
| are you saying you can now update PDS libraries without specifying the member names in the JCL ? |
Huh? No. Where did I say that? I assumed the OP was asking about a PS data set, not a PDS. I read through the OP's notes again and I don't see any mention of a PDS. As previously, DFSORT can operate on a PDS(member), but not on all the members of a PDS at once. |
|
| Back to top |
|
 |
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 670
|
|
|
|
Hi Frank,
you are right, you didn't say it but I was basing it on the dataset name, usually CNTL names pertain to PDS and JCl is usually maintained in a PDS, that's why I asked.
I should have worded it differently.
Gerry |
|
| Back to top |
|
 |
pravi_1985
New User
Joined: 02 Sep 2006 Posts: 14 Location: Chennai
|
|
|
|
sorry for the delay, but to be more specific, here are the specifications
Organization . . . : PS
Record format . . . : FB
Record length . . . : 178
Block size . . . . : 27946
A12345.TTRI.DATA.UDBB05M.UDBT48.UNLOAD is the name & JFCMMAP has to be replaced by JFC01AP. Can I even now, use the same program you gave me above ? Sorry to bug so much but I have started my career recently.............  |
|
| Back to top |
|
 |
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1184 Location: Chennai - India
|
|
|
|
Pravi,
| Quote: |
| Can I even now, use the same program you gave me above ? |
Yes, with few modifications.
DD name IN should have your input dataset. and the new FINDREP should be as shown below.
| Code: |
INREC FINDREP=(IN=C'JFCMMAP',OUT=C'JFC01AP')
|
First check if you are able to use the FINDREP fucntion as it was recently introduced. |
|
| Back to top |
|
 |
pravi_1985
New User
Joined: 02 Sep 2006 Posts: 14 Location: Chennai
|
|
|
|
| Code: |
| COPY FROM(IN) TO(T1) USING(CTL1) |
what is CTL1 ??
is this statement correct as I am facing erros..... Can this be done in any other manner without using FINDREP ?? |
|
| Back to top |
|
 |
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1184 Location: Chennai - India
|
|
|
|
Pravi,
It is the first four characters of the DFSORT control dataset which is CTL1CNTL in your case.
| Quote: |
| is this statement correct as I am facing erros..... |
Yeah, its correct. What issues are you facing?? POst the errors.
| Quote: |
| Can this be done in any other manner without using FINDREP ?? |
Post the errors and then look for alternate solutions. |
|
| Back to top |
|
 |
pravi_1985
New User
Joined: 02 Sep 2006 Posts: 14 Location: Chennai
|
|
|
|
| Code: |
//SORPRAV1 JOB ,,
// CLASS=I,MSGCLASS=X,
//* COND=(4,LT),
//* USER=Z430808,
// NOTIFY=????????,MSGLEVEL=(1,1),REGION=0M,
// TIME=1440,LINES=(999999,WARNING)
//PROCLIB JCLLIB ORDER=(ICFS.IR3I.PROCLIB)
//STD1 OUTPUT FORMS=UU01,CLASS=J,JESDS=ALL,DEFAULT=YES
//*****************************************
//*DELETE THE FILES IF ALREADY EXISTING
//*****************************************
//BB05M020 EXEC PGM=IEFBR14
//DD1 DD DSN=U019715.IR3I.DATA.UDBB05M.UDBT48.UNLOAD,
// DISP=(MOD,DELETE,DELETE),SPACE=(TRK,1)
//DD2 DD DSN=U019715.IR3I.DATA.UDBB05M.UDBT48.CNTL,
// DISP=(MOD,DELETE,DELETE),SPACE=(TRK,1)
//*****************************************
//*UNLOAD THE DATA
//*****************************************
//BB05M030 EXEC PGM=IKJEFT01
//STEPLIB DD DISP=SHR,DSN=DB2.DEV.RUNLIB.LOAD
//SYSPRINT DD SYSOUT=(,),OUTPUT=(*.STD1)
//UTPRINT DD SYSOUT=(,),OUTPUT=(*.STD1)
//SYSUDUMP DD DUMMY
//SYSTSPRT DD SYSOUT=(,),OUTPUT=(*.STD1)
//SYSTSIN DD *
DSN SYSTEM(DSND)
RUN PROGRAM (DSNTIAUL) -
PLAN (DSNTIAUL) PARMS('SQL')
END
//SYSREC00 DD DSN=U019715.IR3I.DATA.UDBB05M.UDBT48.UNLOAD,
// UNIT=(SYSDA,3),SPACE=(TRK,(1000,1000),RLSE),
// DISP=(NEW,CATLG,DELETE)
//SYSPUNCH DD DSN=U019715.IR3I.DATA.UDBB05M.UDBT48.CNTL,
// SPACE=(TRK,(1,1),RLSE),
// UNIT=SYSDA,
// DISP=(NEW,CATLG,DELETE)
//SYSIN DD *
SELECT * FROM ICD88DBA.JFCA6300;
//*****************************************
//*REPLCAING THE VALUES
//*****************************************
//FINDREPL EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=U019715.IR3I.DATA.UDBB05M.UDBT48.UNLOAD,DISP=SHR
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//OUT DD DSN=U019715.IR3I.DATA.UDBB05M.UDBT48.UNLOAD,DISP=OLD
//TOOLIN DD *
COPY FROM(IN) TO(T1) USING(CTL1)
COPY FROM(T1) TO(OUT)
//CTL1CNTL DD *
OPTION COPY
INREC FINDREP=(IN=C'JFCMMAP',OUT=C'JFC01AP')
/*
|
Above is my JCL ..............
[img]
SORPRAV1 FINDREPL - STEP WAS EXECUTED - COND CODE 0016
A12345.SORPRAV1.JOB63443.D0000108.? SYSOUT
A12345.SORPRAV1.JOB63443.D0000109.? SYSOUT
A12345.IR3I.DATA.UDBB05M.UDBT48.UNLOAD RETAINED, DDNAME=IN
A12345.IR3I.DATA.UDBB05M.UDBT48.UNLOAD RETAINED, DDNAME=OUT
A12345.SORPRAV1.JOB63443.D0000103.? SYSIN
A12345.SORPRAV1.JOB63443.D0000104.? SYSIN
STEP/FINDREPL/START 2008233.0533
STEP/FINDREPL/STOP 2008233.0533 CPU 0MIN 00.01SEC SRB 0MIN 00.00S
F40F ALLOCATED TO SYS00001
SYS08233.T053304.RA000.SORPRAV1.R0155702 KEPT
VOL SER NOS= STMP02.
SYS08233.T053243.RA000.SORPRAV1.T1.H01 DELETED, DDNAME=T1
JOB/SORPRAV1/START 2008233.0532
JOB/SORPRAV1/STOP 2008233.0533 CPU 0MIN 00.07SEC SRB 0MIN 00.00S
[/img]
this is the spool result................
can you please check & help me out ?? |
|
| Back to top |
|
 |
|
|
|