09-22-2020
rkumar23
Calcite | Level 5
Member since
06-24-2014
- 81 Posts
- 11 Likes Given
- 0 Solutions
- 0 Likes Received
About
zOS & Storage Mainframe Systems programmer
zOS
-
Latest posts by rkumar23
Subject Views Posted 985 03-20-2018 11:33 AM 2993 05-30-2016 12:35 AM 1519 02-29-2016 10:09 PM 3017 01-20-2016 04:13 AM 3103 01-20-2016 04:10 AM 3107 01-20-2016 04:08 AM 3111 01-20-2016 03:58 AM 3133 01-20-2016 02:41 AM 3136 01-20-2016 02:10 AM 1385 10-29-2015 07:18 AM -
Activity Feed for rkumar23
- Posted Extracting records with in particular string on SAS Programming. 03-20-2018 11:33 AM
- Posted PROC SORT with NODUPKEY on SAS Programming. 05-30-2016 12:35 AM
- Posted Pattern Match using SQL or HASH or any other way on SAS Programming. 02-29-2016 10:09 PM
- Posted Re: Transpose data using array or proc tranpose on SAS Programming. 01-20-2016 04:13 AM
- Posted Re: Transpose data using array or proc tranpose on SAS Programming. 01-20-2016 04:10 AM
- Posted Re: Transpose data using array or proc tranpose on SAS Programming. 01-20-2016 04:08 AM
- Posted Re: Transpose data using array or proc tranpose on SAS Programming. 01-20-2016 03:58 AM
- Posted Re: Transpose data using array or proc tranpose on SAS Programming. 01-20-2016 02:41 AM
- Posted Transpose data using array or proc tranpose on SAS Programming. 01-20-2016 02:10 AM
- Posted PROC Report CELL Coloring condition on ODS and Base Reporting. 10-29-2015 07:18 AM
- Posted Re: PROC REPORT on ODS and Base Reporting. 10-22-2015 11:03 PM
- Posted Re: PROC Report CELL Coloring condition on SAS Programming. 10-22-2015 10:48 PM
- Posted Re: PROC REPORT on ODS and Base Reporting. 10-22-2015 08:16 AM
- Posted Re: PROC Report CELL Coloring condition on SAS Programming. 10-22-2015 08:13 AM
- Posted PROC REPORT on ODS and Base Reporting. 10-22-2015 03:44 AM
- Posted PROC Report CELL Coloring condition on SAS Programming. 10-22-2015 03:15 AM
- Posted Re: Combine/Merge two datasets on SAS Programming. 10-13-2015 12:52 AM
- Posted Re: Combine/Merge two datasets on SAS Programming. 10-12-2015 08:06 AM
- Posted Combine/Merge two datasets on SAS Programming. 10-12-2015 06:03 AM
- Posted Re: Char Variable All possible Character on SAS Procedures. 07-27-2015 04:11 AM
-
Posts I Liked
Subject Likes Author Latest Post 1 1 1 1 1
03-20-2018
11:33 AM
Could somebody please give me some thoughts what do loop I should code to extract the data between String PROF so basically the output dataset should have records which are between "PROF" string as many time as it appear until it reach End of file..
TESTING DATA WHICH IS NOT VALID TESTING DATA WHICH IS NOT VALID
TESING DATA PROF YES THIS IS A RECORD YES THIS IS ANOTHER RECORD DXXXXXXXXXXXXX XXXXXXXXXXXXXXX
TESTING DATA PROF YES THIS IS A RECORD YES THIS IS ANOTHER RECORD DXXXXXXXXXXXXX XXXXXXXXXXXXXXX
TESTING DATA WHICH IS NOT VALID TESTING DATA WHICH IS NOT VALID
... View more
05-30-2016
12:35 AM
DATA LAB1; INPUT OBS DAT TIM X Y Z ; DATALINES; 1 1111 1001 . . . 2 1111 1002 4 . . 3. 1111 1001 . 2 . 4. 1111 1001 . . 3 RUN; PROC SORT DATA=LAB1 NODUPKEY;BY DAT; RUN; PROC PRINT DATA=LAB1;RUN;
So I have data something like given in the DATALINES now I have a SORT which does NODUPKEY on say DAT variable and then pick only first record and discard 2,3,4 as they are duplicates..so output is as below: Obs OBS DAT TIM X Y Z 1 1 1111 1001 . . .
This is ok however now what happens is I have a requirement where out of these duplicates if Variable "X" contains value this should be the record which should be picked so I used below code : DATA LAB1; INPUT OBS DAT TIM X Y Z ; DATALINES; 1 1111 1001 . . . 2 1111 1002 4 . . 3. 1111 1001 . 2 . 4. 1111 1001 . . 3 RUN; PROC SORT DATA=LAB1 NODUPKEY;WHERE X <> . ;BY DAT; RUN;
Which gives me the record "2" as below:
Obs OBS DAT TIM X Y Z 1 2 1111 1002 4 . .
Now with this WHERE statement issue comes if all values for Variable X are missing I require that SORT behave like normal NODUPKEY and gives me record "1" as in example 1 above.
Any thoughts please?
... View more
02-29-2016
10:09 PM
I have two datasets and below is simple example where two datasets exist "dataset a" and "dataset b" now my objective is to do lookup using a pattern string from "dataset b" and look for matches in "dataset a" ...Tried with SQL as below however doesn't seems to work
PROC SQL; CREATE TABLE LOOKUP AS SELECT A.* FROM TMS A, FILT B WHERE A.DSN LIKE B.DSN; QUIT;
Dataset A (variable name is DSN) ZZZZ.TESTRV.CATT.LENGTH.WORMTEST
Dataset B(Variable name is DSN) zzzz.TEST%%.CATT.LENGTH
... View more
01-20-2016
04:13 AM
Looking something like this, so with subsys change the blades name change as well...
Output Looking: SUBSYS,MONTH,DATE,TIME,#Blades,1MA,1MB,1ME,1MF,2MC,2MD,2MC,2MH 53809,09,01-SEP-2015,0:15,8,1,1,2,1,1,1,1,2 53809,09,01-SEP-2015,0:30,8,1,1,2,1,1,1,1,2 53809,09,01-SEP-2015,0:45,8,1,1,3,1,1,1,1,3 53809,09,01-SEP-2015,1:00,8,1,1,3,1,1,1,1,2
SUBSYS,MONTH,DATE,TIME,#Blades,2MA,2MB,3ME,3MF,3MC,4MD,4MG,5MH 98909,09,01-SEP-2015,0:15,4,1,1,3,1,1,1,1,2
... View more
01-20-2016
04:10 AM
Hi Kurt, in that case is it possible by SUBSYS we create the column heading for the names?
... View more
01-20-2016
03:58 AM
Thanks, seems to work upto certain extend however when the value of name changes by subsys they are getting added as an extra column instead of replacing the names by subsys which crate issue as by subsys as names are very variable the row length with adding the columns are getting extended to very long length...
... View more
01-20-2016
02:41 AM
I believe should have included one more line in the input which make it tuff not to use the hardcoded value..so as in below example i added one more row so with the change of susbsy variable(which is first 5 digit no.) it's no guarantee we will have same column values..
So example as below when 98909 came in the things changed ...
Input Data ----------- 53809,09,01-SEP-2015,0:15,8,1MA,1,1MB,1,1ME,2,1MF,1,2MC,1,2MD,1,2MG,1,2MH,2 53809,09,01-SEP-2015,0:30,8,1MA,1,1MB,1,1ME,2,1MF,1,2MC,1,2MD,1,2MG,1,2MH,2 53809,09,01-SEP-2015,0:45,8,1MA,1,1MB,1,1ME,3,1MF,1,2MC,1,2MD,1,2MG,1,2MH,3 53809,09,01-SEP-2015,1:00,8,1MA,1,1MB,1,1ME,3,1MF,1,2MC,1,2MD,1,2MG,1,2MH,2 98909,09,01-SEP-2015,0:15,4,2MA,1,2MB,1,3ME,3,3MF,1,3MC,1,4MD,1,4MG,1,5MH,2
... View more
01-20-2016
02:10 AM
Can somebody give a thought how it will be easier to get below output...
I have input data as below :
--------------
Input Data -------------- 53809,09,01-SEP-2015,0:15,8,1MA,1,1MB,1,1ME,2,1MF,1,2MC,1,2MD,1,2MG,1,2MH,2 53809,09,01-SEP-2015,0:30,8,1MA,1,1MB,1,1ME,2,1MF,1,2MC,1,2MD,1,2MG,1,2MH,2 53809,09,01-SEP-2015,0:45,8,1MA,1,1MB,1,1ME,3,1MF,1,2MC,1,2MD,1,2MG,1,2MH,3 53809,09,01-SEP-2015,1:00,8,1MA,1,1MB,1,1ME,3,1MF,1,2MC,1,2MD,1,2MG,1,2MH,2
And I am looking if I could have output something like below:
---------------------
Output Desired:
---------------------
SUBSYS,Month,Date,Time,#Blades,1MA,1MB,1ME,1MF,2MC,2MD,2MC,2MH 53809,09,01-SEP-2015,0:15,8,1,1,2,1,1,1,1,2 53809,09,01-SEP-2015,0:30,8,1,1,2,1,1,1,1,2 53809,09,01-SEP-2015,0:45,8,1,1,3,1,1,1,1,3 53809,09,01-SEP-2015,1:00,8,1,1,3,1,1,1,1,2
So basically as you see the 1MA,1MB etc get the heading and then corresponding values get at the bottom of those 1MA,1MB ...
I see there's possibility to have it done using the Proc transpose or array can be done however don't seems to come out exactly...
... View more
10-29-2015
07:18 AM
Could somebody give me idea I have following variables :
COUNT 8. DATE 8. MONTH 8. SUBSYS 8. TIME 8. VSP_DAY 8. VSP_MONTH 8. VSP_YEAR 8. ;
Which I am using in below PROC Report and below report output is produced However what I am looking is to color the Cell which match the MAX column so that that clearly give me indication which month is maximum out of all those months.s
PROC REPORT DATA=BASEVSP.BREACHES NOWD STYLE(REPORT)={CELLSPACING=2 BACKGROUND=CXEEEEEE BORDERWIDTH=3 BORDERCOLOR=CX003399} /* BOFA BLUE */ STYLE(HEADER)={FONT_SIZE=4 FONT_WEIGHT=BOLD
FOREGROUND=CX003399} STYLE(COLUMN)={BORDERCOLOR=BLACK FONT_SIZE=2 JUST=CENTER BORDERCOLORLIGHT=BLACK BORDERCOLORDARK=BLACK}; COLUMN SUBSYS FLAG MONTH COUNT ; DEFINE FLAG / Computed NoprinT ; DEFINE SUBSYS / GROUP 'SubSys' WIDTH=10 ; DEFINE MONTH / ACROSS 'MonTh' F=mn_name. WIDTH=10 ; DEFINE COUNT / ANALYSIS MAX 'Max Of Months Breach' WIDTH=10; COMPUTE COUNT; IF COUNT.MAX = COUNT THEN DO; CALL DEFINE(_COL_,'STYLE','STYLE={BACKGROUNDCOLOR=RED}'); END; ENDCOMP;
MonTh
SubSys
Aug
Feb
Sep
Max Of Months Breach
53809
N
1
N
1
55793
N
1
N
1
65239
1
N
N
1
... View more
10-22-2015
11:03 PM
Thanks for your advice however You have hardcoded rename statement with blade_util1=1MA however that's not the case everytime since this is for one SUBSYS(which is a by variable) next subsys data can have Blade_util1=2MC (different name) so renaming with hard coding value won't be successful.
... View more
10-22-2015
10:48 PM
Thanks Tim this worked....I even not had to define alias moving the variable in the column definition worked...
... View more
10-22-2015
08:16 AM
This is the output I am looking instead of above output SUBSYS REPORT DATE TIME SubSys Blades 1MA 1MB 2MC 2MD 28-Feb-15 8:30 12345 4 0 46 67 49 26-Feb-15 8:30 12345 4 0 27 66 55 21-Feb-15 8:30 12345 4 0 41 60 44 20-Feb-15 10:30 12345 4 0 46 57 60
... View more
10-22-2015
08:13 AM
I have looked at the traffic lighting example however unless I hard code value of TEST4 the COMPUTE TEST1 do not bring the desired output.
... View more
10-22-2015
03:44 AM
SUBSYS REPORT
DATE
TIME
SubSys
Blades
Blade Name
Blade Util
Blade Name
Blade Util
Blade Name
Blade Util
Blade Name
Blade Util
Blade Name
Blade Util
Blade Name
Blade Util
Blade Name
Blade Util
Blade Name
Blade Util
28FEB2015
8:30
12345
4
1MA
0
1MB
46
2MC
67
2MD
49
.
.
.
.
26FEB2015
8:30
12345
4
1MA
0
1MB
27
2MC
66
2MD
55
.
.
.
.
21FEB2015
8:30
12345
4
1MA
0
1MB
41
2MC
60
2MD
44
.
.
.
.
20FEB2015
10:30
12345
4
1MA
0
1MB
46
2MC
57
2MD
60
.
.
.
.
Above is an output of the PROC REPORT after processing the data and after the "Blade Name" the next column represent the "Value for that Blade ..
I was wondering if it's possible via PROC REPORT to print this data something like where we have Blade name as column heading and then Blade value...I guess similar kind of question I asked before However none of the solution work...I have requirement to use PROC REPORT becuase I am using that in the MACRO and then printing output in ODS HTML ...
... View more