You did not follow the example at all. You need to get rid of all of the flags and counters that just clutter up the code.
Here's what you should be doing, assuming that all of the rest of code is correct... 0001 Y.SELECT.FILES = "SELECT " : DC.IN.DIR 0002 CALL EB.READLIST(Y.SELECT.FILES, Y.FILE.ID.LIST, '', YSEL,'') 0003 LOOP 0004 REMOVE Y.FILE.ID FROM Y.FILE.ID.LIST SETTING YID.POS 0005 WHILE Y.FILE.ID:YID.POS 0006 Y.FILE = DC.IN.DIR : "/" : Y.FILE.ID 0007 OPENSEQ Y.FILE READONLY TO F.DC.IN ELSE F.DC.IN = "" 0008 * Next line gets past the header, iow the first line of the sequential file 0009 READSEQ Y.REC.DETAILS FROM F.DC.IN THEN ;* If there is a header then continue on 0010 LOOP 0011 READSEQ Y.REC.DETAILS FROM F.DC.IN ELSE EXIT 0012 CONVERT ',' TO FM IN Y.REC.DETAILS 0013 Y.TTYPE = Y.REC.DETAILS<1> 0014 Y.LOCAL.DATE = Y.REC.DETAILS<2> 0015 Y.TLOGID = Y.REC.DETAILS<4> ;*TRANS ID 0016 Y.FT.DETAILS<-1> = 0017 Y.TTYPE: "_":Y.LOCALDATE:"_":Y.TLOGID 0018 CRT Y.FT.DETAILS 0019 REPEAT 0020 END 0021 CLOSESEQ F.DC.IN 0022 Y.ARCH.FILE.LIST<-1> = Y.FILE.ID 0023 REPEAT ;REM < End of reading file list> 0024 RETURN ;* Finish PROCESS.FILES Dan On Wed, Jun 17, 2009 at 9:01 AM, ufuktu <[email protected]> wrote: > > Hi, thanks for all recommended solution, I am sending you my code, > hope you can tell me where it went wrong... > ********************************************************************************************************************************** > Y.SELECT.FILES = "SELECT " : DC.IN.DIR > CALL EB.READLIST(Y.SELECT.FILES, Y.FILE.ID.LIST, '', YSEL,'') > LOOP > REMOVE Y.FILE.ID FROM Y.FILE.ID.LIST SETTING YID.POS > WHILE Y.FILE.ID:YID.POS > Y.FILE = DC.IN.DIR : "/" : Y.FILE.ID > OPENSEQ Y.FILE READONLY TO F.DC.IN ELSE F.DC.IN = "" > Y.RECORD.FOUND = 1 > LINE.CTR = 1 > START.DETAIL.LINE = 2 > LOOP > READSEQ Y.REC.DETAILS FROM F.DC.IN ELSE Y.RECORD.FOUND = 0 > UNTIL NOT( Y.RECORD.FOUND ) > IF LINE.CTR >= START.DETAIL.LINE THEN > CONVERT ',' TO FM IN Y.REC.DETAILS > Y.TTYPE = Y.REC.DETAILS<1> > Y.LOCAL.DATE = Y.REC.DETAILS<2> > Y.TLOGID = Y.REC.DETAILS<4> ;*TRANS ID > Y.FT.DETAILS<-1> = > Y.TTYPE:"_":Y.LOCALDATE:"_":Y.TLOGID > END > LINE.CTR = LINE.CTR + 1 > CRT Y.FT.DETAILS > REPEAT > CLOSESEQ F.DC.IN > Y.ARCH.FILE.LIST<-1> = Y.FILE.ID > REPEAT ;REM < End of reading file list> > CALL BATCH.BUILD.LIST("",Y.FT.DETAILS) > RETURN ;* Finish PROCESS.FILES > > > --~--~---------~--~----~------------~-------~--~----~ Please read the posting guidelines at: http://groups.google.com/group/jBASE/web/Posting%20Guidelines IMPORTANT: Type T24: at the start of the subject line for questions specific to Globus/T24 To post, send email to [email protected] To unsubscribe, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jBASE?hl=en -~----------~----~----~----~------~----~------~--~---
