Sunday 6 August 2017

Cobol Picture Clause Binário Opções


USAGE. A cláusula USAGE especifica o formato de um item de dados na memória do computador ou em um registro de arquivo. Em algumas circunstâncias, o formato de registro de arquivo de um item de dados pode ser diferente do formato de memória do computador especificado pela cláusula USAGE. Ocorrem quando sistemas de arquivos não-COBOL com diferentes formatos de armazenamento de dados estão sendo acessados ​​através de uma interface Por exemplo, o Acu4GL usa o SQL para acessar sistemas de arquivos não-COBOL e, no processo, ocorre uma tradução nos dados. Afetando o comportamento do armazenamento de dados Consulte Opções de armazenamento de dados na seção Compatibilidade do ACUCOBOL-GT. A coluna à esquerda mostra as abreviações aceitas para os termos à direita. Uma cláusula USAGE pode ser usada em qualquer entrada de descrição de dados, exceto aquelas com números de nível 66 , 78 e 88. Uma cláusula USAGE não pode ser usada com um item de dados de ponto flutuante externo. Se uma cláusula USAGE está na entrada de descrição de dados para um item de grupo, então quaisquer cláusulas USAGE que aparecem para entrie subordinada S devem ser do mesmo tipo. A string PICTURE de um item COMP, COMP-1, COMP-2, COMP-3, COMP-4, COMP-5, COMP-6, BINARY ou PACKED-DECIMAL pode conter apenas o Os símbolos 9, S, V e P Os itens COMP-6 não podem usar o símbolo S. A cadeia PICTURE de um item COMP-X ou COMP-N pode conter apenas todos os 9 símbolos ou todos os símbolos X. A entrada de descrição de dados para um USAGE IS INDEX não pode conter nenhuma das seguintes cláusulas BLANK QUANDO ZERO, JUSTIFIED, PICTURE e VALUE IS. Level 88 itens não podem ser especificados para um item de dados USAGE IS INDEX. A entrada de descrição de dados para um item de dados USAGE IS POINTER Não pode conter nenhuma das seguintes cláusulas BLANK WHEN ZERO, JUSTIFIED ou PICTURE Um item de dados POINTER pode ter uma cláusula de valor especificada para ele, mas o valor deve ser a palavra NULL. A entrada de descrição de dados para um USAGE IS FLOAT ou USAGE IS O item de dados DOUBLE não pode conter nenhuma das seguintes cláusulas BLANK WHEN ZERO, JUSTIFIED ou PICTURE FLOAT ou DOUBLE itens de dados podem ter uma cláusula value O valor ma Y é um literal de ponto flutuante, um literal numérico ou a palavra ZERO Aqui está um exemplo de um item de dados da Seção de Trabalho-Armazenamento. Os seguintes são coletivamente chamados de tipos de dados de estilo C SIGNADOS-INT, NÃO ASSINADO-INT, ASSINADO-SHORT Estes tipos de dados são semelhantes aos tipos de dados encontrados na linguagem de programação C. A entrada de descrição de dados para um tipo de dados de estilo C não pode conter nenhuma das seguintes cláusulas BLANK WHEN ZERO, JUSTIFIED ou PICTURE. Control-type é um dos nomes de tipo de controle gráfico conhecidos pelo compilador, como LABEL ou ENTRY-FIELD ou o nome de um ActiveX, COM ou controle. A entrada de descrição de dados para itens de dados de USAGE HANDLE Não pode conter nenhuma das seguintes cláusulas BLANK WHEN ZERO, JUSTIFIED ou PICTURE Se ele contém uma cláusula VALUE, o valor especificado deve ser a palavra NULL. Font-name é um dos seguintes identificadores DEFAULT-FONT, FIXED-FONT, TRADITIONAL - FONT, SMALL-FONT, MEDIUM-FONT, LARGE-FONT. It deve ser observado que A opção - Df ou a opção - Cv fará com que o compilador trate COMP-1 e COMP-2 como FLOAT e DOUBLE, respectivamente. Para obter mais informações, consulte a seção 5 4 em Transição para ACUCOBOL-GT. Layout-name é o nome De um dos gerenciadores de layout padrão do sistema. Atualmente, isso só pode ser LM-RESIZE. Uma cláusula USAGE escrita em um nível de grupo se aplica a cada item elementar subordinado a esse item de grupo. Se nenhuma cláusula USAGE for especificada, então USAGE IS DISPLAY é O formato interno de um item USAGE IS DISPLAY é ASCII. O formato de um item de índice é binário assinado de 32 bits Seu tamanho é sempre quatro e contém um intervalo de valores de -2147483647 a 2147483647 Ao usar uma opção de compilação para Compatibilidade com versões anteriores a 6 0 0 - Z52, por exemplo, um item de índice é de 16 bits não assinado binário, tamanho é sempre dois e contém valores de 0 a 65535.O formato de um item de dados COMP-1 é assinado de 16 bits Binário Os valores legais variam de -32767 a 32767 O tamanho do item de dados é sempre dois Bytes ea metade de alta ordem dos dados é armazenada no byte mais à esquerda A cadeia PICTURE que descreve o item é irrelevante Ao contrário de outros tipos de dados numéricos, um erro de tamanho ocorrerá em um COMP-1, COMP-X ou COMP - N de dados somente quando o valor excede o armazenamento físico do item em outras palavras, o número de 9 s no item s PICTURE é ignorado quando o erro de tamanho é determinado. Para o armazenamento decimal COMP-2, cada dígito é armazenado em um byte Em formato decimal Se o valor é assinado, então um byte de arrasto adicional é alocado para o sinal O armazenamento de COMP-2 é idêntico a USAGE DISPLAY com os quatro bits de ordem alta removidos de cada byte. , Dois dígitos são armazenados em cada byte Um meio byte adicional é alocado para o sinal, mesmo se o valor é unsigned O sinal é colocado na posição mais à direita, e seu valor é 0x0D para negativo todos os outros valores são tratados como positivo, mas ver regra 18 abaixo O tamanho de um item incluindo um para o impl Ied é dividido por dois para chegar ao seu tamanho real arredondamento frações up. The formato de um item COMP-4 é dois binário s complementar o valor sem o seu ponto decimal COMP-4 valores são armazenados em um formato independente da máquina Este formato Coloca a parte de maior ordem do valor na posição mais à esquerda e segue para baixo para a parte de ordem inferior na posição mais à direita O número de bytes que um item de dados ocupa depende do número de 9 s na sua IMAGEM e da presença de vários Opções de tempo de compilação Por exemplo, você pode incluir mais de dezoito 9 s somente se seu programa tiver sido compilado para suporte de 31 dígitos Isto é resumido na tabela a seguir. Note Onde dois valores são dados, o valor menor se aplica a itens de dados não assinados , Eo valor maior se aplica a itens de dados assinadosP-5 é usado principalmente para se comunicar com programas externos que esperam armazenamento de dados nativo. O formato de um item de dados COMP-5 é idêntico a um item de dados COMP-4, exceto que os dados são Armazenado em uma máquina-d Ependent format É armazenado em uma ordem que é natural para a máquina host Por exemplo, um item de dados PIC S9 9 COMP-5 é equivalente a uma palavra binária de 32 bits na máquina host e um item PIC S9 20 COMP-5 É equivalente a uma palavra de 64 bits. Nota Os dados armazenados em um campo COMP-5 podem não ser transportáveis ​​para outras máquinas porque máquinas diferentes têm diferentes ordens de byte natural Em muitas máquinas 68000, a maioria RISC, COMP-5 é idêntico a COMP - 4 Em outros 80x86, VAX, é o mesmo com os bytes na ordem inversa. Uma cláusula VALUE para um item de dados COMP-5 é armazenada em um formato independente da máquina e é ajustada quando é carregada no item de dados Isso garante Que o valor é o mesmo de máquina para máquina. Em aritmética e não-aritmética armazena em itens COMP-5, se truncamento é necessário, por padrão ACUCOBOL-GT trunca em decimal para o número de dígitos dada na cláusula PICTURE Você pode usar A opção --TruncANSI compilador para forçar o truncamento em binário para a capacidade do alloc As opções - Dz e --noTrunc também afetam o truncamento Consulte o Livro 1, seção 2 1 9, Opções de armazenamento de dados, para obter mais informações. Os itens de nível 01 e 77 que são COMP-5 são automaticamente sincronizados Para um limite de máquina adequado, independentemente de quaisquer configurações de tempo de compilação Isso permite que você passar esses itens com segurança para subrotinas C sem ter que se preocupar com alinhamento. Se COMP-5 é usado com um item de dados PIC X n e atribuído um valor alfanumérico , Os resultados são indefinidos Por exemplo, o fragmento de código a seguir faz com que NUM tenha um número indefinido eo valor resultante para a última linha será 100. Um item de dados PIC X n usado com o COMP-5 não pode ser assinado. O item COMP-6 é idêntico a um item COMP-3, exceto que não é assinado e não há espaço alocado para o sinal. Se o número de dígitos é ímpar, um zero é adicionado à extremidade esquerda do número antes de ser compactado. São dois dígitos decimais por byte, eo tamanho real de O item é determinado dividindo o tamanho de sua imagem por dois e arredondando para cima. Um item de dados COMP-X deve ser descrito com uma seqüência de imagem consistindo de apenas 9 ou apenas X símbolos. Em ambos os casos, o item de dados é tratado como um inteiro binário não assinado , Com armazenamento interno semelhante ao de um item de dados COMP-4 Se símbolos X forem usados ​​para descrever o item, então o número de bytes alocados ao item é o mesmo que o número de símbolos X na seqüência de imagem Se 9 símbolos forem Em vez disso, o número de bytes alocados é o menor número de bytes necessários para manter um número desse tamanho. Por exemplo, um item de dados PIC 99 será alocado 1 byte, um item de dados PIC 9 9 será alocado em 4 bytes. O número de 9 símbolos na string de imagem do item, o valor máximo que pode ser armazenado em um item COMP-X é determinado pelo número de bytes alocados a ele com um máximo de 18 dígitos ou um máximo de 31 dígitos se 31 - digit suporte está em vigor Por exemplo, um item COMP-X consistindo de 1 b Yte pode conter um intervalo de números de 0 a 255 A 2 bytes COMP-X número pode conter de 0 a 65535 Um erro de tamanho ocorre em um item COMP-X somente quando o valor é maior do que o item de dados pode segurar fisicamente Quando COMP - X é usado com um item de dados PIC X, o máximo é PIC X 8 Esse máximo é aumentado para PIC X 16 quando o suporte de 31 dígitos está em vigor. Um item de dados COMP-N é idêntico a um item de dados COMP-X, Exceto que os dados são armazenados no formato nativo da máquina host, em vez de formato independente da máquina. Os itens de dados descritos como PACKED-DECIMAL são idênticos a COMP-3 Você pode fazer com que o unsigned PACKED-DECIMAL seja tratado como COMP-6 usando Uma opção de tempo de compilação. Por padrão, um item de dados BINARY é idêntico a um item de dados COMP-4 A opção de compilação - D5 trata os itens de dados BINARY como itens COMP-5. No modo de compatibilidade VAX COBOL, É o mesmo que COMP-4 e é tratado como dados binários No modo de compatibilidade RM COBOL, COMP é o mesmo que COMP-2 Você pode usar opções de compilação para cha Nge o comportamento padrão. Um item de dados do ponteiro é tratado como um item de dados numéricos não assinado O formato interno difere para cada máquina Itens de dados do ponteiro destinam-se a armazenar endereços de outros itens de dados consulte a instrução SET Um item de dados do ponteiro pode ter uma cláusula VALUE especificada Para ele, mas o valor especificado deve ser a palavra NULL Isso indica que o ponteiro não aponta atualmente para qualquer item Se um ponteiro não é explicitamente dado um valor inicial, então seu valor inicial é arbitrário. Os itens de dados do pote ocupam 8 bytes Isso fornece Espaço suficiente para manter um endereço em uma máquina de 64 bits Se você estiver em uma máquina menor, o tempo de execução usa apenas os primeiros 4 bytes de itens de dados de ponteiro os 4 bytes de fuga permanecem na memória, eles são apenas deixados sem uso Você pode usar o - Dw opção de tempo de compilação para ajustar o espaço alocado para itens de dados do ponteiro Você pode fazer isso para conservar o armazenamento se você sabe que não será executado em uma máquina de 64 bits. Pointers podem ser usados ​​em expressões condicionais, onde ca N seja comparado entre si ou com o valor NULL Uma comparação envolvendo um ponteiro deve ser igual ou não igual a maior e menor que comparações não são permitidas. Os itens de nível 01 e 77 que são itens POINTER são sincronizados automaticamente para uma máquina apropriada Independentemente de quaisquer configurações de tempo de compilação Isso permite que você passe esses itens com segurança para subrotinas C sem ter que se preocupar com o alinhamento. Exceto para a sincronização automática, os itens de dados do USAGE POINTER são tratados em todos os aspectos como USAGE UNSIGNED-LONG data items Isso manipula corretamente todas as máquinas atuais. Esse comportamento pode mudar para atender aos requisitos de alguma máquina futura. Os itens de dados de ponto de flutuação são armazenados em um formato dependente da máquina Os itens USAGE FLOAT têm 4 bytes alocados a eles USAGE DOUBLE itens ocupam 8 bytes. Level 01 E os itens de dados do nível 77 que são USAGE FLOAT ou DOUBLE são automaticamente sincronizados com os limites de máquina apropriados, independentemente de qualquer tempo de compilação Configurações Isso permite que você passar esses itens com segurança para subrotinas C sem ter que se preocupar com o alinhamento. A definição ANSI de COBOL não indica como os sinais devem ser armazenados em campos numéricos, exceto para o caso de SIGN IS SEPARATE ACUCOBOL-GT permite que você selecione As convenções de armazenamento de sinal alternativo usando as opções de compilação - Dca, - Dcb, - Dci, - Dcm, - Dcn, - Dcr e - Dcv Especificar uma convenção de armazenamento de sinal é por vezes útil quando você está exportando e importando dados Para Informações adicionais, consulte o Guia do Usuário, seção 2 2 10, Opções de Armazenamento de Dados. A convenção de armazenamento afeta a forma como os dados aparecem nos modos de dados USAGE DISPLAY, COMP-2 e COMP-3 No USAGE DISPLAY, armazenamento ASCII padrão, se o sinal É incorporado em uma posição de dígito, o dígito é codificado de acordo com a seguinte tabela. Table entradas marcadas com um asterisco indicar itens de tamanho fixo Um item de tamanho fixo é o mesmo tamanho independentemente da máquina de destino Entradas sem um asterisco são variáveis ​​em Tamanho Esses itens ocuparão espaço até o número de bytes listados na tabela. Nota Os tamanhos listados na tabela acima cobrem todas as máquinas atuais e previstas que executam o ACUCOBOL-GT As arquiteturas futuras podem exigir alterações no tamanho máximo atribuído a esses itens. No ambiente de execução, esses itens agem de todas as maneiras como se fossem itens de dados de tamanho fixo do tamanho apropriado. Por exemplo, o fragmento de código a seguir. Imprimirá 4 quando executado em uma máquina de 32 bits, mas imprimirá 8 Quando executado em uma máquina de 64 bits. Nos exemplos a seguir, cada byte é representado por dois dígitos hexadecimais ou por um único caractere citado Cada valor é mostrado nos vários formatos Também mostrado é USAGE DISPLAY usando as várias opções SIGN Os exemplos a seguir usam As convenções padrão de armazenamento de sinais ACUCOBOL-GT. Os itens de dados HANDLE compõem sua própria classe de dados e categoria em COBOL Internamente eles são armazenados como valores inteiros e se comportam como números quando usados ​​Um item de dados HANDLE é normalmente usado para Armazenar o identificador de um objeto criado dinamicamente, como uma janela flutuante ou um controle gráfico. HANDLE itens de dados vêm em duas formas digitadas e genérico Você cria um identificador genérico quando você omitir a frase OF Você cria um identificador digitado quando você incluir a frase OF . Você pode usar itens de dados HANDLE somente quando explicitamente permitido, ou como parte de uma instrução MOVE, uma instrução CALL como um parâmetro ou em uma expressão booleana. Generic identificadores podem ser usados ​​em qualquer situação onde as alças são permitidas Quando você usa um genérico Handle como a origem de uma instrução MODIFY, você não será capaz de usar qualquer propriedade de controle específico ou nomes de estilo nessa instrução Isso ocorre porque o identificador genérico poderia ser associado com qualquer tipo de controle Nesse caso, o compilador não pode determinar qual Um conjunto de nomes de estilo e propriedade é válido. As alças manipuladas podem ser usadas em instruções onde qualquer identificador é permitido ou quando você está se referindo a um objeto de um tipo correspondente Por exemplo, um HANDLE OF WINDOW não pode ser usado como o Handle em uma instrução DISPLAY LABEL Em vez disso, você deve usar um identificador genérico ou um HANDLE OF LABEL manipuladores digitados permitem que o compilador para reconhecer estilo associado e nomes de propriedade quando apropriado alças tipadas também melhorar a legibilidade do seu programa fornecendo informações adicionais sobre o pretendido Uso do identificador, além de fornecer verificação de tempo de compilação para garantir que você está usando as alças em situações apropriadas. As alças podem ser usadas em comparações Existem apenas duas comparações significativas verificando a igualdade ou desigualdade para NULL e comparação com outro identificador Item de dados Um valor identificador de NULL sempre indica um identificador inválido. Handles são armazenados internamente como 4 inteiros binários byte Essas informações podem ser úteis quando você está depurando um programa que você pode examinar os valores de identificadores no depurador Você não deve confiar nessa Definição no seu programa, no entanto, porque está sujeito a alterações no futuro. Os itens de dados de manipulação são automaticamente SYNCHRO NIZED em um limite de 4 bytes Observe que isso ocorre independentemente da configuração da opção - DL tempo de compilação que limita a quantidade de sincronização O sistema de tempo de execução requer esse nível de alinhamento para evitar gerar erros de barramento em algumas máquinas. Se o nome da fonte É especificado, então o item de dados descrito pela cláusula USAGE é inicializado na inicialização do programa com o identificador de fonte correspondente. Ele age de forma idêntica à colocação da instrução no início do programa, em que data-item é o item de dados descrito pela cláusula USAGE E font-name é o mesmo que font-name na cláusula USAGE. Reading COBOL Layouts. This tutorial sobre como ler um layout COBOL foi escrito especificamente para os nossos clientes que tiveram uma conversão realizada no Disc Interchange e receberam um layout COBOL Com os dados É destinado a dar-lhe informações suficientes para ler layouts mais simples Ele não abrange todos os tópicos ou tudo o que você iria encontrar em um layout complexo, e se destina a explicar COBOL la Youts somente assim que você pode usar seus dados convertidos, não assim que você pode escrever programas de COBOL. Este artigo começa aqui Reading COBOL Layouts onde você encontrará também um tópico index. Part 4 campos Numerics. This seção descreve vários tipos de dados numéricos ea manipulação de Sinais e pontos decimais. Conteúdos desta seção. Necessidade de converter campos numéricos Isso é nosso business. COBOL tem vários tipos de campos numéricos Esses tipos de dados incluem um campo DISPLAY, que é composto de caracteres os caracteres EBCDIC ou ASCII para 0 - 9, Campos binários, campos preenchidos e campos de ponto flutuante Também há opções para um sinal separado ou um sinal de overpunch e para decimal real ou implícita O tipo de dados é especificado pela cláusula USAGE IS. A Cláusula USAGE IS. Realmente mais para a declaração de imagem do que nós já descrevemos anteriormente Existe uma cláusula USAGE IS que especifica o tipo de armazenamento de um campo numérico - display, binário ou computacional A sintaxe completa, através de um exemplo, é This says to stor E o campo no formato computacional-3 O uso é parte é opcional e geralmente deixado de fora, e computacional pode ser abreviado COMP, então você verá mais comumente isso escrito Os tipos de campos numéricos que você geralmente verá em layouts COBOL are. Display Incluindo Signed fieldsputational ou comp. Display, incluindo Signed ou Zoned campos, é o mais comum, e comp-3 é o segundo tipo mais comum de campo numérico Alguns compiladores também podem ter comp-4 e comp-5 tipos de dados, geralmente para Emular comp em outro compilador. Utilização é Display. Display formato é o padrão para números em COBOL Se nenhuma cláusula use is é especificado, o padrão é uso é exibir, o que significa que o valor é armazenado como dígitos de caracteres EBCDIC, em oposição a binário The Valor pode ou não ter um decimal - implícito ou real - e pode ser unsigned ou ter um incorporado ou um sinal separado - que pode ser ou líder ou trailing O campo de formato de exibição assinado padrão contém um sinal de arrasto embutido e é Co Mmonly chamado um Signed, ou IBM Signed, ou Zoned campo Este tipo de dados é descrito abaixo. Signed Fields. There é um tipo de dados numéricos comum usado em COBOL em mainframes IBM chamado Signed também chamado IBM Signed, ou Zoned COBOL representa este tipo de campo Por um S na cláusula de imagem de um campo de formato de exibição, por exemplo, PIC S9 6 Um campo assinado é composto por caracteres numéricos EBCDIC regulares, um caracter por byte, para todos os dígitos, exceto aquele que contém o sinal, ou o sinal mais significativo O dígito que contém o sinal combina, ou sobre socos o sinal do número para esse dígito Isso salva um byte que o sinal de outra forma ocuparia O valor de que O dígito é armazenado como um valor binário e é OR d com o código de sinal, que é D0 hex para números negativos, C0 hex para valores positivos e F0 hex para valores não assinados. Por causa do overpunch, o dígito que contém o sinal será Não aparecer como Um número quando o campo é exibido no modo de caracteres EBCDIC Se você tiver o campo e exibir um valor de 1 23 com um editor EBCDIC, ele lerá 0000012C. ASCII Os compiladores COBOL também usam um tipo de dados assinado com um overpunch, mas os bits de sinal São diferentes e não padronizados entre os compiladores Veja nossos campos assinados Tech-Talk breve para obter mais detalhes sobre EBCDIC e ASCII campos assinados. Sign é separada. COBOL campos assinados incorporar o sinal no valor por padrão ver campos assinados acima Mas há uma disposição Em COBOL para um sinal separado, e pode ser tanto inicial ou à esquerda A declaração para isso é Isto pode ser combinado com a cláusula inicial ou de arrasto Esta declaração pode ser aplicada a um campo de item elementar ou a todo o registroputational e Fields. Because binário Os computadores executam cálculos com números binários, é mais eficiente armazenar esses valores no arquivo em sua forma binária nativa do que armazená-los em base legível humana dez Se o número é armazenado em sua nat Ive formato binário pode ser entrada do arquivo e usado diretamente Se ele s armazenado em um formato de base dez ele precisa ser convertido em binário antes de executar cálculos sobre ele, em seguida, convertido de volta para base dez para storage. COBOL define vários tipos de dados binários Vamos listar um breve resumo aqui, e você pode encontrar mais detalhes em COBOL Campos Computacionais e em COBOL Comp-3 Packed Fields Antes de começarmos, há um ponto importante para entender O padrão COBOL deixa a implementação real da maioria dos tipos de dados até O fornecedor que escreveu o compilador COBOL A razão para isso é porque diferentes computadores - CPUs - usar diferentes representações binárias internamente e funcionar melhor com seu próprio tipo de números binários Esta abordagem resulta em compiladores melhores e mais rápidos, mas também causa confusão, Porque um comp tipo de dados em uma máquina não é necessariamente o mesmo que comp em outra máquina A tabela abaixo lista os usos comuns nem todos os compiladores seguirão esses tipos Para mais deta O tipo de dados que um campo usa para o armazenamento é determinado pela cláusula use is na definição do campo e, na maioria dos casos, o número de bytes de armazenamento é determinado pelo número de dígitos no campo Os números de ponto flutuante PIC seguem formatos binários padrão e, como tal, seus tamanhos não são determinados por um PIC e nenhum PIC é usado na definição de campo. Descrição de como esse tipo de dados é armazenado. -3.Quando a leitura de um binário ou comp campo especificação, o tamanho listado no PIC é o número de dígitos decimais após o número é convertido de binário para base dez No caso de um campo embalado, é o tamanho depois de desembalar. Real Decimal. Most programadores de PC tendem a pensar em termos de decimal real em valores numéricos Em um PC, se você tem um campo de dólares e centavos para, digamos, factura total, no montante de 123 45, o arquivo conterá os seis bytes 123 45 e provavelmente um sinal Em outras palavras, há Um ponto decimal real no arquivo COBOL pode fazer isso, também, através do seguinte OR A presença do no PIC faz com que um decimal real no arquivo decimal implícito, no entanto, é muito mais comum em COBOL. Implied Decimal. Implied decimal simplesmente Significa que há um ponto decimal implícito em um local especificado em um campo, mas não realmente armazenado no arquivo O local do decimal implícito é indicado por um V no PIC Usando o decimal implícito economiza espaço no arquivo O decimal implícito pode ser aplicado a qualquer Tipo de campo numérico, incluindo um campo compactado ou comp-3. Por exemplo, é um campo decimal implícito Existem 6 dígitos, então um decimal implícito - o V - e mais dois dígitos, para um total de 8 dígitos O campo é 8 bytes de tamanho não existe no arquivo - o local do ponto decimal está implícito entre 9 6 e 99 Se o campo contiver 00000123 então o saldo da conta é 1 23, porque há um decimal implícito entre o Sinais de Sincronização e Alinhamento. Este tópico é Um pouco envolvido para este tutorial, mas você deve estar ciente disso Ao usar binário de armazenamento binário e comp, alguns compiladores em algumas máquinas podem exigir que um campo numérico iniciar em algum limite Por exemplo, em uma máquina de 32 bits, pode exigir que Um campo de comp iniciar em um limite de 32 bits. Se você especificar um campo comp no meio de um registro, e ele doesn t acontecer a começar em um limite de 32 bytes de 4 bytes, o compilador irá alinhá-lo a um limite de 32 bits para sincronizar O que realmente está armazenado no arquivo pode não ser o mesmo que os PICs no layout. Esse não é um problema muito comum, em parte porque os campos binário e comp não são muito comuns nos arquivos, mas você deve estar ciente disso. A empresa de conversão de serviços COBOL pode converter a maioria dos tipos de dados numéricos, incluindo todos os tipos de dados IBM mainframe EBCDIC ea maioria dos tipos de dados ASCII dos sistemas PC e UNIX. Biblioteca de conve Rsion rotinas nos permite lidar com esses trabalhos difíceis que compiladores COBOL padrão não pode converter. A condição é um pedaço especial de código que permite que você instrua o computador para comparar dois pedaços de dados As condições são usadas em declarações IF e nas cláusulas Até Até Da instrução PERFORM. As condições têm a sintaxe. Onde data-1 e data-2 podem ser um literal ou um campo data-2 também pode ser um literal COBOL como SPACES ou ZEROS. Operator pode ser o símbolo de comparação tradicional Desigualdade de uso não porque nem todos os compiladores aceitar o símbolo Raramente, um compilador não aceitará Você pode usar NOT e NOT Voltar ao Sumário. Statements pode ser continuado sobre várias linhas sem fazer nada mais do que colocar o código em linhas separadas O compilador irá Figura para fora. Os literals muito longos alfanuméricos podem ser continuados em linhas múltiplas colocando um hífen na coluna 7 das linhas da continuação e colocando o restante do literal lá Esta continuação do lite Ral requer uma citação inicial simples O literal na linha anterior não tem uma única citação final, mas é considerado como estendendo-se à coluna 72. O hífen na segunda linha está na coluna 7 A citação única nessa linha está na coluna 12 ea Literal continua a partir daí A citação final única na linha é necessária Observe que a parte do literal que s na primeira linha não tem uma citação final Se o último E não está na coluna 72, então será assumido que todos os caracteres entre Que E e coluna 72 são espaços e aparecerá no literal. Also válido com cláusulas value. Control Breaks. Control quebras são um recurso de relatórios que permitem o agrupamento e acumulação de subtotais para dados que pertencem juntos com base no valor de um Campo o campo de controle Quando o valor para este campo muda de um registro para outro o programa quebra para fazer algum processamento especial como imprimir subtotais antes de continuar com o próximo registro O arquivo de entrada deve ser classificado no c Campo de ontrol s. Um exemplo de um relatório com uma quebra de controle de nível único. A quebra de controle está no departamento Cada departamento de grupo de controle tem seus próprios cabeçalhos e totais de pontos Embora não seja mostrado aqui neste exemplo é comum para cabeçalhos de coluna Para ser repetido após cada controle heading. See a página de algoritmos para o código de exemplo. Há basicamente três tipos de dados reconhecidos pelo COBOL dados numéricos com ou sem casas decimais apenas 0-9, o ponto decimal e um sinal permitido, alfabética apenas o Caracteres AZ e alfanuméricos quaisquer caracteres Alfabético raramente é usado. Math só pode ser realizada em campos numéricos. Datas são dados comuns para COBOL programas e devem ser manipulados muitas vezes Tipicamente datas são armazenadas no formato gregoriano, consistindo no familiar mês, dia e ano Isso geralmente é chamado de formato mmddyy, embora o formato mmddyyyy está se tornando o novo padrão ver a página de discussão Y2K Embora esses formatos são familiares para os codificadores e as datas dos usuários são mais E muitas vezes armazenadas no formato yymmdd ou yyyymmdd para que possam ser classificadas facilmente. A chamada matemática do calendário, onde as datas são usadas nos cálculos, pode ser um processo tedioso, a menos que o compilador suporte as funções de data intrínsecas. O calendário gregoriano. April, junho, setembro e novembro só tem 30 dias. Fevereiro só tem 28 dias, 29 se um ano bissexto. Todos os outros meses têm 31 dias. O método oficial de determinar se um ano é um ano bissexto, é necessário dividir o Se o remiander primeiro é 0, então o ano é um ano bissexto, mas se o segundo restante é também 0, então o ano não é um ano bissexto, Mas se o restante terceiro é também um 0 então o ano é um ano bissexto novamente É por isso que 2000 é um ano bissexto por 1900 e 2100 não são Essas verificações devem ser aninhadas dentro uns dos outros, tentando colocá-los em um único IF não Os limites são usados ​​como fins visuais para uma Nt alterar o processamento, mas eles fazem o código mais fácil de ler e manter Um exemplo de um delimitador é END-IF. Verbs que têm delimitadores finais são os verbos de comparação IF, EVALUATE, saída de entrada READ, WRITE, DELETE, REWRITE, ACCEPT, math ADD, SUBTRACT, MULTIPLY, DIVIDE, COMPUTE, processamento de transferência PERFORM, CALL e alguns outros menos utilizados verbos. Quando o compilador encontra um período que leva isso como o fim da declaração Um delimitador que é encontrado após um período está em error. A Campo é o que outras línguas chamam uma variável É um lugar para armazenar dados Todos os campos devem ser declarados na DIVISTA DE DADOS Uma declaração de campo tem três partes o número de nível o nome do campo ea cláusula PIC Cláusulas VALUE são opcionais. 1 a 30 caracteres de comprimento contém apenas as letras AZ, os dígitos 0-9 eo hífen contém pelo menos uma letra não começa ou termina com um hífen e não é uma palavra COBOL reservada. Estes são literais numéricos especiais inerentes a COBOL HIGH - VALUES é O COBOL equivalente ao infinito - nenhum número é maior do que ALTO-VALORES Por outro lado, nenhum número é menor que LOW-VALUES. Julian Dates. Julian é um formato de data que é uma alternativa às datas gregorianas Consiste em um dia de 3 dígitos e um Ano não há meses Os dias variam de 1 Jan 1st a 365 ou 366 Dec 31, dependendo se o ano é um ano bissexto ou não Isto é geralmente conhecido como o formato dddyy ou dddyyyy, embora normalmente a data seja armazenada como Yyddd ou yyyyddd para facilitar com sorting. As lojas que fazem uso de datas julianas terão rotinas callable que Julian secreto para Gregorian e para trás outra vez, porque os seres humanos são confortáveis ​​com datas Gregorian datas intrínsecas funções disponíveis com compiladores COBOL mais recentes têm essas conversões built-in. Julian format has two advantages First, it s smaller, so it takes up less space Second, it eases with some calculations because it contains no months For example, how many days are between Feb 5, 1997 and Nov 28, 1999 Convert to Julian 19970 36 and 1999332 a quick subtraction gives 1026 days Remember that borrowing a year gives you 365 days. Getting a future date or past date can also be easier with Julian What date is 45 days before Apr 15, 1999 Convert it to Julian 1999105 , subtract 45 to get 1999060 and convert back to Gregorian Mar 1, 1999.Level Numbers. Level numbers are used to group fields in the Data Division A field can then be defined as a collection of other fields The higher the level number the lower in the heirarchy the field is Normally, the field numbers 01, 05, 10, etc are used By spacing them out you leave yourself room in case a level needs to be added later Valid level numbers are 0-49.Each FD is required to have an 01-level field defined This is the record definition It can be broken down into smaller fields if desired For example. We have an 01-level field that is broken down into 4 fields the 05-level fields Two of the 05-level fields are also broken down Employee number is an elementary field because it is not broken down into smaller fields The employee name and birth date are group level fields because they are broken down into smaller fields Only elementary fields have PIC clauses. The birth date is 8 characters long the sum of the lengths of the elementary fields that compose it All 8 characters can be accessed with one name IN-BIRTH-DATE or one of its pieces can be accessed by using that name instead i e IN-BIRTH-MM. A group level item ends when another field with the same level number, or one with a lower value, is encountered For example, the list of fields within IN-BIRTH-YEAR ends when the 05-level IN-DEPARTMENT is encountered A field of level 10 would also have ended it. All group level fields are considered to be alphanumeric. All of these level number concepts are valid for WORKING-STORAGE also. Literals are specific values as opposed to fields Alphanumeric literals are enclosed in single quotes In the following statements.3 1415927 is a numeric literal and Enter a number is an alphanumeric literal COBOL has some built-in literals like ZEROES and SPACES. A paragraph is a section of COBOL code Paragraph names start in the A margin and follow the same naming rules that fields do A paragraph ends when another paragraph name is encountered Paragraphs can be executed with the PERFORM statement. You can think of a pargraph as the equivalent of a subroutine in other languages There are no arguments, all fields are thought of as global. PIC Clauses. PIC short for PICture clauses describe the size and type of data for each field Numeric data has a PIC character of 9, alphanumeric data uses X and alphabetic data an A Each 9, X or A represents one character Length can also be represented by a repetition factor The PIC clauses 9999 and 9 04 both define 4-digit numbers. The PIC character V is used to mark where a decimal point is If you had a 8-digit numeric field but 2 of the digits are after the decimal point, you would define it as PIC 9 06 V99 The decimal point is impl ied, it is not physically there in the data It also takes up no space To allow for a field to hold either positive or negative numbers precede the leftmost PIC character with an S PIC S999V99.There are several output PIC characters which help with formatting data for display or print Numeric fields are MOVEd to fields defined with these formatting PIC characters Fields defined with these formatting PIC characters are considered alphanumeric No calculations can be done with these fields Newer versions of COBOL allow these fields to be MOVEd to straight numeric fields. To print a decimal point place a in the desired place in the output PIC clause i e PIC 999 99 You can place commas in output numbers also i e PIC 999,999 99 In this manner the decimal point and commas do take up space These are considered insertion characters - they insert themselves into the data Other insertion characters are B for a space , 0 a zero and useful in printing dates. There is Z, for suppressing leading zeroes If the digit represented by a Z is a leading zero it will print as a blank You normally have one 9 in the PIC clause, in the one s place All other digits represented by Z s Do not use Z s after the decimal point If used with commas i e PIC ZZZ, ZZ9 99 a comma will only print if the character to its left prints, else it prints as a blank. There are other zero suppression characters A can be used just like the Z except that rightmost leading zero will print as a and all zeroes to the left of that will print as spaces So the value of 125 00 MOVEd to a PIC , 9 99 will print as 125 00 This behavior of the is called floating An will work the same way for check protection but all print, not just the one to the left of the most significant digit When either the floating or the is used in conjunction with commas the comma will only print as a comma if the character to its left prints as a digit Depending on the situation it will otherwise print as a blank, or. For sign control you can use or - as an output PIC character A will print for positive numbers and - for negative numbers A - will print a - for negative numbers and a blank for positive numbers Either can be repeated to suppress leading zeroes like the and can float also like the Alternatively, a or - can be placed to the right of the number. For accounting purposes the PIC characters DB and CR can also be used i e PIC , 9 99DB The DB or CR will only show if the value is negative If positive they will print blanks. Qualified Fields. It is legal in COBOL for different fields to have the same name These fields cannot be 01-level fields and cannot be part of the same group-level field. When referencing one of these fields the compiler requires the field to be qualified, meaning its group-level field must be specified If both INPUT-RECORD and OUTPUT-RECORD contained a field named PAY-RATE then in code you cannot simply reference PAY-RATE, it would have to either be PAY-RATE OF INPUT-RECORD or PAY-RATE OF OUTPUT-RECORD. Reference Modification. Reference modification allows for the referencing of a portion of a field without having to make it a group-level field and defining each portion of the field that will be accessed. If you wanted to check the value of the 4th through 6th characters of a field to see if they were equal to ABC you can code. The first number in the parenthesis represents the start position in the field and the second number represents the length Both values have to be specified COBOL treats all such references as alphanumeric. Since this is not a self-documenting feature it should not be used carelessly. A report is simply a formatted representation of data, suitable for being printed on paper hardcopy Reports generically look like. The first two lines are page headings, which will appear on every page The next printed line following the blank line is column headings It s common for column heading lines to be printed on every page Next come the detail lines - typically one per record At the end of the report will be a total line if you are totalling anything Note that the first detail line is the 6th line printed on a page must count the blank lines also. There are other types of lines that can appear on reports Sometimes there are page footings printed on the bottom of each page There can also be report headings and report footings only printed at the top and bottom of the report as opposed to each page. Note the formatting of the data There are commas and leading zeroes are suppressed on page numbers and monetary figures The date has slashes Always make reports as easy to read as possible. See the algorithms page for sample code. A section is a group of paragraphs The section name must begin in the A margin and be followed by the word SECTION Naming standards for sections are the same as those for paragraphs A section ends when a new one begins. A section can be PERFORMed in the same manner a paragraph is PERFORMed The PERFORM only uses the section name, there is no reference to i t actually being a section instead of a paragraph. Subscripts and Indexes. Subscripts and indexes are the two tools used to reference individual elements of a table A subscript is a working-storage field defined separately from the table and is completely available to the programmer An index is created automatically by the system if it is directed to do so and only has limited availability to the programmer. An index cannot be part of a calculation, cannot be MOVEd to another field or cannot receive another field from a MOVE and it cannot be DISPLAYed To manipulate an index the SET statement must be used. The major difference between a subscript and an index is that a subscript is a position in the table first element, 20th element, etc An index is a byte offset of an element relative to the beginning of the table Since the first element is 0 bytes away from the start of the table, it has an index of 0 The 20th element say each element is a PIC X 5 starts 95 bytes from the start of the tab le so its index is 95 When manipulating an index the programmer does not do so by this byte offset It is done by position in the table and the translation to byte offset is done internally by COBOL. See the algorithms page for sample code on loading and searching tables. Tables are the COBOL equivalent to arrays It is a set of fields with the same name and the same data type To reference an individual element of the table a subscript or index must be used. Tables are defined using the OCCURS clause. See the algorithms page for sample code on loading and searching tables. Truncation is a phenomenon that occurs when the receiving field of a MOVE or a math operation is not big enough to hold what it s getting For alphanumeric fields truncation happens on the right move COBOL to a PIC X 4 and you get COBO and numeric it happens on the left move 1000005 to a PIC 9 06 and you get 5 No warnings, no messages Just the loss of data.77-level Fields. A working storage field can be declared with a level number of 77 The 77 must be in column 8, the field cannot be a group-level field and the field cannot be part of a group-level field.88-level Fields. A field declared with a level number of 88 is commonly known as a condition name This name can be used anywhere a condition can be used and is generally more readable Condition names are declared immediately after the field they are associated with They use no storage they take up no room. For example your application contains a field named ACCT-TYPE which is PIC 999 One particular section of code determines if the account is a checking account account type 100, 110, 210 or 300 , a savings account type 150 or 175 or a CD IRA type 400 An IF statement could look like. Logically accurate but not entirely clear what account types are what Comments would help, but condition names will help more Define as. The same IF can now look like. Now it s self-documenting The added advantage is if another type of savings account is developed it only needs add ed at the condition name The IF statement doesn t change. A specific value can appear in multiple condition names Values associated with a condition name can be specified with THRU i e VALUES 90 THRU 99 When checking condition names NOT can be used If a condition name only has one value a statement such as SET CD-IRA-ACCT TO TRUE is valid and is the equivalent to MOVE 400 TO WS-ACCT-TYPE. The ACCEPT statement is used to get information from a source other than a data file like the keyboard or CPU clock. will cause the program to wait until the enter key is pressed Any data typed in before the enter key is pressed will then be placed in field See How do I for issues with getting numeric data in this manner See the algorithms page for sample code on receiving and processing data received interactively. The ACCEPT statement can also be used to get information from the system clock such as the current date and time. field-1 is PIC 9 6 The date will be in yymmdd format. field-2 is PIC 9 8 The tim e will be in hhmmsscc format where cc is hundredths of a second hh will be in military time 0-23.field-3 is PIC 9 3 The value will represent the current Julian date, which is a number from 1-366 representing the date as a number of days relative to the end of the previous year Jan 1st 1, Feb 1st 32, etc. field-4 is PIC 9 The values range from 1 Monday to 7 Sunday. The basic form of the ADD statement is. which adds value either a literal or a field to field-1 and stores the result in field-1 A list of fields can follow the TO which will add the value to each of them A list of values can be before the TO which would add all of them to field-1.It is possible to add two values either literals or fields and store the result in a separate field with the GIVING clause. Blank When Zero. BLANK WHEN ZERO can be specified with a PIC clause so that blanks are printed if the value of the field is zero For example, PIC -,--9 99 BLANK WHEN ZERO. The CALL statement is used to call another program As long as the called program contains a GOBACK or EXIT PROGRAM then when the called program finishes control returns to the calling program. Fields can be passed from the calling program to the called program These fields are in the calling program s WORKING-STORAGE SECTION and in the called program s LINKAGE SECTION The USING clause on the CALL specifies the fields to pass The called program lists these fields in the USING clause of the PROCEDURE DIVISION These fields don t have to have the same name in both programs, but the definitions must match. See the algorithms page for sample code on calling another program. The CLOSE statement will close an open file Attempting to close a closed file will produce a run-time error. One CLOSE statement can close multiple filesPUTE allows you to c ombine several math operations in one statement, using familiar symbols instead of English-like sentances. Expression is any valid mathematical expression involving literals fields and the following symbols COBOL has no recursion. Each of the examples can also be specified with a THRU option, allowing for a sequence of paragraphs to be executed. Paragraph-name-2 will also be executed. There is also what s known as an in-line perform where a block of code appears between a PERFORM and END-PERFORM No paragraph name is specified For example. When using the UNTIL option with a perform or in-line perform the UNTIL condition clause can be preceded by WITH TEST AFTER to have COBOL check the condition after the loop instead of before This will cause the loop to always be executed at least once This has the effect of a REPEAT-UNTIL loop of other languages. The read statement will read the next record from the specified file and place the data in the record layout of that file s FD The file must be al ready open as input Reading an unopend file or attempting to read beyond the end of a file will produce a run-time error The AT END clause is required. Optional clauses are NOT AT END and INTO NOT AT END specifies a statement to be executed if the read did not hit the end of the file INTO specifies a working-storage field into which the system will place the input record. The READ NEXT is used after a successful START to read records along the established access path The condition used by the START is not remembered by the READ NEXT so after each successful READ NEXT the record must be checked to see if it still matches whatever criteria the program is calling for A successful read only means that a record was retrieved. Since this is still a sequential process the READ NEXT requires an AT END clause The optional NOT AT END clause is supported. See the algortihms page for code examples. The REDEFINES clause allows you to have multiple field definitions for the same piece of storage The same data then can be referenced in multiple ways. Take a simple example, useful for data validation. This portion of the data division only consumes 8 bytes of storage, not 16 Each of the two PIC clauses is describing the same 8 bytes of data, just doing it differently. Once data is in WS-NUMBER-X it can be checked to see if it is numeric IF WS-NUMBER-X IS NUMERIC If so, WS-NUMBER can then be used as part of a calculation If the data happens to be non-numeric then this type of code will prevent the program from choking We access the data as alphanumeric any data allowed to see if it is safe to access it as numeric before actually attempting to do so. Note that once the data was moved to WS-NUMBER-X it was also moved to WS-NUMBER because they both describe the same portion of storage. There are a few rules with REDEFINES. A redefinition must have the same level number as the field it is redefining. The redefinition must immediately follow the field it is redefining i e if an 05-level field is bei ng redefined then the redefinition must be the next 05-level field. Cannot have a REDEFINES of an 01-level field in an FD. The redefinition should be the same size as the field it is redefining though not all compilers require this. It is possible to redefine at the group level though each group-level field does not have to the same number of elementary fields. Not all compilers allow VALUE with REDEFINES It s a bad idea in any case. Can have multiple REDEFINES of the same field. Back to Table of Contents. The RELEASE statment is required in an INPUT PROCEDURE of a SORT It is used to specify that a record is to be included in the sort. Only RELEASEd records will be sorted. See the algorithms page for sample code on using the SORT statement. The RETURN statment is required in an OUTPUT PROCEDURE of a SORT It is used to retrieve a record from the sort back into your program. The records are RETURNed in the sorted order. Like the READ statement the RETURN supports the NOT AT END and INTO optional cla uses Also like the READ, it is best if only one statement is used in either the AT END or NOT AT END clauses. See the algorithms page for sample code on the SORT statement. REWRITE will update the current record in a non-sequential file OPENed as I-O There must be a current record, so a successful READ or READ NEXT must precede the REWRITE Following the READ READ NEXT and before the REWRITE some information on the record will presumably be changed. REWRITE specifies the record, not the file. See the algorithms page for sample code on using non-sequential files. Rounded is a clause valid with any of the math verbs ADD SUBTRACT MULTIPLY DIVIDE COMPUTE Place it in the command after the name of the field that will receive the result. The search command is used to search a table for a particular entry The table must have an index see OCCURS The format is. The field is the field with the OCCURS clause WHEN specifies the condition on which to end the search usually when some field equals a table ent ry Only one statement can be specified in the WHEN but it can be a PERFORM The AT END clause is optional, specifying one statement to be executed if the entire table is searched without satisfying the WHEN condition It is recommended, however. There can be multiple WHENs but the search stops once the condition of a WHEN is satisfied To allow for multiple search matches use a PERFORM VARYING which can increment an index. If the table entries are sequenced by the field being searched then a binary search can be used instead Use SEARCH ALL instead of SEARCH It is more efficient than a regular search, especially with large tables The SEARCH ALL has some limitations. Only one WHEN is permitted. The WHEN condition can only test equality. The WHEN condition cannot contain an OR. The table field must be to the left of the in the condition. See the algorithms page for sample code on loading and searching tables. Set can be used to manipulate an index. Note that while an index is actually a byte offset w ithin a table COBOL does not expect you to work on that level Setting an index to 2 will cause it to point to the 2nd element in the table, regardless of its offset Likewise, seting an index up one will move it to the next element in the table, regardless of the size of the element COBOL will translate it to the proper offset for you. Set can also be used with condition names as an alternative to a MOVE Consider the following. It is then permissible to code. This is the equivalent to MOVE Y TO WS-END-OF-FILE-SW but it is more readable Most compilers will not allow a condition name with multiple values to be used in a SET It is not a good idea in any case. The sort statement is used to sort a file It requires a work file area that is defined in the FILE SECTION, just like any other file, except it is an SD instead of an FD The basic sort statement looks like. Multiple fields can be used in the sort, just list them in the desired order DESCENDING KEY can be specified instead of ASCENDING KEY DESCENDING KEY and ASCENDING KEY can be combined in the same statement. The SORT statement will open and close both the input and output files automatically The field s to be sorted on must be defined in the SD of the sort file. An INPUT PROCEDURE can be specified instead of an input file This allows the flexibility of selecting specific records to be sorted or to do other types of processing before the sort Likewise, an OUTPUT PROCEDURE can be used instead of an output file An INPUT PROCEDURE requires a RELEASE statement and an OUTPUT PROCEDURE requires a RETURN statement For example. This statement will execute paragraph-1 perform the sort and then execute paragraph-2 An INPUT PROCEDURE can be used with GIVING and an OUTPUT PROCEDURE can be used with USING Each of these options allows the THRU option i e paragraph-a THRU paragraph-b. The clause WITH DUPLICATES IN ORDER can be included in the statement after the last ASCENDING DESCENDING KEY This will cause any records with the same value s for the sort field s to be kept in their original order Not specifying this will not necessarily change their original order, but there is no guarantee. See the algorithms page for sample code on using the SORT statement. The Start statement is used to establish an access path for an indexed file with alternate keys see the algortihms page for code examples Note that keys in alternate indexes are not necessarily unique and the START is used in conjunction with the READ NEXT statement to find and retrieve and these records. The alternate key field must already be populated with a value. The first record in the file with that value for the alternate key is read It is a good idea to include a INVALID KEY clause in any START to handle the case where there is no record in the file with the appropriate alternate key. Instead of EQUALS the START also supports and NOT or NOT Back to Table of Contents. The stop run statement will cause a normal termination to your program. The STRING is used to con catenate join multiple fields or literals into one field It replaces a series of MOVEs For example. After the above statement is executed WS-DISPLAY-DATE will contain 12 24 2000 DELIMITED BY SPACE means to use as much of that field or literal that appears before the first space If there are no spaces like in the example then the entire field or literal is used Any character can be used in the DELIMITED BY clause. Literals are usually DELIMTED BY SIZE, meaning to use the whole thing. The DELIMITED BY character is never included in the combined field. The basic form of the subtract statement is. which subtracts value either a literal or a field from field-1 and stores the result in field-1 A list of fields can follow the FROM which will subtract the value from each of them A list of values can be before the FROM which would subtract all of them from field-1.It is possible to store the result in a separate field with the GIVING clause. The UNSTRING is used to split a field into multiple fields using a particular character to determine where to split the field For example. The above statement will take the all of WHOLE-NAME, up to but not including the 1st space, and place it into WS-FIRST The the part that is between the 1st and 2nd spaces, not including either one, is placed in WS-MIDDLE, and so on. USAGE can be used in conjunction with the PIC clause to specify how numeric data is to be stored The most common options are DISPLAY the default , COMP and COMP-3 COMP is short for COMPUTATIONAL, which can also be used The words USAGE IS are optional USAGE is only valid with numeric fields It can be specified as follows. A number stored as COMP is in binary format A COMP-3 number is stored as packed-decimal. The USING clause is used to pass parameters from one program to another It appears in the Call statement of the calling program to specify the parameter list These parameters must be working storage fields. The called program must have a USING clause on its PROCEDURE DIVISION sta tement followed by the parameters the program is receiving These fields are defined in the LINKAGE SECTION of the DATA DIVISION, which follows the WORKING-STORAGE SECTION All of the received fields are updateable by the called program. The parameters do not have to have the same names in the calling and called programs but the sizes and data types have to match. See the algorithms page for sample code on calling one program from another. Value allows you to initialize a field at the same time it is defined The VALUE clause follows the PIC clause and must be the proper type of data The value can be changed in code at any time. Some compilers will require the VALUE data to be the proper size also, others will truncate to fit Most compilers will not allow VALUEs in input FDs - it is a bad idea in any case. The write statement will write data to the specified file The file must be opened for output Attempting to write to an unopened file or a file opened for input will produce a run-time error. Optional clauses are FROM, BEFORE and AFTER FROM specifies a working-storage field from which the system will select the data that is to be written FROM can appear with either BEFORE or AFTER. BEFORE and AFTER specify actions to be taken by the printer along with writing a record of data You can either specify the number of lines that are to be advanced or you can specify advancing to the top of the next page BEFORE and AFTER cannot appear in the same write. This document will focus on a discussion of a numeric field or data string known as PACKED-DECIMAL format also referred to as packed data or a packed numeric field This format is used on an IBM Mainframe System and is supported by Micro Focus COBOL running on a Linux, UNIX or Windows System. Note The items in this document are appropriate for applications that are written in COBOL, Mainframe Assembler HLASM or PL I The IBM Mainframe architecture drove many of the numeric formats that existed in the early ANSI specifications for COBOL and have been carried forward to the current COBOL ANSI specifications. A packed decimal representation stores two decimal digits in one byte A packed decimal representation stores decimal digits in each nibble of a byte a byte is eight bits and a nibble is four bits Each byte has two nibbles, and each nibble is indicated by a hexadecimal digit For example, the value 23 would be stored in two nibbles, using the hexadecimal digits 2 and 3 the bit representation would be 0010 0011 The sign indication is dependent on your operating environment On an IBM mainframe, the sign is indicated by the last nibble of the last byte or high memory address For explicitly signed fields the C indicates a positive value and D indicates a negative value For unsigned or implied positive fields the F indicates a positive value. The mainframe can perform arithmetic functions on packed-decimal fields without having to convert the format Storing numeric values in a packed-decimal format may save a significant am ount of storage space For example, on the mainframe the value 12,345 would be five 5 bytes in length i e x F1F2F3F4F5 If the same information is stored in a packed-decimal i e USAGE IS COMPUTATIONAL-3 or abbreviated as COMP-3 the field would be three 3 bytes in length i e x 12345C. When converting records or data structures that contain this type of field from EBCDIC to ASCII the programmer is presented with a number of confusing options and challenges This document will try to explain the options and help the programmer avoid the common mistakes that are made during a conversion process. The following table shows the structure of a five digit numeric field using the Packed-Decimal format i e the COBOL syntax would be USAGE IS COMP-3 The field contains a value of one-hundred-twenty-three or 00123 Since the packed-decimal format stores a digit in each nibble 2 digits per byte the actual field size is only three 3 bytes. The Packed Decimal Format for a Numeric Field. Note-1 A field that is d efined as Unsigned i e PIC 99999 COMP-3 is an implied positive value Note-2 The Hex is an abbreviation for Hexadecimal notation Note-3 A field that is defined as Signed i e PIC S99999 COMP-3 will have the sign in the rightmost nibble of the units positions or Byte-2 in the preceding example A X nC is used as an explicit positive sign and a X nD is used as an explicit negative sign Note-4 The Packed-decimal format is the same for the Mainframe and for Micro Focus running on a Windows or UNIX system. We have made a significant effort to ensure the documents and software technologies are correct and accurate We reserve the right to make changes without notice at any time The function delivered in this version is based upon the enhancement requests from a specific group of users The intent is to provide changes as the need arises and in a timeframe that is dependent upon the availability of resources. Copyright 1987-2017 SimoTime Technologies All Rights Reserved. Table, Packed-Decimal Field S izes. The following is a table that shows the actual field sizes for a COMP-3 or packed-decimal based on the number of digits specified in the picture clause. Convert Packed-Decimal to Text. This section describes how to convert the previously discussed packed-decimal formats into text strings to print or display the information in a human readable form Before converting the packed-decimal fields it should be determined if a conversion is necessary The following list provides some basic guidelines. When migrating an application both data and COBOL programs for processing the data from an IBM Mainframe System to a Windows System with Micro Focus Enterprise Server a conversion of the Packed-Decimal fields is not necessary Micro Focus COBOL supports the packed-decimal format. When migrating an application both data and COBOL programs for processing the data from an IBM Mainframe System to a Linux or UNIX System with Micro Focus Enterprise Server a conversion of the Packed-Decimal fields is not necessary Micro Focus COBOL supports the packed-decimal format. When migrating or transferring data from a COBOL oriented, IBM Mainframe or AS 400 environment to a non-COBOL oriented Linux, UNIX or Windows environment i e ASCII Text or excel spreadsheet then a conversion will be required This may require two conversion tasks The packed-decimal fields or data strings will need to be converted to a zoned-decimal format sign leading separate with an explicit decimal point should be considered depending on the target environment The zoned-decimal format may then require a conversion from EBCDIC to ASCII. When using the File Transfer Protocol FTP to transfer a data file between a Mainframe System and a Linux, UNIX or Windows System it will be necessary to use the BINARY mode if the records contain packed-decimal fields If a conversion between EBCDIC and ASCII is required it will need to be done after the file transfer. Convert to Text with Explicit Sign. This section describes how to convert a packed-decimal field i e PIC S9 5 USAGE IS COMPUTATIONAL-3 to a zoned-decimal field i e PIC S9 5 USAGE IS DISPLAY SIGN LEADING SEPARATE The resulting field will have a separate leading sign but will still have an implied decimal based on the field definition from the COBOL picture clause. Convert to Text with Explicit Decimal. This section describes how to convert a packed-decimal field i e PIC S9 5 USAGE IS COMPUTATIONAL-3 to a zoned-decimal field i e PIC X The resulting field will have a separate leading sign and an explicit decimal point embedded in the text string This field or data string may easily be exported to a non-COBOL environment. Spaces in a Packed Field. We have seen a few instances where a packed field may contain SPACES This should be considered a bad programming practice Having non-numeric values in a numeric field should be avoided The process that caused non-numeric values to be placed in a numeric field should be corrected When converting data between EBCDIC and ASCII this presents an additional effort to deal with the situation. A SPACE character hex 40 for EBCDIC or a hex 20 for ASCII could be a valid numeric entry in a packed field in all the positions of the field except the units positions It would be reasonable to assume that if the units position of a packed field is a SPACE character and all other positions are SPACE characters then the packed field SPACE values should be converted between EBCDIC and ASCII. For numeric fields with USAGE IS COMP-3 i e PACKED FIELDS the conversion code generated by SimoTime does not do any conversion This is the default behavior However, since the situation does exist the SimoTime technology has a configuration option to generate conversion code that will analyze a packed field and convert SPACE values between EBCDIC and ASCII or to initialize the packed field with a ZERO value. The following is sample code that will test a packed field for SPACE values and then convert the EBCDIC SPACE values to ASCII SPACE val ues. The following is sample code that will test a packed field for SPACE values and then initialize the packed field to ZERO values. When trying to do an arithmetic operation on a packed field that has a non-numeric value or an invalid sign the operation will ABEND with a S0C7 Program check on the Mainframe System The operation will ABEND with a 163 RTS error on a Micro Focus System. This condition is managed on the EBCDIC-encoded Mainframe System by using the NUMPROC NOPFD compiler option that accepts the invalid sign and treats space characters x 40 as zeroes This approach does not fix the problem, it simply tolerates the condition while presenting additional challenges for the data conversion and validation efforts. For files that contain records with packed or binary fields the EBCDIC to ASCII data conversion is done at the field level Since the packed and binary fields have their unique bit structure i e neither EBCDIC nor ASCII they are left in their existing structure Therefore, a packed field that contains all x 40 characters will contains all x 40 characters after the record is converted. Herein lies the challenge, the x 40 character is a space character on the EBCDIC-encoded Mainframe System but it is not a space character in an ASCII-configured environment. In an ASCII-configured Micro Focus environment the spaces in a numeric, packed field can be managed by using the SIGN-FIXUP compiler directive This directive provides limited emulation of NUMPROC NOPFD when used with HOSTNUMMOVE HOSTNUMCOMPARE. However, since the x 40 value is not a space character in the ASCII environment and is a valid numeric value in a packed field it will produce incorrect totals when used in an arithmetic operation Therefore, at a minimum the x 40 values will need to be changed to an ASCII space or x 20 character. Note the process that causes the packed fields to contain SPACE characters should be addressed The Compiler options only prevent the ABEND but may produce incorrect results wh en used in arithmetic processing. The following link will provide more details about compiler directives and numeric field processing. Explore the Compiler Directives available for the Micro Focus COBOL technologies. Explore how to process non-Numeric Values stored in a Packed-Decimal format This document will use examples to show how to manage a situation where non-numeric values such as Space Characters are placed in a Packed-Decimal field and then managed to avoid a S0C7 or RTS 163 error message and an abnormal termination of the program. The purpose of this document is to provide an overview of numeric data strings or fields that are packed-decimal format This document may be used as a tutorial for new programmers or as a quick reference for experienced programmers. In the world of programming there are many ways to solve a problem This document and the links to other documents are intended to provide a greater awareness of the Data Management and Application Processing alternatives. The documentation and software were developed and tested on systems that are configured for a SimoTime environment based on the hardware, operating systems, user requirements and security requirements Therefore, adjustments may be needed to execute the jobs and programs when transferred to a system of a different architecture or configuration. SimoTime Services has experience in moving or sharing data or application processing across a variety of systems For additional information about SimoTime Services or Technologies please send an e-mail to or call 415 883-6565 We appreciate hearing from you. Software Agreement and Disclaimer. Permission to use, copy, modify and distribute this software, documentation or training material for any purpose requires a fee to be paid to SimoTime Technologies Once the fee is received by SimoTime the latest version of the software, documentation or training material will be delivered and a license will be granted for use within an enterprise, provided the Simo Time copyright notice appear on all copies of the software The SimoTime name or Logo may not be used in any advertising or publicity pertaining to the use of the software without the written permission of SimoTime Technologies. SimoTime Technologies makes no warranty or representations about the suitability of the software, documentation or learning material for any purpose It is provided AS IS without any expressed or implied warranty, including the implied warranties of merchantability, fitness for a particular purpose and non-infringement SimoTime Technologies shall not be liable for any direct, indirect, special or consequential damages resulting from the loss of use, data or projects, whether in an action of contract or tort, arising out of or in connection with the use or performance of this software, documentation or training material. Downloads Links. This section includes links to documents with additional information that are beyond the scope and purpose of this document The fir st sub-section requires an internet connection, the second sub-section references locally available documents. Note A SimoTime License is required for the items to be made available on a local server. Current Server or Internet Access. The following links may be to the current server or to the Internet. Note The latest versions of the SimoTime Documents and Program Suites are available on the Internet and may be accessed using the icon If a user has a SimoTime Enterprise License the Documents and Program Suites may be available on a local server and accessed using the icon. Explore how to process non-Numeric Values stored in a Packed-Decimal format This document will use examples to show how to manage a situation where non-numeric values such as Space Characters are placed in a Packed-Decimal field and then managed to avoid a S0C7 or RTS 163 error message and an abnormal termination of the program. Explore how to Calculate a Record Count and Accumulate Summary Totals by reading a Record Sequ ential Data File Each record contains numeric fields with a packed-decimal COMP-3 format The count and totals will be posted to the SYSOUT device. Explore The Binary or COMP format for numeric data strings This numeric structure is supported by COBOL and may be explicitly defined with the USAGE IS COMP or USAGE IS BINARY clause. Explore The Edited for Display format for numeric data strings This numeric structure is supported by COBOL and may be used with an edit-mask to prepare the presentation for readability by human beings. Explore The Packed-Decimal or COMP-3 format for numeric data strings This numeric structure is supported by COBOL and may be explicitly defined with the USAGE IS COMP-3 clause. Explore The Zoned-Decimal format for numeric data strings This numeric structure is the default numeric for COBOL and may be explicitly defined with the USAGE IS DISPLAY clause. Explore commonly used formats and processing techniques for managing various numeric formats available on the mainfr ame. Explore the Numbers Connection for additional information about the structure and processing of numeric data items or numeric fields. Explore the Compiler Directives available for the Micro Focus COBOL technologies. Explore How to Generate a Data File Convert Program using simple specification statements in a Process Control File PCF This link to the User Guide includes the information necessary to create a Process Control File and generate the COBOL programs that will do the actual data file conversion The User Guide contains a list of the PCF statements that are used for the data file convert process. Explore How to Generate a Data File Compare, Validate or Hex-Dump Program using simple specification statements in a Process Control File PCF This link to the User Guide includes the information necessary to create a Process Control File and generate the COBOL programs that will do a data file compare, accumulate summary totals with a record count or produce a Hex-Dump of records in a VSAM, KSDS based on a list of user-defined keys The User Guide contains a list of the PCF statements that are used for the data file compare, validate or dump process. Explore a typical data file conversion process that may be required when working in a multi-system environment This suite of documents describes a model for managing non-relational data structures Sequential Files and VSAM Data Sets that contain ASCII or EBCDIC text strings and various numeric formats such as BINARY, PACKED-Decimal and ZONED-Decimal This model has the capability of creating a test file for an ASCII or EBCDIC encoded environment This suite of documents will address many of the challenges of doing a record content conversion of a file that will be transferred between an EBCDIC-encoded Mainframe System and an ASCII-encoded Linux, UNIX or Windows System. Explore The ASCII and EBCDIC Translation Tables These tables are provided for individuals that need to better understand the bit structures and differences of the encoding formats. Explore The File Status Return Codes to interpret the results of accessing VSAM data sets and or QSAM files. Internet Access Required. The following links will require an internet connect. A good place to start is The SimoTime Home Page for access to white papers, program examples and product information This link requires an Internet Connection. Explore The Micro Focus Web Site for more information about products and services available from Micro Focus This link requires an Internet Connection. Glossary of Terms. Explore the Glossary of Terms for a list of terms and definitions used in this suite of documents and white papersments or Feedback. This document was created and is copyrighted and maintained by SimoTime Technologies. If you have any questions, suggestions, comments or feedback please call or send an e-mail to. We appreciate hearing from youpany Overview. SimoTime Technologies was founded in 1987 and is a privately owned company We specialize in the creation and deployment of business applications using new or existing technologies and services We have a team of individuals that understand the broad range of technologies being used in today s environments Our customers include small businesses using Internet technologies to corporations using very large mainframe systems. Quite often, to reach larger markets or provide a higher level of service to existing customers it requires the newer Internet technologies to work in a complementary manner with existing corporate mainframe systems We specialize in preparing applications and the associated data that are currently residing on a single platform to be distributed across a variety of platforms. Preparing the application programs will require the transfer of source members that will be compiled and deployed on the target platform The data will need to be transferred between the systems and may need to be converted and validated at various stages within the process SimoTime has the technology, servi ces and experience to assist in the application and data management tasks involved with doing business in a multi-system environment. Whether you want to use the Internet to expand into new market segments or as a delivery vehicle for existing business functions simply give us a call or check the web site at. Packed-Decimal Format, Description and Discussion. Note 1 A binary field that is defined as Unsigned i e PIC 999 is an implied positive value A two 2 byte unsigned, binary field may contain a range of implied positive values from 0 to 65,535.Note 2 A binary field that is defined as Signed i e PIC S999 will use the high-order, leftmost bit as the sign A zero 0 is a positive sign and a one 1 is a negative sign A two 2 byte signed, binary field may contain a range of values from -32,767 to 32,767.The BINARY Format for a Numeric Field. We have made a significant effort to ensure the documents and software technologies are correct and accurate We reserve the right to make changes without n otice at any time The function delivered in this version is based upon the enhancement requests from a specific group of users The intent is to provide changes as the need arises and in a timeframe that is dependent upon the availability of resources. Copyright 1987-2017 SimoTime Technologies All Rights Reserved. The Idiosyncrasies of COMP Fields. The creation and processing of COMP or BINARY data on a Windows or UNIX platform must be done in the same manner as the mainframe On the mainframe COMP or BINARY fields must be 2, 4, or 8 bytes in length the mainframe was originally a half-word, full-word and double-word centric system On Linux, UNIX or Windows using Micro Focus COBOL with Net Express or Server Express the COMP or BINARY fields may be 1 through 8 bytes in length. Note The syntax for COBOL is USAGE IS COMPUTATIONAL However, this is usually abbreviated to COMP or may be coded as BINARY. Notice the following, the record layout for the Item Master File contains two 2 COMP or BINARY fi elds These fields are defined as PIC 9 7 and may contain values from zero 0 through 9,999,999 or the binary values of x 000000 through x 98967F which may be contained in a three 3 byte binary field. Herein is the problem, on the EBCDIC-encoded, half-word, full-word, double-word, mainframe environment the fields would be allocated with an actual length of four 4 bytes for a binary field For the Micro Focus, ASCII-encoded, byte-oriented environment the fields would be allocated with an actual length of three 3 bytes for a binary field. The solution to this problem for the Micro Focus environment is to use the IBMCOMP and NOTRUNC directives when compiling the programs This will enforce the mainframe rules for COMP or BINARY fields and the field lengths will be the same as the mainframe. An alternative solution is to modify the copy file and change the PIC 9 7 to PIC 9 9 However, this solution requires a source code change and is not recommended during the first phase of a data migration. Nume ric Field Definitions Lengths. The following table shows the COBOL picture clause, the number of digits, the length of a packed field, the length of a binary COMP field for an IBM Mainframe and the length of a binary field for the Linux, UNIX and Windows LUW environments running Micro Focus COBOL. The differences in field or data string length are high-lighted in RED. It is important to note that Micro Focus Mainframe Express supports the mainframe format for binary or COMP fields This is accomplished by pre-setting the compiler directives to force this behavior The compiler directives are IBMCOMP and NOTRUNC These directives may also be used with Net Express and must be configured manually since the default for Net Express is to allow binary fields to be any length. Big Endian Little Endian. Information is usually process by executing programs that were created using a program language that separates the user programmer from the underlying hardware structure However, this separation is not one-hundred percent Therefore, some level of awareness or understanding of the hardware may be required The hardware techniques used to define, process, save and retrieve numeric values is typically an area where some level of understanding is required. First, lets review how units of information are structured in a typical computer system. A bit is a unit of information A bit may be in an OFF or ON condition that is traditionally referred to as 0 or 1 Four 4 bits make a nybble and eight bits or 2 nybbles make a byte. Note The term nibble is commonly used but the original spelling was nybble. Next, lets review how units of information are stored in memory and processed by the system. In order to understand the concept of Big and Little Endian we need to understand memory typically referred to as RAM or Random Access Memory We may think of RAM as one large array with many one-byte elements An Index is typically used to access a specific element within an array An Address is typically used t o access a specific location within RAM or memory. Note For this discussion we are using a RAM architecture that stores one byte in each RAM location There are some RAM architectures where each memory location stores something besides a byte However, these are rare so we will limit this discussion to RAM architectures that are byte oriented. An IBM Mainframe System has the hardware capability of performing arithmetic tasks using a variety of different formats Since we are currently focused on a discussion of Big and Little Endian formats we will limit this discussion to 32 bit or 4 byte integers For COBOL programmers this would be USAGE IS COMPUTATIONAL. The question, How are these 4 bytes placed in RAM for processing. The answer, It depends, The IBM Mainframe System uses Big Endian and the hardware that is used to run Linux, UNIX and Windows typically use Little Endian It would be important to note that Micro Focus COBOL has a compiler directives IBMCOMP that provides support for the Big Endian support for COMP fields. The following shows how the 4 bytes of a 32 bit integer are arranged in RAM starting at an address location of 100.Note Notice the bytes of the little endian are in the reverse order when compared to big endian format With little endian the least significant byte is stored first With big endian the most significant byte is stored first. Next, lets review how data files are used to save and retrieve units of information. To understand the importance of endianness lets take a look at the following example. A data string of x 1A2B3C4D is written to a file on a system that uses big endian. This is hexadecimal notation of four bytes 1A, 2B, 3C and 4D or 32 bits 0001 1010 0010 1011 0011 1100 0100 1101.On a Little Endian System this would represent a decimal numeric value of 1,295,788,826.Attention This would result in a difference of 856,747,725 between the expected value and the actual value. The purpose of this document is to provide an overview of binary formats for numeric data strings or fields This document may be used as a tutorial for new programmers or as a quick reference for experienced programmers. In the world of programming there are many ways to solve a problem This document and the links to other documents are intended to provide a greater awareness of the Data Management and Application Processing alternatives. The documentation and software were developed and tested on systems that are configured for a SimoTime environment based on the hardware, operating systems, user requirements and security requirements Therefore, adjustments may be needed to execute the jobs and programs when transferred to a system of a different architecture or configuration. SimoTime Services has experience in moving or sharing data or application processing across a variety of systems For additional information about SimoTime Services or Technologies please send an e-mail to or call 415 883-6565 We appreciate hearing from you. Software Agreement and Disclai mer. Permission to use, copy, modify and distribute this software, documentation or training material for any purpose requires a fee to be paid to SimoTime Technologies Once the fee is received by SimoTime the latest version of the software, documentation or training material will be delivered and a license will be granted for use within an enterprise, provided the SimoTime copyright notice appear on all copies of the software The SimoTime name or Logo may not be used in any advertising or publicity pertaining to the use of the software without the written permission of SimoTime Technologies. SimoTime Technologies makes no warranty or representations about the suitability of the software, documentation or learning material for any purpose It is provided AS IS without any expressed or implied warranty, including the implied warranties of merchantability, fitness for a particular purpose and non-infringement SimoTime Technologies shall not be liable for any direct, indirect, special or con sequential damages resulting from the loss of use, data or projects, whether in an action of contract or tort, arising out of or in connection with the use or performance of this software, documentation or training material. Downloads Links. This section includes links to documents with additional information that are beyond the scope and purpose of this document The first sub-section requires an internet connection, the second sub-section references locally available documents. Note A SimoTime License is required for the items to be made available on a local server. Current Server or Internet Access. The following links may be to the current server or to the Internet. Note The latest versions of the SimoTime Documents and Program Suites are available on the Internet and may be accessed using the icon If a user has a SimoTime Enterprise License the Documents and Program Suites may be available on a local server and accessed using the icon. Explore The Binary or COMP format for numeric data st rings This numeric structure is supported by COBOL and may be explicitly defined with the USAGE IS COMP or USAGE IS BINARY clause. Explore The Edited for Display format for numeric data strings This numeric structure is supported by COBOL and may be used with an edit-mask to prepare the presentation for readability by human beings. Explore The Packed-Decimal or COMP-3 format for numeric data strings This numeric structure is supported by COBOL and may be explicitly defined with the USAGE IS COMP-3 clause. Explore The Zoned-Decimal format for numeric data strings This numeric structure is the default numeric for COBOL and may be explicitly defined with the USAGE IS DISPLAY clause. Explore commonly used formats and processing techniques for managing various numeric formats available on the mainframe. Explore the Numbers Connection for additional information about the structure and processing of numeric data items or numeric fields. Explore How to Generate a Data File Convert Program using simp le specification statements in a Process Control File PCF This link to the User Guide includes the information necessary to create a Process Control File and generate the COBOL programs that will do the actual data file conversion The User Guide contains a list of the PCF statements that are used for the data file convert process. Explore a typical data file conversion process that may be required when working in a multi-system environment This suite of documents describes a model for managing non-relational data structures Sequential Files and VSAM Data Sets that contain ASCII or EBCDIC text strings and various numeric formats such as BINARY, PACKED-Decimal and ZONED-Decimal This model has the capability of creating a test file for an ASCII or EBCDIC encoded environment This suite of documents will address many of the challenges of doing a record content conversion of a file that will be transferred between an EBCDIC-encoded Mainframe System and an ASCII-encoded Linux, UNIX or Windows System. Explore The ASCII and EBCDIC Translation Tables These tables are provided for individuals that need to better understand the bit structures and differences of the encoding formats. Explore The File Status Return Codes to interpret the results of accessing VSAM data sets and or QSAM files. Internet Access Required. The following links will require an internet connect. A good place to start is The SimoTime Home Page for access to white papers, program examples and product information This link requires an Internet Connection. Explore The Micro Focus Web Site for more information about products and services available from Micro Focus This link requires an Internet Connection. Glossary of Terms. Explore the Glossary of Terms for a list of terms and definitions used in this suite of documents and white papersments or Feedback. This document was created and is copyrighted and maintained by SimoTime Technologies. If you have any questions, suggestions, comments or feedback please call or send a n e-mail to. We appreciate hearing from youpany Overview. SimoTime Technologies was founded in 1987 and is a privately owned company We specialize in the creation and deployment of business applications using new or existing technologies and services We have a team of individuals that understand the broad range of technologies being used in today s environments Our customers include small businesses using Internet technologies to corporations using very large mainframe systems. Quite often, to reach larger markets or provide a higher level of service to existing customers it requires the newer Internet technologies to work in a complementary manner with existing corporate mainframe systems We specialize in preparing applications and the associated data that are currently residing on a single platform to be distributed across a variety of platforms. Preparing the application programs will require the transfer of source members that will be compiled and deployed on the target platform The da ta will need to be transferred between the systems and may need to be converted and validated at various stages within the process SimoTime has the technology, services and experience to assist in the application and data management tasks involved with doing business in a multi-system environment. Whether you want to use the Internet to expand into new market segments or as a delivery vehicle for existing business functions simply give us a call or check the web site at. Binary or COMP Format, a Description and Discussion.

No comments:

Post a Comment