Re: [Tutor] Script to generate statements

2013-03-17 Thread Charles Leviton
Many thanks to Peter, Steven, Dave and Alan as well. Especially Peter's hints about using the "with construct". I discovered the missing strip() the hard way! ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://m

Re: [Tutor] Script to generate statements

2013-03-17 Thread Charles Leviton
Hi thanks for the response On Fri, Mar 15, 2013 at 5:43 PM, Hugo Arts wrote: > On Fri, Mar 15, 2013 at 9:03 PM, Hugo Arts wrote: > >> >> I have a few comments >> >> * Does the script work? If yes, I'd say it's probably fine. Pretty short >> so easy to understand whatever you do, and I see no ob

Re: [Tutor] Script to generate statements

2013-03-16 Thread Peter Otten
Charles Leviton wrote: > I was recently given this task. it's a very IBM mainframe specific task > so > I'm not sure how to find equivalent terms in another environment. I will > just use the mainframe terminology and hopefully y'all can figure out what > I mean. > > Given a list of DBRM member

Re: [Tutor] Script to generate statements

2013-03-15 Thread Steven D'Aprano
On 16/03/13 06:42, Charles Leviton wrote: This is the script I came up with...Would you critique it and let me know how I could have done it better? #create a series of bind statements fo = open('i:/text/jclout.txt', 'w') fi = open('i:/text/bindjclfirstpart.txt','rU') fibindjclvar = open('i:/t

Re: [Tutor] Script to generate statements

2013-03-15 Thread Dave Angel
On 03/15/2013 08:53 PM, Alan Gauld wrote: On 15/03/13 19:42, Charles Leviton wrote: Given a list of DBRM members create a JCL which has a series of bind statements for each DBRM. Ah, the joys of JCL. I haven't read a JCL script in about 15 years! :-) Been over 40 years for me, so I may not

Re: [Tutor] Script to generate statements

2013-03-15 Thread Alan Gauld
On 15/03/13 19:42, Charles Leviton wrote: Given a list of DBRM members create a JCL which has a series of bind statements for each DBRM. Ah, the joys of JCL. I haven't read a JCL script in about 15 years! :-) This is the tack I took. I have 3 input files a_ contains the fixed part of the JC

Re: [Tutor] Script to generate statements

2013-03-15 Thread Hugo Arts
On Fri, Mar 15, 2013 at 7:42 PM, Charles Leviton wrote: > I was recently given this task. it's a very IBM mainframe specific task > so I'm not sure how to find equivalent terms in another environment. I > will just use the mainframe terminology and hopefully y'all can figure out > what I mean. >

[Tutor] Script to generate statements

2013-03-15 Thread Charles Leviton
I was recently given this task. it's a very IBM mainframe specific task so I'm not sure how to find equivalent terms in another environment. I will just use the mainframe terminology and hopefully y'all can figure out what I mean. Given a list of DBRM members create a JCL which has a series of b