LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (March 2002, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 5 Mar 2002 14:23:47 -0500
Reply-To:     "Carriere, Ron" <rcarriere@MEDNET.UCLA.EDU>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Carriere, Ron" <rcarriere@MEDNET.UCLA.EDU>
Subject:      How to read previous lines based upon string in current line.

I have dataset that consists of 40K+ lines of MVS JCL. I am attempting to output a list of datasets cataloged by that JCL. Pseudo code for the task would be

Read a line;

IF a line contains the string "CATLG" then do; if line contains "dsn=' then output the line; else do; read and then output the two previous and then the current line; end; end;

The "else do" part is required because the dataset name is sometimes on one of the two previous lines. That is part I can't accomplish without sorting and resorting the dataset, but there must be a better way using line pointer controls, no?

Ron Carriere UCLA Medical Center


Back to: Top of message | Previous page | Main SAS-L page