MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

stem logic

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
cyberuser
Beginner


Joined: 15 Oct 2005
Posts: 29
Topics: 12

PostPosted: Thu May 18, 2006 2:20 am    Post subject: stem logic Reply with quote

Hello,
i have a file with 200.000 recs, and after read it, i would like to remove the recs by a certain criteria. Could someone pls provide me a sample code how this can be acquired by use of REXX ?

the code below would drop all lines after list.100
and the desired would be : list.1 ... list.99 then list.101...

DO A=1 TO LIST.0
IF LIST.A = 100 THEN DROP LIST.A
END

is the use of STEM for this problem a good idea?
Back to top
View user's profile Send private message
acevedo
Beginner


Joined: 03 Dec 2002
Posts: 127
Topics: 0
Location: Europe

PostPosted: Thu May 18, 2006 6:29 am    Post subject: Reply with quote

a stem with 200000 items? IMHO are too much items... what about your region memory?
Back to top
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Thu May 18, 2006 6:37 am    Post subject: Reply with quote

cyberuser,

Using Stem for this case is not a good idea. Instead, you can read your input file record by record using DISKR until RC = 2 (End of file). You can then check your input record for any condition and drop it if required. Else write it to your output file.

The other best alternative, would be to use utilities like SORT / FILEAID to delete only those records that you do not want.

Please provide us with complete information about your input file like LRECL, RECFM and the Criteria on which you drop the record. Do you just want to delete record # 100 or is there any other drop criteria ?

Thanks,
Phantom
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group