08-14-2023
mikegia5
Obsidian | Level 7
Member since
02-17-2016
- 17 Posts
- 11 Likes Given
- 1 Solutions
- 7 Likes Received
-
Latest posts by mikegia5
Subject Views Posted 2138 10-26-2020 04:31 PM 2153 10-26-2020 12:33 PM 2184 10-26-2020 10:15 AM 2215 10-25-2020 08:37 AM 2346 10-21-2020 11:02 AM 5715 10-14-2020 06:22 PM 5727 10-14-2020 06:15 PM 5710 10-14-2020 06:13 PM 5718 10-14-2020 06:08 PM 5721 10-14-2020 06:06 PM -
Activity Feed for mikegia5
- Tagged Identify Column Support on SASware Ballot Ideas. 08-14-2023 02:09 PM
- Liked Re: Identify Column Support for Tom. 08-14-2023 02:08 PM
- Got a Like for Re: Identify Column Support. 09-23-2022 07:32 PM
- Got a Like for Re: Identify Column Support. 09-23-2022 05:59 PM
- Posted Re: Identify Column Support on SASware Ballot Ideas. 09-23-2022 05:05 PM
- Liked Re: Identify Column Support for ballardw. 09-23-2022 04:59 PM
- Liked Re: Identify Column Support for Tom. 09-23-2022 04:59 PM
- Liked Re: Identify Column Support for Reeza. 09-23-2022 04:58 PM
- Posted Re: Identify Column Support on SASware Ballot Ideas. 09-23-2022 02:08 PM
- Got a Like for Re: How to invoke SAS from a REXX in "silent" mode (z/OS). 10-26-2020 04:44 PM
- Posted Re: How to invoke SAS from a REXX in "silent" mode (z/OS) on Developers. 10-26-2020 04:31 PM
- Posted Re: How to invoke SAS from a REXX in "silent" mode (z/OS) on Developers. 10-26-2020 12:33 PM
- Liked Re: How to invoke SAS from a REXX in "silent" mode (z/OS) for data_null__. 10-26-2020 12:31 PM
- Got a Like for Re: How to invoke SAS from a REXX in "silent" mode (z/OS). 10-26-2020 10:32 AM
- Posted Re: How to invoke SAS from a REXX in "silent" mode (z/OS) on Developers. 10-26-2020 10:15 AM
- Got a Like for Re: How to invoke SAS from a REXX in "silent" mode (z/OS). 10-25-2020 09:55 AM
- Posted Re: How to invoke SAS from a REXX in "silent" mode (z/OS) on Developers. 10-25-2020 08:37 AM
- Posted How to invoke SAS from a REXX in "silent" mode (z/OS) on Developers. 10-21-2020 11:02 AM
- Liked Re: How to suppress macro resolution for Tom. 10-15-2020 01:51 PM
- Got a Like for Re: How to suppress macro resolution. 10-14-2020 06:27 PM
-
Posts I Liked
Subject Likes Author Latest Post 1 1 3 2 2 -
My Liked Posts
Subject Likes Posted 3 09-23-2022 05:05 PM 1 10-26-2020 04:31 PM 1 10-26-2020 10:15 AM 1 10-25-2020 08:37 AM 1 10-14-2020 06:22 PM
10-26-2020
04:31 PM
1 Like
Here's what I was finally able to make work. It worked well and faster than I thought.
My next step will be to enable the SAS code to issue ISPF commands and build an ISPF table to display the results. Currently the output is sent to SYSOUT and/or sent via email, so the ISPF output option will be another option.
ADDRESS TSO "ALTLIB ACT APPL(EXEC) DA(SAS.SASRX.LIB)"
call sasrx "-input 'my.sas.source(fritz)' log(2) print(2)" ADDRESS TSO "ALTLIB DEACTIVATE APPL(EXEC)"
RETURN
... View more
10-26-2020
12:33 PM
Yes, thanks. I have all that doc and I've been experimenting with SAS INPUT and SASRX -INPUT, allocate, etc. It might be an installation problem as most of the times I get an error about an unbalanced comment and it hasn't even begun to execute my code. I'll try to get back to this when I can!
... View more
10-26-2020
10:15 AM
1 Like
That's exactly what I'm working on - trying to find the right combination of options and TSO allocations to get it to work. I'm trying both SAS and SASRX and I'm close, but, can't work on this now because of other priorities. I'll get back to it soon and post what I found.
... View more
10-25-2020
08:37 AM
1 Like
Jim,
I was looking for more of a "Foreground/Background" option. I don't want to submit the JCL without giving someone a chance to review the jobcard options.
I did find two methods for invoking SAS - once is via the SAS clist and another via SASRX. And there is an input option that should allow SAS to startup and run a SAS program. I'll continue trying to get them to work - as soon as I find a little free time!
Mike
... View more
10-21-2020
11:02 AM
Is there a way to call a SAS program "under the covers" from an ISPF/REXX application? I know there is an interactive SAS, but I don't want my users to necessarily know they are using SAS. I just want them to enter some parameters on an ISPF screen and then get the results. Today the ISPF application builds SAS JCL and then puts them into an ISPF Edit session for them to review the jobcard and then submit. I would like to give them a "Foreground/Background" option so they can choose. I would write the results to a dataset and then put them into a browse session showing them the results.
The 2nd part of the problem is that the ISPF application allows user to choose to see the report in one of several ODS formats (CSV/EXCEL/PDF/HTML) so it would be really nice if I could open a window with the spreadsheet, but today I send that over an email and I can continue to do that.
... View more
10-14-2020
06:22 PM
1 Like
Thank you Scott. I bookmarked your GitHub link and will definitely be taking a look. For now I've solved it using the Qscan, qsysfunc, and single quoting techniques above. If they didn't work I would have worked my way down to your solution next. I didn't want to use nomerror since this is just data and someone will run a combination resulting in finding a real macro name!
... View more
10-14-2020
06:15 PM
I don't have any control over the input data, so I would need to scan for the % sign and double up on it. I found another solution above that worked. Thanks for your input!
... View more
10-14-2020
06:13 PM
Perfect - thanks for understanding what I was trying to do and coming up with a solution! I changed to qsysfunc and qscan and that solved the warnings coming out of the macro, but what I didn't say is that this is dynamic code and I run the macro via the execute function so when it came time to run the code, I still had some warnings using double quotes (i.e., LIKE "P%TZ"). So I added an escaped single quote and now it runs without a problem! Thanks again. %if %length(&acics) > 1 %then
%do;
and (
%let acics=%qsysfunc(translate(&acics,%NRSTR(%_),%NRSTR(*+)));
%do i=1 %to %sysfunc(countw(%superq(acics),' '));
%if &i > 1 %then or;
region_id like %str(%')%qscan(%superq(acics),&i,' ')%str(%')
%end;) %end;
... View more
10-14-2020
06:08 PM
Thanks - I'm already using mprint but this is a large macro (about 400 lines) and the resulting MPRINT is long too, so I just snipped the relevant part.
... View more
10-14-2020
06:06 PM
Ok, thanks! The single quotes helped when combined with another solution 😁 cics like %str(%')%qscan(%superq(acics),&i,' ')%str(%')
... View more
10-14-2020
03:30 PM
Thank you Reeza, I'm not sure how to apply your suggestions? I changed the double quotes to single quotes but that didn't work. Are you suggesting I don't use the SQL LIKE predicate and instead use a FIND or REGEX to search through the database? While that might work, the database I'm reading is in a relational database (DB2) that contains 10 billion rows and anything that isn't supported in the database will result in the data being passed back to SAS, so I really want to use native relational database predicates as much as possible.
... View more
10-14-2020
02:57 PM
I am passing a variable to a macro that will be used as a SQL LIKE predicate, so it can contain the % character, but I can't seem to get the macro to bypass the resolution attempt. At best this is a warning message, but if the data actually matches a macro name, it will be an error. The variable contains a list of character values, separated by spaces, one or more of which could contain a %. I first convert the % to an asterisks in an attempt to get around the macro resolution problem: P*TZ P*T1 The above value needs to be converted to 2 SQL LIKE predicates: and (cics like "P%TZ" or cics like "P%T1") The variable name is ACICS. Since I convert the % to * outside of the macro, I now have to convert it back to % in the macro (I've tried not converting as well). Here's the macro code: %if %length(&acics) > 1 %then
%do;
and (
%let acics=%sysfunc(translate(&acics,%NRSTR(%_),%NRSTR(*+)));
%do i=1 %to %sysfunc(countw(%superq(acics),' '));
%if &i > 1 %then or;
CICS like "%scan(%superq(acics),&i,' ')"
%end;) %end; I get these messages with MLOGIC and SYMBOLGEN enabled showing the warnings: MLOGIC(FRITZ): %IF condition %length(&acics) > 1 is TRUE MLOGIC(FRITZ): %LET (variable name is ACICS) SYMBOLGEN: Macro variable ACICS resolves to P*TZ P*T1 WARNING: Apparent invocation of macro TZ not resolved. WARNING: Apparent invocation of macro T1 not resolved. MLOGIC(FRITZ): %DO loop beginning; index variable I; start value is 1; stop value is 2; by value is 1. SYMBOLGEN: Macro variable I resolves to 1 MLOGIC(FRITZ): %IF condition &i > 1 is FALSE SYMBOLGEN: Macro variable I resolves to 1 WARNING: Apparent invocation of macro TZ not resolved. MLOGIC(FRITZ): %DO loop index variable I is now 2; loop will iterate again. SYMBOLGEN: Macro variable I resolves to 2 MLOGIC(FRITZ): %IF condition &i > 1 is TRUE SYMBOLGEN: Macro variable I resolves to 2 WARNING: Apparent invocation of macro T1 not resolved. MLOGIC(FRITZ): %DO loop index variable I is now 3; loop will not iterate again. The generated code comes out good, but, I still get the warnings: and ( cics like "P%TZ" or cics like "P%T1") ; Does anyone have any suggestions on how to stop the macro engine from trying to resolve the macro references? Thank you SAS 9.4
... View more
02-17-2016
02:16 PM
Hi, I'm a long time SAS user (since 1997) but this is my first time using this forum and submitting a request for an enhancement! I would like to take a 32 bit IPV4 or 128 bit IPV6 binary IP address and convert to text as dotted notation. For example, an IPV4 is stored in binary as 4 bytes as x'0a0b0c01' and the text is up to 15 bytes "010.011.012.001". While I don't have a requirement right now to go the other way, that may be useful as well (i.e., convert a char(15) field from 10.11.12.1 back into a 4 byte binary). The equivalent functions in unix are inet_ntop (numeric to presentation) and inet_pton (presentation to numeric). My goal right now is to read in a binary number and display it as dotted notation. I can work out the SAS code to do this myself, but I really think a function or informat/format would be useful. For example: input @1 ipv4addr pib4. put @1 ipv4addr $ipv4.; The length would be implied to be either char15 if IPV4 or char35 if IPV6. A function would work too - whichever makes sense. Thank you, Mike Giaquinto Principal Engineer Wells Fargo
... View more