<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6833569903370638627</id><updated>2012-01-27T05:58:00.006-08:00</updated><title type='text'>Organizar para ser GRANDE.</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://organizarparasergrande.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6833569903370638627/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://organizarparasergrande.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Gerson Tomas Schmitt</name><uri>http://www.blogger.com/profile/03338308786772705130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/-1RYOcdfrnvk/TyKtUMhNJKI/AAAAAAAAAEI/brfHH6j6M5o/s220/eu%2Bde%2Bgravata.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6833569903370638627.post-8015027060303889763</id><published>2009-12-12T03:37:00.000-08:00</published><updated>2010-02-15T05:44:46.498-08:00</updated><title type='text'>Acucobol - exportando dados CSV</title><content type='html'>&lt;div style="text-align: justify; font-family: arial;"&gt;Utilizar ferramentas de escritório (office) como editor de textos e planilhas eletrônicas é uma prática comum nas empresas, e a integração dessas ferramentas com os sistemas de gestão é um ganho de produtividade bem significativo. Neste post irei demostrar como exportar informações para um arquivo CSV (&lt;em&gt;Comma-separated values)&lt;/em&gt;, que é um padrão de arquivos onde as colunas são delimitadas por ";" (por default), podendo ser outro caracter delimitador. É importante ressaltar que não utilizaremos componente ACTIVEX neste exemplo, pois não iremos formatar o CSV na planilha, apenas efetuar uma chamada de sistema do aplicativo da planilha passando como parâmetro o arquivo CSV.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family:arial;"&gt;Primeiramente devemos declarar o arquivo CSV, que não deixa de ser um arquivo texto (line sequential).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;span style="font-weight: bold;"&gt;SELECT SAIDA ASSIGN TO DISK W-ARQ-CSV&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; ORGANIZATION IS LINE SEQUENTIAL&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; FILE STATUS IS FILE-STATUS.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;FD SAIDA.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;01 REG-SAIDA PIC X(300).&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;A seguir leitura dos registros, e gravação dos mesmos no arquivo CSV.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="padding: 3px; background: white none no-repeat scroll left top; overflow: auto; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; color: rgb(0, 0, 0); position: relative; height: 450px; opacity: 0.5;"&gt;&lt;pre&gt;OPEN INPUT CADASTRO | abertura do arquivo&lt;br /&gt;&lt;br /&gt;MOVE SPACES TO REG-SAIDA&lt;br /&gt;MOVE "CODIGO;NOME;ENDERECO;CEP" TO REG-SAIDA | o primeiro registro é o cabeçalho&lt;br /&gt;WRITE REG-SAIDA | grava registro&lt;br /&gt;&lt;br /&gt;INITIALIZE REG-CADASTRO | inicializa registro no inicio do arquivo&lt;br /&gt;START CADASTRO KEY IS &gt; CHAVE-CADASTRO INVALID KEY | posiciona para leitura&lt;br /&gt;EXIT PARAGRAPH&lt;br /&gt;END-START&lt;br /&gt;PERFORM UNTIL 1 = 2 | laço infinito&lt;br /&gt;READ CADASTRO NEXT RECORD AT END&lt;br /&gt;   EXIT PERFORM | termina laço de repetição infinito (1=2)&lt;br /&gt;END-READ&lt;br /&gt;STRING CAD-CODIGO DELIMITED BY SIZE&lt;br /&gt;       ";"        DELIMITED BY SIZE&lt;br /&gt;       CAD-NOME   DELIMITED BY "  " | delimitado por 2 espaços&lt;br /&gt;       ";"        DELIMITED BY SIZE&lt;br /&gt;       CAD-ENDERECO DELIMITED BY " "&lt;br /&gt;       ";"        DELIMITED BY SIZE&lt;br /&gt;       CAD-CEP    DELIMITED BY SIZE&lt;br /&gt;       INTO REG-SAIDA&lt;br /&gt;END-STRING&lt;br /&gt;WRITE REG-SAIDA | grava registro&lt;br /&gt;END-WRITE&lt;br /&gt;END-PERFORM&lt;br /&gt;&lt;br /&gt;CLOSE CADASTRO | fecha arquivo&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family:arial;"&gt;E por final, podemos chamar o aplicativo da planilha diretamente (observar o PATH do sistema).&lt;/span&gt; &lt;/div&gt;&lt;span style="font-family:arial;"&gt;Este exemplo também é funcional utilizando acuconnect(thinclient).&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;span style="font-weight: bold;"&gt;STRING "excel.exe /r " DELIMITED BY SIZE&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;     W-ARQ-SAIDA DELIMITED BY SIZE&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;           INTO W-AUX&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;END-STRING&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;CALL "C$SYSTEM" USING W-AUX, 129.&lt;/span&gt; | 128=CSYS-DESKTOP + 1=CSYS-ASYNC (chama excel e segue programa)&lt;br /&gt;&lt;/pre&gt;&lt;span style="font-family:arial;"&gt;Grato pela oportunidade.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6833569903370638627-8015027060303889763?l=organizarparasergrande.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organizarparasergrande.blogspot.com/feeds/8015027060303889763/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://organizarparasergrande.blogspot.com/2009/12/acucobol-exportando-dados-csv.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6833569903370638627/posts/default/8015027060303889763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6833569903370638627/posts/default/8015027060303889763'/><link rel='alternate' type='text/html' href='http://organizarparasergrande.blogspot.com/2009/12/acucobol-exportando-dados-csv.html' title='Acucobol - exportando dados CSV'/><author><name>Gerson Tomas Schmitt</name><uri>http://www.blogger.com/profile/03338308786772705130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/-1RYOcdfrnvk/TyKtUMhNJKI/AAAAAAAAAEI/brfHH6j6M5o/s220/eu%2Bde%2Bgravata.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6833569903370638627.post-6998951655213830874</id><published>2009-12-01T15:19:00.000-08:00</published><updated>2009-12-12T04:24:01.330-08:00</updated><title type='text'>Acucobol + LOG</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-family:arial;"&gt;Quando nos deparamos com problemas oriundos de falhas de execução nos processos (geralmente processos batch), somente chegamos a solução executando o processo falho novamente por tantas vezes até que tenhamos um ponto de partida para começar a investigação. Nessas situações podemos utilizar um log nos processos, que irá nos situar e reduzir o desperdício de tempo para começar a investigação.&lt;/span&gt; &lt;span style="font-family:arial;"&gt;A seguir irei demostrar como implementar log de processos em programas acucobol.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family:arial;"&gt;Abaixo foi implementado um script que executa o programa cobol, define o nome e diretório onde o log será armazenado. Para executar basta passar como parâmetro o programa acucobol, o script acrescenta informações ao log antes de instanciar o runtime. Já no runtime podemos observar o parâmetro '--time' que acrescenta ao final do log o tempo real de execução, e por fim o parâmetro +ee que identifica o arquivo de log e que ele será alimentado pelo programa a ser executado.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ACU=`echo $1`&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; DATA_HORA=`date +%d%m%Y_%H%M_%N`&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; LOG_FILE=/var/log/acucobol/log_$ACU_$DATA_HORA.txt&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; touch $LOG_FILE&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; chmod 777 $LOG_FILE&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; logname &gt;&gt; $LOG_FILE&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;echo $IP_CLIENTE &gt;&gt; $LOG_FILE&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;date &gt;&gt; $LOG_FILE&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;runcbl --time +ee $LOG_FILE $ACU&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;date &gt;&gt; $LOG_FILE&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;exit&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Agora veremos quais as alterações necessárias no programa acucobol. Inicialmente deve ser declarada em SPECIAL-NAMES, SYSERR IS SYSERR.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;SPECIAL-NAMES&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;      SYSERR IS SYSERR.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Pronto, para escrever no log basta utilizar&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;DISPLAY "GRAVANDO NO LOG" UPON SYSERR&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;É muito simples e facilitará o monitoramente dos processos. Façam bom uso.&lt;br /&gt;&lt;br /&gt;Grato pela oportunidade.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6833569903370638627-6998951655213830874?l=organizarparasergrande.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organizarparasergrande.blogspot.com/feeds/6998951655213830874/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://organizarparasergrande.blogspot.com/2009/12/acucobol-log.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6833569903370638627/posts/default/6998951655213830874'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6833569903370638627/posts/default/6998951655213830874'/><link rel='alternate' type='text/html' href='http://organizarparasergrande.blogspot.com/2009/12/acucobol-log.html' title='Acucobol + LOG'/><author><name>Gerson Tomas Schmitt</name><uri>http://www.blogger.com/profile/03338308786772705130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/-1RYOcdfrnvk/TyKtUMhNJKI/AAAAAAAAAEI/brfHH6j6M5o/s220/eu%2Bde%2Bgravata.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6833569903370638627.post-4621572031944368971</id><published>2009-10-25T08:00:00.000-07:00</published><updated>2009-11-15T04:05:23.745-08:00</updated><title type='text'>Acucobol + CGI</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-family:arial;"&gt;A utilização do navegador de &lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"  style="font-family:arial;"&gt;internet&lt;/span&gt;&lt;span style="font-family:arial;"&gt; para execução de processos (entrada de dados e exibir resultados), tornou-se  &lt;/span&gt;&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"  style="font-family:arial;"&gt;comum&lt;/span&gt;&lt;span style="font-family:arial;"&gt; no desenvolvimento de sistemas. Há alguns dias, tive a necessidade de exibir no &lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"  style="font-family:arial;"&gt;browser&lt;/span&gt;&lt;span style="font-family:arial;"&gt;, um relatório gerado por um programa &lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"  style="font-family:arial;"&gt;cobol&lt;/span&gt;&lt;span style="font-family:arial;"&gt;. A seguir irei &lt;/span&gt;&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_4"  style="font-family:arial;"&gt;demonstrar&lt;/span&gt;&lt;span style="font-family:arial;"&gt; a melhor maneira que encontrei, com o mínimo de alterações no código-fonte.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div  style="text-align: justify;font-family:arial;"&gt;Para esta prática, estaremos utilizando a tecnologia &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"  style="font-family:arial;"&gt;CGI&lt;/span&gt; que pode ser compreendida na documentação do &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"  style="font-family:arial;"&gt;acucobol&lt;/span&gt; (A &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"  style="font-family:arial;"&gt;programmer&lt;/span&gt;´s &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"  style="font-family:arial;"&gt;guide&lt;/span&gt; to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"  style="font-family:arial;"&gt;the&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"  style="font-family:arial;"&gt;internet&lt;/span&gt;) e exemplos que acompanham o produto.&lt;br /&gt;&lt;/div&gt;&lt;div  style="text-align: justify;font-family:arial;"&gt;No formulário HTML, teremos o &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"  style="font-family:arial;"&gt;start&lt;/span&gt; do &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"  style="font-family:arial;"&gt;script&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"  style="font-family:arial;"&gt;CGI&lt;/span&gt;:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;action="cgi-bin/programa.cgi"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div  style="text-align: justify;font-family:arial;"&gt;No &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"  style="font-family:arial;"&gt;script&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"  style="font-family:arial;"&gt;CGI&lt;/span&gt; (&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"  style="font-family:arial;"&gt;programa&lt;/span&gt;.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"  style="font-family:arial;"&gt;cgi&lt;/span&gt;) teremos:&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_r_ap3c9ySPU/Sv6v-VK0-VI/AAAAAAAAACg/7AQfSV4-psM/s1600-h/cgi.png"&gt;&lt;img style="cursor: pointer; width: 320px; height: 178px;" src="http://2.bp.blogspot.com/_r_ap3c9ySPU/Sv6v-VK0-VI/AAAAAAAAACg/7AQfSV4-psM/s320/cgi.png" alt="" id="BLOGGER_PHOTO_ID_5403950088260483410" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div  style="text-align: justify;font-family:arial;"&gt;Entendendo o &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_40"  style="font-family:arial;"&gt;script&lt;/span&gt;: A variável DATA_HORA obterá a data e hora com &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_41"  style="font-family:arial;"&gt;nano segundos&lt;/span&gt;, e ARQUIVO_&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_42"  style="font-family:arial;"&gt;RELATORIO&lt;/span&gt; possui o caminho e nome do arquivo que será gerado pelo &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_44"  style="font-family:arial;"&gt;cobol&lt;/span&gt;, criando assim a segurança de não termos usuários diferentes criando um mesmo arquivo. Exemplo: 251009&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_45"  style="font-family:arial;"&gt;Out&lt;/span&gt;10902888652.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_46"  style="font-family:arial;"&gt;txt&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;ARQUIVO_&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_47"  style="font-family:arial;"&gt;RELATORIO&lt;/span&gt; é passado como parâmetro ao programa &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_48"  style="font-family:arial;"&gt;cobol&lt;/span&gt;, que deverá gerar o relatório no &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_49"  style="font-family:arial;"&gt;caminho &lt;/span&gt;especificado. Após a execução do programa &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_50"  style="font-family:arial;"&gt;cobol&lt;/span&gt; o  arquivo é exibido com outras instruções html informadas no CGI.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: arial; text-align: justify;"&gt;E por fim veremos quais as alterações necessárias no programa cobol.&lt;br /&gt;O ARQUIVO_RELATORIO que foi enviado como parâmetro ao cobol, será recebido quando informado junto a PROCEDURE DIVISION a declaração CHAINING ARQ-TXT.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family:arial;"&gt;Ex.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:arial;" &gt;PROCEDURE DIVISION CHAINING ARQ-TXT.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;ARQ-TXT é uma variável a  ser definida na WORKING-STORAGE SECTION do programa.&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;Ex.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:arial;" &gt;77 ARQ-TXT              PIC X(100).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Também deve ser informado no ASSIGN do arquivo.&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;Ex.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-weight: bold;"&gt;SELECT SAIDA ASSIGN TO ARQ-TXT&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:arial;" &gt;              &lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: arial; text-align: justify;"&gt;Resta salientar que para utilizar o mesmo programa cobol rodando pelo CGI e SSH, devemos separar a entrada de dados (ACCEPT) da rotina principal que irá gerar o relatório. E os comandos DISPLAY devem estar de acordo com o tipo de chamada, pelo CGI ou SSH.&lt;br /&gt;&lt;br /&gt;Grato pela oportunidade e até a próxima.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6833569903370638627-4621572031944368971?l=organizarparasergrande.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organizarparasergrande.blogspot.com/feeds/4621572031944368971/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://organizarparasergrande.blogspot.com/2009/10/acucobol-cgi.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6833569903370638627/posts/default/4621572031944368971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6833569903370638627/posts/default/4621572031944368971'/><link rel='alternate' type='text/html' href='http://organizarparasergrande.blogspot.com/2009/10/acucobol-cgi.html' title='Acucobol + CGI'/><author><name>Gerson Tomas Schmitt</name><uri>http://www.blogger.com/profile/03338308786772705130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/-1RYOcdfrnvk/TyKtUMhNJKI/AAAAAAAAAEI/brfHH6j6M5o/s220/eu%2Bde%2Bgravata.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_r_ap3c9ySPU/Sv6v-VK0-VI/AAAAAAAAACg/7AQfSV4-psM/s72-c/cgi.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6833569903370638627.post-5156912647894681561</id><published>2009-10-04T09:53:00.000-07:00</published><updated>2009-10-04T12:44:20.164-07:00</updated><title type='text'>Acucobol básico - depurador</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-family:arial;"&gt;Neste post irei demonstrar a utilização do  depurador de código. Não precisamos mais colocar um display de variáveis em determinados pontos do código como é procedimento em algum cobol mais antigo. Para que possamos depurar o código, devemos compilar o programa com o parâmetro &lt;/span&gt;&lt;span style="font-weight: bold;font-family:arial;" &gt;-zd&lt;/span&gt;&lt;span style="font-family:arial;"&gt;, ou seja, &lt;/span&gt;&lt;span style="font-weight: bold;font-family:arial;" &gt;ccbl32 -zd -o @.acu teste1.cob&lt;/span&gt;&lt;span style="font-family:arial;"&gt;. Para submeter o objeto ao runtime, utilizamos o parâmetro &lt;/span&gt;&lt;span style="font-weight: bold;font-family:arial;" &gt;-d&lt;/span&gt;&lt;span style="font-family:arial;"&gt;, ou seja,&lt;/span&gt;&lt;span style="font-weight: bold;font-family:arial;" &gt; wrun32 -d teste1.acu&lt;/span&gt;&lt;span style="font-family:arial;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_r_ap3c9ySPU/SsjyO2ZaAeI/AAAAAAAAABE/_p-HH-K3pD8/s1600-h/temp.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 160px;" src="http://4.bp.blogspot.com/_r_ap3c9ySPU/SsjyO2ZaAeI/AAAAAAAAABE/_p-HH-K3pD8/s320/temp.jpg" alt="" id="BLOGGER_PHOTO_ID_5388823291082965474" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div face="arial" style="text-align: justify;"&gt;Abaixo segue o código-fonte exemplo construído para demonstrar o depurador.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_r_ap3c9ySPU/Ssj0JjO8W_I/AAAAAAAAABM/snCH5OfKq5Q/s1600-h/teste1.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 209px;" src="http://1.bp.blogspot.com/_r_ap3c9ySPU/Ssj0JjO8W_I/AAAAAAAAABM/snCH5OfKq5Q/s320/teste1.jpg" alt="" id="BLOGGER_PHOTO_ID_5388825399062715378" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="font-family: arial; text-align: justify;"&gt;Após executar a linha de comando, uma interface com o código é exibida, e esta possui diversas funcionalidades como &lt;span&gt;correr o código passo-a-passo &lt;span style="font-weight: bold;"&gt;(tecle s seguido de enter)&lt;/span&gt;&lt;/span&gt;, mostrar conteúdo de variáveis , mudar o valor de variáveis, dentre outras que constam na documentação do produto.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_r_ap3c9ySPU/Ssj05GnjF_I/AAAAAAAAABU/FLiJknV4xOc/s1600-h/teste1.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 228px;" src="http://2.bp.blogspot.com/_r_ap3c9ySPU/Ssj05GnjF_I/AAAAAAAAABU/FLiJknV4xOc/s320/teste1.jpg" alt="" id="BLOGGER_PHOTO_ID_5388826216015009778" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;Grato pela oportunidade.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6833569903370638627-5156912647894681561?l=organizarparasergrande.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organizarparasergrande.blogspot.com/feeds/5156912647894681561/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://organizarparasergrande.blogspot.com/2009/10/acucobol-basico-debug.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6833569903370638627/posts/default/5156912647894681561'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6833569903370638627/posts/default/5156912647894681561'/><link rel='alternate' type='text/html' href='http://organizarparasergrande.blogspot.com/2009/10/acucobol-basico-debug.html' title='Acucobol básico - depurador'/><author><name>Gerson Tomas Schmitt</name><uri>http://www.blogger.com/profile/03338308786772705130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/-1RYOcdfrnvk/TyKtUMhNJKI/AAAAAAAAAEI/brfHH6j6M5o/s220/eu%2Bde%2Bgravata.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_r_ap3c9ySPU/SsjyO2ZaAeI/AAAAAAAAABE/_p-HH-K3pD8/s72-c/temp.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6833569903370638627.post-8735827708672728462</id><published>2009-09-29T15:44:00.000-07:00</published><updated>2009-10-04T12:47:41.051-07:00</updated><title type='text'>Acucobol básico - compilador e runtime</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: arial;font-family:arial;" &gt;A melhor forma de aprender uma tecnologia é utilizando sua documentação e modelos de exemplos que acompanham o produto. O acucobol possui uma documentação bastante rica e bem elaborada&lt;/span&gt;&lt;span style="font-family: arial;"&gt;. Neste post irei apresentar basicamente o compilador e runtime do acucobol.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: arial; text-align: justify;"&gt;&lt;br /&gt;O código fonte acucobol é submetido ao compilador que gera um  objeto que por sua vez é executado pelo runtime. No windows, o compilador do acucobol é executado pelo comando &lt;span style="font-weight: bold;"&gt;ccbl32&lt;/span&gt;. Para este comando existem vários parâmetros, ao adicionar &lt;span style="font-weight: bold;"&gt;-help&lt;/span&gt; ao comando, será exibida uma lista. Neste momento utilizarei apenas o básico, e em outro post o assunto pode ser apresentado.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: arial;"&gt;Então, executando &lt;/span&gt;&lt;span style="font-weight: bold; font-family: arial;"&gt;ccbl32 -o @.acu olamundo.cob&lt;/span&gt;&lt;span style="font-family: arial;"&gt;, o compilador estara gerando um objeto de nome &lt;/span&gt;&lt;span style="font-weight: bold; font-family: arial;"&gt;olamundo.acu&lt;/span&gt;&lt;span style="font-family: arial;"&gt; para o código-fonte &lt;/span&gt;&lt;span style="font-weight: bold; font-family: arial;"&gt;olamundo.cob&lt;/span&gt;&lt;span style="font-family: arial;"&gt;. Para executar este objeto, utilizamos o runtime do acucobol pelo comando &lt;/span&gt;&lt;span style="font-weight: bold; font-family: arial;"&gt;wrun32&lt;/span&gt;&lt;span style="font-family: arial;"&gt;. O exemplo é executado da seguinte forma,  &lt;/span&gt;&lt;span style="font-weight: bold; font-family: arial;"&gt;wrun32 olamundo.acu&lt;/span&gt;&lt;span style="font-family: arial;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_r_ap3c9ySPU/SsKbs5IQWQI/AAAAAAAAAAU/Owxg2zVaEPM/s1600-h/olamundo.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 161px;" src="http://4.bp.blogspot.com/_r_ap3c9ySPU/SsKbs5IQWQI/AAAAAAAAAAU/Owxg2zVaEPM/s320/olamundo.jpg" alt="" id="BLOGGER_PHOTO_ID_5387039299840530690" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;O resultado da execução é:&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_r_ap3c9ySPU/SsKcwJgsAQI/AAAAAAAAAAc/g-1_e4NcG68/s1600-h/olamundobox.jpg"&gt;&lt;img style="cursor: pointer; width: 177px; height: 169px;" src="http://1.bp.blogspot.com/_r_ap3c9ySPU/SsKcwJgsAQI/AAAAAAAAAAc/g-1_e4NcG68/s320/olamundobox.jpg" alt="" id="BLOGGER_PHOTO_ID_5387040455289209090" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;O código-fonte que foi submetido ao compilador segue abaixo. A estrutura do código-fonte acucobol será assunto para um próximo post.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_r_ap3c9ySPU/SsjSMRkv4AI/AAAAAAAAAA8/1_-5-IvgFDU/s1600-h/olamundofonte.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 274px;" src="http://3.bp.blogspot.com/_r_ap3c9ySPU/SsjSMRkv4AI/AAAAAAAAAA8/1_-5-IvgFDU/s320/olamundofonte.jpg" alt="" id="BLOGGER_PHOTO_ID_5388788062466596866" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Também resta salientar que existe um arquivo de configurações que é utilizado pelo runtime do acucobol, este por default é localizado no diretório &lt;span style="font-weight: bold;"&gt;etc&lt;/span&gt; e  é chamado &lt;span style="font-weight: bold;"&gt;cblconfig&lt;span style="font-weight: bold;"&gt;. &lt;/span&gt;&lt;/span&gt;Este também será assunto para os próximos posts.&lt;br /&gt;&lt;br /&gt;Grato pela oportunidade e espero ter colaborado.&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="file:///C:/Users/GTS/AppData/Local/Temp/moz-screenshot.png" alt="" /&gt;&lt;img src="file:///C:/Users/GTS/AppData/Local/Temp/moz-screenshot-1.png" alt="" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6833569903370638627-8735827708672728462?l=organizarparasergrande.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organizarparasergrande.blogspot.com/feeds/8735827708672728462/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://organizarparasergrande.blogspot.com/2009/09/acucobol-basico-ola-mundo.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6833569903370638627/posts/default/8735827708672728462'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6833569903370638627/posts/default/8735827708672728462'/><link rel='alternate' type='text/html' href='http://organizarparasergrande.blogspot.com/2009/09/acucobol-basico-ola-mundo.html' title='Acucobol básico - compilador e runtime'/><author><name>Gerson Tomas Schmitt</name><uri>http://www.blogger.com/profile/03338308786772705130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/-1RYOcdfrnvk/TyKtUMhNJKI/AAAAAAAAAEI/brfHH6j6M5o/s220/eu%2Bde%2Bgravata.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_r_ap3c9ySPU/SsKbs5IQWQI/AAAAAAAAAAU/Owxg2zVaEPM/s72-c/olamundo.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6833569903370638627.post-6806144801310615194</id><published>2009-09-25T19:02:00.000-07:00</published><updated>2009-10-04T12:50:04.466-07:00</updated><title type='text'>Apresentação</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: arial;font-family:arial;" &gt;Meu nome é Gerson Tomas Schmitt, e estou finalmente criando meu blog para que possa divulgar o conhecimento adquirido em alguns anos de vivência no ambiente de TI. Atualmente retornei as origens, fazendo parte em um projeto para migração de sistemas cobol ansi 74 para acucobol 85, desenvolvendo e convertendo programas e base cobol. Estarei postando conteúdo sobre as diferenças encontradas do cobol 74 para acucobol, e novas implementações para ambiente caracter e gráfico . Convido todos a participar.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6833569903370638627-6806144801310615194?l=organizarparasergrande.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organizarparasergrande.blogspot.com/feeds/6806144801310615194/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://organizarparasergrande.blogspot.com/2009/09/apresentacao.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6833569903370638627/posts/default/6806144801310615194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6833569903370638627/posts/default/6806144801310615194'/><link rel='alternate' type='text/html' href='http://organizarparasergrande.blogspot.com/2009/09/apresentacao.html' title='Apresentação'/><author><name>Gerson Tomas Schmitt</name><uri>http://www.blogger.com/profile/03338308786772705130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/-1RYOcdfrnvk/TyKtUMhNJKI/AAAAAAAAAEI/brfHH6j6M5o/s220/eu%2Bde%2Bgravata.jpg'/></author><thr:total>0</thr:total></entry></feed>
