|
Hi Chuck I remember doing something similar in the past! can't you do something like this declare text (50) declare wtext(50) declare temp33(33) declare temp41(10) declare kill40(40) chgvar wtext(text) this should give you a text to mess with while keeping the original value in text chgvar temp33(text) this should put the first 33 chars into temp33 chgvar wtemp(kill40) this is where I don't know for sure but if it works like i think should blank out the first 40 chars chgvar wtext(temp33 *cat wtext) should give you what you want then chgvar text(wtext) then run submit use isdbg on the cl and watch the field values by setting breaks on each line then advance remember the line that's hilighted hasn't been done yet let me know how it went! Hope this helps !!! "Chuck Lewis" <clewis@xxxxxxxxx t> To Sent by: "RPG/400 / iSeries" rpg400-l-bounces+ <rpg400-l@xxxxxxxxxxxx> jfortwen=courts.s cc tate.in.us@midran ge.com Subject I Give Up - CLP Question... 01/28/2004 10:43 AM Please respond to RPG programming on the AS400 / iSeries <rpg400-l@midrang e.com> OK, I'm blind or something. I've looked and looked and cannot see what is wrong with this. I have a command to create user profile. To get it to work properly (for a person that does not have *SECADM authority) I have created two CL's compiled and owned by QSECOFR. Also had to add some authority to these for the IT user). The first one is used by the actual command and does some other stuff (creating entries in some 3rd party applications, etc) and all the second one does it get submitted to batch to create the user profile. Well this works fine. The profile gets created, etc. The only problem is the Text description on the newly created user profile has *SPLCTL stuck in the 34th through 40th positions of the Text. The parameters passed to the second CL all are in the user profile correctly except for this deal. Here is the part of the first CL that submits the second one: DCL VAR(&PROFILE) TYPE(*CHAR) LEN(10) DCL VAR(&GRPPRF) TYPE(*CHAR) LEN(10) DCL VAR(&PWD) TYPE(*CHAR) LEN(10) DCL VAR(&TEXT) TYPE(*CHAR) LEN(50) DCL VAR(&ULOC) TYPE(*CHAR) LEN(20) DCL VAR(&UDEP) TYPE(*CHAR) LEN(20) DCL VAR(&BRANCH#) TYPE(*CHAR) LEN(3) DCL VAR(&INITIALS) TYPE(*CHAR) LEN(3) DCL VAR(&SPLAUT) TYPE(*CHAR) LEN(7) SBMJOB CMD(CALL PGM(SU036C2) PARM(&PROFILE &PWD + &TEXT &SPLAUT &GRPPRF)) JOB(PRF_CREATE) + JOBD(CHUCK) And here is the submitted CL: PGM PARM(&PROFILE &PWD &TEXT &SPLAUT &GRPPRF) DCL VAR(&PROFILE) TYPE(*CHAR) LEN(10) DCL VAR(&PWD) TYPE(*CHAR) LEN(10) DCL VAR(&TEXT) TYPE(*CHAR) LEN(50) DCL VAR(&SPLAUT) TYPE(*CHAR) LEN(7) DCL VAR(&GRPPRF) TYPE(*CHAR) LEN(10) CRTUSRPRF USRPRF(&PROFILE) PASSWORD(&PWD) PWDEXP(*YES) + STATUS(*ENABLED) INLPGM(DMLIB/DMINLPGM) + INLMNU(*SIGNOFF) LMTCPB(*YES) TEXT(&TEXT) + SPCAUT(&SPLAUT) GRPPRF(&GRPPRF) + OWNER(*GRPPRF) ACGCDE(&PROFILE) + DLVRY(*BREAK) OUTQ(*DEV) ENDPGM WHAT the heck am I missing here ? The fields passed are in the correct order and field lengths match, etc. There was never a problem with this until I had to change it to a submit to get around the authority issue (this all came about because we are a small shop and they want my coworker to be able to create user profiles if I am not here.). Thanks ! Chuck _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.