Editing Unix (dot) files from within MV line editor

0 views
Skip to first unread message

Patrick

unread,
Sep 20, 2013, 4:44:27 PM9/20/13
to InterSy...@googlegroups.com
Hi, I was wondering if it is possible to edit Unix dot files (hidden files) i.e. .profile from within the MV line editor. I have created my VOC pointer and all files display, but am unable to edit any (dot) files. I have checked and permissions are not an issue.
Thanks,
Patrick

Michael Cohen

unread,
Sep 22, 2013, 12:47:25 PM9/22/13
to InterSy...@googlegroups.com

Hi Patrick,

 

I started up an old instance and gave it a try and it seemed to work.  The only issue seems to be CATALOGing such programs does add the VOC entry, but trying to run them fails for conflicts with the stack commands (which begin with dot).  Perhaps try what I tried.  If it fails, send your version info.

 

Here is my test session:

*                              MultiValue Shell                              *

* Cache for UNIX (Red Hat Enterprise Linux 5 for x86-64) 2010.2 (Build 500) Mon Nov 8 2010 23:08:53 EST*

 

MV:

MV:CREATE.FILE BPDIR DIR /usr/BPDIR

[421] DICT for file 'BPDIR' created. Type = INODE

[429] Default Data Section of 'BPDIR' set to use directory '/usr/BPDIR'.

[437] Added default record '@ID' to 'DICT BPDIR'.

[417] CreateFile Completed.

MV:ED BPDIR HI

HI

New record.

----:I CRT "HELLO"

0001: CRT "HELLO"

Bottom at line 1.

----:FIB

"HI" filed in file "BPDIR".

HI

[B0] Compilation completed.

MV:RUN BPDIR HI

HELLO

MV:

MV:

MV:

MV:ED BPDIR .HI

.HI

New record.

----:I CRT "HELLO FROM BPDIR .HI"

0001: CRT "HELLO FROM BPDIR .HI"

Bottom at line 1.

----:FIB

".HI" filed in file "BPDIR".

.HI

[B0] Compilation completed.

MV:RUN BPDIR .HI

HELLO FROM BPDIR .HI

MV:LIST BPDIR

LIST BPDIR                                  12:39:45pm  22 Sep 2013  PAGE    1

BPDIR.....

 

.HI

HI

 

2 Items listed.

MV:ED BPDIR .HI

.HI

1 lines long.

----:P

0001: CRT "HELLO FROM BPDIR .HI"

Bottom at line 1.

----:FI

".HI" filed in file "BPDIR".

MV:

--
You received this message because you are subscribed to the Google Groups "InterSystems: MV Community" group.
---
You received this message because you are subscribed to the Google Groups "InterSystems: MV Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to InterSystems-...@googlegroups.com.
To post to this group, send email to InterSy...@googlegroups.com.
Visit this group at http://groups.google.com/group/InterSystems-MV.
For more options, visit https://groups.google.com/groups/opt_out.

Patrick

unread,
Sep 23, 2013, 11:51:19 AM9/23/13
to InterSy...@googlegroups.com
Thank you Michael,
 
I think I see what the problem is. I am trying to edit an existing file not created using the MV editor. When creating the record using the editor I see that it changes the (.) period to  a %P. 
 
Is it possible to edit existing (dot) files?
 
Thank you for your help.
Patrick
 

> ls -l .HI

ls: 0653-341 The file .HI does not exist.

lvsiad03:/antrimD001/home/mccannp

> ls -l HI

-rwxr-x---    1 mccannp  cacheusr         12 Sep 23 06:56 HI

lvsiad03:/antrimD001/home/mccannp

> ls -l | grep "Sep 23"

-rwxr-x---    1 mccannp  cacheusr         28 Sep 23 06:58 %PHI

-rwxr-x---    1 mccannp  cacheusr         12 Sep 23 06:56 HI

lvsiad03:/antrimD001/home/mccannp

Edward Clark

unread,
Sep 23, 2013, 12:11:17 PM9/23/13
to InterSy...@googlegroups.com
For compatability across operating systems, and to avoid write failures, Cache converts a number of characters that are illegal in os file names when writing to dir-type files. It also converts leading dots.
You can turn off the conversion by flagging the file with a U on line 6 of the voc entry. Either edit the voc entry, or use (U) on the CREATE-FILE command:
  CREATE-FILE UFILE DIR ufile (U)
 


From: InterSy...@googlegroups.com [mailto:InterSy...@googlegroups.com] On Behalf Of Patrick   
Sent: Monday, September 23, 2013 11:51 AM
To: InterSy...@googlegroups.com
Subject: Re: [InterSystems-MV] Editing Unix (dot) files from within MV line editor

Patrick

unread,
Sep 23, 2013, 1:09:13 PM9/23/13
to InterSy...@googlegroups.com, edward...@intersystems.com
Ed,
Thank you for the information. It worked as described.
Patrick
Reply all
Reply to author
Forward
0 new messages