Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AS400 CPYTOIMPF forces me to enter the latest Job Number

Status
Not open for further replies.

AMRICE

IS-IT--Management
Nov 6, 2019
4
US
Hello All:

HELP!!! I have developed a very slick VBA script in Excel which automates copying AS400 spool files to a Shared Folder in Windows using the CPYTOIMPF function. The CPYTOIMPF required several key values, which have all be captured in an AS400 Macro. I can manipulate the key values using VBA to select the appropriate spool files (they always have same name) as they are refreshed with new data.

My problem is the Job Number. CPYTOIMPF forces me to enter the latest Job Number, which requires manual intervention to find the Job Number. It seems to me if I know the Job Name (never changes), User Name (never changes), System Name (never changes), *Last file created, etc. Why won’t CPYTOIMPF forgive entering the Job Number which changes every time the spool file is refreshed. In one case there are 36 spool reports run in sequence and all have the same Job Number.

I will stop here and ask if anyone have a easy solution to get around the Job Report Number of a way to scrap the number perhaps from an AS400 screen. A solution would be a great find, and result in major labor savings at my company
Many thanks,
AMRICE
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top