BookmarkSubscribeRSS Feed
iren_118
Calcite | Level 5

help:

  sas editor

Problem Description:

   sas editor has
characters for end of record /beginning of record????

I need them to do batch replacing in replacing.

6 REPLIES 6
ballardw
Super User

batch replacing of what? Values in a data set? Code files? External files?

And which file format/ operating system. Unix and Windows use different characters to denote end of line/ end of record.

Do you need to enter a value in program code? Do you need to identify something that your files are using other than operating system standard characters?

iren_118
Calcite | Level 5

My answers from my work email did not show here.

So I copied them here.

-bai

======

Just edit a text file as in general editor. Editor has replace
feature and I need to specify what to replace what.

To do this I need to know what char stands for ‘end of
record’/’beginning of record’ in the replace dialog.

=======

Code file as a text file. I am under windows.

-bai

jakarman
Barite | Level 11

The Windows/Unix environment is using a CR-LF LF CR (one of those) indicating the end of a record. This is very basic inherited from 7-bit ascii telex tty age.

This is how all tools and program editor are working. Often there is limit in the length of processing (no character) as with limited memory and processor-register usage.
A counter of 1 byte is ending at 255 length. This is a common limit for code with Unix (and SAS editor) with two-bytes and a sign this upper limit is 32K. That size can be set with sas as them maximum length. (default with 9.4 I believe).

The exception is Mainframes FB VB are not using chars for the end of record but they are system defined. They still often use a 80 max (Hollerith) source line. With a VBS you could use a 32k length. Only with downloading datasets from mainframe to Unix/Windows you have that kind of issues to take care of. SAS is supporting those mainframe approaches on Windows/Unix as it has his origins there. Not all tools are having that.    

---->-- ja karman --<-----
iren_118
Calcite | Level 5

Mr  Karman:

I no can get it clearly.

I use Widows. I knew Unix, VAX/VMS too. Have not heard FB VB yet.

=================

on SAS online documentation there is one about INFILE OPTIONS:

TERMSTR

CRLF for windows formatted file;

LF, NL for Unix

This is quite related  to my question.

But it is related to reading files to a SAS dataset..

==========================

Combine all those I have said:

What keys I should type for beginning/ending in the Replace  dialog box under SAS extended editor???

Thanks,

-Bai

jakarman
Barite | Level 11

The include is an external file there are many options for that like the infile and some special for source/code behavior .
SAS(R) 9.4 Companion for Windows, Third Edition  and linesize log/output windows - 256

SAS(R) 9.4 System Options: Reference, Third Edition source2 display included code in log

SAS(R) 9.4 System Options: Reference, Third Edition s2= limiting input source lines 
SAS(R) 9.4 System Options: Reference, Third Edition lrecl= the default length for reading external files, zee the note on F than it is 256 

SAS(R) 9.4 System Options: Reference, Third Edition cardimage that mainframe history
These are the documented settings that can cause cutting the length. In previous versions you are more often hit by some old convention as that 255

Thos cr/lf are hardly replacable as they are are global conventions being used everywhere.
When you have a problem with Excel csv having new-lines within cells there is some trick I believe. That is when the hard return is a CR and the new line a CR-LF you can diffentiate between those

Another would be fixing the record convention before processing.

---->-- ja karman --<-----
iren_118
Calcite | Level 5

According to SAS tech help: this is impossible.

-bai

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 937 views
  • 0 likes
  • 3 in conversation