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

ISPF Edit commands in batch


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Thu Jan 29, 2009 3:28 pm
Reply with quote

Hi all,

I wanted to issue ISPF Edit CHANGE command through IKJEFT01 on a PS.

But I was unable to run it fine.

GNANAS.PS.OLD is the target PS and it has a record with AAA SNG.

I ran some tests and didnot get the results.

Please look up these and let me know where I am wrong.

Code:
//STEP10   EXEC PGM=IKJEFT01   
//SYSTSPRT DD   SYSOUT=*       
//SYSTSIN  DD   *             
EDIT 'GNANAS.PS.OLD' TEXT NONUM 
TOP                           
C ALL 'AAA' 'GNA'             
END SAVE                       
/*               
             
-------------  SYS OUT  ------------------

1READY                                 
 EDIT 'GNANAS.PS.OLD' TEXT NONUM         
 EDIT                                   
 TOP                                   
 C ALL 'AAA' 'GNA'                     
 IKJ56712I INVALID KEYWORD, A'         
 IKJ56712I INVALID KEYWORD, 'GNA'       
 END SAVE                               
 READY                                 
 END 


Code:
//STEP10   EXEC PGM=IKJEFT01     
//SYSTSPRT DD   SYSOUT=*         
//SYSTSIN  DD   *               
EDIT 'GNANAS.PS.OLD' TEXT NONUM   
TOP                             
C ALL AAA GNA                   
END SAVE                         
/*                               

-------------  SYS OUT  ------------------

1READY                                   
 EDIT 'GNANAS.PS.OLD' TEXT NONUM           
 EDIT                                   
 TOP                                     
 C ALL AAA GNA                           
 IKJ56712I INVALID KEYWORD, GNA         
 END SAVE                               
 READY                                   
 END           


Code:
//STEP10   EXEC PGM=IKJEFT01         
//SYSTSPRT DD   SYSOUT=*             
//SYSTSIN  DD   *                   
EDIT 'GNANAS.PS.OLD' TEXT NONUM       
TOP                                 
C ALL SNG GNA                       
END SAVE                             
/*       

-------------  SYS OUT  ------------------
                           
1READY                                     
 EDIT 'GNANAS.PS.OLD' TEXT NONUM             
 EDIT                                       
 TOP                                       
 C ALL SNG GNA                             
 IKJ52506I TEXT NOT FOUND                   
 END SAVE                                   
 READY                                     
 END         


Code:
//STEP10   EXEC PGM=IKJEFT01                 
//SYSTSPRT DD   SYSOUT=*                     
//SYSTSIN  DD   *                           
EDIT 'GNANAS.PS.OLD' TEXT NONUM               
TOP                                         
C ALL 'SNG' 'GNA'                           
END SAVE                                     
/*           
                               
-------------  SYS OUT  ------------------

1READY                                 
 EDIT 'GNANAS.PS.OLD' TEXT NONUM         
 EDIT                                 
 TOP                                   
 C ALL 'SNG' 'GNA'                     
 IKJ52506I TEXT NOT FOUND             
 END SAVE                             
 READY                                 
 END     
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Thu Jan 29, 2009 3:34 pm
Reply with quote

You need to do it using an ISPF edit macro.

I think that the edit macro manual is one available from the IBM manuals button at the top of the page.
Back to top
View user's profile Send private message
lohithegde

New User


Joined: 18 May 2008
Posts: 31
Location: Chennai

PostPosted: Thu Jan 29, 2009 3:40 pm
Reply with quote

Hi

1.Write "Change ALL" command in EDIT macro
2.Write a JCl to call that edit macro
i don't think you can run "C ALL" command in JCL, But you can use DFSORT techniques to achieve the same
Regards
Lohit
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Thu Jan 29, 2009 3:54 pm
Reply with quote

lohithegde wrote:
Hi
1.Write "Change ALL" command in EDIT macro
2.Write a JCl to call that edit macro
i don't think you can run "C ALL" command in JCL, But you can use DFSORT techniques to achieve the same
Regards
Lohit

If you say that you can not run a "C ALL" command in batch, why have you suggested doing it ?

You CAN do this either online or in batch, as I have done so many times.
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Thu Jan 29, 2009 4:13 pm
Reply with quote

Hi,

This works for me.
Code:
C 'AAA' 'GNA' ALL


Even, this will work
Code:
C * 99999999 =AAA=GNA= ALL


Please visit these two links.
www.ibmmainframes.com/about29457.html
ibmmainframes.com/viewtopic.php?t=14500

Thanks for your replies. icon_smile.gif
Back to top
View user's profile Send private message
lohithegde

New User


Joined: 18 May 2008
Posts: 31
Location: Chennai

PostPosted: Thu Jan 29, 2009 4:24 pm
Reply with quote

Hi

Thaks for carrecting me,,We can run C ALL COMMAND using JCL also

Regards
Lohit
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Thu Jan 29, 2009 5:54 pm
Reply with quote

Lohit,

You're welcome. Have a good day... icon_biggrin.gif
Back to top
View user's profile Send private message
giraffe

New User


Joined: 09 Nov 2010
Posts: 27
Location: SHENZHEN CHINA

PostPosted: Fri Nov 18, 2011 6:13 pm
Reply with quote

Gnana Sekaran Nallathambi wrote:
Hi,

This works for me.
Code:
C 'AAA' 'GNA' ALL


Even, this will work
Code:
C * 99999999 =AAA=GNA= ALL


Please visit these two links.
www.ibmmainframes.com/about29457.html
ibmmainframes.com/viewtopic.php?t=14500

Thanks for your replies. icon_smile.gif


When I use this method to replace strings in my pds member, I can only change the first one, any one knows the reason?

I've tried these below:

F 'XXXX'
C 'XXXX' 'YYYY' ALL

C * 999 'XXXX' 'YYYY'

Neither of them work, I'm really confused.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Nov 18, 2011 6:36 pm
Reply with quote

When you want to ask a new question, start a new topic please.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Fri Nov 18, 2011 6:44 pm
Reply with quote

As we have absolutely no idea of what you are trying to do and how you are doing it just telling us it doesn't work is so very helpfull.

WOW so much information in so short a post
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Sat Nov 19, 2011 12:18 am
Reply with quote

I wrote a nice long explanation but clicked the wrong thing and lost it all. I am not going to retype it all. Look up the syntax of the Find/Change command then go figure why your last change command is a load of manure. Why your find/change method did not work I do not know as I was not looking over your shoulder at the time and you have not given any information except that it did not work. We are not psychic - especially on a Friday.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Sat Nov 19, 2011 2:30 am
Reply with quote

coders who don't make return code checks when returning from a function,
are a great source of business for me,
because their companies need someone (like me)
to clean-up the BS code.

i always code an 'if not equal to ok' (or the equivalent)
after each ispf function call,
with an output-msg ("RC=xx, abc_function_call")
and EXIT RUN-UNIT.

that way as i debug, i can add additional conditions to the 'IF'
until i have them all cleaned-up.
the stuff that runs 'pretty much always ok' never trips the 'IF',
otherwise i learn something new
plus i am able to debug my script/module.
Back to top
View user's profile Send private message
giraffe

New User


Joined: 09 Nov 2010
Posts: 27
Location: SHENZHEN CHINA

PostPosted: Tue Nov 29, 2011 7:05 pm
Reply with quote

Hi, I found C * 999 'XXXX' 'YYYY' ALL works well! icon_biggrin.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 Looking for a little history of ISPF ... TSO/ISPF 5
No new posts How to get a stack trace on a looping... ABENDS & Debugging 5
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
No new posts Adding QMF and SPUFI to the ISPF menu DB2 20
No new posts Help in Automating Batch JCL jobs mon... JCL & VSAM 3
Search our Forums:

Back to Top