It's already a subroutine.

It's the tests that are the problem. If I used an OPEN and a READ I
   wouldn't have an issue. It's trying to get TRANS to be all it can be
   that is the problem. I might also consider passing the one file's
   FCB into the subroutine to avoid an OPEN, but I wanted to make this
   subroutine something that could be called from multiple programs that
   may or may not have that file open...

But since a TRANS is about as intensive as an OPEN/READ it probably wouldn't
   be any difference is processing time.

George

> -----Original Message-----
> From: [email protected] [mailto:u2-users-
> [email protected]] On Behalf Of Israel, John R.
> Sent: Friday, October 08, 2010 9:15 AM
> To: 'U2 Users List'
> Subject: Re: [U2] Stumped with TRANS...
> 
> Instead of a TRANS with various conditions, call a subroutine that has
> all the tests you need.
> 
> 
> John Israel
> Senior Programmer/Analyst
> Dayton Superior Corporation
> 1125 Byers Road
> Miamisburg, OH  45342
> 
> 
> -----Original Message-----
> From: [email protected] [mailto:u2-users-
> [email protected]] On Behalf Of George Gallen
> Sent: Friday, October 08, 2010 9:14 AM
> To: U2 Users List
> Subject: Re: [U2] Stumped with TRANS...
> 
> hmmm. might work. I'll have to try it just to see, but I'll
> most likely go with switching field orders, since I'd rather
> not do a double TRANS, in case the file I'm scanning gets
> a lot bigger, then processing time will be significant.
> 
> Thanks
> 
> George
> 
> > -----Original Message-----
> > From: [email protected] [mailto:u2-users-
> > [email protected]] On Behalf Of Bob Woodward
> > Sent: Thursday, October 07, 2010 7:22 PM
> > To: U2 Users List
> > Subject: Re: [U2] Stumped with TRANS...
> >
> > Can you chain two TRANS functions and compare the results?  If you
> use
> > "C" the first time and "X" the second time then you would be able to
> > know if there is no record when the two results are different.  If
> the
> > record doesn't exist, you would only have @ID in the first result but
> > the second result would be blank.  If the record does exist and the
> > field you are getting is the key value, then the first AND second
> > results would be equal, both containing @ID.
> >
> > BobW
> >
> _______________________________________________
> U2-Users mailing list
> [email protected]
> http://listserver.u2ug.org/mailman/listinfo/u2-users
> 
> _______________________________________________
> U2-Users mailing list
> [email protected]
> http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to