<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: PROC format dynamic define statement using JCL mainframe. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-format-dynamic-define-statement-using-JCL-mainframe/m-p/236013#M43176</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;it partially works actually, i did achieve that anyway. I have few values like %%%bat ,&amp;nbsp; %%%BBAT,%%%PRD &amp;nbsp;etc.., this code label these all &amp;nbsp;the values "FOUND" and when i pass the format into next dataset. i achieve the result for those values which exist in the dataset but not which are not matching with Qname dataset( such as %%%bat ,&amp;nbsp; %%%BBAT,%%%PRD &amp;nbsp;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want these values %%%bat ,&amp;nbsp; %%%BBAT,%%%PRD &amp;nbsp; as missing in the output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;------------------------------------------------------------&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DATA QNAME; &lt;BR /&gt; INFILE QLNAME; &lt;BR /&gt; INPUT NAME $8.; &lt;BR /&gt; &lt;BR /&gt; PROC SORT NODUPS NODUPKEYS DATA=QNAME; &lt;BR /&gt; BY NAME; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; DATA DS; &lt;BR /&gt; SET QNAME END=LAST; &lt;BR /&gt; &lt;BR /&gt; RETAIN FMTNAME '$HTNFMT'; &lt;BR /&gt; START=NAME; &lt;BR /&gt; LABEL='FOUND'; &lt;BR /&gt; OUTPUT; &lt;BR /&gt; &lt;BR /&gt; IF LAST THEN DO; &lt;BR /&gt; HLO='O'; &lt;BR /&gt; LABEL='NOT FOUND'; &lt;BR /&gt; OUTPUT; &lt;BR /&gt; END; &lt;BR /&gt; RUN; &lt;BR /&gt; PROC FORMAT CNTLIN=DS; &lt;BR /&gt; PROC PRINT DATA=DS; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; DATA NEW; &lt;BR /&gt; SET DETAIL.BATJOB01(KEEP=SYSID RACFUSID); &lt;BR /&gt; TYPE=PUT(RACFUSID,$HTNFMT.); &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; PROC SORT NODUPS NODUPKEYS DATA=NEW; &lt;BR /&gt; BY SYSID RACFUSID; &lt;BR /&gt; &lt;BR /&gt; PROC PRINT DATA=NEW; &lt;BR /&gt; WHERE TYPE='FOUND'; &lt;BR /&gt;. . . . . . . . . . . . . . . . &lt;/P&gt;</description>
    <pubDate>Mon, 23 Nov 2015 16:24:59 GMT</pubDate>
    <dc:creator>Rajeev8080</dc:creator>
    <dc:date>2015-11-23T16:24:59Z</dc:date>
    <item>
      <title>PROC format dynamic define statement using JCL mainframe.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-format-dynamic-define-statement-using-JCL-mainframe/m-p/235511#M43121</link>
      <description>&lt;P&gt;i have below kind of data that i like to put in dynamic proc format statement and use in JCL mainframe. pls help me how i can deal with it. appreciate your help in advance !&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%%%BAT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%%%BBAT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%%%PRD&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CICSP%&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HXNDVR&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NFSC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PODPRD&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROD&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Q%%PFT%&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Q%%PSC%&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAMA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SOFTBAT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SYSMAIN&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2015 17:29:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-format-dynamic-define-statement-using-JCL-mainframe/m-p/235511#M43121</guid>
      <dc:creator>Rajeev8080</dc:creator>
      <dc:date>2015-11-19T17:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: PROC format dynamic define statement using JCL mainframe.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-format-dynamic-define-statement-using-JCL-mainframe/m-p/235525#M43122</link>
      <description>&lt;P&gt;When you say dynamic, &amp;nbsp;which part is dynamic? &amp;nbsp;The data in the format or the JCL code? Could you please elaborate on what you are trying to accomplish?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2015 19:14:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-format-dynamic-define-statement-using-JCL-mainframe/m-p/235525#M43122</guid>
      <dc:creator>kannand</dc:creator>
      <dc:date>2015-11-19T19:14:56Z</dc:date>
    </item>
    <item>
      <title>Re: PROC format dynamic define statement using JCL mainframe.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-format-dynamic-define-statement-using-JCL-mainframe/m-p/235548#M43123</link>
      <description>&lt;P&gt;There's still a little guesswork here about what you are trying to do.&amp;nbsp; I think you could try:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(a) Create a file holding the data lines that you want in the format&lt;/P&gt;
&lt;P&gt;(b) Mention that file in a DD statement&lt;/P&gt;
&lt;P&gt;(c) Read in the file in the program, creating a SAS data set.&lt;/P&gt;
&lt;P&gt;(d) Define the appropriate variables in the SAS data set so that it can be used as a CNTLIN= data set on PROC FORMAT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2015 20:47:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-format-dynamic-define-statement-using-JCL-mainframe/m-p/235548#M43123</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-11-19T20:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: PROC format dynamic define statement using JCL mainframe.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-format-dynamic-define-statement-using-JCL-mainframe/m-p/235711#M43138</link>
      <description>&lt;P&gt;here you go for my situation . pls help if anyone deal with this situation.&lt;/P&gt;
