View previous topic :: View next topic
|
Author |
Message |
Mr.Niceguy
New User
Joined: 16 Jun 2005 Posts: 63
|
|
|
|
Hi all,
I have a tape file in production which populated some wrong values. I just wanted to replace all wrongly populated value with my original values which are residing in particular column. I just tried with ICEMAN utility. I coded both source and destination file as same as follows. I just do not want to create a new file where I wanted to replace all the values in existing file itself.
STEP EXEC PGM=ICEMAN
//SORTIN DD DISP=SHR,DSN=SOURCE FILE
//SORTOUT DD DISP=SHR,DSN=SOURCE FILE
//SYSOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
OUTREC IFTHEN=(WHEN=(38,5,CH,EQ,C'SCFPS'),
OVERLAY=(38:C'BNDFP'))
/*
But it threw S513 error. where the TAPE File is in already open status. Please suggest me to if you people have any other way to replace the values in existing files.
Thanks alot. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
You can not do it like that. You MUST create a new file. |
|
Back to top |
|
|
Mr.Niceguy
New User
Joined: 16 Jun 2005 Posts: 63
|
|
|
|
Thanks Expat,
But this is working for ordinary DASD files. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Tape and DASD are two completely different animals. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi,
I can think of one option, get the file on DASD, use this DASD file as SORTIN for above SORT card, use UNIT=TAPEC for SORTOUT (put the SORTOUT on tape). |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
why copy the file to DASD ?
Gerry |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi,
Because if You use SORTIN & OUT with same name & file is on TAPE, then we cann't issue an 'open' to already open (SORTIN) TAPE file. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi Anuj,
the fact you mentioned UNIT=TAPEC, i took that as creating a new tape, hence I don't see the need to copy the file to DASD.
Gerry |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi Gerry,
I'm an application engineer, so what I know about TAPE files is through manuals or little experiment i can do with them in my shop. I don't usually deal with them, might be I'm wrong. However, for this thread I tried below test JOB:
Code: |
//STEP050 EXEC PGM=SORT,REGION=4096K
//*
//SORTIN DD DSN=HLQ.FIRST.FILE.TAPE,
// DISP=SHR
//SORTOUT DD DSN=HLQ.FIRST.FILE.TAPE,
// DISP=SHR,
// DSORG=PS,
// RECFM=FB,
// LRECL=80,
// BLKSIZE=0,
// DATACLAS=LARGE,
// UNIT=TAPEC
//SORTWK01 DD UNIT=SYSDA,SPACE=(CYL,(20,5))
//SYSIN DD *
OPTION COPY
OUTREC IFTHEN=(WHEN=(1,3,CH,EQ,C'111'),
OVERLAY=(1:C'XXX'))
/*
//SORTMSG DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//CEEDUMP DD SYSOUT=*
//* |
Both the files, SORTIN & SORTOUT have same Data Set Name & are on TAPE, the JOB got abended by S513 & so my previous posts comes in...
Please let me know Your thoughts on this. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi Anuj,
ok, I think we have established that you can't use the same cart in the same step ie. cannot be both an input and output file nor can we update in place without rewriting the entire file.
If the same output tape is required then what you have mentioned is correct. ie. copy the file and then use the copied file as input to copy to original tape.
All the parameters such as UNIT=TAPEC are not required.
Like I said earlier, the fact that UNIT=TAPEC was mentioned, I took it as creating a new tape ie. using a different VOL SER.
Sorry if I have made the issue more confusing.
Gerry |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
gcicchet wrote: |
Sorry if I have made the issue more confusing. |
No You don't, matter is rather clear to me now, not sure about TS though.. |
|
Back to top |
|
|
|