ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Using CL to automate User Profile creation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using CL to automate User Profile creation

    Hello All, I have been searching for awhile trying to find any threads on the topic but haven't had any luck.

    What i'm looking for is a way using CL to create user profiles for me. I am able to FTP a file up with the commands i'd like to run, but the commands are like 250 Chars long and the SEU has a char limit of 80.... Is there any way around this? Do i just have to split the command into several commands?

    The command i'm using is

    CRTUSRPRF USRPRF(XXXXXXXX) PASSWORD(XXXXXXX) INLPGM(XXXXXXXX/XXXXX) INLMNU(*LIBL/XXXXXXXXXX) LMTCPB(*YES) TEXT('XXXXXXXXXXXXXXXXXXXXXXXXXXXX') SPCAUT(*splctl) JOBD(QGPL/XXXXXXXXXX) GRPPRF(XXXXXXXXXX) OWNER(*GRPPRF) DLVRY(*BREAK) OUTQ(QGPL/XXXXXXXXXX)

    I would need it to run this command at least 100 times. Also some kind of results outfile would be nice too.


    I would much appreciate any input!

    Thanks

  • #2
    Re: Using CL to automate User Profile creation

    Maybe the following facts will help you.

    1. Source physical files can have a record length of up to 32,766 bytes, so you should be able to create a source physical file that is long enough for your commands.

    2. SEU can handle a maximum record length of 240. RDi can handle larger record lengths, but I don't know how large. I used it to edit a source physical file with a record length of 512.

    3. The CL compiler reads more than 80 positions of a source record. I assume it reads the entire record. I don't know what the maximum length is, but it can handle the CRTUSRPRF command in your post.

    4. You can continue CL commands from one line to the next. End a line with a hyphen to continue with the first column of the next line. End with a plus to continue with the first non-blank of the next line.

    HTH.

    Ted

    Comment


    • #3
      Re: Using CL to automate User Profile creation

      The simplest solution is to make it into multiple lines:

      Code:
      [COLOR=#333333]CRTUSRPRF USRPRF(XXXXXXXX) + 
              PASSWORD(XXXXXXX) +
      [/COLOR][COLOR=#333333]        [/COLOR][COLOR=#333333]INLPGM(XXXXXXXX/XXXXX) +
      [/COLOR][COLOR=#333333]        [/COLOR][COLOR=#333333]INLMNU(*LIBL/XXXXXXXXXX) +
      [/COLOR][COLOR=#333333]        [/COLOR][COLOR=#333333]LMTCPB(*YES) + 
      [/COLOR][COLOR=#333333]        [/COLOR][COLOR=#333333]TEXT('XXXXXXXXXXXXXXXXXXXXXXXXXXXX') +
      [/COLOR][COLOR=#333333]        [/COLOR][COLOR=#333333]SPCAUT(*splctl) +
      [/COLOR][COLOR=#333333]        [/COLOR][COLOR=#333333]JOBD(QGPL/XXXXXXXXXX) +
      [/COLOR][COLOR=#333333]        [/COLOR][COLOR=#333333]GRPPRF(XXXXXXXXXX) +
      [/COLOR][COLOR=#333333]        [/COLOR][COLOR=#333333]OWNER(*GRPPRF) +
      [/COLOR][COLOR=#333333]        [/COLOR][COLOR=#333333]DLVRY(*BREAK) +
      [/COLOR][COLOR=#333333]        [/COLOR][COLOR=#333333]OUTQ(QGPL/XXXXXXXXXX) [/COLOR]

      Comment


      • #4
        Re: Using CL to automate User Profile creation

        Originally posted by jjsuthe
        I am able to FTP a file up with the commands i'd like to run,...
        Have you determined what you'll do with the file while it's on your server? Are you intending to "execute" the commands? Or will you compile into a CL program and run it?

        Any reason you don't just run the commands from your PC, e.g., by feeding the file into RMTCMD?
        Tom

        There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

        Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

        Comment

        Working...
        X