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
 

 

Can we save the JCL or COBOL pgm in view mode

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Can we save the JCL or COBOL pgm in view mode
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    Post subject: Re
Reply with quote

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

Moderator Team Head


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

PostPosted: Thu Apr 07, 2005 9:12 pm    Post subject: Re: Can we save the JCL or COBOL pgm in view mode
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    Post subject:
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    Post subject: Re: Can we save the JCL or COBOL pgm in view mode
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    Post subject:
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 http://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    Post subject:
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    Post subject: Re: Can we save the JCL or COBOL pgm in view mode
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    Post subject:
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    Post subject: Re: Can we save the JCL or COBOL pgm in view mode
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    Post subject: hello
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: 356
Location: New York

PostPosted: Thu Dec 27, 2007 11:30 am    Post subject:
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    Post subject:
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    Post subject:
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

Senior Member


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

PostPosted: Thu Dec 27, 2007 1:11 pm    Post subject:
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    Post subject: Reply to: Can we save the JCL or COBOL pgm in view mode
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    Post subject:
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: 31

PostPosted: Thu Jan 10, 2008 4:35 pm    Post subject: Reply to: Can we save the JCL or COBOL pgm in view mode
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    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
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts How to see VIEW definition from BMC c... rohanthengal DB2 1 Thu May 04, 2017 1:50 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm


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