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
 

 

Editing dataset inside JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
aurora58

New User


Joined: 02 Aug 2005
Posts: 2

PostPosted: Tue Aug 02, 2005 8:34 pm    Post subject: Editing dataset inside JCL
Reply with quote

hi,

I need to know if we can edit a dataset in the same JCL where it is being created and populated and How. This is a sequential dataset and there is some possible corruption of data in it which I want to delete.
Is there any way other than the File Aid.
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4649
Location: Raleigh, NC, USA

PostPosted: Wed Aug 03, 2005 12:21 am    Post subject: Re: Editing dataset inside JCL
Reply with quote

- you could write a script to call the TSO EDIT editor and take a series of whatever steps you need.

- you could start TSO and ISPF services and invoke the ISPF EDIT editor along with an EDIT macro.

- you could use IDCAMS or DFSORT to update or delete or identify particular records based on some criteria.
Back to top
View user's profile Send private message
die7nadal

Active User


Joined: 23 Mar 2005
Posts: 156

PostPosted: Wed Aug 03, 2005 12:21 am    Post subject:
Reply with quote

U can do a host of things to edit a file write a program in any language like COBOL, C...or tools like SORT,IEBGENER. But it depends on what and how u want to edit. If you want to access the DS in the same Job then code the DISP status as SHR to share or MOD,OLD for exclusive access
Back to top
View user's profile Send private message
aurora58

New User


Joined: 02 Aug 2005
Posts: 2

PostPosted: Wed Aug 03, 2005 2:48 pm    Post subject: Re: Editing dataset inside JCL
Reply with quote

Thanks for the reply. I at least have a clue as to where to be banging my head after this.

As for your questions, the data that i am talking about has some characters that are not being recognised by the systema nd are then represented as undefined characters. This file is then sent across places where it may be picked up by the Oracle server which then rejects this file because of these characters. I have to get rid of these characters.

Can I burden you with giving me a small batch job example to handle this edit.

Thanks anyway...you have been very helpful
Back to top
View user's profile Send private message
rajakumar10

New User


Joined: 03 Aug 2005
Posts: 12

PostPosted: Wed Aug 03, 2005 4:19 pm    Post subject:
Reply with quote

Is it any particular field/column you have problem with?
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4649
Location: Raleigh, NC, USA

PostPosted: Wed Aug 03, 2005 7:56 pm    Post subject: Re: Editing dataset inside JCL
Reply with quote

aurora58, you wanted a sample EDIT job:
Code:

//STEP0001 EXEC PGM=IEFBR14                                           
//DD1      DD   DSN=&SYSUID..MYTEST.DATA,DISP=(MOD,DELETE,DELETE),   
//         UNIT=SYSDA,SPACE=(CYL,(1,0))                               
//*                                                                   
//STEP0002 EXEC PGM=ICEGENER                                         
//SYSUT1   DD   *                                                     
THIS IS TEST RECORD 01 OF 10 @@@@@@@@                                 
THIS IS TEST RECORD 02 OF 10 @@@@@@@@                                 
THIS IS TEST RECORD 03 OF 10 ########                                 
THIS IS TEST RECORD 04 OF 10 ########                                 
THIS IS TEST RECORD 05 OF 10 ========                                 
THIS IS TEST RECORD 06 OF 10 ========                                 
THIS IS TEST RECORD 07 OF 10 @@@@@@@@                                 
THIS IS TEST RECORD 08 OF 10 @@@@@@@@                                 
THIS IS TEST RECORD 09 OF 10 ########                                 
THIS IS TEST RECORD 10 OF 10 $$$$$$$$                                 
/*                                                                   
//SYSUT2   DD   DSN=&SYSUID..MYTEST.DATA,DISP=(,CATLG,DELETE),       
//         UNIT=SYSDA,SPACE=(CYL,(1,1))                               
//SYSPRINT DD   SYSOUT=*                                             
//SYSIN    DD   DUMMY                                                 
//*                                                         
//STEP0003 EXEC PGM=IKJEFT01                                 
//SYSTSPRT DD   SYSOUT=*                                     
//SYSTSIN  DD   *                                           
EDIT MYTEST DATA                                             
TOP                                                         
FIND '@@@@@@@@'                                             
CHANGE * '@@@@@@@@' ''                                       
TOP                                                         
FIND '@@@@@@@@'                                             
CHANGE * '@@@@@@@@' ''                                       
TOP                                                         
FIND '@@@@@@@@'                                             
CHANGE * '@@@@@@@@' ''                                       
TOP                                                         
FIND '@@@@@@@@'                                             
CHANGE * '@@@@@@@@' ''                                       
TOP                                                         
FIND '########'                                             
CHANGE * '########' ''                                       
TOP                                                         
FIND '########'                                             
CHANGE * '########' ''                   
TOP                                     
FIND '########'                         
CHANGE * '########' ''                   
END SAVE                                 
TOP                                     
FIND '$$$$$$$$'                         
CHANGE * '$$$$$$$$' ''                   
END SAVE                                 
/*                                       
//*                                     

Of course, the TSO EDIT functions could be scripted.
Back to top
View user's profile Send private message
vinu

New User


Joined: 03 Jul 2005
Posts: 9

PostPosted: Thu Aug 04, 2005 7:04 pm    Post subject: Re: Editing dataset inside JCL
Reply with quote

what functions can be done with the tool ICEGENER you have used in that JCL ?

I want to know some basics about many utilities.

Pls help,

vinu
Back to top
View user's profile Send private message
Prandip

New User


Joined: 04 Mar 2005
Posts: 85
Location: In my tiny cubicle ...

PostPosted: Sat Aug 06, 2005 1:53 am    Post subject: Re: Editing dataset inside JCL
Reply with quote

Take a look at this IBM bulletin:

http://www-1.ibm.com/servers/storage/support/software/sort/mvs/beyond_sorting/online/srtmbgen.html
Back to top
View user's profile Send private message
vijayamadhuri

Active User


Joined: 06 Apr 2005
Posts: 180

PostPosted: Sat Aug 06, 2005 3:43 am    Post subject: Hi,
Reply with quote

In THE JCL go the step where the dataset name is used and hightlight it and type E on the command prompt.
The datset will be open in the edit mode.U can make all the changes u need,save it and submit the job the job will run with the new data.
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 Browse dataset cvnlynn CLIST & REXX 4 Tue Jul 18, 2017 3:52 am
No new posts Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
No new posts LISTCAT on a dataset with symbolic pa... shreya19 JCL & VSAM 5 Fri Apr 07, 2017 5:43 pm
No new posts Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 7 Fri Mar 24, 2017 2:24 pm


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