After reading the post Easy way to convert CSV file to DDS file Martin Coates emailed me with the following question:
How do you map a folder in the IFS and share is on the pc? I am an As400 “purist” but more and more I find programming requests overflowing into the pc domain.
In this post I will discuss how to create a folder in the IFS, and then how to share it as a folder that can be accessed by a Windows PC. If you already know how to create folders in the IFS feel free to skip to the second part.
- How to create a folder in the IFS
- How to share the IFS folder
- How to map the folder to the Windows PC
How to create a folder in the IFS
I can create folders using either the Operations Navigator or the browser based IBM Navigator for i.
In this example I am going to create folder called simonh, which is a subfolder within the folder Note: You can click on any of the images below to see a bigger version of them. I open the Operations Navigator, and I select the IBM i I want to create the folder on. I click on the + (plus sign) next to File Systems. Then I click on the + next to Integrated File System. I riight click on the Root, and select New Folder. In the pop-up windows, shown on the right, I am going to enter: When I have entered and changed what I want I click on the OK button and the subfolder simonh is created in the users folder. If you have never used this read: Navigate your IBM i using a web browser. I log into the IBM Navigator for i for the IBM i I want to create the folder on. In the menu on the right I find Files Systems and click on the + next to it. Under the Integrated File Systems heading I click on the Create Integrated File System Folder link, see above. I do not enter the path name here, above, I click on the Browse button. I have found it is easier to select the folder, users, and add the subfolder there. When I have found the users folder I click on it. Then I click on the add icon, circled in red, to create my subfolder, see above. I enter the subfolder name in the Folder Name box, see above, and click the OK button. And the subfolder is created, see above. Having created the subfolder simonh I need to share it. This will make it available to my Windows PC. I find the folder users, and click on the + next to it to see the subfolder simonh. I right click on simonh and select Sharing, see below. I enter a share name, SimonH, and changed the access to Read/Write. Finally I click the OK button and I am done. In the menu on the right I find File Systems and click on the + next to it, and then I click on the Create File Share link, see below. I enter a share name, SimonH, changed the access to Read/Write, and in the Path Name I enter the path /users/simonh, see below. When I am done I click the OK button. Now to map the IFS folder I can do it one of two ways: When I map to an IFS folder I only do so when I need to as there is no point in wasting time when booting up my Windows PC to map the drive to the IFS folder that I might not use today. I am sure many of you already have drives mapped to folders on various servers and this is no different. In the Windows Explorer I click on Tools on the menu bar and select Map network drive.
The dialog box above is displayed. I choose a drive letter that is not being used. For the Folder I enter the path to the IFS folder. Which would be: As I said above I always make sure that the Reconnect at logon is unchecked. My Windows login and IBM i signon and passwords are different so I check the Connect using different credentials. Then I click on the Finish button, and the Enter Network Password dialog appears, see below. This is where I enter my IBM i user name and password. I never check the Remember my credentials. When finished I click the OK button. Voila! I now have a Z: drive which is mapped to my IFS folder.
Rather than perform this mapping manually every time I want to use the folder I will create a batch file (program) to do the same thing. It would look like: I would replace my-ibmi with the name of my IBM i. Hey presto! I now have drive Z: mapped to my IFS folder. So why do I use the pause in the batch file? If there is a problem with connecting to the IBM i or mapping to the IFS folder I will see the message. If it is missing the batch file will complete and I will be none the wiser to why I am not mapped to Z: This article was written for IBM i 7.1, and it should work with earlier releases too.
\users\simonh
Creating a folder using the Operations Navigator
Creating a folder using the IBM Navigator for i
How to share the IFS folder
Sharing using Operations Navigator
Sharing using IBM Navigator for i
How to map the folder to the Windows PC
Manually map a drive to IFS folder using Windows Explorer
\\my-ibmi\users\simonh
I would, of course, replace my-ibmi with the name of my IBM i.Using a batch file (program) to map drive to IFS folder
@cls
net use Z: \\my-ibmi\users\simonh
pause
I've done this many times. The gotcha at times if is your network people employ a network naming convention that is static that is not ISeries compatible. For example: Your network login is JSmith01 but when mapping, the login is fixed as ab\JSmith01 and can'tb e changed no matter what, even using a different ID.
ReplyDeleteThat's the case where I'm at now.
Problem resolved. I went to "my computer" and looked at the drives that were mapped by firm. Their root is abcde\JSmith01. When I use that to connect to the IFS mapped drive, it works perfectly. What is shown is "root on systema '12.23.45.67" (example) but you get the idea.
ReplyDeleteI permanently map drives to the IFS - to speed the "boot-up" process qualify your system "i" UserId with your server name - allows Windows to immediately access the correct credientials from the correct box.
ReplyDeleteExample User Name: system_i\j_smith
Another tip use Windows Credential Manager on the Control Panel to maintain your passwords for your mapped IFS Folders
What timing, we were just talking today in the office about how to share excel file between i5 and the network drive (windows PC).
ReplyDeleteRandall, there's a method to do this using Excel fille add-ins for IBM i. For Excel 2003, 2007, 2010 there's 1 method of implementation, for Excel 2013 a diff way. Same result from both.
ReplyDeleteI can be reached at LinkedIn if you want more info. Contact me if you'd like.
Excellent sir
ReplyDeleteShould you not also set the IFS properties to enable file extension o be eligible for automatic text conversion?
ReplyDeleteHello, my name is João
ReplyDeleteI didn't make it, following the instructions mentioned in your posts.
I have my iSeries "trqvas2.besseguros.pt" and my IFS folder /I2SITG/SIGBV/BINFOLIO/Input , already shared with read/write permissions, and when I put the path for drive Z:, like \\trqvas2.besseguros.pt\I2SITG\SIGBV\BINFOLIO\Input, always received a msg "Windows couldn't access to \\trqvas2...Input". Do you know what problably I'm doing wrong, or something I should check out ?
I have been unable to connect when I had both capital and lower case letters in my password.
DeleteThe user name and password are your IBM i user name and password, and the password is always lower case (as I understand it).
DeleteAnyway that I can map a folder to use Linux instead of windows ?
ReplyDeleteThat is an excellent question. I use a Windows PC so I am unable to try this technique on a Linux desktop client. Try it and let us know if it works.
DeleteHi Simon, I've mapped the IFS folder but the files when we open them in windows they have weird characters, while via WRKLNK they look fine. These are text/xml files.
ReplyDeleteI do not want to get into debugging people's programs, etc. in these comments.
DeleteMy guess is the CCSID used by the IBM i is causing this.
I would try changing the CCSID of the XML written from the IBM i to CCSID = 1208, Unicode.