- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: problem getting the correct filename
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2006 04:44 AM
тАО02-27-2006 04:44 AM
I have problem renaming a file. In my case it is DICOM File
I am passing the complete file path as a an argument in 'p1' and 'p2'
The way I give it to file
"$@''IPL_FILE' ''AIMFILE' ''DICOMFILE'"
so p1 is
AIMFILE := 'DEV''DIR''FILENAME'.AIM
p2 is
DICOMFILE := 'DEV''DIR''FILENAME'.DCM
And here is the script attached. I need to use
"dicomFilename"
So I am having trouble at
$ dicomFilename := F$PARSE(p2,,,"DIRECTORY") + filename
as a symbol
where i would need that
dicomFilename is a symbol containg "disk1:[dir1.dir2]chk"
Please let me know if you require further clarification
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2006 05:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2006 05:35 AM
тАО02-27-2006 05:35 AM
Re: problem getting the correct filename
Try dicomFilename:='F$PARSE(p2,,,"DIRECTORY")'+'filename'
$DIR = "[SYS_MGMT.logs]"
$DICOMFILE:='DEV''DIR'FILENAME.DCM
$DEV = "DSA0:"
$DIR = "[SYS_MGMT.logs]"
$filename:=change_check.log
$DICOMFILE:='DEV''DIR''FILENAME' !all Single quotes
$P2=DICOMFILE
$dicomFilename:='F$PARSE(P2,,,"DIRECTORY")'+'FILENAME'
ASDEV1├В┬╗ sh sym dicomfilename
DICOMFILENAME = "[SYS_MGMT.LOGS]+CHANGE_CHECK.LOG"
Lawrence
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2006 05:36 AM
тАО02-27-2006 05:36 AM
Re: problem getting the correct filename
dicomFilename := F$PARSE(p2,,,"DIRECTORY") + filename
Remove the ":" in front of the "=" so that it would be as follows:
dicomFilename = F$PARSE(p2,,,"DIRECTORY") + filename
and this should work.
Phil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2006 05:43 AM
тАО02-27-2006 05:43 AM
Re: problem getting the correct filename
If you use, ":=" whatever is behind it is intrepeted as ASCII strings, so you would need single quotes around both parts to have DCL translate both parts correctly.
Lawrence
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2006 05:51 AM
тАО02-27-2006 05:51 AM
Re: problem getting the correct filename
$ A="12"
$ B="34"
$
$ C:='A'+'B'
$ show symbol C
C = "12+34"
$
A slightly different version that does not work either:
$ C:="''A'"+"''B'"
$ show symbol C
C = "12+34"
$
This works:
$ C=A+B
$ show symbol C
C = "1234"
$
And this:
$ C="''A'"+"''B'"
$ show symbol C
C = "1234"
$
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2006 06:38 AM
тАО02-27-2006 06:38 AM
Re: problem getting the correct filename
That worked however I have to do F$Parse in a different way.
However, I can't seem to go into the "IF loop"
I want to have the option that if some user writes
filename = "test" file
it should go into the IF LOOP so that we can have that name of the file
otherwise go the normal way.
Currently I feel it just doesn't enter the IF Subroutine.
I am reattaching the script file. Please let me know what I am doing wrong.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2006 06:38 AM
тАО02-27-2006 06:38 AM
Re: problem getting the correct filename
That worked however I have to do F$Parse in a different way.
However, I can't seem to go into the "IF loop"
I want to have the option that if some user writes
filename = "test" file
it should go into the IF LOOP so that we can have that name of the file
otherwise go the normal way.
Currently I feel it just doesn't enter the IF Subroutine.
I am reattaching the script file. Please let me know what I am doing wrong.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2006 06:53 AM
тАО02-27-2006 06:53 AM
Re: problem getting the correct filename
> $ filename = default
Do you have a symbol named "DEFAULT" or did you intend this:
$ filename = "default"
>$ dicomFilename = p2 - F$PARSE(p2,,,"VERSION") - ".DCM" - F$PARSE(p1,,,"NAME")+ filename
>$ dicomFilename = filename
The second command overwrites the result of the first command. I don't know if this is intentional, because there is no explanation what parameters the command procedure is supplied, but I see that the first command line uses |P1| and |P2|.
>$ EXIT
>$ ENDIF
Note that the procedure will always EXIT here when the symbol |filename| is a non-empty string and "ipl_scanco_prog" will not execute.
> -dicom_filename "dicomFilename
I guess this line is read by the program named "ipl_scanco_m.exe", but please note that DCL does not translate the value of the symbol |dicomFilename| for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2006 11:09 AM
тАО02-27-2006 11:09 AM
Re: problem getting the correct filename
Thanks for the detailed analysis. By loop I meant the "IF loop"
I want it to enter the loop if the user keeps the variable
filename = ""
I removed
"EXIT"
command from the IF subroutine. But I think I am still unable to enter the IF subroutine. I have attached the file again with the changes.
Regarding
filename = "default" (I intentionally kept it to see whether it comes up)
>$ dicomFilename = p2 - F$PARSE(p2,,,"VERSION") - ".DCM" - F$PARSE(p1,,,"NAME")+ filename
>$ dicomFilename = filename
The repition above was because I was not clear whether it does enter the sub-routine and is unable to do the parsing or just skips it.
Regarding p1 and p2 they are input arguments.
regaring IPL yeah from then it goes into a seprate application which is fine. I did not wish to eliminate that part for overall clarity.
Pleas let me know if you require further information or clarification.