m204prgmr Posted April 10, 2007 Report Share Posted April 10, 2007 It has been awhile and I'm rusty. I'm trying to save Notepad that I've opened and written to and can't seem to connect the dots. Can someone help? thanks <BTFBEG:005:000001:000000:C:\Documents and Settings\RGHutchinson\Desktop\AnnArbornames.txt><LAUNCHDEL2:0:01C:\WINDOWS\system32\notepad.exe><IVAR2:01:02:FEnter the numberFFCenter:Center><SPKEY:0100><TEXTTYPE:<ALTD>F<ALTU>><TEXTTYPE:A><TEXTTYPE:C:\PT2OKX0%N%.txt<ENTER>><DELAY:10><DIS:<TVAR2:05:02:FEnter the outfile nameFFCenter:Center><TEXTTYPE://PT2MTX0%N1% JOB ,'PT2MT FTP'<ENTER>><TEXTTYPE://STEPNAME EXEC PGM=FTP<ENTER>><TEXTTYPE://*%OPC SCAN<ENTER>><TEXTTYPE://SYSPRINT DD SYSOUT=*<ENTER>><TEXTTYPE://OUTPUT DD SYSOUT=*<ENTER>><TEXTTYPE://INPUT DD * <ENTER>><TEXTTYPE:XXX.29.XX.64 5565<ENTER>><TEXTTYPE:FTISTSC TISTSC <ENTER>><TEXTTYPE: <ENTER>><TEXTTYPE:put 'PT2MT.OUT.%T5%' PT2MT.OUT.%T5% <ENTER>><TEXTTYPE:quit<ENTER>><TEXTTYPE://*<ENTER>><BTFEND> Quote Link to comment Share on other sites More sharing options...
kevin Posted April 10, 2007 Report Share Posted April 10, 2007 I'm not sure what you're trying to accomplish but at first glance I think you need to move the launching of notepad above the Text File Begin Process loop. One other thing that I noticed is you are using uppercase letters in your text type commands that open the file. Some programs don't work as well with uppercase letters as with lower case letters. I also think you may need a slight delay after the Alt-f and another one after the a. And lastly, I do not see where you are saving the file (and possibly closing it) after your Text Type commands. This is what you have: Text File Begin Process: "AnnArbornames.txt" Program Launch: "notepad.exe" Variable Set Integer %N1% from Prompt Keystroke Speed: 100 Milliseconds Text Type: <ALTD>F<ALTU> Text Type: A Text Type: C:\PT2OKX0%N%.txt<ENTER> Delay 10 Seconds Variable Set String %T5% from Prompt Text Type: //PT2MTX0%N1% JOB ,'PT2MT FTP'<ENTER> Text Type: //STEPNAME EXEC PGM=FTP<ENTER> Text Type: //*%OPC SCAN<ENTER> Text Type: //SYSPRINT DD SYSOUT=*<ENTER> Text Type: //OUTPUT DD SYSOUT=*<ENTER> Text Type: //INPUT DD * <ENTER> Text Type: XXX.29.XX.64 5565<ENTER> Text Type: FTISTSC TISTSC <ENTER> Text Type: <ENTER> Text Type: put 'PT2MT.OUT.%T5%' PT2MT.OUT.%T5% <ENTER> Text Type: quit<ENTER> Text Type: //*<ENTER> Text File End Process You might want to try something like this: Launch and Activate: "notepad.exe" Delay 1 Seconds Text File Begin Process: "AnnArbornames.txt" If Not Window Title "Notepad" on top Activate Window: "Notepad" End If Variable Set Integer %N1% from Prompt Keystroke Speed: 100 Milliseconds Text Type: <ALTD>f<ALTU> Delay 0.1 Seconds Text Type: a Delay 0.1 Seconds Text Type: C:\PT2OKX0%N%.txt<ENTER> Delay 10 Seconds Variable Set String %T5% from Prompt Text Type: //PT2MTX0%N1% JOB ,'PT2MT FTP'<ENTER> Text Type: //STEPNAME EXEC PGM=FTP<ENTER> Text Type: //*%OPC SCAN<ENTER> Text Type: //SYSPRINT DD SYSOUT=*<ENTER> Text Type: //OUTPUT DD SYSOUT=*<ENTER> Text Type: //INPUT DD * <ENTER> Text Type: XXX.29.XX.64 5565<ENTER> Text Type: FTISTSC TISTSC <ENTER> Text Type: <ENTER> Text Type: put 'PT2MT.OUT.%T5%' PT2MT.OUT.%T5% <ENTER> Text Type: quit<ENTER> Text Type: //*<ENTER> Text Type: <CTRLD>s<CTRLU> Wait for File Ready: "PT2OKX0%N%.txt" Delay 0.1 Seconds Text File End Process Quote Link to comment Share on other sites More sharing options...
m204prgmr Posted April 10, 2007 Author Report Share Posted April 10, 2007 Thanks Kevin I'll try your suggestion tonight. How do I save PT2OKX0%N%.txt %N% times once done? AnnArbor.txt has 63 lines with one word on each line. That's where %T5% is used. Quote Link to comment Share on other sites More sharing options...
kevin Posted April 10, 2007 Report Share Posted April 10, 2007 How do I save PT2OKX0%N%.txt %N% times once done?I don't understand. Why are you saving it %N% times? I see another error that I didn't spot before. %N% is not a valid Macro Express variable. %N1% would be, however. Quote Link to comment Share on other sites More sharing options...
m204prgmr Posted April 11, 2007 Author Report Share Posted April 11, 2007 The objective is to create as many .txt files as there are %N1% variables and to FTP them to the Mainframe. I hope this make sense and I apologize for not stating that earlier Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.