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

Can we save the JCL or COBOL pgm in view mode


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
gaurchetan
Warnings : 1

New User


Joined: 20 Mar 2005
Posts: 6

PostPosted: Thu Apr 07, 2005 8:58 pm
Reply with quote

can we save the jcl or cobol pgm in view mode?
Back to top
View user's profile Send private message
priya

Moderator


Joined: 24 Jul 2003
Posts: 568
Location: Bangalore

PostPosted: Thu Apr 07, 2005 9:08 pm
Reply with quote

Then what's the need of "EDIT" option?
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Thu Apr 07, 2005 9:12 pm
Reply with quote

The VIEW option fully supports the CUT command. Obviously, you will need to open an EDIT session to PASTE the previous CUT into a new member that can be saved.
Back to top
View user's profile Send private message
priya

Moderator


Joined: 24 Jul 2003
Posts: 568
Location: Bangalore

PostPosted: Thu Apr 07, 2005 10:13 pm
Reply with quote

Thanks Superk...
Back to top
View user's profile Send private message
ranjit_bh

New User


Joined: 06 Apr 2005
Posts: 7

PostPosted: Thu Apr 07, 2005 10:20 pm
Reply with quote

Hi,
I beleive the replace option can be used to save datasets which have been updated in the VIEW mode.

Ex: replace .zf .zl

Ranjit
Back to top
View user's profile Send private message
somasundaran_k

Active User


Joined: 03 Jun 2003
Posts: 134

PostPosted: Fri Apr 08, 2005 12:18 am
Reply with quote

I remember using a Rexx utility named VSAVE that does this. I think it uses the replace command as suggested by Ranjit.
Check FILE 0183 in cbttape.org/.

hth
-Som
Back to top
View user's profile Send private message
gaurchetan
Warnings : 1

New User


Joined: 20 Mar 2005
Posts: 6

PostPosted: Sat Apr 09, 2005 1:37 pm
Reply with quote

thanx all,
but the command worked was
repl .zf .zl 'memeber name'
Back to top
View user's profile Send private message
cheli

New User


Joined: 21 Jul 2005
Posts: 11

PostPosted: Mon Nov 28, 2005 3:57 pm
Reply with quote

Hi.....

I tried the command Rep .zf .zl 'membername' to save the changes in View mode.But its giving the message Member in Use,on left-side topmost.
Can anybody pls tell me on how to save the changes in the same member which was opened in View mode.

Thanks...
Back to top
View user's profile Send private message
vicky10001
Warnings : 1

Active User


Joined: 13 Jul 2005
Posts: 136

PostPosted: Mon Nov 28, 2005 4:01 pm
Reply with quote

I think you or somebody opend in edit mode that replacing file.Close all window and try..It will work.If anything wrong please let me know
Back to top
View user's profile Send private message
mfsuresh

New User


Joined: 03 Nov 2004
Posts: 5

PostPosted: Fri Dec 02, 2005 4:59 pm
Reply with quote

guys,
we can save member in view mode by using
REP .ZF .ZL MEMBERNAME
provided
1. if no one else opend that member in edit mode.
2 if ur the one opend in view mode and made some changes u can by using above command.
Back to top
View user's profile Send private message
sun_job

New User


Joined: 18 Sep 2007
Posts: 73
Location: Bangalore

PostPosted: Thu Dec 27, 2007 11:13 am
Reply with quote

even REPL .ZL .ZF MEMBERNAME will do i think so
Back to top
View user's profile Send private message
ksk

Active User


Joined: 08 Jun 2006
Posts: 355
Location: New York

PostPosted: Thu Dec 27, 2007 11:30 am
Reply with quote

Hi,

When I typed mistakenly REP .ZL .ZL MEMBERNAME and pressed enter, existing member was replaced by only one statement END as shown below.

Code:

****** ***************************** Top of Data ******************************
000001  END                                                                   
****** **************************** Bottom of Data ****************************


Can I retrive the original code?

Regards,
KSK
Back to top
View user's profile Send private message
raak

Active User


Joined: 23 May 2006
Posts: 166
Location: chennai

PostPosted: Thu Dec 27, 2007 11:40 am
Reply with quote

In REPL .ZF .ZL,

ZF - notes the First line number
ZL - denotes the last line number

So basically, u r taking the lines from first to last and saving it in the name u specify.

But Once u give REPL .ZL .ZL, u get only the last line.

I don't think u can retrieve the original code....
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Thu Dec 27, 2007 12:33 pm
Reply with quote

