Clearing Library using SNDNETMSG

275 pts.
Tags:
AS/400 Library
LPAR
SNDNETMSG
Few weeks back I asked about a question that how I can clear libraries in IBG01 from IBF01. IBG01 is a backup LPAR and IBF01 is a primary LPAR. Somebody suggested SNDNETMSG command and I think it should work but when I used it from primary it gives me a message such as, "User not enrolled in system distribution directory"

Now I would like to ask how I can create it and which LPAR I should create it, Prim or Backup. Then i'll ask more question if someone helps me with this.

Regards MK.



Software/Hardware used:
AS/400
ASKED: April 19, 2011  1:10 AM
UPDATED: May 10, 2011  11:11 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hello
Now I have SNDNETMSG command in front of me.
Message text CLRLIB LIB(ABCDEFG)
USERID MAKHAN10
ADDRESS IBG01

Now when I ENTER it says “I am not enrolled in system distribution dir”
So now can you tell me how I can enroll into the dir. And if I have to enroll in both primary and backup LPARS.

Please help me so I can start clearing libraries using my program which resides on primary LPAR.

REGARDS

MK

Discuss This Question: 11  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • wpoulin
    Khan23, Work with directory entries, WRKDIRE, will not only allow you to see existing directory entries, but allow you to create new ones using option 1=Add. You will need directory entries to exist on both systems, one to send the other to receive. They can be the same or different. Hope this helps, Bill Poulin
    2,480 pointsBadges:
    report
  • TomLiotta
    The user who sends the message must be in the distribution directory on the sending system. The system won't send net messages from users who don't exist (in the directory). The user who receives the message must be in the distribution directory of the receiving system. The system won't accept messages for users who don't exist (in the directory). And distribution services need to be configured on both systems before distributions can be routed between them. Tom
    125,585 pointsBadges:
    report
  • TomLiotta
    As Bill Poulin wrote, you use the WRKDIRE command to Work with Directory Entries. But I'm not at all clear why you would think that SNDNETMSG will help you. Anything that you might do with SNDNETMSG could be done far easier with SBMRMTCMD or other means. Tom
    125,585 pointsBadges:
    report
  • khan23
    Hello I am also sure I can do better with this command because I remember I tried to send a command WRKACTJOB on IBG01 and it worked even though I could not kill this command as it stayed their for hrs. Ok if you think this one is better then please help me how to use this command. I also want a simmple solution as I do not want to make a mistake on a very busy system. Here is what I want. My menu is called ABCMENU on primary LPAR. One option is, 1: Clr lib on IBG01. This is for MIMIX purpose. Now can you tell me how I can use this command in this menu. SBMRMTCMD regards MK
    275 pointsBadges:
    report
  • TomLiotta
    ...I remember I tried to send a command WRKACTJOB on IBG01 and it worked... Since SNDNETMSG doesn't send commands, please show how you used it to send WRKACTJOB and had the command work. You could have had SNA Distribution Services set up, and had a user ID on the remote system to send a message to. Then you could have a never-ending program on the remote system to receive that user's messages. The program could interpret the text of a message as being a command and execute the command with QCMDEXC or a similar API, I suppose. It'd be much easier just to have the REXEC server running on the remote system. Then on your local system, you run the RUNRMTCMD command and specify the command you want in the CMD() parameter. For example:
    RUNRMTCMD CMD( WRKACTJOB )
              RMTLOCNAME( <RmtHost> *IP)
              RMTUSER( <RmtUsrID> )
              RMTPWD( <RmtPwd> )
    Alternatively, you could use the *DDM server. Use the CRTDDMF command to create a DDM file to act as the pipe between the systems, then:
    SBMRMTCMD CMD(WRKACTJOB) 
              DDMFILE( <MyDDMF> )
    If you are running DDM as a TCP/IP server, you'll need to use the ADDSVRAUTE command to set a user and password for SERVER(QDDMSERVER). (The *DDM server should require passwords at the least.) Tom
    125,585 pointsBadges:
    report
  • khan23
    I do not exactly remember which command I used but i just checked my CL program which i am trying to create is using SBMRMTCMD. Probably i used this command. Now you are telling me RUNRMTCMD but I would like to go slowly and I'll get back to you if it works. I am sure I will be needing some help with DDM since I do not know anything about DDM. regards MK
    275 pointsBadges:
    report
  • TomLiotta
    ...is using SBMRMTCMD. Probably i used this command. Now you are telling me RUNRMTCMD... SBMRMTCMD or RUNRMTCMD -- either would be far easier than trying to use SNDNETMSG. Or you can use the rexec() API or you might call QCMDEXC as a stored procedure. I'm was only saying that SNDNETMSG is more difficult than any of the methods that are intended for sending remote commands. SNDNETMSG is intended for sending messages, not commands. Whatever method you use, it will take some preparation. Systems are not going to simply let remote commands come in for execution. If they did, we'd all be a lot busier than we are now. Tom
    125,585 pointsBadges:
    report
  • khan23
    [...] Clearing Library using SNDNETMSG [...]
    0 pointsBadges:
    report
  • khan23
    Hi everybody Tom I used RUNRMTCMD and I restored a library into a "TESTLIB" on IBG01 then called the program from IBF02 (Primary LPAR). The labrary was succesfully cleared on IBG01. Then I put it into a simple CL program in my menu and tested and worked. Thank you. But now because this is for MIMIX purposes and I have to restore all the database libraries immediatedly from the latest backup, can you tell me how I can do that. I do that from BRMS command but one by one due to TAPE restriction. It is OK with the TAPE but can I write a program which will pick up the second desired library from the tape once it finishes the first one. I shall try myself also but I would like few pointers. Thank you again, Regards MK Thank
    275 pointsBadges:
    report
  • TomLiotta
    But now because this is for MIMIX purposes and I have to restore all the database libraries immediatedly from the latest backup, can you tell me how I can do that. The topic has gone far from the original question. I have to suggest that you start a new question with a new topic. Give more background on what you need to do next -- it's not clear yet. A new topic might help bring others who have good ideas into the discussion. They might not pay attention under the old topic. You can include a reference back to this question and even to an earlier one for background. Tom
    125,585 pointsBadges:
    report
  • khan23
    Hello again I used RUNRMTCMD to clear libraries on the backup LPAR (IBG01). It worked. Now think about the backup LPAR as MIMIX environment. Whatever I do on IBF02 which is primary I have to update in certain situation as the same on IBG01. Let's assume I install an application on IBF02 but for some reason I have to clear and restore the libraries on IBG01. You guys help me how to clear libraries on backup LPAR but now I have to restore the same libraries from the most recent backup on IBG01 or backup LPAR. Is there a way to do it even if I have to do it one by one. This should be done using BRMS. Regards MK
    275 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following