View previous topic :: View next topic
|
Author |
Message |
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
lohithegde
New User
Joined: 18 May 2008 Posts: 31 Location: Chennai
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
Back to top |
|
|
lohithegde
New User
Joined: 18 May 2008 Posts: 31 Location: Chennai
|
|
|
|
Hi
Thaks for carrecting me,,We can run C ALL COMMAND using JCL also
Regards
Lohit |
|
Back to top |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
Lohit,
You're welcome. Have a good day... |
|
Back to top |
|
|
giraffe
New User
Joined: 09 Nov 2010 Posts: 27 Location: SHENZHEN CHINA
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
When you want to ask a new question, start a new topic please. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
giraffe
New User
Joined: 09 Nov 2010 Posts: 27 Location: SHENZHEN CHINA
|
|
|
|
Hi, I found C * 999 'XXXX' 'YYYY' ALL works well! |
|
Back to top |
|
|
|