Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: How to change a value of a TAPE file in a particular column
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: 8593
Location: Back in jolly old England

PostPosted: Mon Mar 10, 2008 4:45 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

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

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

Senior Member


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

PostPosted: Mon Mar 10, 2008 11:02 pm    Post subject:
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: 1703
Location: Australia

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

Hi,
why copy the file to DASD ?


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

Senior Member


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

PostPosted: Tue Mar 11, 2008 6:29 am    Post subject:
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: 1703
Location: Australia

PostPosted: Tue Mar 11, 2008 6:49 am    Post subject:
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

Senior Member


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

PostPosted: Tue Mar 11, 2008 9:00 am    Post subject:
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: 1703
Location: Australia

PostPosted: Tue Mar 11, 2008 11:22 am    Post subject:
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

Senior Member


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

PostPosted: Sun Mar 23, 2008 3:57 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts TAPE VERIFY utility?? MrExtraordinare JCL & VSAM 3 Fri Dec 09, 2016 10:57 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us