Posted: Sun Jun 08, 2008 11:42 pm Post subject: SAS Macros and VSAM match
Hi,
Please help me in the below requirement,
I need to calculate value BALANCE = SALARY - EXPENSE-2 using 4 ps input files and one vsam input file by using vsam key match and reading the input files in sas macros.
I have 4 input files (PS) with following fields,
EMP NO, AGE, NAME, SALARY, EXPENSE-1.
I have another VSAM input file which having fields,
EMP NO, EXPENSE-2.
now, I need to calculate BALANCE = SALARY - EXPENSE-2 using VSAM match for all the employee (EMP no is unique) in the 4 input files by reading the files in SAS macros and write into the output file - with EMP NO, AGE, NAME, BALANCE.
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
Posted: Mon Jun 09, 2008 1:42 am Post subject:
What specific problem do you have? This looks fairly rudimentary:
read concatenated seql. file
create vsam key
read vsam file
create output
repeat until eof on seql. file _________________ Utility and Program control cards are NOT, repeat NOT, JCL.
Joined: 01 Mar 2007 Posts: 475 Topics: 9 Location: Welsh Wales
Posted: Sat Jun 21, 2008 4:58 am Post subject:
Why do you need to use a SAS macro ? please explain further.
Are you writing a PS or VS file as output ?
4 input files all containing the indicated fields, what about suplicate data, is this a possibility ? _________________ If it's true that we are here to help others,
then what exactly are the others here for ?
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