Making a macro in AS/400

40 pts.
Tags:
AS/400
AS/400 macros
Macros
How to make a macro in AS/400?

Software/Hardware used:
AS 400

Answer Wiki

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

I’m not sure what you are trying to accomplish.
I believe what you would want to do is create a CMD.

—————
Perhaps you are looking for instructions on Macro on Client Access Terminal Emulator or Rumba Terminal Emulator — keystroke macro’s for the screen????
Phil

_______________________

If you are referring to iSeries access for windows, just click on help then procedures. There is an entire section on macros/scripts.
_______________________

If you are using reflaction to connect AS400…there are option for MACRO in top menu.

Click on start recording and put all the command you want to run when you signon..your AS400
like wrkactjob
chgmsgq qsysopr

Thanks

Ashish

Discuss This Question: 23  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.
  • chenthil
    if you are using client access then you will be able to see a Red play button by clicking that you can record your macros in macro file format or VB script format once you have clicked the Red Play button from the iseries access it will start record the macros , until you click the Red stop button. recorded macros will be stored in the below path C:Program FilesIBMClient AccessEmulatorPrivate ( it will be stored as .TXT file ) .
    480 pointsBadges:
    report
  • pdraebel
    If you refer to MACRO AS400 as a way to accomplish/call several tasks you should create a CMD. For example I use a command "MORNING" to check up on my iSeries LPAS's first thing in the morning and that runs a CL program that takes me through several system Commands. Peter
    7,545 pointsBadges:
    report
  • Splitgurl
    Hi, I use AS400, I know how to create macro, but the problem is, nobody here knows how to delete them? I try deleting the .txt from there: C:Program FilesIBMClient AccessEmulatorPrivate ( it will be stored as .TXT file ) but they still are in my AS400 !! Anybody knows how to delete old macro? Thank you very much!!
    10 pointsBadges:
    report
  • pdraebel
    I believe you are referring to the MACRO still being called from your session. If so go to File-Preferences and select Macro/Script. There you can select a blank for the Macro that is automatically performed when you start the session.
    7,545 pointsBadges:
    report
  • MacAttack
    I'm trying to run a macro within a macro from my text.mac file. I tried various syntax with no avail. Can someone help out? Also, if there is reference for all the Macro commands that would be really helpful too.
    40 pointsBadges:
    report
  • Michael Tidmarsh
    Welcome to ITKE MacAttack! The best idea is to start a new question so our experts can try to help you.

    For more information on how our community works, check out our FAQ.
    64,945 pointsBadges:
    report
  • ToddN2000
    Hi MacAttack, I do not think you can run a macro within a macro. I may be wrong but I’ll have to do some digging on my own. Sounds interesting. What type of application are you thinking of the using it in? We do not use a lot of macros here mainly because of security problems. We had a lot users creating macros for their sign on. Some of theses were PC that were shared on the shop floor .When their password was due to be changed their macros no longer worked.
    110,160 pointsBadges:
    report
  • TomLiotta
    With iSeries Access macro language, the 'Help' describes how to nest macros. If VB is used, then external VB scripts (i.e., other VB "macros") can be called the same way VB has always done it. In that case, it's a general VB question and not a "macro" question. . And if it isn't iSeries Access, then it completely depends on what the product is. Without knowing the product, there is no way to answer. . AS/400s don't have "macros" at all except for maybe C compiler 'macros' or Net.Data 'macros' or similar. We have no definition for "AS/400 macros" for the question yet. There is no good answer possible. . Tom
    125,585 pointsBadges:
    report
  • Chelebarry
    Hello all, I want to now if there is a command when creating a macro using VBScript to:
    - show and give the corresponding value in a determine coordinate in the AS400 screen.
    I want to do the above to use a logical formula to check that coordinate and it is let say blank to execute a roll-up.
    100 pointsBadges:
    report
  • TheRealRaven
    What "coordinate" is the macro supposed to "determine"? How will the macro knew which "coordinate" it's supposed to be checking?

    But your question doesn't quite fit here. You should create your own question rather than trying to change the subject of an existing thread.
    27,190 pointsBadges:
    report
  • CharlieBrowne

    You can only get the coordinates within a program that is setup to return the cursor position when an action is taken to read the screen

    62,340 pointsBadges:
    report
  • TheRealRaven
    But the "action" can be as simple as calling the Get Cursor Address (QsnGetCsrAdr) API. It's not necessary actually to issue a READ nor even a WRITE.

    Of course, that API isn't something that would usually be thought of as one used in a "macro". But I'm still not sure what "macro" means here.
    27,190 pointsBadges:
    report
  • Chelebarry
    Splitgurl have you tried elimination the .Mac extension file?

    Thanks TheRealRaven. Your reply seems interesting. Have you happened to have used the code previously and to do what exactly?
    100 pointsBadges:
    report
  • Chelebarry
    TheRealRaven...I used the GetText action and made it check text in from a certain position with a certain length of characters, if text extracted did not match my condition I made do a certain action.  I am planning to using your action.
    100 pointsBadges:
    report
  • bernard85
    you "ll find here a way to interpret your own formula on AS400.:
    for instance you can enter a formula like myNO+'/'+myUser+'/'+myJob it will give you directly 005939/BERNARD85/QPADEV002. 
    specifical procedures are referenced in the interpretor by using the %pAddr function
       - member BERNARD85/SRC.U6
     I -/*   *MODULE      U6XVIEW      BERNARD85    06/24/18  01:25:12      */
     I -  EXPORT SYMBOL("XVIEW_GETCOLUMNATPOS")
     I -/*   *MODULE      U6YVIEW      BERNARD85    06/24/18  01:25:12      */
     I -  EXPORT SYMBOL("YVIEW_GETYVIEW")
     I -  EXPORT SYMBOL("YVIEW_LOADYVIEW")
       - member BERNARD85/SRC.U6FORM
     I -         label.maxWidth=xml_getAttAsInteger('MAXWIDTH':ND.atts);
     I -         xml_setAttfromInteger(ND.atts:'MAXWIDTH':label.maxwidth);
       - member BERNARD85/SRC.U6TREE
     I -      //‚Link type
     I -     d  kType                         1a   inz(kLink)
       - member BERNARD85/SRC.U6XVIEW
     I -       XView.lfmt=fmt_getFormat(lFmts:fmtID);
     D -       XView.lfmt=
     D -            tree_Xml2Tree(env_getfilename(cFmt:fmtID):%pAddr(fmt_XmlInput));
     I -       XView.lGrid=grid_getGrid(lGrids:fmtID);
     D -       XView.lGrid=
     D -          tree_Xml2Tree(env_getfilename(cGrid:fmtID):%pAddr(grid_XmlInput));
     I -         =int_loadFormula(column.formula:XView.lFmt);
     D -         =tree_getItemFromList(XView.lFmt:kField:column.formula);
       - member BERNARD85/CPY.U6DS_H
     I -     d  sflDsp         s               n   based(pIN88)
     D -     d  sflclr         s               n   based(pIN88)
     I -     d  sflClr         s               n   based(pIN89)
     D -     d  sfldsp         s               n   based(pIN89)
     I -      //‚used on break
     I -     d fStop           c                   const(-1)
     I -     d fContinue       c                   const(1)
     I -     d fBreak          c                   const(0)
       - member BERNARD85/CPY.U6FORM_H
     I -     d  lFormula                       *
     D -     d  lField                         *
     I -     d  maxWidth                      5u 0
     D -     d  max                           3u 0
     D -     d  det                                likeDs(tLabelDet) dim(2)
     D -     d tLabelDet       ds                  qualified template
     D -     d  pValue                         *
     D -     d  owned                          n
     D -     d  len                           5u 0
       - member BERNARD85/CPY.U6GRID_H
     I -     d  formula                      50    varying
     D -     d  formula                      10    varying
       - member BERNARD85/CPY.U6INT_H
     I -      //‚Error
     I -     dkErr             c                    const('e')
     I -     dtErr             ds                  qualified
     I -     d kind                           1a   inz(kErr)
     I -     d pStr                            *   inz(*null)
     I -      //‚constante
     I -     dkCst             c                    const('c')
     I -     dtCst             ds                  qualified
     I -     d kind                           1a   inz(kCst)
     I -     d pStr                            *   inz(*null)
     I -      //‚procedure
     I -     dkProc            c                    const('p')
     I -     dtProc            ds                  qualified
     I -     d kind                           1a   inz(kProc)
     I -     d ID                            25a   varying
     I -     d pAddr                           *   procptr
     I -      //‚set of characters
     I -     d min             c                   const('abcdefghijklmnopqrstuvwxyz
     I -     d maj             c                   const('ABCDEFGHIJKLMNOPQRSTUVWXYZ
     I -     d num             c                   const('0123456789')
     I -     d spec            c                   const('$%_')
     D -      ///lFormat                        *   const
     I -      //‚get string from formula
     I -     d int_getStringFromFormula2...
     I -     d                 pr         32000a   varying
     I -     d  lFormula                       *   const
     I -     d  curBuffer                     3u 0 const options(*nopass)
     I -      //‚load procedures
     I -     dint_LoadProcs    pr
     I -      //‚pre-load the formula
     I -     d int_loadFormula...
     I -     d                 pr              *
     I -     d  formula                    1000a   varying const
     I -     d  lRep                           *   const
     I -      //‚get string from argument
     I -     d int_getStringFromArg...
     I -     d                 pr         32000a   varying
     I -     d  lArg                           *   const
     I -     d  curBuffer                     3u 0 const options(*nopass)
       - member BERNARD85/CPY.U6TREE_H
     I -      //‚Link kind
     I -     d kLink           c                   const('#')
       - member BERNARD85/SRC.U6INT
          //‚-------------------------------------------------------------------
          //‚specific variables
          //‚-------------------------------------------------------------------
         d lProcs          s               *
     I -         return %editc(%dec(int4:9:0):'Q');
     D -         return %editc(%dec(int4):'Q');
          //‚-------------------------------------------------------------------
          //‚get string from formula
          //‚-------------------------------------------------------------------
         pint_getStringFromFormula2...
         p                 b                   export
         d int_getStringFromFormula2...
         d                 pi         32000a   varying
         d  lFormula                       *   const
         d  curBuffer                     3u 0 const options(*nopass)
          *
         d  field          ds                  likeDS(tField) based(pField)
         d  fmt            ds                  likeDS(tFormat) based(pFmt)
         d  String         s          32000a   varying inz('?')
         d  buffer         s          32000a   based(pBuffer)
         d  pBuffer        s               *
          /free
           if tree_isOfTheKind(kField:lFormula:pField);
             pFmt=tree_getItem(tree_getParent(lFormula));
             //
             if %parms()=1;
               pBuffer=fmt.pBuffer1;
             elseif curBuffer=1;
               pBuffer=fmt.pBuffer1;
             else;
               pBuffer=fmt.pBuffer0;
             endIf;
             //
             if %scan(field.type:'AOZLT')>0;
               String=%subst(buffer:field.posInBuffer+1:field.len);
             elseif %scan(field.type:'PS')>0;
               String=int_editNumeric(pBuffer:field);
             elseIf field.type='B';
               String=int_editInteger(pBuffer:field);
             endIf;
             return String;
           else;
             return '?';
           endIf;
          /end-free
         p                 e
          //‚-------------------------------------------------------------------
          //‚load procedures
          //‚-------------------------------------------------------------------
         pint_LoadProcs    b                   export
         d int_loadProcs   pi
           lProcs=tree_getnewlink(*null);
           //
           int_loadProc(lProcs:'TODAY' :%pAddr(today));
           int_loadProc(lProcs:'CONCAT':%pAddr(concat));
           int_loadProc(lProcs:'%TRIM' :%pAddr(trim));
         p                 e
          //‚------------------------------------------------------------------
          //‚load procedure
          //‚------------------------------------------------------------------
         pint_LoadProc     b
         d int_loadProc    pi
         d  lProcs                         *
         d  ID                           35    varying const
         d  pAddr                          *   procptr const
          *
         d proc            ds                  likeDs(tProc) based(pProc)
           pProc=tree_getNewItem(%addr(tProc):%size(tProc));
           Proc.ID=ID;
           proc.pAddr=pAddr;
           tree_linktoParent(lProcs:tree_getNewLink(pProc));
         p                 e
          //‚------------------------------------------------------------------
          //‚pre-load the formula
          //‚------------------------------------------------------------------
         pint_loadformula  b                   export
         d int_loadFormula...
         d                 pi              *
         d  formula_                   1000a   varying const
         d  lRep                           *   const
          *
         d lArg            s               *
         d p               s              5u 0
         d formula         s           1000a
           //‚the formula is empty ?
           if formula_='';
             return *null;
           endif;
           formula=formula_+' ';
           p=%check(' ':formula:1);
           if %scan(%subst(formula:p:1):min+maj+num+spec+'''')=0;
               return int_getNewlErr(
               'the first character is unexpected.');
           endif;
           lArg=int_getArg(formula:p:lRep);
           if tree_isofthekind(kErr:lArg) or p=0;
             return lArg;
           endif;
           p=%check(' ':formula:p);
           if p>0;
               return int_getNewlErr(
               'Unexpected character is found.');
           endif;
           return lArg;
         p                 e
          //‚------------------------------------------------------------------
          //‚get argument
          //‚------------------------------------------------------------------
         pint_getArg       b
         d int_getArg      pi              *
         d  formula                    1000a   varying const
         d  p                             5u 0
         d  lRep                           *   const
          *
         d  lArg           s               *
           lArg=int_getArg2(formula:p:lRep);
           if tree_isofthekind(kErr:lArg) or p=0;
             return lArg;
           endif;
           //
           p=%check(' ':formula:p);
           if p>0 and %subst(formula:p:1)='+';
             return int_plus(lArg:formula:p:lRep);
           endIf;
           return larg;
         p                 e
          //‚------------------------------------------------------------------
          //‚get argument (part 2)
          //‚------------------------------------------------------------------
         pint_getArg2      b
         d int_getArg2     pi              *
         d  formula                    1000a   varying const
         d  p                             5u 0
         d  lRep                           *   const
          *
         d p1              s              5u 0
         d p2              s              5u 0
         d p3              s              5u 0
         d keyWord         s             50a   varying
           //‚search for the next filled position
           p1=%check(' ':formula:p);
           if %subst(formula:p1:1)='''';
             p=p1;
             return int_getConst(formula:p);
           endif;
           //‚search for the next no meaning position
           p2=%check(min+maj+num+spec:formula:p1);
           //‚get the key word
           keyWord=%subst(formula:p1:p2-p1);
           //‚put the keyword on uppercase
           keyWord=%xlate(min:maj:keyWord);
           //‚get the next charactere
           p3=%check(' ':formula:p2);
           if p3>0 and %subst(formula:p3:1)='(';
             p=p3+1;
             return int_getProc(keyWord:formula:p:lRep);
           else;
             p=p3;
             return int_getField(keyWord:p:lRep);
           endIf;
         p                 e
          //‚------------------------------------------------------------------
          //‚get the field
          //‚------------------------------------------------------------------
         pint_getField     b
         d int_getField    pi              *
         d  keyword                      50a   const varying
         d  p                             5u 0
         d  lRep                           *   const
          *
         d lField          s               *
           lField=tree_getItemfromList(lRep:kField:keyWord);
           if lField<>*null;
             return lField;
           else;
             return int_getNewlErr('The field '+keyWord+' is not defined');
           endIf;
         p                 e
          //‚------------------------------------------------------------------
          //‚get the procedure
          //‚------------------------------------------------------------------
         pint_getProc      b
         d int_getProc     pi              *
         d  keyword                      50a   const varying
         d  formula                    1000a   varying const
         d  p                             5u 0
         d  lRep                           *   const
          *
         d lProc           s               *
           lProc=tree_getItemfromList(lProcs:kProc:keyWord);
           if lProc=*null;
             return int_getNewlErr('The procedure '+keyWord+' is not defined');
           endIf;
           p=%check(' ':formula:p);
           //‚procedure without arguments
           if p>0 and %subst(formula:p:1)=')';
             p+=1;
             return lProc;
           endIf;
           //‚create a link to tie arguments
           return int_getArgs(lProc:formula:p:lRep);
         p                 e
          //‚------------------------------------------------------------------
          //‚get the arguments of the procedure
          //‚------------------------------------------------------------------
         pint_getArgs      b
         d int_getArgs     pi              *
         d  lProc$                         *   const
         d  formula                    1000a   varying const
         d  p                             5u 0
         d  lRep                           *   const
          *
         d  lProc          s               *
         d  lArg           s               *
           lProc=tree_getNewLink(lProc$);
           dou p=0 or %subst(formula:p:1)<>':';
             p=%check(':':formula:p);
             lArg=int_getArg(formula:p:lRep);
             if tree_isOfTheKind(kErr:lArg);
               return lArg;
             elseif tree_isOfTheKind(klink:lArg);
               tree_linktoparent(lProc:lArg);
             else;
               tree_linktoparent(lProc:tree_getNewLink(lArg));
             endIf;
             p=%check(' ':formula:p);
           endDo;
           if p=0 or %subst(formula:p:1)<>')';
               return int_getNewlErr(
               'A right parenthesis is expected but is not found.');
           endif;
           p+=1;
           return lProc;
         p                 e
          //‚------------------------------------------------------------------
          //‚concat arguments (triggered by plus)
          //‚------------------------------------------------------------------
         pint_plus         b
         d int_plus        pi              *
         d  lArg1                          *   const
         d  formula                    1000a   varying const
         d  p                             5u 0
         d  lRep                           *   const
          *
         d  lPlus          s               *
         d  lArg           s               *
           lPlus=tree_getNewLink(tree_getItemfromList(lProcs:kProc:'CONCAT'));
             if tree_isOfTheKind(klink:lArg1);
               tree_linktoparent(lPlus:lArg1);
             else;
               tree_linktoparent(lPlus:tree_getNewLink(lArg1));
             endIf;
           dou p=0 or %subst(formula:p:1)<>'+';
             p=%check('+ ':formula:p);
             if p=0;
               return int_getNewlErr(
               'An argument is expected but not found.');
             endif;
             lArg=int_getArgPlus(formula:p:lRep);
             if tree_isOfTheKind(kErr:lArg);
               return lArg;
             elseif tree_isOfTheKind(klink:lArg);
               tree_linktoparent(lPlus:lArg);
             else;
               tree_linktoparent(lPlus:tree_getNewLink(lArg));
             endIf;
           endDo;
           return lPlus;
         p                 e
          //‚------------------------------------------------------------------
          //‚get argument in plus context
          //‚------------------------------------------------------------------
         pint_getArgPlus   b
         d int_getArgPlus  pi              *
         d  formula                    1000a   varying const
         d  p                             5u 0
         d  lRep                           *   const
          *
         d  lArg           s               *
           lArg=int_getArg2(formula:p:lRep);
           if tree_isofthekind(kErr:lArg) or p=0;
             return lArg;
           endif;
           //
           p=%check(' ':formula:p);
           return larg;
         p                 e
          //‚------------------------------------------------------------------
          //‚get const
          //‚------------------------------------------------------------------
         pint_getConst     b
         d int_getConst    pi              *
         d  formula                    1000a   varying const
         d  p                             5u 0
          *
         d  Str            s           2048a   varying
         d  p1             s              5u 0
         d  p2             s              5u 0
           p1=p+1;
           dow 1=1;
             p2=%scan('''':formula:p1);
             if p2=0;
               return int_getNewlErr('missing trailing apostrophe (pos='+
                                      %char(p)+')');
             endif;
             str+=%subst(formula:p1:p2-p1);
             if %subst(formula:p2:2)='''''';
               str+='''';
               p1=p2+2;
               iter;
             endif;
             leave;
           enddo;
           p=p2+1;
           return int_getNewlCst(str);
         p                 e
          //‚-------------------------------------------------------------------
          //‚ create a new error
          //‚-------------------------------------------------------------------
         pint_getNewlErr...
         p                 b
         d int_getNewlErr...
         d                 pi              *
         d  Str                        2048a   const varying
          *
         d err             ds                  likeDs(tErr) based(pErr)
          /free
            pErr=tree_getNewItem(%addr(tErr):%size(tErr));
            err.pStr=int_allocStr(str);
            return tree_getNewLink(pErr);
          /end-free
         p                 e
          //‚-------------------------------------------------------------------
          //‚ create a new constant
          //‚-------------------------------------------------------------------
         pint_getNewlCst...
         p                 b
         d int_getNewlCst...
         d                 pi              *
         d  Str                        2048a   const varying
          *
         d cst             ds                  likeDs(tCst) based(pCst)
          /free
            pCst=tree_getNewItem(%addr(tCst):%size(tCst));
            cst.pStr=int_allocStr(str);
            return tree_getNewLink(pCst);
          /end-free
         p                 e
          //‚-------------------------------------------------------------------
          //‚ Alloc string
          //‚-------------------------------------------------------------------
         pint_allocStr     b
         d int_allocStr    pi              *
         d  Str                        2048a   const varying
          *
         d pStr            s               *
         d len             s              5u 0
          /free
           len=%len(Str)+1;
           pStr=%alloc(len);
           %str(pStr:len)=str;
           return pStr;
          /end-free
         p                 e
          //‚-------------------------------------------------------------------
          //‚get string from argument
          //‚-------------------------------------------------------------------
         pint_getStringFromArg...
         p                 b                   export
         d int_getStringFromArg...
         d                 pi         32000a   varying
         d  lArg                           *   const
         d  curBuffer                     3u 0 const options(*nopass)
          *
         d  lArg$          s               *
         d  field          ds                  likeDS(tField) based(pField)
         d  fmt            ds                  likeDS(tFormat) based(pFmt)
         d  err            ds                  likeDS(tErr) based(pErr)
         d  cst            ds                  likeDS(tCst) based(pCst)
         d  proc           ds                  likeDS(tProc) based(pProc)
         d  String         s          32000a   varying inz('?')
         d  buffer         s          32000a   based(pBuffer)
         d  pBuffer        s               *
          //˜procedure
         d  procexe        pr         32000a   varying extproc(proc.pAddr)
         d                                 *   options(*nopass) const
          /free
           //‚the item/link is a link?take it as argument
           if not tree_isOfTheKind(kLink:lArg:lArg$);
             lArg$=lArg;
           endIf;
           //‚get the value from the kind of item
           if tree_isOfTheKind(kField:lArg$:pField);
             //‚field
             pFmt=tree_getItem(tree_getParent(lArg$));
             //
             if %parms()=1;
               pBuffer=fmt.pBuffer1;
             elseif curBuffer=1;
               pBuffer=fmt.pBuffer1;
             else;
               pBuffer=fmt.pBuffer0;
             endIf;
             //
             if %scan(field.type:'AOZLT')>0;
               String=%subst(buffer:field.posInBuffer+1:field.len);
             elseif %scan(field.type:'PS')>0;
               String=int_editNumeric(pBuffer:field);
             elseIf field.type='B';
               String=int_editInteger(pBuffer:field);
             endIf;
             return String;
           elseif tree_isOfTheKind(kErr:lArg$:pErr);
             //‚error
             String=%str(err.pStr);
             return String;
           elseif tree_isOfTheKind(kCst:lArg$:pCst);
             //‚constante
             String=%str(cst.pStr);
             return String;
           elseif tree_isOfTheKind(kProc:lArg$:pProc);
             //‚procedure
             String=procexe(lArg);
             return String;
           else;
             return '';
           endIf;
          /end-free
         p                 e
          //˜-------------------------------------------------------------------
          //˜get today date
          //˜-------------------------------------------------------------------
         ptoday            b
         d today           pi         32000a   varying
         d lArgs                           *   options(*nopass) const
          *
         d str             s          32000a   varying
           str=%char(%date());
           return str;
         p                 e
          //˜-------------------------------------------------------------------
          //˜concatenation
          //˜-------------------------------------------------------------------
         pConcat           b
         d concat          pi         32000a   varying
         d lArgs                           *   options(*nopass) const
          *
         d string          s          32000a   varying
         d lArg            s               *
           lArg=tree_getFirst(lArgs);
           dow lArg<>*null;
             String+=int_getStringFromArg(lArg);
             lArg=tree_getNext(lArg);
           endDo;
           return string;
         p                 e
          //˜-------------------------------------------------------------------
          //˜trim
          //˜-------------------------------------------------------------------
         pTrim             b
         d trim            pi         32000a   varying
         d lArgs                           *   options(*nopass) const
          *
         d string          s          32000a   varying
         d lArg            s               *
          *
           lArg=tree_getFirst(lArgs);
           String=int_getStringFromArg(lArg);
           string=%trim(string);
           return string;
         p                 e
    
    585 pointsBadges:
    report
  • Chelebarry
    Splitgurl check in the Edit - Preferencia - Macro / Script option to see if you are really deleting the macros on the right folder sometimes people have more that one private folder.
    100 pointsBadges:
    report
  • Chelebarry
    MacAttack  I have used a mix of VBA commands and some other internal from AS400 such as:

    autECLSession.autECLPS.SendKeys

    Many of this and how they work I have had to load for them in the internal help the program give you.

    But VB help me set variables and objects the help me open files where I pick data to update on a certain AS400 screen such as:

    Dim

    Set 

    100 pointsBadges:
    report
  • balvarenga
    I need a script to start recording a macro of what I do. A basic one would be fine as my as400 was stripped of macro scripts for some stupid reason. Please if anyone has a simple code to record in AS/400. Please provide.
    20 pointsBadges:
    report
  • TheRealRaven
    @balvarenga : "AS/400s" don't have "macros". You might have software on your PC that can create and use macros, but we'd need to know what that software is before knowing how it might record and play back your actions.

    It seems likely that you'd have iSeries Access for Windows, but competing products exist.
    27,190 pointsBadges:
    report
  • ToddN2000
    @balvarenga: If it's just to record keystrokes, try using the Client Access record feature to save your macro. If it's more involved let us know more details on what you need help with and what coding you are familiar with.
    110,160 pointsBadges:
    report
  • balvarenga
    @ToddN2000, the issue is I have a record button on my as 400 the little red arrow button a box pops up and asks for file name, there is vb script file or macro file option, I clock ok on either and a PC5250 boc pops up saying "PCSERR003 - error writing file:*MAC" and so im not savy on code or how to fix my i.t doesn't know much about macros and so I'm on my own lol. trying to fix so I can be more productive.
    20 pointsBadges:
    report
  • TheRealRaven
    @balvarenga: If that's the actual error message, it most likely means that you didn't supply a valid macro file name. It doesn't know where you want to store the macro.
    27,190 pointsBadges:
    report
  • ToddN2000
    @balvarenga: After pressing the red arrow to record the key strokes, the macro box open up. *.MAC is a generic placeholder. You need to give it a name like Orderfill.MAC. If it's keystrokes you are recording, just press the red square to stop recording and save the macro. The default location they get stored in is under "username"\appdata\roaming\Client Access\emulator\private.
    110,160 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.

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

Following

Share this item with your network: