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
 

 

ISPF Edit commands in batch

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

Active Member


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

PostPosted: Thu Jan 29, 2009 3:28 pm    Post subject: ISPF Edit commands in batch
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: 8593
Location: Back in jolly old England

PostPosted: Thu Jan 29, 2009 3:34 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Jan 29, 2009 3:54 pm    Post subject:
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: 788
Location: Chennai, India

PostPosted: Thu Jan 29, 2009 4:13 pm    Post subject:
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.
http://www.ibmmainframes.com/about29457.html
http://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    Post subject:
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: 788
Location: Chennai, India

PostPosted: Thu Jan 29, 2009 5:54 pm    Post subject:
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: 28
Location: SHENZHEN CHINA

PostPosted: Fri Nov 18, 2011 6:13 pm    Post subject:
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.
http://www.ibmmainframes.com/about29457.html
http://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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7306

PostPosted: Fri Nov 18, 2011 6:36 pm    Post subject: Reply to: ISPF Edit commands in batch
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: 8593
Location: Back in jolly old England

PostPosted: Fri Nov 18, 2011 6:44 pm    Post subject:
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: 1756
Location: UK

PostPosted: Sat Nov 19, 2011 12:18 am    Post subject:
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    Post subject:
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: 28
Location: SHENZHEN CHINA

PostPosted: Tue Nov 29, 2011 7:05 pm    Post subject: Reply to: ISPF Edit commands in batch
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    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 Batch job tuning sgandhla Testing & Performance analysis 0 Fri Mar 24, 2017 9:41 pm
No new posts MIPS/CPU consumption reduction in Batch vishwakotin DFSORT/ICETOOL 4 Sat Mar 18, 2017 5:46 pm
No new posts Customizing the ISPF HILITE Command Pedro TSO/ISPF 3 Fri Mar 03, 2017 11:49 pm
No new posts Mass comment and edit elixir1986 IBM Tools 3 Thu Mar 02, 2017 10:09 pm
No new posts ISPF - How to come out of ISPF Panel parasmalik20 TSO/ISPF 5 Tue Feb 21, 2017 7:44 pm


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