Hi Guys if you are new to REPLACE command here are some tips for usage.
1. Typical form of usage in command line
Code:

For replace a member
REPLACE .ZF .ZL 'HLQ.PDS(member)'
Foe replacing a PS
REPLACE .ZF .ZL 'HLQ.PS'

2. In short you could use REPL in the place of REPLACE like this
Code:

For replace a member
REPL .ZF .ZL 'HLQ.PDS(member)'
Foe replacing a PS
REPL .ZF .ZL 'HLQ.PS'


3. What is .ZF and .ZL?
.ZF => Points to the first line of the member/PS that you are viewing
.ZL => Points to the last line of the member/PS that you are viewing

4. If you are viewing a member and want to save the changes to the same member then instead of
Quote:
REPL .ZF .ZL 'HLQ.PDS(member)'

You could provide just the member name like this
Code:
REPL .ZF .ZL member


5. While viewing the PS if you want to save the changes to the PS and if it was with the same HLQ as yours you need not provide the HLQ.
That is instead of
Quote:
REPL .ZF .ZL 'HLQ.PS'

you could use
Code:
REPL .ZF .ZL PS
it will automatically add you HLQ there.

6. In case you are viewing a member called MEMBER1 and you want to save the changes to a new member as MEMBER2
Code:
REPL .ZF .ZL MEMBER2
All the contents of MEMBER1 will be saved in newly created MEMBER2

7. In case you need only the 1st three lines to be saved as a new member...here is a snap shot
Code:
VIEW       HLQ.CHAD.JCL(CRF1F2) - 01.02                Columns 00001 00072
Command ===>  REPL .a .b CRF1F3                               Scroll ===> CSR
****** ***************************** Top of Data *****************************
.a     //CRF1F2    PROC                                                       
000100 //*******************************************************             
.b     //STEP003  EXEC PGM=ICETOOL                                           
000300 //TOOLMSG  DD SYSOUT=*                                                 
000400 //DFSMSG   DD SYSOUT=*                                                 

Mark those lines as .a and .b and mention the command as shown in the command line and give the new member(same works with a PS file) name.


8. If you want to replace the existing member with only 2 lines
Code:
VIEW       HLQ.CHAD.JCL(CRF1F3) - 01.02                Columns 00001 00072
Command ===> REPL .ZF .b  CRF1F3                              Scroll ===> CSR 
****** ***************************** Top of Data ******************************
000010 //CRF1F2    PROC                                                       
.b0100 //*******************************************************               
000200 //STEP003  EXEC PGM=ICETOOL                                             
****** **************************** Bottom of Data ****************************
Name the line as .b and provide the command as shown in the command line. It will replace the member CRF1F3 with only 1st two lines...

Hop these tips helps....
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Thu Dec 27, 2007 1:11 pm
Reply with quote

Quote:
I don't think u can retrieve the original code....

Yup, no one can...I'm not sure whether like Microsoft PCs are there some 'History files' or not..if we might get such storage in Mainframe as well.. there is way I can think of..not sure though.
Back to top
View user's profile Send private message
Govindaswamy

New User


Joined: 26 Dec 2007
Posts: 5
Location: india

PostPosted: Thu Dec 27, 2007 1:33 pm
Reply with quote

s u can.. After editing the member type the following line in command line
"REPL .ZL .ZF <MEMBER NAME>"

or type "REPL .ZL .ZF" and press enter.Then give in the dataset and member name.
If the member name is alredy existing it will replace else create a new member.Hope its clear.
Back to top
View user's profile Send private message
psoundar

New User


Joined: 27 Dec 2007
Posts: 1
Location: india

PostPosted: Wed Jan 09, 2008 8:22 pm
Reply with quote

thanks
it helped me a lot icon_smile.gif
Back to top
View user's profile Send private message
naveensrimf

New User


Joined: 04 Oct 2005
Posts: 34

PostPosted: Thu Jan 10, 2008 4:35 pm
Reply with quote

YES WE CAN REPLACE THE MEMBER IN VIEW MODE

REPLACE .ZL .ZF <MEMBER NAME>
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 COBOL sorting, with input GDG base COBOL Programming 7
No new posts Need help with ADABAS query (COBOL-AD... All Other Mainframe Topics 0
No new posts Replacing FILLER with FILLER<SeqNu... DFSORT/ICETOOL 2
No new posts Compile Sp Cobol base COBOL Programming 1
No new posts SQLCODE=-311 in Cobol SP-DB2. COBOL Programming 2
Search our Forums:

Back to Top