home *** CD-ROM | disk | FTP | other *** search
- Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
- Path: sparky!uunet!gatech!paladin.american.edu!auvm!LOBBY.TI.COM!RSNYDER
- X-Mailer: ELM [version 2.2 PL16]
- Message-ID: <9207311445.AA21000@ti.com>
- Newsgroups: bit.listserv.sas-l
- Date: Fri, 31 Jul 1992 09:45:25 CDT
- Reply-To: "R. Snyder" <rsnyder@LOBBY.TI.COM>
- Sender: "SAS(r) Discussion" <SAS-L@UGA.BITNET>
- From: "R. Snyder" <rsnyder@LOBBY.TI.COM>
- Subject: Re: SAS/AF problem
- Comments: To: GOVE004%TWNMOE10.BITNET@uga.cc.uga.edu
- Comments: cc: sas-l@uga.cc.uga.edu
- In-Reply-To: <9207290945.AA29887@ti.com>; from "Aga Chen" at Jul 29,
- 92 1:55 pm
- Lines: 97
-
- The question:
-
- > Dear SAS-Lers:
- > I have developed a tape management system using SAS 6.07/AF on
- > MVS/XA system. I imitated the way listing on SAS manu: SAS Screen
- > Control Language, Usage Version 6, First Edition, page 197-200.
- >
- > I describe you some information:
- > My data file contains some fields: volser no.
- > use dept.
- > borrow date
- > the date should be return
- > tape type
- > .
- > .
- > .
- >
- >
- > On page 199, Display 12.5, I changed the field 'Delete row' to
- > 'action' in my program and I can issue commands in the 'action' field.
- > For example, 'D' means 'delete record from data file',
- > 'A' means 'apend a new tape record to the last record',
- > 'R' means 'use department Return tapes borrowed from
- > our EDP center and from my program's
- > control to erase the tape record's fields
- > to blank except volser no. and tape type'
- > 'U' means 'to Update the record and to highlight
- > the record'.
- >
- > The way I use is like the MVS/ISPF funtion 3.4 can manipulate multiple
- > entries.
- >
- > My problems are:
- > 1. When I am trying to delete records by issuing multiple
- > 'D' on the action fields, I cannot successfully delete those records.
- > (eg. I issue 3 'D' to delete 3 records but it only delete 1 or 2 records.)
- >
- > 2. Issuing 'A' on field 'action' to add a new record but it doesn't
- > work on subset data file, it just works on the whole data file and
- > I cannot put the cursor on the first field of the new record.
- > (Before I make actions on my tape records, I use another screen to
- > find subset records I want to manage. Then, pass the where
- > CLAUSE to next program.)
- >
- > 3. I issue 'R' but it doesn't work.
- >
- > 4. I don't know how to highlight the update record and how to show message
- > for us confirmation.
- >
- > Following is my screens and program:
- >
- ><Stuff Deleted>
- >
- > =============================================================================
- > Does anyone know of any ways to solve my problem?
- > Thanks in advance for any suggestions.
- >
- > Aga Chen Bitnet add. : GOVE004@TWNMOE10
-
- Aga,
-
- I have a couple of suggestions that I hope will help.
-
- a) The SCL manual reccomends that the the set statement come immediately
- after the open statement. Ir may not be a problem, but it is safer
- that way.
-
- b) Regarding problem 1: I don't believe that the putrow routine
- neccessarily executes for each row in the table. In fact I believe
- it only executes as required to update the screen. You may need your
- own loop to go through all of the records to search for the D's.
- I also noted that you use the _currow_ variable outside of the getrow
- and putrow routines. I've foud that its value can be unpredictable
- under these circumstances. I usually save a value I want to keep in
- another variable to use later. Unless it is a part of your data set,
- you may also need to setup your action
- field as an array to store multiple designations. This may be tricky
- since you are dealing with an unknown number of recods and may require
- another data set for the purpose. An option may be to put the action
- field above the extended table and then use multiple selections and the
- selected function to handle it.
-
- c) Regarding problem 2: Attempting to sort a subsetted data set causes
- the open mode of the data set to be changed to 'i' and fouls everything
- up. The only cure that I know of is to sort it before applying the
- where clause or to remove the where temporarily while sorting. Perhaps
- someone else can help us both out with that mess. At any rate, your
- append will fail.
-
- d) Regarding problem 3: i believe that your "R" routine needs an UPDATE
- function to update the data set after you set your variable values.
-
- Let me know if any of this is of value.
-
- Regards,
-
- Bob Snyder, Texas Instruments, Sherman, TX
-