&lt;P&gt;DATA _NULL_; &lt;BR /&gt; FILE INSTREAM NOPRINT LRECL=80 RECFM=FB; &amp;nbsp; /*&amp;nbsp;&lt;SPAN&gt;INSTREAM &amp;nbsp;is my flat file defined in DD statement.&lt;/SPAN&gt;&lt;BR /&gt; SET _LAST_ END=ABC; &lt;BR /&gt;&lt;BR /&gt; IF _N_ = 1 THEN DO; &lt;BR /&gt; PUT "PROC FORMAT FMTLIB; " ; &lt;BR /&gt; PUT "VALUE $TSOID" ; &amp;nbsp;(/* i am looking how i can define above %%% in the format, at this moment all is read as CHAR)&lt;BR /&gt; END; &lt;BR /&gt; &lt;BR /&gt; PUT "'" RACFUSID "' = 'TSO'" ; &lt;BR /&gt; &lt;BR /&gt; IF ABC EQ 1 THEN DO; &lt;BR /&gt; PUT "OTHER='.'" ; &lt;BR /&gt; PUT ';' ; &lt;BR /&gt; END; &lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2015 16:05:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-format-dynamic-define-statement-using-JCL-mainframe/m-p/235711#M43138</guid>
      <dc:creator>Rajeev8080</dc:creator>
      <dc:date>2015-11-20T16:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: PROC format dynamic define statement using JCL mainframe.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-format-dynamic-define-statement-using-JCL-mainframe/m-p/235720#M43139</link>
      <description>&lt;P&gt;Skip the part about how to program this, and focus on what the result should be. &amp;nbsp;Suppose you had these three lines in your file:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CICSP%&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HXNDVR&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NFSC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What would your format look like. &amp;nbsp;Is this it:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc format;&lt;/P&gt;
&lt;P&gt;value $TSOID &amp;nbsp;'CICSP%'='TSO' &amp;nbsp;'HXNDVR'='TSO' 'NFSC'='TSO' other=' ';&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The goal just isn't clear yet. &amp;nbsp;So show us where you want to end up.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2015 16:27:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-format-dynamic-define-statement-using-JCL-mainframe/m-p/235720#M43139</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-11-20T16:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: PROC format dynamic define statement using JCL mainframe.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-format-dynamic-define-statement-using-JCL-mainframe/m-p/235732#M43141</link>
      <description>&lt;P&gt;Format implies that you have an existing value and want to display a different value, or in the case of invalue read as a different value.&lt;/P&gt;
&lt;P&gt;So, in your case what is the start value and what is the result value?&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2015 17:36:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-format-dynamic-define-statement-using-JCL-mainframe/m-p/235732#M43141</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-11-20T17:36:01Z</dc:date>
    </item>
    <item>
      <title>Re: PROC format dynamic define statement using JCL mainframe.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-format-dynamic-define-statement-using-JCL-mainframe/m-p/235895#M43164</link>
      <description>&lt;P&gt;i want to create a format and save it for future use.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I like to match my existing format values with other dataset which will have similar kind of data.&amp;nbsp; for example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;variable name=RACFUSID , it has below data. I will have another dataset which will have similar data but not necessary that all value will be same. I like to figure out which all values matches and which are missing. my worry is that if i use $ value in proc format now, it would read everything as CHAR and assign name e.g TSO (above). I am ok to have TSO name only for the values which are matching with next dataset but how about the missing values where other would not show me missing stuff as&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CICSP%&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HXNDVR&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NFSC&lt;/P&gt;</description>
      <pubDate>Sun, 22 Nov 2015 08:58:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-format-dynamic-define-statement-using-JCL-mainframe/m-p/235895#M43164</guid>
      <dc:creator>Rajeev8080</dc:creator>
      <dc:date>2015-11-22T08:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: PROC format dynamic define statement using JCL mainframe.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-format-dynamic-define-statement-using-JCL-mainframe/m-p/235911#M43167</link>
      <description>&lt;P&gt;DATA batst; &lt;BR /&gt;INFILE QLNAME; &lt;BR /&gt;INPUT NAME $8.; &lt;BR /&gt; &lt;BR /&gt;PROC SORT NODUPS NODUPKEYS DATA=BATST; &lt;BR /&gt; BY name; &lt;BR /&gt; &lt;BR /&gt; DATA _NULL_; &lt;BR /&gt; FILE INSTREAM NOPRINT LRECL=80 RECFM=FB; &lt;BR /&gt; SET _LAST_ END=ABC; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; IF _N_ = 1 THEN DO; &lt;BR /&gt; PUT "PROC FORMAT FMTLIB; " ; &lt;BR /&gt; PUT "VALUE &amp;nbsp;$TSOID" ; &lt;BR /&gt; END; &lt;BR /&gt; &lt;BR /&gt; PUT "'" name "' = 'TSO'" ; &lt;BR /&gt; &lt;BR /&gt; IF ABC EQ 1 THEN DO; &lt;BR /&gt; PUT "OTHER='.'" ; &lt;BR /&gt; PUT ';' ; &lt;BR /&gt; END; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; DATA NEWDS; &lt;BR /&gt; SET BATST; &lt;BR /&gt; %INCLUDE INSTREAM; &lt;BR /&gt; RUN; &lt;BR /&gt; &lt;BR /&gt; DATA bac; &lt;BR /&gt; SET DETAIL.abc01; &lt;BR /&gt; IF SYSID = 'SY'; &lt;BR /&gt; TYPE = PUT(name,$TSOID.); &lt;BR /&gt; &lt;BR /&gt; PROC SORT NODUPS NODUPKEYS DATA=BAc; &lt;BR /&gt; BY name;&lt;/P&gt;
&lt;P&gt;--------------------------------------------&lt;/P&gt;
&lt;P&gt;Here i want values which are matching with BAC dataset. I want which are missing also... the above e.g %%% values are really not existing in the BAC dataset but i couldnt figure out those in the current code. I have assign TSO for eveything which is available infile QLNAME howverev most of those are not available in the BAT BAC. I couldnt define indivisual format for every values as list is long .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need to know if there is way to write a solution for it.&lt;/P&gt;</description>
      <pubDate>Sun, 22 Nov 2015 16:20:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-format-dynamic-define-statement-using-JCL-mainframe/m-p/235911#M43167</guid>
      <dc:creator>Rajeev8080</dc:creator>
      <dc:date>2015-11-22T16:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: PROC format dynamic define statement using JCL mainframe.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-format-dynamic-define-statement-using-JCL-mainframe/m-p/235923#M43168</link>
      <description>&lt;P&gt;Instead of generating code which you then execute with an "%include" the "better" approach would be to create a control data set which you then pass into Proc Format via option "cntlin" as demonstrated in this example:&amp;nbsp;&lt;A href="https://support.sas.com/documentation/cdl/en/proc/68954/HTML/default/viewer.htm#n1e19y6lrektafn1kj6nbvhus59w.htm" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/proc/68954/HTML/default/viewer.htm#n1e19y6lrektafn1kj6nbvhus59w.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to store a format permanently then you need to store it in a permanent library, one which then is also available to other programs. Option "library" allows you to define the output library for the format (a libref must already exist).&lt;/P&gt;</description>
      <pubDate>Sun, 22 Nov 2015 20:54:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-format-dynamic-define-statement-using-JCL-mainframe/m-p/235923#M43168</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2015-11-22T20:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: PROC format dynamic define statement using JCL mainframe.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-format-dynamic-define-statement-using-JCL-mainframe/m-p/235930#M43169</link>
      <description>&lt;P&gt;Here are some of the pieces that will get you there. &amp;nbsp;First, if you want to store the format permanently, you need a libname statement (no special features about it, a plain vanilla libname statement):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;libname mylib 'path.to.some.dataset';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Next, begin as you did by reading in the data. &amp;nbsp;However, call the variable START:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;DATA batst; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;INFILE QLNAME; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;INPUT start $8.; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;PROC SORT NODUPKEY DATA=BATST; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;BY start;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Add a couple of additional variables that PROC FORMAT will want to see, to make it possible to use the SAS data set as input rather than requiring a VALUE statement:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;data batst;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;set batst end=done;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;fmtname='$TSOID';&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;label='Found this one';&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;output;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;if done;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;hlo='O';&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;label='Not Found';&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Adding the extra variable with HLO=O will be used to create the OTHER= category by PROC FORMAT:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;proc format cntlin=batst library=mylib;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The library= option lets the format get saved permanently, and the cntlin= option tells PROC FORMAT to use the contents of the SAS data set to create the format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That takes care of creating the format. &amp;nbsp;But it doesn't make the format available to later programs. &amp;nbsp;For that, you need to add instructions that tell SAS where to look for formats. &amp;nbsp;For that part, take a look at documentation for the FMTSEARCH option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You would use the format in a later step, possibly in this way:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;result = put(varname, $TSOID.);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;RESULT will either be "Found this one" or "Not Found" depending on whether or not there is a match.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck.&lt;/P&gt;</description>
      <pubDate>Sun, 22 Nov 2015 23:04:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-format-dynamic-define-statement-using-JCL-mainframe/m-p/235930#M43169</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-11-22T23:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: PROC format dynamic define statement using JCL mainframe.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-format-dynamic-define-statement-using-JCL-mainframe/m-p/236013#M43176</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;it partially works actually, i did achieve that anyway. I have few values like %%%bat ,&amp;nbsp; %%%BBAT,%%%PRD &amp;nbsp;etc.., this code label these all &amp;nbsp;the values "FOUND" and when i pass the format into next dataset. i achieve the result for those values which exist in the dataset but not which are not matching with Qname dataset( such as %%%bat ,&amp;nbsp; %%%BBAT,%%%PRD &amp;nbsp;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want these values %%%bat ,&amp;nbsp; %%%BBAT,%%%PRD &amp;nbsp; as missing in the output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;------------------------------------------------------------&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DATA QNAME; &lt;BR /&gt; INFILE QLNAME; &lt;BR /&gt; INPUT NAME $8.; &lt;BR /&gt; &lt;BR /&gt; PROC SORT NODUPS NODUPKEYS DATA=QNAME; &lt;BR /&gt; BY NAME; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; DATA DS; &lt;BR /&gt; SET QNAME END=LAST; &lt;BR /&gt; &lt;BR /&gt; RETAIN FMTNAME '$HTNFMT'; &lt;BR /&gt; START=NAME; &lt;BR /&gt; LABEL='FOUND'; &lt;BR /&gt; OUTPUT; &lt;BR /&gt; &lt;BR /&gt; IF LAST THEN DO; &lt;BR /&gt; HLO='O'; &lt;BR /&gt; LABEL='NOT FOUND'; &lt;BR /&gt; OUTPUT; &lt;BR /&gt; END; &lt;BR /&gt; RUN; &lt;BR /&gt; PROC FORMAT CNTLIN=DS; &lt;BR /&gt; PROC PRINT DATA=DS; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; DATA NEW; &lt;BR /&gt; SET DETAIL.BATJOB01(KEEP=SYSID RACFUSID); &lt;BR /&gt; TYPE=PUT(RACFUSID,$HTNFMT.); &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; PROC SORT NODUPS NODUPKEYS DATA=NEW; &lt;BR /&gt; BY SYSID RACFUSID; &lt;BR /&gt; &lt;BR /&gt; PROC PRINT DATA=NEW; &lt;BR /&gt; WHERE TYPE='FOUND'; &lt;BR /&gt;. . . . . . . . . . . . . . . . &lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2015 16:24:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-format-dynamic-define-statement-using-JCL-mainframe/m-p/236013#M43176</guid>
      <dc:creator>Rajeev8080</dc:creator>
      <dc:date>2015-11-23T16:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: PROC format dynamic define statement using JCL mainframe.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-format-dynamic-define-statement-using-JCL-mainframe/m-p/236018#M43179</link>
      <description>&lt;P&gt;I'm glad you noticed that the second OUTPUT statement was needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You're only getting the "FOUND" records in your report because you requested that with this statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;where type='FOUND';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want the "NOT FOUND" records as well, just remove the WHERE statement.&amp;nbsp; Also notice, this statement should be added before LABEL='FOUND';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;LENGTH LABEL $ 9;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Otherwise there won't be room to hold all the characters in "NOT FOUND".&amp;nbsp; Finally, if you are printing the "NOT FOUND" records as well as the "FOUND" records, you might want TYPE to be the first variable in the BY statement in PROC SORT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2015 16:45:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-format-dynamic-define-statement-using-JCL-mainframe/m-p/236018#M43179</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-11-23T16:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: PROC format dynamic define statement using JCL mainframe.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-format-dynamic-define-statement-using-JCL-mainframe/m-p/236032#M43189</link>
      <description>&lt;P&gt;"NOT FOUND" values are only for&amp;nbsp;DATA NEW dataset. NOT for&amp;nbsp;DATA DS; I wanted to get value %%%BAT etc. as missing/NOT found.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;probably need diffferent way to handle it.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2015 17:19:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-format-dynamic-define-statement-using-JCL-mainframe/m-p/236032#M43189</guid>
      <dc:creator>Rajeev8080</dc:creator>
      <dc:date>2015-11-23T17:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: PROC format dynamic define statement using JCL mainframe.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-format-dynamic-define-statement-using-JCL-mainframe/m-p/236042#M43196</link>
      <description>&lt;P&gt;Yes, the format creation is entirely separate from applying the format later.&amp;nbsp; The format can be applied to many different data sets, and there is no way of predicting which mismatches will appear in a later data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are looking to determine matches and mismatches, then MERGE using in= variables is fairly straightforward for this purpose.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2015 18:13:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-format-dynamic-define-statement-using-JCL-mainframe/m-p/236042#M43196</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-11-23T18:13:45Z</dc:date>
    </item>
  </channel>
</rss>

