def _makeProcCallMacro(self, objtype: str, objname: str, data: ['<STR_LIT>', str] = None, args: dict = None) -> str:
plot = '<STR_LIT>'<EOL>outmeth = '<STR_LIT>'<EOL>procopts = args.pop('<STR_LIT>', '<STR_LIT>')<EOL>ODSGraphics = args.get('<STR_LIT>', True)<EOL>if self.sasproduct.lower() == '<STR_LIT>' and not ('<STR_LIT>' in args.keys() or ODSGraphics == False):<EOL><INDENT>plot = '<STR_LIT>'<EOL><DEDENT>if self.sasproduct.lower() == '<STR_LIT>':<EOL><INDENT>pass<EOL><DEDENT>if self.sasproduct.lower() == '<STR_LIT>' and not ('<STR_LIT>' in args.keys() or ODSGraphics == False):<EOL><INDENT>outmeth = '<STR_LIT>'<EOL>plot = '<STR_LIT>'<EOL><DEDENT>if self.sasproduct.lower() == '<STR_LIT>':<EOL><INDENT>pass<EOL><DEDENT>if self.sasproduct.lower() == '<STR_LIT>':<EOL><INDENT>outmeth = '<STR_LIT>'<EOL><DEDENT>if self.sasproduct.lower() == '<STR_LIT>':<EOL><INDENT>outmeth = '<STR_LIT>'<EOL>if objtype.lower() =='<STR_LIT>' and not ('<STR_LIT>' in args.keys() or ODSGraphics == False):<EOL><INDENT>plot = '<STR_LIT>'<EOL>outmeth = '<STR_LIT>'<EOL><DEDENT><DEDENT>outds = args.pop('<STR_LIT>', None)<EOL>if outds == None:<EOL><INDENT>outds = args.pop('<STR_LIT>', None)<EOL><DEDENT>outcodegen = Codegen.new('<STR_LIT>', outds)<EOL>outcodegen.outmeth = outmeth<EOL>outcodegen.objname = objname<EOL>outstr = outcodegen.codestmt<EOL>self.logger.debug("<STR_LIT>" + self.sasproduct.lower())<EOL>debug_code= '<STR_LIT>'<EOL>code = "<STR_LIT>"<EOL>if '<STR_LIT>' in args:<EOL><INDENT>outmeth = args['<STR_LIT>']<EOL><DEDENT>if '<STR_LIT>' in args:<EOL><INDENT>plot = args['<STR_LIT>']<EOL><DEDENT>if len(outmeth) and not outds == None:<EOL><INDENT>code += "<STR_LIT>" % (<EOL>objtype, data.libref, data.table, data._dsopts(), plot, outmeth, outstr, procopts)<EOL><DEDENT>else:<EOL><INDENT>code += "<STR_LIT>" % (<EOL>objtype, data.libref, data.table, data._dsopts(), plot, procopts)<EOL>if outds is not None:<EOL><INDENT>args['<STR_LIT>'] = outds<EOL><DEDENT><DEDENT>self.logger.debug("<STR_LIT>" + str(args))<EOL>self.logger.debug("<STR_LIT>" + str(type(args)))<EOL>uoargs = {}<EOL>orderedargs = {}<EOL>keyorder = ['<STR_LIT>', '<STR_LIT:input>', '<STR_LIT:target>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>']<EOL>for k, v in args.items():<EOL><INDENT>if k in keyorder:<EOL><INDENT>orderedargs[k] = v<EOL><DEDENT>else:<EOL><INDENT>uoargs[k] = v<EOL><DEDENT><DEDENT>orderedargs = OrderedDict(sorted(orderedargs.items(), key=lambda i: keyorder.index(i[<NUM_LIT:0>])))<EOL>for k, v in uoargs.items():<EOL><INDENT>orderedargs[k] = v<EOL>orderedargs.move_to_end(k)<EOL><DEDENT>for key, value in orderedargs.items():<EOL><INDENT>gen = Codegen.new(key, value)<EOL>gen.objtype = objtype<EOL>gen.data = data<EOL>gen.outmeth = outmeth<EOL>gen.objname = objname<EOL>code += gen.codestmt<EOL>if gen.debug is not None:<EOL><INDENT>debug_code += gen.debug<EOL><DEDENT><DEDENT>code += "<STR_LIT>"<EOL>code += "<STR_LIT>" % (objname, objtype, data.table)<EOL>if self.logger.level == <NUM_LIT:10>:<EOL><INDENT>print("<STR_LIT>" + str(code))<EOL>print("<STR_LIT>" + debug_code)<EOL><DEDENT>return code<EOL>
This method generates the SAS code from the python objects and included data and arguments.
The list of args in this method is largely alphabetical but there are exceptions in order to
satisfy the order needs of the statements for the procedure. as an example...
http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_glm_syntax.htm#statug.glm.glmpostable

:param objtype: str -- proc name
:param objname: str -- 3 digit code for proc
:param data: sas dataset object
:param args: dict --  proc arguments
:return: str -- the SAS code needed to execute on the server