Macro Script on AS/400

4275 pts.
Tags:
AS/400
AS/400 macros
Macros
Hi,

Currently We are getting a Report on Monthly Basis using Macro script which runs manually on next day to monthend. Now, We have requirement for generating the Report on Monthend Date itself as part of over night process. Is there anyway to automate the Macro Scripts in AS400. Please suggest.

Pradeep.



Software/Hardware used:
AS/400

Answer Wiki

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

Pradeep, are you referring to a Client Access Macro script? Are you calling something from a menu? More details are needed I think… I’ve not used Macros from Client Access a whole lot, but I’m not aware of a way to run them automatically. Your PC would have to be on with an active logged in connection to the system…I believe… Not sure how this would be done automatically…

Can you just put the programs into the batch process? Or are you running them from an interactive menu? If that is the case you’ll have to write a wrapper that get submitted in batch or break out the base logic into a separate program that can be called via an interactive program or be submitted via batch.

Discuss This Question: 7  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
  • TomLiotta
    Although there's not much chance of replicating the actual macro onto your AS/400, the functions that are done by the macro can usually be duplicated. The difficult parts to duplicate would be any times that your macro entered characters into a display file in one of your applications. What tasks does your macro do? Tom
    125,585 pointsBadges:
    report
  • deepu9321
    I am not writing into any Display Files using Macro and using it for Extracting Data from Database to Excel Sheet. Pradeep.
    4,275 pointsBadges:
    report
  • Yorkshireman
    Perhaps you should give some more details - the term 'macro script' isn't very precise. Is it a macro in Client Access? in Excel? 'macroo's used to imply a keystroke recorder, but could now include any functionality. How is the macro started - on which platform? Can you post the code here ? Generating a report at a monthend is uitterly fundamental to business processing, and on IBM a Scheduled job entry would be a start point. More information please...
    5,580 pointsBadges:
    report
  • TomLiotta
    ...using it for Extracting Data from Database to Excel Sheet. An Excel-compatible file could be generated on the AS/400 on a schedule. The basic question would be about what "Data from Database" is used as input to the macro. Tom
    125,585 pointsBadges:
    report
  • deepu9321
    It is an Excel compatible macro. And, As of now we are automating(Scheduled Jobs) all other Reports except Macro scripts. Still it will be good if I can know about this. Here is the structure of the code. I have not included fully.
    Sub Macro1()
    '
    ' Macro1 Macro
    ' Macro created 5/02/2010 by Allan Guatlo
    '
    
    '
        Columns("A:A").Select
        Selection.TextToColumns Destination:=Range("A1"), DataType:=xlFixedWidth, _
            FieldInfo:=Array(Array(0, 1), Array(44, 1), Array(55, 1), Array(64, 1), Array(73, 1), _
            Array(82, 1), Array(91, 1), Array(100, 1), Array(109, 1), Array(118, 1), Array(127, 1), _
            Array(136, 1), Array(145, 1), Array(154, 1), Array(168, 1), Array(176, 1), Array(190, 1))
        Cells.Select
        Cells.EntireColumn.AutoFit
    ....
    ...
    ...
        Columns("U:U").Select
        Range(Selection, Selection.End(xlToRight)).Select
        Selection.Delete Shift:=xlToLeft
        
        Rows("1:1").Select
        Selection.Insert Shift:=xlDown
        Range("A1").Select
        
        ActiveCell.FormulaR1C1 = reportMonth
        
    End Sub
    
    Pradeep.
    4,275 pointsBadges:
    report
  • Yorkshireman
    Am I right in think ing that you run a Client Access transfer to move the dat to a PC, then your script? If so, you can automate the Client access with the RTOPCB batch transfer. A STRPCCMD could be automated as a scheduled job within the IBM i Series, run the transfer, call Excel, and IFIRC, the macro set to run on opening the sheet.
    5,580 pointsBadges:
    report
  • TomLiotta
    What is the macro selecting from? Tom
    125,585 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