Friday 4 August 2017

Outputting Tables In Stata Forex


O meu Sony Playstation 3 está ligado ao meu Sony Bravia KDF-E50A11E (TV) através de um cabo hdmi. Ocasionalmente, a tela ficará preta por vários segundos e exibirá as configurações (por exemplo, hdmi, 1080i / 60, largura, etc.) e retornará ao normal. Parece que a Playstation 3 está perdendo conexão com a TV por alguns segundos. Estou procurando uma solução para este problema. Eu mudei o cabo hdmi e também tenho uma lâmpada nova na TV. Se alguém tem algum conselho seria apreciado. Obrigado. Acontece-me enquanto estou a jogar um jogo. O jogo começa e carrega muito bem em 1080i (qualquer jogo), então, enquanto I39m jogando (pode acontecer a qualquer momento, geralmente uma hora ou 2 em um jogo), o problema acontece. Ele irá ocorrer novamente após outra hora ou 2 passou. Mensagem Editado por URDOOM em 24-11-2009 09:34 PMMessage Editado por URDOOM em 24-11-2009 09:49 PM shaunwilko escreveu: Você Bravia será configurado para exibir a resolução máxima. No homescreen a resolução máxima é 1080p (ou o máximo sua tevê pode indicar 1080i). Quando você vai para um jogo a maioria dos quais são 720p sua TV está mudando para 720p, em seguida, tela fica em branco enquanto muda configuração. 1) colocar-se com ele (ele doesnt fazer qualquer dano) 2) Vá em configurações e corrigir o seu ps3 para colocar em apenas 720p ou 1080i isso vai pará-lo mudando entre o 2. Não, isso não é o problema, leia o OP novamente , Ele está acontecendo mid-game, não apenas ao iniciar um jogo para cima RELEVANCY SCORE 6.01 DB: 6.01: Sony Kdf-E50a11e mk a mia esperienza: um sony kdf-e50a11e, va da Dio fino quando a lampada, ancora ottima come efficienza E luminosit si fulmina. Non sono sicuro sia la lamada (altrimenti l39avrei cambiata io) perca não c39era n immagine pi scura n accensione della spia che avvertiva dell39esaurimento, semplicemente il tv non si accende pi. All39assistenza della mia zona fanno i quotpreziosiquot e anche dettagliando il difetto sostengono di non poter dire quale sia il problema e devo portarglielo. Pretendono 30 (como uma obra de guadagna em uma giornata intera) por aprirlo e vedere cosa non va: si la lampada a faccio cambiare, my fanno pagare alias 205 (si avete capito bene) oltre i primi 30 per total di 235 perch di loro Iniziativa mi quotpuliscono gruppo otticoquot (ma perch.). Comunque non fa niente, vado a casa por godermi il mio tv e não pensare ai 235 e, sorpresa, il tv ha una macchia gialla (sui chiari) che diventa azzurrina (sugli scuri). Faccio un giro su internet, invio mail e outros auxiliares da região e scopro dovrebbe essere il gruppo ottico. Contesto il guasto all39assistência che mi risponde: quotgi c39era ma lei não se n39era accortoquot ma come. Non mi é uma coisa do gênero. Ero cieco o ubriaco. E tra l39altro não mi dite prima di cambiare la lampada che il TV da buttare per quel gran guaio. Contatto sony che, em sintesi, si limita a chiedere all39assistenza: quotl39hai rotto tuquot. Senza osservare l39assurdit do susseguirsi degli eventi. Ovviamente loro cosa rispondono. Chiedo a sony se esistono dei criteri (numeri di serie altro) perch un tecnico verifichi se a rottura sia dovuta a intervento umano o peggio se l39assistenza mi abbia sostituito o gruppo ottico con altro difettato (não numeri di serie) non mi viene fornita risposta . Il problema não sarebbe grave perch mi dicono dei tecnici che sarebbe sufficiente sostituir un vetrino danneggiato, ma sony fornisce tutto il gruppo ottico pare a prezzi pi alti del tv. Em sintesi tv perfetto, vado em assistenza (tra l39altro parlando com uma mia amica ho scoperto che hanno fatto em passato danni anche a lei), mi faccio spillare 235 euro. Por buttare il tv. Ora devo comprar on the altro, ovviamente non sony per via dell39assistenza che si ritrova (e não pode ser visitado por nenhum destinatário), sperando che con l39intervento dell39associazione di consumatori che mi via e via giuduiziale, si riesca ad ottenere giustizia Hai ragiona. La sensazione proprio quella: no momento em que assistimos a um riso, um piutto concreto, uma paginação quantitativa e um problema com um problema. Io di tv ne capisco un p meno de niente, quello che ho scoperto l39ho scoperto dopo su internet e niente mi toglie dalla mente la malafede di chi ha operato. Credo che per verificare se fosse a lampada occorressero pochi minuti e avrebbero potuto faro davanti a me, invece l39hanno voluto tarifa em tenor por tenersi il tv. Qui forse corro un p con la fantasia da malpensa, ma no possibile che mi abbiano sostituito qualcosa del gruppo ottico funzionante per favorire al cliente privilegiato nello scambio. Perch Sony não pode ser verificado por um número de série. Perch le assistenze non operano em trasparenza, fissando appuntamenti con it clients when hanno la disponibilit di time por visionare e riparare il tv ed eseguendo tutte le operazioni al cospetto del cliente, invento mantengono il tv por un tempo spropositato che ingenera ancora maggiori dubbi Tra pochi Giorni ho appuntamento com federconsumatori e vedr cosa si pu fare. Comunique o nome de uma comunidade: a sua comunidade de amigos (não um sono sicuro) uma pessoa em cui alcuni, ou seja, um indivíduo que não gosta de um amigo. Sai se cos Se vêm ci si arriva. Grazie ciao RELEVANCY SCORE 6.01 Eu quero adicionar um campo chamado Business Place (BUPLA) na seleção dinâmica no tcode F.42. Assim, em F.42 o banco de dados lógico KDF é usado, então eu faço uma visualização de Seleção personalizada para o banco de dados KDF. O local de negócios é adicionado com sucesso na seleção dinâmica, mas não reflete quando executo F.42. Quando eu testar a partir do SE36, ele reflete. A Nota 50370 explica detalhadamente como o sistema funciona para selecionar os documentos com seleção dinâmica. Relatório de saldo lê os números de transação que são armazenados com a ajuda de vários campos diferentes, de modo que a seleção de acordo com outros campos não pode ser prosseguir. Este é o projeto padrão. A seleção dinâmica de Dados de Documento não funciona para relatórios que usam tabelas de transação cliente / fornecedor (KNC1 LFC1), i. e. Documentos como doc. number e Doc. date não são armazenados em tabelas de transações. As seleções dinâmicas só podem ser usadas com os campos cliente / fornecedor, empresa ou ano fiscal. Os seguintes relatórios são afetados por este SALR87012186 - vendas do cliente SALR87012082 - saldos do fornecedor em moeda local SALR87012093 - negócio do fornecedor SALR87012079 - números da transação: saldo da conta SALR87012080 - figuras da transação: vendas especiais SALR87012081 - figuras da transação: vendas SALR87012105 - Data Chave - Fornecedores SALR87012172 - Saldos de clientes em moeda local Espero que isso esclareça. DB: 2.73: Problema Bravia Kdf-E50a11e 19 il mio televisore BRAVIA KDF-E50A11E de um po di tempo ha um problema. Si spegne automaticamente e la spia rossa lampeggia e não c39 verso pi di riaccenderlo se non passano svariate ore. A volte se lo si spegne volontariamente. Quando o produto é submetido a um processo de eliminação, o dopo é molhado ou adicionado ao seu estado natural. Ho chiamato um tecnico e eu disse que a lâmpada cheia e andando e che costa 300. E39 passatempo gia39 um anuário e um avanço de costura de anora, o quidi vem com o cheio de seda e lâmpada. Qual é a sua opinião sobre este produto? Potrebbe essere necessario sostituire veramente la lampada, il televisore ha qualche anno. La spia sul frontale del televisiòn che alli sinistra di quella dell39Indicatore standby resta accesa o si accende. Dovrebbe iluminarsi di rosso quando a lampada ha dei quotproblemiquot. RELEVANCY SCORE 2.73 1. Retire as pilhas do controlo remoto. 2. Enquanto as pilhas estiverem apagadas, pressione cada botão no controle remoto duas vezes. 3.Reinserir as pilhas. 4. Teste o controle remoto. Se isso não funcionar, você pode tentar testar se o controle remoto está produzindo um sinal de IR usando uma câmera digital ou câmera de telefone celular: 1: Ligue a câmera. 2: Aponte o controle remoto para a lente da câmera. 3. Pressione um botão no controle remoto. 4. Enquanto mantiver o botão no controle remoto pressionado, olhar para a tela LCD na câmera. Se o controle remoto estiver transmitindo um sinal de infravermelho, então o transmissor de infravermelho no controle remoto aparecerá iluminado ao pressionar um botão e olhando para ele através da tela LCD da câmera. Se o transmissor IR não acender, pode haver um problema com o controle remoto e ele deve ser substituído. Se você pode ver a luz, então pode haver algo de errado com o receptor de IV na TV. NOTA: A luz IR por si só é invisível para o olho humano. Você só pode vê-lo quando ao olhar através de uma câmera digital como descrito acima. Eu tenho um problema com o meu Sony Rear Projeção 3LCD 50quot (KDF-E50A11E) É cerca de 7 anos de idade e para além de duas substituições de lâmpada que tem funcionado perfeitamente desde compraLamp foi apenas Substituído há apenas 4 meses agoJust ontem a TV desligar e não vai voltar onThe ícone da lâmpada está permanentemente em ea luz de alimentação está piscando (luz vermelha piscando 3x vezes) Tentando fazer alguma pesquisa, mas nada definitivo sobre os 3 lightsCould vermelho ser um dos Muitas coisas - Lâmpada soprada / Lamp Door Sensor / Short no BoardCan qualquer pessoa derramou qualquer luz sobre isso para mim pleaseIs é uma correção rápida ou reparação caraGraças de antecedência Resolvido Ir para a solução. Obrigado pela sua ajuda - substituído a lâmpada ea TV é de backup e execução Embora eu tenha um outro problema, mas vou começar outro thread sobre isso RELEVANCY SCORE 2.72 DB: 2.72: Tenho Problema Sobre Shadow (Ghost Double Image) fz Tenho um Sombra do problema. Meu dispositivo é PS3 e TV é Sony KDF-E50A11E (HD ready) Tv está normalmente trabalhando 1080i / 50 hz e nenhum problema. Quando iniciar PS3 após resolução é alterada para 1080i / 60. Todo menu e jogo está sob fantasma (imagem dupla). Cabo HDMI alterado, mas o problema é o mesmo. Preciso de ajuda sobre este caso, encontrei soluções para seu avforum de encaminhamento. Alterar algum valor no menuquot quotservis e 1080i / 60 está funcionando .. Isso é perfeito. E obrigado todos os amigos..Esto é incrível. Este quotsolutionquot utiliza um quotservicequot menu, que só engenheiros treinados devem usar. Você, não é um, você é um usuário quotend. Eu também, mas prestei atenção. O uso desta informação é inteiramente a seu próprio risco, você estraga sua televisão, é sua própria culpa bobo. Don39t ir brincando com coisas em que você don39t saber. Para colocar o televisor no modo de espera, coloque o televisor no modo de espera e, em seguida, pressione em sequência: Visualização no Ecrã (o pequeno ecrã com o i no mesmo) 5 (número do canal 5) Volume Para Cima (botão superior do volume) Botão) A TV deve ligar e quando ele esquentou, você deve ver uma tela com muitas letras grandes verde sobre ele. Pressione o botão do quotmenuquot (parte inferior central) Use o seletor de direção para mover para baixo para quotLCD Driversquot e pressione para a direita no dial para entrar neste menu. Mover para baixo para quotS H Pos Reg Rquot. Deve ser quot10quot, alterá-lo para quot11quot. (Esquerda / Direita para ajustar) Mover para baixo para quotS H Pos Reg Gquot. Deve ser quot10quot, alterá-lo para quot11quot. Mover para baixo para quotSHPos Reg Bquot. Deve ser quot10quot, alterá-lo para quot11quot. Pressione o menu de baixo para sair dos menus e o botão standy para colocar no modo de espera. Volte a ligar, e espero que o seu fantasma será ido. O meu foi, haven39t observou quaisquer efeitos colaterais, parece ok. Eu não sei exatamente o que esta configuração faz. Acho que é que ajusta a mudança horizontal, talvez algo obtém queimado em 10. Desde que eu postei-lo primeiro, I39m vai dub este a solução de Tapquot quotSpinal. Desde. Quotif você colocá-lo em 11, que39s 1 mais alto. Quot Incidentemente, o meu menu tem no fundo quotLE4B v7.27quot. Perguntei o que as outras pessoas têm. Esteja interessado em saber sobre este firmware quotfixquot para este problema específico. É que o meu número de firmware Meu firmware é LE4B v8.45, mas este método eu ainda trabalho e nada de qualquer problema. Mas, por favor, não altere outras configurações porque talvez aumente o risco. Tenha um bom jogo. Adeus fantasma. Tenha um bom dia e obrigado. RELEVANCY SCORE 2.72 Bem-vindo à Comunidade Sony Por favor, verifique este artigo para obter mais detalhes e etapas sobre como solucionar esse problema específico. Se o problema ainda persistir, faça o seguinte: 1. Remova qualquer dispositivo ou unidade conectada da TV. 2. Realize a reinicialização. Por favor, verifique este link sobre como redefinir sua TV de volta às configurações de fábrica. 3. Execute o ciclo de alimentação na sua TV durante pelo menos 1 minuto. Verifique este link para obter mais detalhes sobre como executar a redefinição de energia em sua TV. Observação: se o problema persistir. Reparo será necessário, por favor visite nosso site para a opção de reparação disponível ou para encontrar o centro de serviço autorizado mais próximo em seu lugar. O site é eservice. sony. Se o meu post responde à sua pergunta, marque-a como quotAccept como Solutionquist RELEVANCY SCORE 2.61 DB: 2.61: Kdf 60xs955 f8 Eu comprei um KDF 60XS955 novo na Costco e depois de 24 meses ele começou a ciclo on-off-on-off constantemente. Eu vi hoje que muitas pessoas que compraram o mesmo e similar televisores série KDF postaram inúmeras queixas relacionadas aos mesmos problemas idênticos e problemas, que são claramente OEM problemas de produção. Desde que eu passei mais de 200 tendo várias coisas substituídas, que didn39t necessidade de ser substituído, e que nunca remediado as quoton-off-onquot questões. Estou escrevendo para, espero, encontrar a correção real para o problema identificado. Os tubos de projeção estão em excelente estado de funcionamento ea televisão tem baixas horas de uso desde que comprou novo. Eu chamei um serviço local de reparo de loja de TV e ele didn39t fazer qualquer coisa, exceto custar-me mais agravamento e mais dinheiro. De qualquer forma, qualquer ajuda neste momento é apreciada Obrigado pela mensagem. Siga as etapas abaixo para executar a redefinição de energia na TV. 1. Desligue a TV. 2. Desconecte o cabo de alimentação da TV da tomada elétrica. 3. Deixe a TV permanecer sem alimentação por 60 segundos. 4. Conecte novamente o cabo de alimentação à tomada elétrica. (Se o televisor estiver ligado a uma fonte de alimentação ou a um protector de sobretensão, remova-o da ficha de alimentação ou do protector contra sobretensões e ligue-o directamente à tomada de parede. 5. Ligue a TV. Se o problema permanecer não resolvido após a reinicialização, isso pode ser uma indicação de que a TV precisa de serviço. Você pode consultar este link para localizar o centro de assistência autorizado Sony mais próximo da sua área. Se o meu post responde à sua pergunta, marque-a como quotAccept como Solution. quot RELEVANCY SCORE 2.61 DB: 2.61: Eu tenho uma Sony Tv Kdf-60xs955 Quando eu ligá-lo vai sair em cerca de 2 Min. What posso fazer para Fix It fa Se o seu televisor de ecrã plano LCD ou LED não ligar ou não permanecer ligado Se tiver um encerramento imediato depois de ligar o televisor ou, por vezes, um desligamento atrasado, ou o aparelho não liga e tem Sem imagem e sem som. Primeiro elimine todos os problemas de proteção contra sobretensão / plug-in conectando diretamente na rede elétrica. Certifique-se de que a rede tenha alimentação. Em seguida tente primeiro um poder re set (desconecte o conjunto por um minuto ou dois, em seguida, ligá-lo de volta e ligá-lo) Se isso não corrigi-lo ou o problema re occours tente um reset de fábrica (consulte o manual do proprietário) se isso não Corrigi-lo ou o problema re occours tentar uma atualização de firmware / re instalar. (Consulte o manual do proprietário) Instructoins para o acima e downloads de firmware são geralmente availiable no fabricante de TV site de suporte ao produto e listados por seu número de modelo de conjuntos também re procedimentos de configuração deve estar em seu manual do proprietário. Se você não tem um proprietário maunual eles são geralmente disponíveis no fabrico de suporte ao produto site on-line também. Se o acima não corrigi-lo, E você ainda tem um auto-teste imediato falha / desligamento após ligar sua TV ou às vezes um desligamento atrasado pode ser causado por uma falha dura. Uma fonte de alimentação com defeito muito comum e geralmente não é difícil de reparar Veja o meu post em AVS para mais detalhes (lenthy mas informativo) avsforum / t / 1491809 / mais comum-lcd-led-plasma-tv-repair RELEVANCY SCORE 2.61 Olá, Bem-vindo Para a Comunidade Sony. O problema pode ocorrer se existir uma ligação incorrecta entre o televisor eo dispositivo de origem. Altere a entrada do televisor e verifique se o mesmo problema ocorre com diferentes dispositivos (como um decodificador de cabo, leitor de DVD, consola de jogos, etc.). Se o mesmo problema ocorrer com outros dispositivos também, você pode tentar redefinir a TV. Consulte o seguinte link para obter os passos para reiniciar a TV. Você também pode tentar redefinir a TV para a configuração padrão de fábrica, se a redefinição de energia não ajudar. Esta operação limpará todas as suas configurações personalizadas, incluindo a configuração quotParental Lockquot. Para reiniciar a TV, ligue-a e pressione o botão RESET no telecomando fornecido. Enquanto ainda pressiona o botão RESET, pressione o botão POWER no painel frontal da unidade de TV. O televisor desliga-se e volta a ligar. Solte o botão RESET uma vez que o televisor se liga. Se o mesmo problema for visível em entradas diferentes, mesmo depois de redefinir a alimentação e redefinir a TV, o serviço pode ser necessário. Você pode iniciar solicitação de serviço usando o link fornecido abaixo. Obrigado pelo seu post. RELEVANCY SCORE 2.61 DB: 2.61: Fluxo Net Flix c9 tem roteador sem fio no computador, vai comprar netflix, o que eu preciso para strem netflix para o meu modelo de TV Sony KDF-50E-2000 graças acccess HDMI Obrigado por sua postagem. O acesso à Internet de alta velocidade e a conta NetFlix são necessários para que um computador transmita filmes NetFlix. O próximo passo é conectar o computador à TV via cabo HDMI, se possível. Entre em contato com o suporte desse fabricante de computadores para descobrir como fazer a saída de vídeo para um monitor externo. Quanto ao computador VAIO, você pode usar a tecla de atalho FnF7 para alterar a configuração de saída de vídeo. RELEVANCY SCORE 2.61 DB: 2.61: Kdf-E55a20 se desliga xk Eu tenho um kdf-e55a20 que se liga e desliga automaticamente. Substituído o bulbo cerca de 4 anos atrás e quando a tv está em tudo funciona bem. Problema é que ele permanece ligado por um minuto de dois e, em seguida, a seqüência de ligar / desligar começa novamente. Unplugged sentado em um canto e esposa quer fixo ou ido antes do Natal Olá scubafinn, bem-vindo ao site da comunidade Obrigado pela sua mensagem. No que diz respeito às suas preocupações, eu gentilmente compartilhar com você o seguinte link, para que você possa executar algumas etapas de solução de problemas: us. en. kb. sony/app/answers/detail/aid/42970. PERFIL DE RELEVÂNCIA 2.61 DB: 2.61: Alguém sabe onde posso obter um arquivo. Kdf para um Gpib Board km Não tenho êxito no desenvolvimento de um arquivo. kdf para uma placa AT-GPIB / TNT usando um sistema operacional mínimo sem rede NT Embedded. Gostaria de ajuda. Não consegui desenvolver um arquivo. kdf para uma placa AT-GPIB / TNT usando um sistema operacional mínimo sem nenhuma rede no NT Embedded. Gostaria de ajuda. RELEVANCY SCORE 2.57 DB: 2.57: Kdf-E42a10 Tv xc Há uma grande explosão de cor azul na nossa tela KDF-E42A10 - poderia ser necessária uma lâmpada de substituição Tente fazer uma reinicialização de energia na TV. Clique neste link para saber como executar uma reinicialização de energia em uma TV Sony. Além disso, você vê a cor azul em todos os canais Por favor, tente também outro dispositivo para confirmar. Se o problema persistir depois de fazer a solução de problemas fornecida eo problema acontecer em todos os canais e todas as entradas, a TV exigirá serviço. Por favor, vá para o nosso websiteRepair para localizar o Sony Authorized Servicer mais próximo da sua área. Se o meu post responde à sua pergunta, por favor, marque como quotAccept como Solutionquot RELEVANCY SCORE 2.57 DB: 2.57: Qual é o número do fusível térmico para a TV Kdf E55a20 s8 Luz verde ligada por alguns segundos, em seguida, vai para vermelho intermitente 6 qual é o número para o Fusível térmico para este modelo KDF E55a20 Obrigado pela mensagem. Siga as etapas abaixo para solucionar problemas da TV. Faça uma reinicialização de energia. 1. Desligue a TV. 2. Desconecte o cabo de alimentação da TV da tomada elétrica. 3. Deixe a TV permanecer sem alimentação por 60 segundos. 4. Conecte novamente o cabo de alimentação à tomada elétrica. (Se o televisor estiver ligado a uma fonte de alimentação ou a um protector de sobretensão, remova-o da ficha de alimentação ou do protector contra sobretensões e ligue-o directamente à tomada de parede. 5. Ligue a TV. Se o problema persistir após a reinicialização, isso pode indicar que a TV precisa de serviço. Você pode consultar este link para localizar o centro de assistência autorizado Sony mais próximo da sua área. Para obter o número do modelo do fusível térmico da sua TV, entre em contato com nosso departamento de venda de acessórios e acessórios. Se o meu post responde à sua pergunta, marque-a como quotAccept como Solution. quot RELEVANCY SCORE 2.57 DB: 2.57: Kdf-E55a20 7m Tentei programar a minha TV sem uma caixa de conversor anexada e não recebo nenhum canal. Uma vez que eu conecto a caixa do conversor a ela eu começ 20 canais entretanto a qualidade de som é muito muito pobre. O que estou fazendo de errado. Seja agradável Obrigado para seu borne. Você não receberá nenhum canal sem caixa de conversor, já que tudo foi trocado para transmissão digital. Para determinar qual dispositivo está causando a má qualidade do som, tente o seguinte: 1) Substitua o cabo do conversor para a TV 2) Mova o cabo para outra porta (se usar o vídeo 1, tente o vídeo 2) 3) Teste a TV usando outra fonte, como Como leitor de DVD ou leitor de Blu-ray. Depois de seguir as etapas acima e não resolver o problema, TV exige serviço. Visite o nosso site eSupport para obter informações e opções de reparação: esupport. sony/US/perl/contac. KDFE55A20 RELEVANCY SCORE 2.57 DB: 2.57: Meu Sony 42 polegadas Lcd Modelo de Projeção Kdf-42we655, sem vídeo Som Audio. Por favor, aconselhar 13 DB: 2.49: Sony Kdf E50a11e Ou Kdf E42a11e amplificador Ps3, Blueray, Xbox 360 mc Eu sou um possuidor de dois rtroprojetadores, um em 50 polegadas e l39autre em 42, além disso, existe também uma PS3, uma XBOX 360 e un Leitor blueray. Quel plaisir, malheureusement ce plaisir est limite mon cran de 23 pouces carro j39ai beau essay todos os tipos de branchement (hdmi, YUV, SVHS, Cinch ou peritel) impossível de lire blue ray, jogos PS3, e seuls os jogos XBOX en 60 Hertz passent Correct, les autres m39affichent une imagem dont les couleurs sont dcales. Quelqu39un a t-il une solução autre que de racheter deux nouveaux tlviseurs. Par avance, merci pour vos rponses. Vos rtroprojecteurs sont compatibles hd e fornece uma resolução de 1280 x 720 pixéis ce qui sembl tre juste pour un bleu-ray (1920 x 1080p) si votre blu-ray peut baisser sa rsolution de sortie 1280 x 720 la connexion en YUV est la meilleure RELEVANCY SCORE 2.48WebSphere (R) Development Studio Referência ILE RPG Além disso, alguns tipos de dados permitem diferentes formatos de dados. Este capítulo descreve a diferença entre os formatos de dados internos e externos, descreve cada formato e como especificá-los. Os campos numérico, de caractere, data, hora e carimbo de data / hora têm um formato interno que é independente do formato externo. O formato interno é a forma como os dados são armazenados no programa. O formato externo é a maneira como os dados são armazenados em arquivos. Você precisa estar ciente do formato interno quando: Passando parâmetros por referência Sobreposição de subcampos em estruturas de dados Além disso, você pode querer considerar o formato interno de campos numéricos, quando o desempenho em tempo de execução de operações aritméticas é importante. Para obter mais informações, consulte Considerações sobre desempenho. Existe um formato interno e externo predefinido para os tipos de dados numéricos e de data / hora. Você pode especificar um formato interno para um campo específico em uma especificação de definição. Da mesma forma, você pode especificar um formato externo para um campo descrito no programa na especificação de entrada ou saída correspondente. Para campos em um arquivo descrito externamente, o formato de dados externo é especificado nas especificações de descrição de dados na posição 35. Você não pode alterar o formato externo de campos descritos externamente, com uma exceção. Se você especificar EXTBININT em uma especificação de controle, qualquer campo binário com zero posições decimais será tratado como tendo um formato externo inteiro. Para subcampos em estruturas de dados descritas externamente, os formatos de dados especificados na descrição externa são utilizados como formatos internos dos subcampos pelo compilador. O formato interno padrão para campos numéricos standalone é empacotado-decimal. O formato interno padrão para sub-campos de estrutura de dados numéricos é zoned-decimal. Para especificar um formato interno diferente, especifique o formato desejado na posição 40 na especificação de definição para o campo ou subcampo. O formato padrão para os campos de data, hora e carimbo de data / hora é ISO. Em geral, recomenda-se que você use o formato ISO interno padrão, especialmente se você tiver uma mistura de tipos de formatos externos. Para campos de data, hora e carimbo de data / hora, você pode usar as palavras-chave DATFMT e TIMFMT na especificação de controle para alterar o formato interno padrão, se desejado, para todos os campos de data e hora no programa. Você pode usar a palavra-chave DATFMT ou TIMFMT em uma especificação de definição para substituir o formato interno padrão de um campo de data e hora individual. Se você tiver campos numéricos, de caractere ou de data e hora em arquivos descritos no programa, você pode especificar seu formato externo. O formato externo não afeta a forma como um campo é processado. No entanto, você pode melhorar o desempenho de operações aritméticas, dependendo do formato interno especificado. Para obter mais informações, consulte Considerações sobre desempenho. A tabela a seguir mostra como especificar o formato externo dos campos descritos pelo programa. Para obter mais informações sobre cada tipo de formato, consulte a seção apropriada no restante deste capítulo. P Comprimido decimal S Zoned decimal O formato externo padrão para dados numéricos flutuantes é chamado de representação de exibição externa. O formato para dados de float de 4 bytes é: O formato para dados de float de 8 bytes é: Note que um valor de float de 4 bytes ocupa 14 posições e um valor de float de 8 bytes ocupa 23 posições. Para dados numéricos diferentes de float, o formato externo padrão é zonal decimal. O formato externo para matrizes e tabelas de compilação-tempo deve ser zoned-decimal, left-sign ou right-sign. Para float compilação-tempo matrizes e tabelas, os dados de tempo de compilação são especificados como um literal numérico ou um literal float. Cada elemento de uma matriz de float de 4 bytes requer 14 posições no registro de origem cada elemento de uma matriz de float de 8 bytes requer 23 posições. Os campos numéricos não float definidos em especificações de entrada, especificações de cálculo ou especificações de saída sem definição correspondente em uma especificação de definição são armazenados internamente em formato decimal compactado. Para qualquer um dos campos de entrada e saída na Tabela 11. especifique um dos seguintes formatos de dados externos válidos: A Caractere (válido para dados de caracteres e indicadores) N Indicador (válido para dados de caracteres e indicadores) G Gráfico (válido para dados gráficos) C UCS-2 (válido para dados UCS-2) A palavra-chave EXTFMT pode ser usada para especificar os dados para uma matriz ou tabela no formato UCS-2. Especifique o atributo de dados VAR nas posições 31-34 em uma especificação de entrada e nas posições 53-80 em uma especificação de saída para dados de caracteres, gráficos ou UCS-2 de comprimento variável. Se você tiver campos de data, hora e carimbo de data / hora em arquivos descritos no programa, então você deve especificar seu formato externo. Você pode especificar um formato externo padrão para todos os campos de data, hora e carimbo de data / hora em um arquivo descrito no programa usando as palavras-chave DATFMT e TIMFMT em uma especificação de descrição de arquivo. Você também pode especificar um formato externo para um campo específico. Especifique o formato desejado nas posições 31-34 em uma especificação de entrada. Especifique a palavra-chave e o formato apropriados nas posições 53-80 em uma especificação de saída. Para obter mais informações sobre cada tipo de formato, consulte a seção apropriada no restante deste capítulo. O tipo de dados de caractere representa valores de caractere e pode ter qualquer um dos seguintes formatos: Os dados de caractere podem conter um ou mais caracteres de um ou dois bytes, dependendo do formato especificado. Os campos de caracteres, gráficos e UCS-2 também podem ter um formato fixo ou de comprimento variável. A tabela a seguir resume os diferentes formatos de tipo de dados de caracteres. Tipo de dados de caractere Número de bytes O formato de caractere de comprimento fixo é um ou mais bytes com um comprimento definido. Você define um campo de caractere especificando A na entrada Data-Type da especificação apropriada. Você também pode definir um usando a palavra-chave LIKE na especificação de definição onde o parâmetro é um campo de caractere. O valor de inicialização padrão é espaços em branco. O formato do indicador é um tipo especial de dados de caracteres. Os indicadores têm um byte de comprimento e só podem conter os valores de caractere 0 (desligado) e 1 (ligado). Geralmente são usados ​​para indicar o resultado de uma operação ou para condicionar (controlar) o processamento de uma operação. O valor padrão dos indicadores é 0. Você define um campo indicador especificando N na entrada Data-Type da especificação apropriada. Você também pode definir um campo indicador usando a palavra-chave LIKE na especificação de definição onde o parâmetro é um campo indicador. Os campos indicadores também são definidos implicitamente com a palavra-chave COMMIT na especificação de descrição do arquivo. Também está disponível um conjunto especial de indicadores RPG IV pré-definidos (INxx). Para uma descrição destes indicadores, ver Indicadores RPG IV. As regras para definir variáveis ​​de indicadores são: Os indicadores podem ser definidos como campos independentes, subcampos, parâmetros prototípicos e valores de retorno do procedimento. Se uma variável de indicador é definida como uma matriz ou tabela de tempo de pré-compilação ou de tempo de compilação, os dados de inicialização devem consistir em apenas 0s e 1s. Nota: Se um indicador contiver um valor diferente de 0 ou 1 no tempo de execução, os resultados são imprevisíveis. Se a palavra-chave INZ for especificada, o valor deve ser 0, OFF, 1 ou ON. A palavra-chave VARYING não pode ser especificada para um campo indicador. As regras para o uso de variáveis ​​de indicador são: O valor de inicialização padrão para campos de indicadores é 0. O código de operação CLEAR define uma variável de indicador como 0. A função em branco aplicada a uma variável de indicador define-a como 0. Se uma matriz de indicadores for especificada como O resultado de uma operação MOVEA (P), o caractere de preenchimento é 0. Os indicadores são implicitamente definidos com ALTSEQ (NONE). Isto significa que a seqüência alternativa de agrupamento não é usada para comparações envolvendo indicadores. Os indicadores podem ser usados ​​como campos-chave onde a chave externa é um caractere de comprimento 1. O formato gráfico é uma seqüência de caracteres onde cada caractere é representado por 2 bytes. Fields defined as graphic data do not contain shift-out (SO) or shift-in (SI) characters. The difference between single byte character and double byte graphic data is shown in the following figure: The length of a graphic field, in bytes, is two times the number of graphic characters in the field. The fixed-length graphic format is a character string with a set length where each character is represented by 2 bytes. You define a graphic field by specifying G in the Data-Type entry of the appropriate specification. You can also define one using the LIKE keyword on the definition specification where the parameter is a graphic field. The default initialization value for graphic data is X4040. The value of HIVAL is XFFFF, and the value of LOVAL is X0000. The Universal Character Set (UCS-2) format is a character string where each character is represented by 2 bytes. This character set can encode the characters for many written languages. Fields defined as UCS-2 data do not contain shift-out (SO) or shift-in (SI) characters. The length of a UCS-2 field, in bytes, is two times the number of UCS-2 characters in the field. The fixed-length UCS-2 format is a character string with a set length where each character is represented by 2 bytes. You define a UCS-2 field by specifying C in the Data-Type entry of the appropriate specification. You can also define one using the LIKE keyword on the definition specification where the parameter is a UCS-2 field. The default initialization value for UCS-2 data is X0020. The value of HIVAL is XFFFF, LOVAL is X0000, and the value of BLANKS is X0020. For more information on the UCS-2 format, see the iSeries Information Center globalization topic. Variable-length character fields have a declared maximum length and a current length that can vary while a program is running. The length is measured in single bytes for the character format and in double bytes for the graphic and UCS-2 formats. The storage allocated for variable-length character fields is 2 bytes longer than the declared maximum length. The leftmost 2 bytes are an unsigned integer field containing the current length in characters, graphic characters or UCS-2 characters. The actual character data starts at the third byte of the variable-length field. Figure 80 shows how variable-length character fields are stored: Figure 81 shows how variable-length graphic fields are stored. UCS-2 fields are stored similarly. You define a variable-length character data field by specifying A (character), G (graphic), or C (UCS-2) and the keyword VARYING on a definition specification. It can also be defined using the LIKE keyword on a definition specification where the parameter is a variable-length character field. You can refer to external variable-length fields, on an input or output specification, with the VAR data attribute. A variable-length field is initialized by default to have a current length of zero. The following rules apply when defining variable-length fields: The declared length of the field can be from 1 to 65535 single-byte characters and from 1 to 16383 double-byte graphic or UCS-2 characters. The current length may be any value from 0 to the maximum declared length for the field. The field may be initialized using keyword INZ. The initial value is the exact value specified and the initial length of the field is the length of the initial value. The field is padded with blanks for initialization, but the blanks are not included in the length. In all cases except subfields defined using positional notation, the length entry (positions 33-39 on the definition specifications) contains the maximum length of the field not including the 2-byte length. For subfields defined using positional notation, the length includes the 2-byte length. As a result, a variable-length subfield may be 32769 single bytes long or 16384 double bytes long for an unnamed data structure. The keyword VARYING cannot be specified for a data structure. For variable-length prerun-time arrays, the initialization data in the file is stored in variable format, including the 2-byte length prefix. Since prerun-time array data is read from a file and files have a maximum record length of 32766, variable-length prerun-time arrays have a maximum size of 32764 single-byte characters, or 16382 double-byte graphic or UCS-2 characters. A variable-length array or table may be defined with compile-time data. The trailing blanks in the field of data are not significant. The length of the data is the position of the last non-blank character in the field. This is different from prerun-time initialization since the length prefix cannot be stored in compile-time data. LIKE DEFINE cannot be used to define a field like a variable-length field. The following is an example of defining variable-length character fields: The following is an example of defining variable-length graphic and UCS-2 fields: The default initialization value for numeric fields is zero. Binary format means that the sign (positive or negative) is in the leftmost bit of the field and the numeric value is in the remaining bits of the field. Positive numbers have a zero in the sign bit negative numbers have a one in the sign bit and are in twos complement form. A binary field can be from one to nine digits in length and can be defined with decimal positions. If the length of the field is from one to four digits, the compiler assumes a binary field length of 2 bytes. If the length of the field is from five to nine digits, the compiler assumes a binary field length of 4 bytes. Every input field read in binary format is assigned a field length (number of digits) by the compiler. A length of 4 is assigned to a 2-byte binary field a length of 9 is assigned to a 4-byte binary field, if the field is not defined elsewhere in the program. Because of these length restrictions, the highest decimal value that can be assigned to a 2-byte binary field is 9999 and the highest decimal value that can be assigned to a 4-byte binary field is 999 999 999. In general, a binary field of n digits can have a maximum value of n 9s. This discussion assumes zero decimal positions. Because a 2-byte field in binary format is converted by the compiler to a decimal field with 1 to 4 digits, the input value may be too large. If it is, the leftmost digit of the number is dropped. For example, if a four digit binary input field has a binary value of hexadecimal 6000, the compiler converts this to 24 576 in decimal. The 2 is dropped and the result is 4576. Similarly, the input value may be too large for a 4-byte field in binary format. If the binary fields have zero (0) decimal positions, then you can avoid this conversion problem by defining integer fields instead of binary fields. Note: Binary input fields cannot be defined as match or control fields. The number of digits of a binary field is exactly the same as the length in the DDS description. For example, if you define a binary field in your DDS specification as having 7 digits and 0 decimal positions, the RPG IVcompiler handles the data like this: The field is defined as a 4-byte binary field in the input specification A Packed(7,0) field is generated for the field in the RPG IV program. If you want to retain the complete binary field information, redefine the field as a binary subfield in a data structure or as a binary stand-alone field. Note that an externally described binary field may have a value outside of the range allowed by RPG IV binary fields. If the externally described binary field has zero (0) decimal positions then you can avoid this problem. To do so, you define the externally described binary field on a definition specification and specify the EXTBININT keyword on the control specification. This will change the external format of the externally described field to that of a signed integer. The float format consists of two parts: the mantissa and the exponent. The value of a floating-point field is the result of multiplying the mantissa by 10 raised to the power of the exponent. For example, if 1.2345 is the mantissa and 5 is the exponent then the value of the floating-point field is: You define a floating-point field by specifying F in the data type entry of the appropriate specification. The decimal positions must be left blank. However, floating-point fields are considered to have decimal positions. As a result, float variables may not be used in any place where a numeric value without decimal places is required, such as an array index, do loop index, etc. The default initialization and CLEAR value for a floating point field is 0E0. The length of a floating point field is defined in terms of the number of bytes. It must be specified as either 4 or 8 bytes. The range of values allowed for a floating-point field are: 4-byte float (8 digits) -3.4028235E38 to -1.1754944E-38, 0.0E0, 1.1754944E-38 to 3.4028235E38 8-byte float (16 digits) -1.797693134862315E308 to -2.225073858507201E-308, 0.0E0, 2.225073858507201E-308 to 1.797693134862315E308 Note: Float variables conform to the IEEE standard as supported by the OS/400 operating system. Since float variables are intended to represent scientific values, a numeric value stored in a float variable may not represent the exact same value as it would in a packed variable. Float should not be used when you need to represent numbers exactly to a specific number of decimal places, such as monetary amounts. See Specifying an External Format for a Numeric Field for a general description of external display representation. The external display representation of float values applies for the following: Output of float data with Data-Format entry blank. Input of float data with Data-Format entry blank. External format of compile-time and prerun-time arrays and tables (when keyword EXTFMT is omitted). Display and input of float values using operation code DSPLY. Output of float values on a dump listing. Result of built-in function EDITFLT. When outputting float values, the external representation uses a format similar to float literals, except that: Values are always written with the character E and the signs for both mantissa and exponent. Values are either 14 or 23 characters long (for 4F and 8F respectively). Values are normalized. That is, the decimal point immediately follows the most significant digit. The decimal separator character is either period or comma depending on the parameter for Control Specification keyword DECEDIT. Here are some examples of how float values are presented: When inputting float values, the value is specified just like a float literal. The value does not have to be normalized or adjusted in the field. When float values are defined as array/table initialization data, they are specified in fields either 14 or 23 characters long (for 4F and 8F respectively). Note the following about float fields: Alignment of float fields may be desired to improve the performance of accessing float subfields. You can use the ALIGN keyword to align float subfields defined on a definition specification. 4-byte float subfields are aligned on a 4-byte boundary and 8-byte float subfields are aligned along a 8-byte boundary. For more information on aligning float subfields, see ALIGN. Length adjustment is not allowed when the LIKE keyword is used to define a field like a float field. Float input fields cannot be defined as match or control fields. The integer format is similar to the binary format with two exceptions: The integer format allows the full range of binary values The number of decimal positions for an integer field is always zero. You define an integer field by specifying I in the Data-Type entry of the appropriate specification. You can also define an integer field using the LIKE keyword on a definition specification where the parameter is an integer field. The length of an integer field is defined in terms of number of digits it can be 3, 5, 10, or 20 digits long. A 3-digit field takes up 1 byte of storage a 5-digit field takes up 2 bytes of storage a 10-digit field takes up 4 bytes a 20-digit field takes up 8 bytes. The range of values allowed for an integer field depends on its length. Field length Range of Allowed Values 3-digit integer -128 to 127 5-digit integer -32768 to 32767 10-digit integer -2147483648 to 2147483647 20-digit integer -9223372036854775808 to 9223372036854775807 Note the following about integer fields: Alignment of integer fields may be desired to improve the performance of accessing integer subfields. You can use the ALIGN keyword to align integer subfields defined on a definition specification. 2-byte integer subfields are aligned on a 2-byte boundary 4-byte integer subfields are aligned along a 4-byte boundary 8-byte integer subfields are aligned along an 8-byte boundary. For more information on aligning integer subfields, see ALIGN. If the LIKE keyword is used to define a field like an integer field, the Length entry may contain a length adjustment in terms of number of digits. The adjustment value must be such that the resulting number of digits for the field is 3, 5, 10, or 20. Integer input fields cannot be defined as match or control fields. Packed-decimal format means that each byte of storage (except for the low order byte) can contain two decimal numbers. The low-order byte contains one digit in the leftmost portion and the sign (positive or negative) in the rightmost portion. The standard signs are used: hexadecimal F for positive numbers and hexadecimal D for negative numbers. The packed-decimal format looks like this: The sign portion of the low-order byte indicates whether the numeric value represented in the digit portions is positive or negative. Figure 89 shows what the decimal number 21544 looks like in packed-decimal format. Use the following formula to find the length in digits of a packed-decimal field: This formula gives you the maximum number of digits you can represent in packed-decimal format the upper limit is 31. Packed fields can be up to 16 bytes long. Table 12 shows the packed equivalents for zoned-decimal fields up to 31 digits long: Zoned-Decimal Length in Digits Number of Bytes Used in Packed-Decimal Field For example, an input field read in packed-decimal format has a length of five bytes (as specified on the input or definition specifications). The number of digits in this field equals 2(5) - 1 or 9. Therefore, when the field is used in the calculation specifications, the result field must be nine positions long. The PACKEVEN keyword on the definition specification can be used to indicate which of the two possible sizes you want when you specify a packed subfield using from and to positions rather than number of digits. The unsigned integer format is like the integer format except that the range of values does not include negative numbers. You should use the unsigned format only when non-negative integer data is expected. You define an unsigned field by specifying U in the Data-Type entry of the appropriate specification. You can also define an unsigned field using the LIKE keyword on the definition specification where the parameter is an unsigned field. The length of an unsigned field is defined in terms of number of digits it can be 3, 5, 10, or 20 digits long. A 3-digit field takes up 1 byte of storage a 5-digit field takes up 2 bytes of storage a 10-digit field takes up 4 bytes a 20-digit field takes up 8 bytes. The range of values allowed for an unsigned field depends on its length. Field length Range of Allowed Values 3-digit unsigned 0 to 255 5-digit unsigned 0 to 65535 10-digit unsigned 0 to 4294967295 20-digit unsigned 0 to 18446744073709551615 For other considerations regarding the use of unsigned fields, including information on alignment, see Integer Format. Zoned-decimal format means that each byte of storage can contain one digit or one character. In the zoned-decimal format, each byte of storage is divided into two portions: a 4-bit zone portion and a 4-bit digit portion. The zoned-decimal format looks like this: The zone portion of the low-order byte indicates the sign (positive or negative) of the decimal number. The standard signs are used: hexadecimal F for positive numbers and hexadecimal D for negative numbers. In zoned-decimal format, each digit in a decimal number includes a zone portion however, only the low-order zone portion serves as the sign. Figure 89 shows what the number 21544 looks like in zoned-decimal format. You must consider the change in field length when coding the end position in positions 40 through 43 of the Output specifications and the field is to be output in packed format. To find the length of the field after it has been packed, use the following formula: You can specify an alternative sign format for zoned-decimal format. In the alternative sign format, the numeric field is immediately preceded or followed by a or - sign. A plus sign is a hexadecimal 4E, and a minus sign is a hexadecimal 60. When an alternative sign format is specified, the field length (specified on the input specification) must include an additional position for the sign. For example, if a field is 5 digits long and the alternative sign format is specified, a field length of 6 positions must be specified. Keep in mind the following when defining numeric fields: When coding the end position in positions 47 through 51 of the output specifications, be sure to use the external format when calculating the number of bytes to be occupied by the output field. For example, a packed field with 5 digits is stored in 3 bytes, but when output in zoned format, it requires 5 bytes. When output in integer format, it only requires 2 bytes. If you move a character field to a zoned numeric, the sign of the character field is fixed to zoned positive or zoned negative. The zoned portion of the other bytes will be forced to F. However, if the digit portion of one of the bytes in the character field does not contain a valid digit a decimal data error will occur. When numeric fields are written out with no editing, the sign is not printed as a separate character the last digit of the number will include the sign. This can produce surprising results for example, when -625 is written out, the zoned decimal value is XF6F2D5 which appears as 62N. You should specify the integer or unsigned format for fields when: Performance of arithmetic is important With certain arithmetic operations, it may be important that the value used be an integer. Some examples where performance may be improved include array index computations and arguments for the built-in function SUBST. Interacting with routines written in other languages that support an integer data type, such as ILE C. Using fields in file feedback areas that are defined as integer and that may contain values above 9999 or 999999999. Packed, zoned, and binary formats should be specified for fields when: Using values that have implied decimal positions, such currency values Manipulating values having more than 19 digits Ensuring a specific number of digits for a field is important Float format should be specified for fields when: The same variable is needed to hold very small and/or very large values that cannot be represented in packed or zoned values. Note: Overflow is more likely to occur with arithmetic operations performed using the integer or unsigned format, especially when integer arithmetic occurs in free-form expressions. This is because the intermediate results are kept in integer or unsigned format rather than a temporary decimal field of sufficient size. Figure 89 shows what the decimal number 21544 looks like in various formats. Note the following about the representations in the figure. To obtain the numeric value of a positive binary or integer number, unsigned number, add the values of the bits that are on (1), but do not include the sign bit (if present). For an unsigned number, add the values of the bits that are on, including the leftmost bit. The value 21544 cannot be represented in a 2-byte binary field even though it only uses bits in the low-order two bytes. A 2-byte binary field can only hold up to 4 digits, and 21544 has 5 digits. Figure 90 shows the number -21544 in integer format. Date fields have a predetermined size and format. They can be defined on the definition specification. Leading and trailing zeros are required for all date data. Date constants or variables used in comparisons or assignments do not have to be in the same format or use the same separators. Also, dates used for I/O operations such as input fields, output fields or key fields are also converted (if required) to the necessary format for the operation. The default internal format for date variables is ISO. This default internal format can be overridden globally by the control specification keyword DATFMT and individually by the definition specification keyword DATFMT. The hierarchy used when determining the internal date format and separator for a date field is From the DATFMT keyword specified on the definition specification From the DATFMT keyword specified on the control specification ISO There are three kinds of date data formats, depending on the range of years that can be represented. This leads to the possibility of a date overflow or underflow condition occurring when the result of an operation is a date outside the valid range for the target field. The formats and ranges are as follows: Number of Digits in Year 2 (YMD, DMY, MDY, JUL) Several formats are also supported for fields used by the MOVE, MOVEL, and TEST operations only. This support is provided for compatibility with externally defined values that are already in a 3-digit year format and the 4-digit year LONGJUL format. It also applies to the 2-digit year formats when JOBRUN is specified. JOBRUN should be used when the field which it is describing is known to have the attributes from the job. For instance, a 12-digit numeric result of a TIME operation will be in the job date format. Table 15 lists the valid externally defined date formats that can be used in Factor 1 of a MOVE, MOVEL, and TEST operation. Format (Default Separator) 2-Digit Year Formats Determined at runtime from the DATFMT, or DATSEP job values. 3-Digit Year Formats 2 4-Digit Year Formats JOBRUN is valid only for character or numeric dates with a 2-digit year since the run-time job attribute for DATFMT can only be MDY, YMD, DMY or JUL. Valid values for the century character c are: When coding a date format on a MOVE, MOVEL or TEST operation, separators are optional for character fields. To indicate that there are no separators, specify the format followed by a zero. For more information on how to code date formats without separators see MOVE (Move). MOVEL (Move Left) and TEST (Test Date/Time/Timestamp). To initialize the Date field to the system date at runtime, specify INZ(SYS) on the definition specification. To initialize the Date field to the job date at runtime, specify INZ(JOB) on the definition specification. SYS or JOB cannot be used with a field that is exported. The Date field can also be initialized to a literal, named constant or figurative constant. Note: Runtime initialization takes place after static intitialization. Time fields have a predetermined size and format. They can be defined on the definition specification. Leading and trailing zeros are required for all time data. Time constants or variables used in comparisons or assignments do not have to be in the same format or use the same separators. Also, times used for I/O operations such as input fields, output fields or key fields are also converted (if required) to the necessary format for the operation. The default internal format for time variables is ISO. This default internal format can be overridden globally by the control specification keyword TIMFMT and individually by the definition specification keyword TIMFMT. The hierarchy used when determining the internal time format and separator for a time field is From the TIMFMT keyword specified on the definition specification From the TIMFMT keyword specified on the control specification ISO Table 16 shows the time formats supported and their separators. RPG Format Name When coding a time format on a MOVE, MOVEL or TEST operation, separators are optional for character fields. To indicate that there are no separators, specify the format followed by a zero. For more information on how to code time formats without separators see MOVE (Move). To initialize the Time field to the system time at runtime, specify INZ(SYS) on the definition specification. SYS cannot be used with a field that is exported. The Time field can also be initialized at runtime to a literal, named constant or figurative constant. Note: Runtime initialization takes place after static intitialization. A special value of JOBRUN can be used in Factor 1 of a MOVE, MOVEL or TEST operation. This indicates that the separator of the field being described is based on the run-time job attributes, TIMSEP. Timestamp fields have a predetermined size and format. They can be defined on the definition specification. Timestamp data must be in the format Microseconds (.mmmmmm) are optional for timestamp literals and if not provided will be padded on the right with zeros. Leading zeros are required for all timestamp data. The default initialization value for a timestamp is midnight of January 1, 0001 (0001-01-01-00.00.00.000000). The HIVAL value for a timestamp is 9999-12-31-24.00.00.000000. The LOVAL value for timestamp is 0001-01-01-00.00.00.000000. When coding the timestamp format on a MOVE, MOVEL or TEST operation, separators are optional for character fields. To indicate that there are no separators, specify ISO0. For an example of how ISO is used without separators see TEST (Test Date/Time/Timestamp). To initialize the Timestamp field to the system date at runtime, specify INZ(SYS) on the definition specification. SYS cannot be used with a field that is exported. The Timestamp field can also be initialized at runtime to a literal, named constant or figurative constant. Note: Runtime initialization takes place after static intitialization. The object data type allows you to define a Java object. You specify the object data type as follows: In position 40, you specify data type O. In the keyword section, you specify the CLASS keyword to indicate the class of the object. Specify JAVA for the environment, and the class name. If the object is the return type of a Java constructor, the class of the returned object is the same as the class of the method so you do not specify the CLASS keyword. Instead, you specify the EXTPROC keyword with environment JAVA, the class name, and procedure name CONSTRUCTOR. An object cannot be based. It also cannot be a subfield of a data structure. If an object is an array or table, it must be loaded at runtime. Pre-run and compile-time arrays and tables of type Object are not allowed. Every object is initialized to NULL, which means that the object is not associated with an instance of its class. To change the contents of an object, you must use method calls. You cannot directly access the storage used by the object. Classes are resolved at runtime. The compiler does not check that a class exists or that it is compatible with other objects. You can use an object field in the following situations: Free-Form Evaluation You can use the EVAL operation to assign one Object item (field or prototyped procedure) to a field of type Object. Free-Form Comparison You can compare one object to another object. You can specify any comparison, but only the following comparisons are meaningful: Equality or inequality with another object. Two objects are equal only if they represent exactly the same object. Two different objects with the same value are not equal. If you want to test for equality of the value of two objects, use the Java equals method as follows: Equality or inequality with NULL. An object is equal to NULL if it is not associated with a particular instance of its class. Free-Form Call Parameter You can code an object as a parameter in a call operation if the parameter in the prototype is an object. Objects are not valid as input or output fields. Assignment validity is not checked. For example, RPG would allow you to assign an object of class Number to an object variable defined with class String. If this was not correct, a Java error would occur when you tried to use the String variable. Basing pointers are used to locate the storage for based variables. The storage is accessed by defining a field, array, or data structure as based on a particular basing pointer variable and setting the basing pointer variable to point to the required storage location. For example, consider the based variable MYFIELD, a character field of length 5, which is based on the pointer PTR1. The based variable does not have a fixed location in storage. You must use a pointer to indicate the current location of the storage for the variable. Suppose that the following is the layout of some area of storage: If we set pointer PTR1 to point to the G, If MYFIELD is now changed by an EVAL statement to HELLO, the storage starting at the J would change: Use the BASED keyword on the definition specification (see BASED(basingpointername) ) to define a basing pointer for a field. Basing pointers have the same scope as the based field. The length of the basing pointer field must be 16 bytes long and must be aligned on a 16 byte boundary. This requirement for boundary alignment can cause a pointer subfield of a data structure not to follow the preceding field directly, and can cause multiple occurrence data structures to have non-contiguous occurrences. For more information on the alignment of subfields, see Aligning Data Structure Subfields. The default initialization value for basing pointers is NULL. Note: When coding basing pointers, you must be sure that you set the pointer to storage that is large enough and of the correct type for the based field. Figure 96 shows some examples of how not to code basing pointers. Note: You can add or subtract an offset from a pointer in an expression, for example EVAL ptr ptr offset. When doing pointer arithmetic be aware that it is your responsibility to ensure that you are still pointing within the storage of the item you are pointing to. In most cases no exception will be issued if you point before or after the item. When subtracting two pointers to determine the offset between them, the pointers must be pointing to the same space, or the same type of storage. For example, you can subtract two pointers in static storage, or two pointers in automatic storage, or two pointers within the same user space. You set or change the location of the based variable by setting or changing the basing pointer in one of the following ways: Initializing with INZ(ADDR(FLD)) where FLD is a non-based variable Assigning the pointer to the result of ADDR(X) where X is any variable Assigning the pointer to the value of another pointer Using ALLOC or REALLOC (see ALLOC (Allocate Storage). REALLOC (Reallocate Storage with New Length). and the WebSphere Development Studio: ILE RPG Programmers Guide for examples) Moving the pointer forward or backward in storage using pointer arithmetic: (offset is the distance in bytes that the pointer is moved)

No comments:

Post a Comment