- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: Java file
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
Forums
Discussions
Discussions
Discussions
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
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
12-09-2009 01:47 AM
12-09-2009 01:47 AM
Java file
i have a client java application on windows machine that create a file and put it on a openvms directory by ftp.
My problem is that the file has a record format like Variable length, maximum 0 bytes, longest 32 bytes but i want a stream type.How i can do this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2009 02:09 AM
12-09-2009 02:09 AM
Re: Java file
welcome to the OpenVMS itrc forum!
From the release notes for Java:
Converting Binary Files
Binary .class files need to be Stream_LF as well. If they are not Stream_LF you will get error messages like the following, even though your CLASSPATH is correct and the correct .class file is on the path:
Can't find class Test.HelloWorld
If you import .class files from a non-OpenVMS system, be sure to convert them to Stream_LF.
To get a binary file (.class, .jar, .zip) into Stream_LF record format, do the following to give the file the right record format attributes:
$ SET FILE/ATTR=(RFM:STMLF,RAT:CR) filespec
Regards,
Duncan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2009 02:10 AM
12-09-2009 02:10 AM
Re: Java file
A command procedure like the following will do it (beware of line wraps):
$ wspec = "*.TXT;0"
$ if p1.nes."" then wspec=p1
$ last=""
$ loop:
$ file=f$search(wspec)
$ if file.eqs."" then EXIT
$ filenv = file - f$parse(file,,,"VERSION")
$ if filenv.eqs.last then EXIT
$ last=filenv
$ if f$file(file,"RFM").eqs."VAR"
$ then
$ write sys$output "Convert VAR ",file," to STMLF:",filenv
$ if f$trnlnm("SYS$INPUT",,,"USER").eqs."SYS$COMMAND" then deassign/user SYS$INPUT
$ convert/fdl=SYS$INPUT: 'file' 'filenv'
FILE
ORGANIZATION sequential
RECORD
BLOCK_SPAN yes
CARRIAGE_CONTROL carriage_return
FORMAT stream_lf
$ if $STATUS then delete 'file'/log
$ endif
$ goto loop
$ exit '$STATUS'
Spacify parameter p1 as the file name (default is all *.txt files).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2009 02:14 AM
12-09-2009 02:14 AM
Re: Java file
As Duncan writes, "binary" files like class files just need to have the right RFM attributes set, and this works ONLY if transferred in binary FTP mode !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2009 02:18 AM
12-09-2009 02:18 AM
Re: Java file
the method of removing the version from a file-specification :
$ filenv = file - f$parse(file,,,"VERSION")
is not ODS5 save!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2009 02:21 AM
12-09-2009 02:21 AM
Re: Java file
thanks for clarifying that.
I am so used to the effects of binary transfer, that I overlooked the likelihood of a text file...not had my first cup of coffee yet!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2009 02:25 AM
12-09-2009 02:25 AM
Re: Java file
I forgot to mention that i want to make the record type stream by java code if is possible.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2009 02:41 AM
12-09-2009 02:41 AM
Re: Java file
since java can't read VAR files, it would need some native VMS (JNI) code: open-read-write using RMS calls, and manipulating FAB/RAB structures.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2009 07:23 AM
12-09-2009 07:23 AM
Re: Java file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2009 07:51 AM
12-09-2009 07:51 AM
Re: Java file
> ftp. [...]
As usual, it might help to know more about
the VMS (IP, FTP) environment:
TCPIP SHOW VERSION
(or whatever works for your IP software).
> My problem is that the file has a record
> format like Variable length, maximum 0
> bytes, longest 32 bytes but i want a stream
> type.
The answer may depend on how much control you
have over the VMS system. For example, this
might be helpful:
http://h71000.www7.hp.com/doc/83final/6526/6526pro_041.html#ftp_logicals_sec
[...]
TCPIP$FTP_STREAMLF
If defined, the FTP server and client
create files as RMS STREAM_LF files.
The default is variable-length files.
[...]
I recently did this on my system, and I
haven't noticed any problems because of it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2009 08:10 AM
12-09-2009 08:10 AM
Re: Java file
I have a hard time parsing the problem description.
Is the file being created on the OpenVMS side, with the VAR attributes?
- that would be a C-RTL feature setting, such as Hartmut hints at.
Or is it created on the windows side, FTPed to OpenVMS and found to be VAR?
- That woudl be an FTP issue as Steven hints at.
For the C-RTL, try again after renaming (or deleting) all prior versions away.
See the C-RTL documenation or HELP such as:
$ help crtl Feature_Logical_Names DECC$V62_RECORD_GENERATION
hth,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2009 01:21 AM
12-10-2009 01:21 AM
Re: Java file
the file is produced on Windows.
the file is transferred to VMS by FTP.
So it depends on the TCPIP and FTP software, what has to be done to produce a STMLF file on the VMS side.
If it is HP TCPIP then Steven showed the solution, other tcpip stacks or FTP servers may need post-processing.