BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I need to replace an existing INVALUE with a sequential dataset, and do not have clue 1 on how to do this. I am working with SAS 9.1.3 on a z/OS. The existing code looks like this:

PROC FORMAT;
INVALUE $FEIN '530075853' = '01'
'521264413' = '02'
'751588101' = '03'
'520794134' = '06';

and is then used in an INPUT statement:
DATA LIAB;
INFILE INPUT01;
INPUT @1 COMP $FEIN.
@13 LOB $CHAR1. ;

after the INPUT is the following:
KEEP COMP LOB;

The input file will only have 5 or 6 records.

Any thoughts or suggestions will be greatly appreciated

Thx
2 REPLIES 2
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
"Replace with sequential dataset" - what does this mean? Do you want to eliminate the use of the INPUT/INFORMAT $FEIN and change the SAS code to somehow take the possible input/output data-values and maintain then in a sequential file?

And, if so, would you expect your SAS program to read the sequential file with each execution, take the current data-values and generate your SAS statements to perform the data translation?

Have you looked at PROC FORMAT and CNTLIN= where you would have a DATA step to read your external (sequential) file and generate the SAS-required variables needed to use PROC FORMAT and input your equivalent INVALUE parameters from a SAS file?

Suggest reviewing the SAS DOC for PROC FORMAT (not having to do with z/OS specifically, other than reading / inputting your external file).

Scott Barry
SBBWorks, Inc.

Suggested Google advanced search argument, this topic / post:

proc format cntlin invalue site:sas.com
deleted_user
Not applicable
Scott,

You are correct in your assumptions - the sequential dataset IS intended to replace the hard-coded values. I have not worked with PROC FORMAT before, but I will give your suggestion a try and let you know how it works. Your help is greatly appreciated - I know only a little SAS, so did not know where to even start looking for the answer..

Thanks,
GES60

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1064 views
  • 0 likes
  • 2 in conversation