IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to change a value of a TAPE file in a particular column


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Mr.Niceguy

New User


Joined: 16 Jun 2005
Posts: 63

PostPosted: Mon Mar 10, 2008 4:43 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Mar 10, 2008 4:45 pm
Reply with quote

You can not do it like that. You MUST create a new file.
Back to top
View user's profile Send private message
Mr.Niceguy

New User


Joined: 16 Jun 2005
Posts: 63

PostPosted: Mon Mar 10, 2008 5:09 pm
Reply with quote

Thanks Expat,

But this is working for ordinary DASD files.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Mar 10, 2008 5:11 pm
Reply with quote

Tape and DASD are two completely different animals.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Mar 10, 2008 11:02 pm
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Tue Mar 11, 2008 5:29 am
Reply with quote

Hi,
why copy the file to DASD ?


Gerry
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Mar 11, 2008 6:29 am
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Tue Mar 11, 2008 6:49 am
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Mar 11, 2008 9:00 am
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Tue Mar 11, 2008 11:22 am
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Sun Mar 23, 2008 3:57 am
Reply with quote

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.. icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 3
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top