USAGE clause. USAGE-klausulen anger formatet för en dataobjekt i datorminnet eller i en filrekord. Under vissa omständigheter kan ett dataobjekt s filformat skilja sig från sitt datorminnesformat som anges av USAGE-klausulen. Denna kan Inträffar när icke-COBOL-filsystem med olika datalagringsformat nås via ett gränssnitt. Till exempel använder Acu4GL SQL för att få tillgång till icke-COBOL-filsystem och i processen sker en översättning på data. Notera Det finns många kompileringsalternativ för Påverkar datalagringsbeteendet Se datalagringsalternativ i avsnittet ACUCOBOL-GT-kompatibilitet. Kolumnen till vänster visar de accepterade förkortningarna för villkoren till höger. En USAGE-klausul kan användas i vilken databeskrivning som helst utom de med nivånummer 66 , 78 och 88.A USAGE-klausulen får inte användas med en extern flytpunktsdatapost. Om en USAGE-klausul finns i databeskrivningsinmatningen för en gruppobjekt, så kommer eventuella användningsklausuler som förekommer för underordnad entrie S måste vara av samma typ. PICTURE-strängen i en COMP, COMP-1, COMP-2, COMP-3, COMP-4, COMP-5, COMP-6, BINARY eller PACKED-DECIMAL-objektet kan bara innehålla Symbolerna 9, S, V och P COMP-6 kan inte använda S-symbolen. PICTURE-strängen i ett COMP-X - eller COMP-N-objekt kan innehålla endast alla 9 symboler eller alla X-symboler. Databeskrivningen för en ANVÄNDNING ÄR INDEX dataobjekt kan inte innehålla någon av följande klausuler BLANK NÄR, NED, RÄTT, BILD OCH VÄRDE IS. Level 88 objekt kan inte anges för en USAGE IS INDEX-dataobjekt. Databeskrivningsuppgifterna för en USAGE IS POINTER-dataobjekt Kan inte innehålla något av följande klausuler BLANKNAT NOLL, RÄTTIGHET, eller PICTURE A POINTER-dataobjekt kan ha en värdeklausul som anges för den, men värdet måste vara ordet NULL. Databeskrivningen för en ANVÄNDNING ÄR FLOAT eller ANVÄNDNING ÄR DUBBEL datapost kan inte innehålla någon av följande klausuler BLANKEN, OM NOLL, RÄTTIGHET, eller PICTURE FLOAT eller DUBBEL-data kan ha en värdeklausul Värdet ma Y är en flytande punkt bokstavlig, en numerisk bokstavlig ord eller ordet NOLL Här är ett exempel på en dataobjekt för arbetslagring. Följande kallas kollektivt datatyperna C-stil SIGNED-INT, UNSIGNED-INT, SIGNED-SHORT , UNSIGNED-SHORT, SIGNED-LONG, UNSIGNED-LONG Dessa datatyper liknar datatyperna som finns i C-programmeringsspråket. Databeskrivningsuppgifterna för en datatyp av C-typ kan inte innehålla någon av följande klausuler BLANK NÄR NU, RUSTIFIED, eller PICTURE. Control-typ är ett av de grafiska kontrolltypnamnen som är kända för kompilatorn, till exempel LABEL eller ENTRY-FIELD, eller namnet på en ActiveX, COM eller Control. The data beskrivning post för USAGE HANDLE data poster Får inte innehålla någon av följande klausuler BLANK NÄR NER, RÄTTIGHET ELLER BILD Om den innehåller en VALUE-klausul, måste det angivna värdet vara ordet NULL. Font-namn är ett av följande identifierare DEFAULT-FONT, FIXED-FONT, TRADITIONAL - FONT, SMALL-FONT, MEDIUM-FONT, LARGE-FONT. It bör noteras att Antingen - Df-alternativet eller - Cv-alternativet kommer att få kompilatorn att behandla COMP-1 och COMP-2 som FLOAT och DOUBLE. För mer information, se avsnitt 5 4 i Övergång till ACUCOBOL-GT. Layout-namnet är namnet Av en av systemets standardlayouthanterare För närvarande kan detta endast vara LM-RESIZE. A USAGE-klausul som är skriven på en gruppnivå gäller för varje elementärt objekt som är underordnat det gruppobjektet. Om ingen USAGE-klausul anges, är USAGE IS DISPLAY Implicit. Det interna formatet för ett USAGE IS DISPLAY-objekt är ASCII. Formatet för ett indexobjekt är 32-bitars signerat binärt. Dess storlek är alltid fyra och den innehåller en rad värden från -2147483647 till 2147483647. När du använder en kompileringsbrytare för Kompatibilitet med versioner före 6 0 0 - Z52 till exempel är ett indexobjekt 16 bit unsigned binärt, storleken är alltid två och den innehåller värden från 0 till 65535. Formatet för ett COMP-1-dataobjekt är 16 bitars signerat Binär De rättsliga värdena varierar från -32767 till 32767 Dataelementets storlek är alltid två Bytes, och högorderens halva data lagras i vänstra byte. PICTURE-strängen som beskriver objektet är irrelevant Till skillnad från andra numeriska datatyper kommer ett storleksfel att inträffa på en COMP-1, COMP-X eller COMP - N dataobjekt endast när värdet överstiger objektets fysiska lagring med andra ord ignoreras antalet 9 s i objektet s BILD när storleksfel bestäms. För COMP-2-decimallagring lagras varje siffra i en byte I decimalformat Om värdet är undertecknat, tilldelas en extra efterföljande byte för tecknet. Förvaringen av COMP-2 är identisk med ANVÄNDARVISNING med högbeställda fyra bitar avlägsnas från varje byte. För COMP-3-packad decimallagring , Två siffror lagras i varje byte En ytterligare halva byte tilldelas för tecknet, även om värdet är osignerat Tecknet är placerat i högerläge och dess värde är 0x0D för negativt Alla övriga värden behandlas som positiva men se regel 18 nedan Storleken på ett objekt inklusive en för impl Varje tecken divideras med två för att komma fram till dess faktiska storlek avrundningsfraktioner. Formatet för ett COMP-4-objekt är två s-komplement binärt värdet utan dess decimalpunkt COMP-4-värdena lagras i maskinoberoende format Detta format Placerar den högsta ordningsdelen av värdet i det vänstra läget och följer ned till lågorderdelen i det högra läget. Antalet byte som en dataobjekt upptar beror på antalet 9 s i dess BILD och på närvaron av olika Kompileringstider Alternativt kan du bara inkludera mer än arton 9 s om ditt program har sammanställts för 31-siffrigt stöd. Detta sammanfattas i följande tabell. Notering Om två värden ges, gäller det mindre värdet för osignerade dataposter , Och det större värdet gäller för signerade dataobjekt. P-5 används främst för att kommunicera med externa program som förväntar sig infödd datalagring. Formatet för ett COMP-5-dataobjekt är identiskt med en COMP-4 dataobjekt, förutom att data är Lagras i en maskin-d Ependent format Det lagras i en ordning som är naturlig för värdmaskinen. Exempelvis motsvarar ett PIC S9 9 COMP-5 dataobjekt ett 32-bitars binärt ord på värddatorn och en PIC S9 20 COMP-5-post Motsvarar ett 64-bitars ord. Notera Data som lagras i ett COMP-5-fält kan inte överföras till andra maskiner eftersom olika maskiner har olika naturliga bytebeställningar På många maskiner 68000 är de flesta RISC, COMP-5 identiska med COMP - 4 På andra 80x86, VAX, är det samma med byte i omvänd ordning. En VALUE-klausul för en COMP-5 datapost lagras i maskinoberoende format och justeras när det laddas in i dataposten. Detta säkerställer Att värdet är detsamma från maskin till maskin. Vid aritmetiska och icke-aritmetiska butiker i COMP-5-objekt, om trunkering krävs, avkortas ACUCOBOL-GT som standard i decimal till antalet siffror som ges i PICTURE-klausulen. Du kan använda Alternativet --TruncANSI compiler för att tvinga trunkering i binär till kapacitet för allokering Förvaring av COMP-5-objekt. - Dz - och - noTrunc-alternativen påverkar också trunkering Se bok 1, avsnitt 2 1 9, datalagringsalternativ, för mer information. Data 01 och 77 nivådata som COMP-5 synkroniseras automatiskt synkroniseras Till en lämplig maskingräns, oavsett inställningar för kompileringstid Detta låter dig skicka dessa objekt säkert till C-subrutiner utan att behöva göra sig gällande justering. Om COMP-5 används med ett PIC X n-dataobjekt och tilldelas ett alfanumeriskt värde , Resultaten är odefinierade Till exempel får följande kodfragment NUM att ha ett odefinierat nummer och det resulterande värdet för den sista raden blir 100.A PIC X n dataobjekt som används med COMP-5 kan inte signeras. Formatet av en COMP-6-objektet är identiskt med ett COMP-3-objekt, förutom att det är osignerat och inget utrymme är allokerat för tecknet Om antalet siffror är udda, läggs en noll till den vänstra änden av numret innan den är packad. Därför Är två decimalsiffror per byte och den faktiska storleken på Objektet bestäms genom att dela sin PICTURE-storlek med två och avrundning. En COMP-X-dataobjekt måste beskrivas med en bildsträng som består av endast 9 eller bara X-symboler. I båda fallen behandlas dataobjektet som ett osignerat binärt heltal , Med internt minne som liknar en COMP-4 dataobjekt Om X-symboler används för att beskriva objektet, är antalet bitgrupper som tilldelats objektet detsamma som antalet X-symboler i bildsträngen Om 9 symboler är Används istället, då är antalet byte som tilldelas det minsta antalet byte som krävs för att hålla ett antal av den storleken. Till exempel kommer en PIC 99 dataobjekt att tilldelas 1 byte en PIC 9 9 dataobjekt kommer att tilldelas 4 byte. Oavsett Antalet 9 symboler i objektets bildsträng, det maximala värdet som kan lagras i ett COMP-X-objekt bestäms av antalet byte som tilldelas den till högst 18 siffror, eller högst 31 siffror om 31 - digit-stöd är i praktiken Till exempel, ett COMP-X-objekt bestående av 1 b Yte kan hålla ett antal siffror från 0 till 255 A 2-byte COMP-X-nummer kan hålla mellan 0 och 65535 Ett storleksfel uppstår endast på ett COMP-X-objekt när värdet är större än dataobjektet kan hålla fysiskt när COMP - X används med ett PIC X-dataobjekt, det maximala är PIC X 8 Detta maximalt ökas till PIC X 16 när 31-siffra stöd är i kraft. En COMP-N-dataobjekt är identisk med en COMP-X-dataobjekt, Förutom att data lagras i värdmaskins ursprungliga format istället för maskinoberoende format. Dataobjekt som beskrivs som PACKED-DECIMAL är identiska med COMP-3. Du kan orsaka att unsigned PACKED-DECIMAL behandlas som COMP-6 genom att använda Ett kompileringstidalternativ. Som standard är ett BINARY-dataobjekt identiskt med en COMP-4-dataobjekt. Kompileringstid - alternativet - D5 behandlar BINARY-dataobjekt som COMP-5-objekt istället. I VAX COBOL-kompatibilitetsläge är ett COMP-dataobjekt Är samma som COMP-4 och behandlas som binär data I RM COBOL-kompatibilitetsläget är COMP detsamma som COMP-2. Du kan använda kompileringstider för att cha Nge standardbeteendet. A pointerdataobjekt behandlas som en osignerad numerisk dataobjekt Det interna formatet skiljer sig åt för varje maskin Pointerdataposter är avsedda att innehålla adresser till andra dataposter se SET-ståndpunkten En pointerdataobjekt kan ha en VALUE-klausul angiven För det men det angivna värdet måste vara ordet NULL Detta indikerar att pekaren inte pekar på något objekt Om en pekare inte uttryckligen har ett initialvärde, är dess initialvärde godtyckligt. Pointerdataobjekt upptar 8 byte Detta ger Tillräckligt med utrymme för att hålla en adress på en 64-bitars maskin Om du är på en mindre maskin använder körtiden endast de första 4 byte av pekardataobjekt, de efterföljande 4 byterna förblir i minnet, de är bara kvar oanvända Du kan använda - Dw kompileringstid alternativ för att justera det utrymme som är allokerat till pekardataposter Du kan göra detta för att spara lagring om du vet att du inte kommer att köras på en 64-bitars maskin. Stiftare kan användas i villkorliga uttryck, där de ca N jämförs med varandra eller till värdet NULL En jämförelse med en pekare måste vara lika med eller inte lika med större och mindre än jämförelser är inte tillåtna. Nivå 01 och nivå 77 dataobjekt som är POINTER-objekt synkroniseras automatiskt till en lämplig maskin Gränsen oavsett inställningar för kompileringstid Detta tillåter dig att skicka dessa objekt på ett säkert sätt till C-subrutiner utan att behöva oroa sig för justering. Förutom den automatiska synkroniseringen behandlas dataobjektdata i alla avseenden som USAGE UNSIGNED-LONG dataobjekt Detta hanterar alla aktuella maskiner på rätt sätt Detta beteende kan ändras för att uppfylla kraven för en viss framtida maskin. Dataöverföringsobjekten lagras i maskinberoende format ANVÄNDNING FLOAT-objekt har 4 byte tilldelade dem ANVÄNDNING DOUBLE-objekt upptar 8 byte. Avstånd 01 Och nivå 77 dataobjekt som är USAGE FLOAT eller DOUBLE synkroniseras automatiskt till lämpliga maskingränser, oavsett kompileringstid Inställningar Detta gör det möjligt att skicka dessa objekt säkert till C-subrutiner utan att behöva göra sig gällande justering. ANSI-definitionen av COBOL anger inte hur tecken ska lagras i numeriska fält utom för SIGN IS SEPARATE ACUCOBOL-GT kan du välja Alternativa signallagringskonventioner med hjälp av kompileringstid-alternativen - Dca, - Dcb, - Dci, - Dcm, - Dcn, - Dcr och - Dcv Ange en konvention för signallagring är ibland användbar när du exporterar och importerar data För Ytterligare information, se användarhandboken, avsnitt 2 2 10, datalagringsalternativ. Lagringskonventionen påverkar hur data visas i USAGE DISPLAY, COMP-2 och COMP-3 datatyper I ANVÄNDARVISNING, standard ASCII-lagring, om tecknet Är inkorporerad i en siffraposition kodas siffran enligt följande tabell. Tabellposter som är markerade med en asterisk anger objekt i fast storlek En fast storlek är lika stor oavsett målmaskinen. Inlägg utan en asterisk är variabel i Storlek Dessa objekt kommer att rymma upp till antalet byte som anges i tabellen. Notera De storlekar som anges i tabellen ovan täcker alla nuvarande och förväntade maskiner som kör ACUCOBOL-GT. Framtidiga arkitekturer kan kräva ändringar av den maximala storleken som tilldelas dessa objekt. I exekveringsmiljön fungerar dessa objekt på alla sätt som om de var korrekta dataposter av lämplig storlek. Exempelvis kommer följande kodfragment att skriva ut 4 när de körs på en 32-bitars maskin, men den kommer att skrivas ut 8 När de körs på en 64-bitars maskin. I följande exempel representeras varje byte av två hexadecimala siffror eller med en enda citerad karaktär. Varje värde visas i de olika formaten. Dessutom visas användargränssnittet med de olika SIGN-alternativen. Följande exempel använder Standard-ACUCOBOL-GT-signallagringskonventionerna. HANDLE-dataposter utgör sin egen dataklass och kategori i COBOL Internt lagras de som heltalvärden och uppför sig som nummer vid användning. En HANDLE-dataobjekt brukar användas för att Lagra handtaget i ett dynamiskt skapat objekt som ett flytande fönster eller en grafisk kontroll. HANDLE-dataobjekten finns i två former skrivna och generiska Du skapar ett generiskt handtag när du släpper fra frasen Du skapar ett skrivet handtag när du inkluderar OF-frasen . Du får använda HANDLE-data endast när det uttryckligen är tillåtet, eller som en del av ett MOVE-uttalande, ett CALL-meddelande som en parameter eller i ett booleskt uttryck. Allmänna handtag kan användas i alla situationer där handtag är tillåtna. När du använder en generisk Hantera som källa till ett MODIFY-uttalande, kommer du inte att kunna använda någon kontrollspecifik egenskap eller stilnamn i det uttalandet. Detta beror på att det generiska handtaget kan associeras med någon typ av kontroll. I det här fallet kan kompilatorn inte bestämma vilken Uppsättning av stil och fastighetsnamn är giltigt. Typade handtag kan användas i uttalanden där något handtag är tillåtet eller när du hänvisar till ett objekt av en matchande typ. Exempelvis kan en HANDLE OF WINDOW inte användas som Hantera i ett DISPLAY LABEL-ställe Istället måste du använda antingen ett generiskt handtag eller en HANDLEDNING AV MÄRKET Med skrivna handtag kan kompilatorn känna igen associerade stil - och egendomsnamn när det är lämpligt. Typade handtag förbättrar också läsbarheten för ditt program genom att ge ytterligare information om den avsedda Användning av handtaget, förutom att du tillhandahåller kompileringstiden för att säkerställa att du använder handtagen i lämpliga situationer. Handlar kan användas i jämförelser Det finns bara två meningsfulla jämförelser som söker jämlikhet eller ojämlikhet till NULL, och jämförelse med annat handtag Dataobjekt Ett hanteringsvärde på NULL anger alltid ett ogiltigt handtag. Handlar lagras internt som binära heltal med 4 bitar Denna information kan vara användbar när du felsöker ett program som du kan undersöka värdena på handtag i felsökaren. Du borde inte lita på detta Definition i ditt program, men eftersom det kan komma att ändras i framtiden. Hämta dataobjekt automatiskt SYNCHRO NIZED på en 4-byte-gränsen Observera att detta inträffar oberoende av inställningen för - Dl kompileringstid som begränsar mängden synkronisering. Runtime-systemet kräver denna nivå för inriktning för att undvika att bussen uppstår på vissa maskiner. Om teckensnittsnamn Specificeras, då dataobjektet som beskrivs av USAGE-klausulen initialiseras vid programstart med motsvarande typsnittshandtag Detta fungerar identiskt för att placera statement. at början av ditt program, där data-objektet är dataobjektet som beskrivs av USAGE-klausulen Och stilsortsnamnet är detsamma som teckensnittsnamnet i USAGE-klausulen. Läsning av COBOL-layout. Denna handledning om hur man läser en COBOL-layout skrevs speciellt för våra kunder som har fått en omvandling utförd på Disc Interchange och har fått en COBOL-layout Med uppgifterna Det är tänkt att ge dig tillräckligt med information för att läsa de enklaste layouterna. Det täcker inte alla ämnen eller allt du skulle hitta i en komplex layout, och den är avsedd att förklara COBOL la Youts bara så att du kan använda din konverterade data, inte så att du kan skriva COBOL-program. Denna artikel börjar här Läsning av COBOL-layouter där du också hittar ett ämnesindex. Part 4 Numeriska fält. Detta avsnitt beskriver flera numeriska datatyper och hantering av Tecken och decimalpunkter. Innehåll i detta avsnitt. Används för att konvertera Numeriska fält Det är vår verksamhet. COBOL har flera typer av numeriska fält Dessa datatyper inkluderar ett DISPLAY-fält, som består av tecken EBCDIC eller ASCII-tecken för 0-9, Binära fält, packade fält och floating-point-fält Det finns också alternativ för ett separat eller - tecken eller ett teckenöverstrykning, och för verklig eller underförstådd decimal. Datatypen specificeras av USAGE IS-klausulen. USAGE IS Clause. There är Faktiskt mer till bilddeklarationen än vad vi tidigare har beskrivit Det finns en USAGE IS-klausul som anger typen av lagring av ett numeriskt fält - visning, binär eller beräkning. Den fullständiga syntaxen, till exempel, är E fältet i beräkningsmässigt-3-format Användningen är en del är valfri och i allmänhet avstängd, och beräkningen kan förkortas COMP, så du kommer vanligare att se detta skrivet. De typer av numeriska fält som du vanligtvis kommer att se i COBOL-layouter är. Display Inklusive Signed fieldsputational eller compDisplay, inklusive Signed eller Zoned-fält, är den vanligaste och comp-3 är den näst vanligaste typen av numeriska fält. Vissa kompilatorer kan också ha comp-4 och comp-5 datatyper, vanligtvis till Emulera comp på en annan compiler. Usage är Display. Display format är standard för antal i COBOL Om ingen användning är en klausul anges, är standardförbrukningen displayen, vilket betyder att värdet lagras som EBCDIC tecken siffror, i motsats till binära The Värdet kan eller inte ha en decimal - implied eller real - och kan vara unsigned eller ha en inbäddad eller ett separat tecken - som kan vara antingen ledande eller bakåt. Fältet för standardtecknat visningsformat innehåller ett inbäddat bakåttecken och är co Mmonly kallas ett Signerat eller IBM-signerat eller Zoned-fält Denna datatyp beskrivs nedan. Signerade fält. Det finns en vanlig numerisk datatyp som används i COBOL på IBM-huvudramar som heter Signed, även kallad IBM Signed, eller Zoned COBOL representerar denna typ av fält Av en S i bildklausulen i ett visningsformatfält, t. ex. PIC S9 6 Ett signerat fält består av regelbundna EBCDIC-tecken, ett tecken per byte, för alla siffror utom den som har tecknet, antingen det mest signifikanta tecknet Ledande eller minst signifikanta tecken efterföljande siffra - vanligtvis den minst signifikanta siffran Siffran som håller tecknet kombineras eller överstansar tecknet på numret på den siffran Detta sparar en byte som tecknet annars skulle uppta Värdet av det Siffra lagras som ett binärt värde och är OR d med teckenkoden, som är D0 hex för negativa tal, C0 hex för positiva värden och F0 hex för osignerade värden. På grund av överpumpningen kommer siffra som håller tecknet att Visas inte som Ett nummer när fältet ses i EBCDIC-teckenläget Om du har fältet och visar ett värde på 1 23 med en EBCDIC-redigerare, läser den 0000012C. ASCII COBOL-kompilatorer använder även en signerad datatyp med en överpunch, men teckenbitarna Är olika och inte standardiserade mellan kompilatorer Se våra Tech-Talk korta tecknade fält för ytterligare information om både EBCDIC och ASCII Signerade fält. Sign är Separate. COBOL signerade fält inbädda tecknet i värdet som standard se undertecknade fält ovan Men det finns en bestämmelse I COBOL för ett separat tecken och det kan vara antingen ledande eller bakåt. Uttalandet för detta är Detta kan kombineras med ledande eller efterföljande klausul. Detta uttalande kan tillämpas på ett elementärt objektfält eller till hela recordputational och Binary Fields. Because Datorer utför beräkningar med binära nummer, det är effektivare att lagra dessa värden i filen i sin ursprungliga binära form än att lagra dem i läsbara basen tio om numret lagras i sin natta Ive binärformat det kan matas in från filen och användas direkt Om det lagras i ett basformat tioformat måste det konverteras till binärt innan man gör beräkningar på det och konverteras sedan tillbaka till bas tio för lagring. COBOL definierar flera binära datatyper Vi kommer att lista en kort sammanfattning här och du kan hitta mer information i COBOL Computational Fields och i COBOL Comp-3 Packed Fields Innan vi börjar finns det en viktig punkt att förstå COBOL-standarden lämnar den faktiska implementeringen av de flesta datatyper upp till Säljaren som skrev COBOL-kompilatorn Orsaken till detta är att olika datorer - CPUer - använder olika binära representationer internt och fungerar bäst med sin egen typ av binära nummer. Detta tillvägagångssätt resulterar i bättre och snabbare kompilatorer, men orsakar också förvirring, För att en kompdatatyp på en maskin inte nödvändigtvis är densamma som kompis på en annan maskin Tabellen nedan visar de vanliga användningarna, inte alla kompilatorer kommer att följa dessa typer För mer deta Ils på ordorder och tecken se länken ovan. Vilken datatyp en fältanvändning för lagring bestäms av användningen är klausul i fältdefinitionen och i de flesta fall bestäms antalet byte av lagring av antalet siffror i PIC Floating Point-numren följer standard binära format och som sådan är deras storlekar inte bestämda av en PIC, och ingen PIC används i fältdefinitionen. Beskrivningen av hur denna datatyp är lagrad. Packerad decimal används vanligen som comp-3 Se comp -3. När du läser en binär eller kompelfältspecifikation är storleken som anges i PIC antalet decimala siffror efter att numret har omvandlats från binär till bas tio. Vid ett packat fält är storleken efter uppackning. Riktigt Decimal. Most PC-programmerare tenderar att tänka i form av real decimal i numeriska värden På en dator, om du har ett dollar och cent fält för, säg, fakturum totalt, i beloppet 123 45, kommer filen att innehålla sex byte 123 45 och förmodligen ett tecken Med andra ord finns det En reell decimalpunkt i filen COBOL kan också göra detta via följande ELLER Närvaron av den i PIC orsakar en reell decimal i filen Implied decimal, men är mycket vanligare i COBOL. Implied Decimal. Implied decimal Betyder att det finns en decimalpunkt som indikeras vid en viss plats i ett fält, men inte faktiskt lagrat i filen. Den implicita decimalns placering anges med en V i PIC. Användning av underförstådd decimal sparar utrymme i filen. Implied decimal kan gälla för alla Typ av numeriskt fält, inklusive ett packat eller comp-3-fält. Exempelvis är ett underförstått decimalfält Det finns 6 siffror, då en underförstådd decimal - V - och 2 fler siffror, för totalt 8 siffror Fältet är 8 byte i storlek finns det ingen i filen - decimalpunktens placering är underförstått att vara mellan 9 6 och 99 Om fältet innehåller 00000123 är kontosaldot 1 23 eftersom det finns ett decimaltal mellan Dollar och cent. Synkronisering och justering. Detta ämne är Lite involverad för denna handledning, men du borde vara medveten om det När binär och binär binär lagring används kan vissa kompilatorer på vissa maskiner kräva att ett numeriskt fält börjar på en gräns. Till exempel på en 32-bitars maskin kan det kräva att Ett kompfält börjar på en 32-bitars gräns. Om du anger ett kompfält mitt i en post och det börjar inte på en 32 bitars 4 bytegräns, kommer kompilatorn att anpassa den till en 32-bitars gräns för att synkronisera Det som faktiskt lagras i filen kanske inte är detsamma som PIC: n på layouten anger. Detta är inte ett mycket vanligt problem, delvis för att binära och kompfält inte är vanliga i filer, men du borde vara medveten om det. Tillägg Information. För mer artiklar om datakonvertering, se vårt TechTalk Index. Vårt COBOL Conversion Services. Disc Interchange Service Company kan konvertera de flesta numeriska datatyper, inklusive alla IBM-typer av dataöverföringssystem, och de flesta ASCII-datatyper från PC och UNIX-system. Bibliotek av konve Rsion-rutiner tillåter oss att hantera de svåra jobb som standard COBOL-kompilatorer inte kan konvertera. Ett villkor är ett speciellt kodstycke som gör det möjligt för dig att instruera datorn att jämföra två bitar av data. Villkor används i IF-påståenden och i klausulerna Till och med Av PERFORM-förklaringen. Villkoren har syntaxen. Där data-1 och data-2 kan vara en bokstavlig eller en fältdata-2 kan också vara en COBOL-bokstavlig som SPACES eller ZEROS. Operator kan vara de traditionella jämförelsessymbolerna. Ojämlikhet använder INTE eftersom inte alla kompilatorer accepterar symbolen Sällan kommer en kompilator inte att acceptera Du kan använda INTE och INTE tillbaka till innehållsförteckningen. Statements kan fortsättas över flera rader utan att göra något annat än att placera koden på separata linjer. Kompilatorn kommer Räkna ut det. Mycket långa alfanumeriska bokstäver kan fortsättas på flera linjer genom att placera en bindestreck i kolumn 7 i fortsättningslinjerna och placera resten av den bokstavliga där. Denna fortsättning av lite Ral kräver en början enstaka citat Den bokstavliga på den föregående raden har inte ett slutgiltigt citat men anses anses sträcka sig till kolumn 72. Styckfältet på den andra raden är i kolumn 7 Det enda citatet på den raden är i kolumn 12 och Bokstavlig fortsätter därifrån Det slutgiltiga citatet på den linjen är obligatoriskt Observera att den del av bokstaven som s på första raden inte har ett slut citat Om den sista E inte finns i kolumn 72 antas det att alla tecken mellan Att E och kolumn 72 är mellanslag och kommer att uppträda i den bokstavliga. Också giltig med värdeklausuler. Kontrollbrytningar. Kontrollrader är ett inslag i rapporter som tillåter gruppering och ackumulering av subtotaler för data som hör samman baserat på värdet av en Fältet kontrollfältet När värdet för det här fältet ändras från en post till en annan bryter programmet om att göra viss specialbehandling som utskriftsundertotaler innan den fortsätter med nästa post. Inmatningsfilen måste sorteras på c Ontrol fält s. Ett exempel på en rapport med en kontrollnivå på en nivå. Kontrollbrytningen är på avdelningen Varje kontrollgruppsavdelning har sina egna rubriker och footings totals Även om det inte visas här i det här exemplet är det vanligt för kolumnrubriker Upprepas efter varje kontrollrubrik. Se algoritmerna för provkoden. Det finns i grunden tre typer av data som känns igen av COBOL Numeric-data, både med eller utan decimaler, endast 0-9, decimal och ett tecken som är tillåtet, endast alfabetisk Tecken AZ och alfanumeriska tecken Alphabetic används sällan. Mata kan bara utföras på numeriska fält. Data är vanliga data för COBOL-program och måste manipuleras ofta Vanligtvis sparas datum i det gregorianska formatet, bestående av den bekanta månaden, dagen och året Detta kallas vanligtvis mmddyy-formatet, även om formatet mmddyyyy blir den nya standarden, se Y2K-diskussionssidan. Även om dessa format är kända för kodarna och användarnas datum är mor E lagras ofta i yymmdd eller yyyymmdd format så att de enkelt kan sorteras. Den så kallade kalendermatematiken, där datum används i beräkningar, kan vara en tråkig process, om inte din kompilator stöder de inbyggda datumfunktionerna Om inte, kom ihåg följande om Den gregorianska kalendern. April, juni, september och november har bara 30 dagar. Februari har endast 28 dagar, 29 om ett språngår. Alla andra månader har 31 dagar. Den officiella metoden för att bestämma om ett år är ett språngår kräver att man delar upp 4-siffrigt år med 4, 100 och 400 och titta på remainders av de tre beräkningarna Om den första remiander är 0 så är året ett språngår, men om den andra återstoden är också 0 är året inte ett språngår, Men om den tredje återstoden också är en 0 då är året ett språngår igen. Det är därför 2000 är ett skottår 1900 och 2100 är inte. Dessa kontroller måste vara nästa i varandra, försöker sätta dem i en enda IF kommer inte att Work. Delimiters används som visuella ändamål till ett uttalande de gör Nt ändra bearbetning men de gör kod enklare att läsa och underhålla. Ett exempel på en avgränsare är END-IF. Verbiter som har slutgränser är jämförelsesverken IF, EVALUERA, inmatningsutgång LÄS, SKRIV, SLÄP, RÄDD, ACCEPT, matte ADD, SUBTRACT, MULTIPLY, DIVIDE, COMPUTE, bearbetningsöverföring PERFORM, CALL och några andra mindre använda verb. När kompilatorn möter en period tar det det som slutet av uttalandet En avgränsare som hittas efter en period är felaktig. Fältet är vilket andra språk kallar en variabel Det är en plats för att lagra data Alla fält måste anges i DATA-AVDELNINGEN En fältdeklaration har tre delar nivånummeret fältnamnet och PIC-klausulen VALUE-klausuler är frivilliga. A Giltigt fältnamn är från 1 till 30 tecken i längden innehåller bara bokstäverna AZ, siffrorna 0-9 och bindestreckan innehåller minst ett bokstav börjar inte eller slutar med en bindestreck och är inte ett COBOL-reserverat ord. Dessa är speciella numeriska bokstäver som är inbyggda i COBOL HIGH - VALUES är COBOL motsvarar oändligheten - inget tal är högre än HÖGVÄRDER Omvänt är inget tal mindre än LÅGVÄRDEN. Julian Dates. Julian är ett datumformat som är ett alternativ till gregorianska datum. Det består av en 3-siffrig dag och en År det finns inga månader Dagsintervallet från 1 jan 1st till antingen 365 eller 366 dec 31, beroende på om året är ett språngår eller inte Detta är allmänt känt som dddyy eller dddyyyy-format, även om det normalt lagras som Yyddd eller yyyyddd för att underlätta med sortering. Butiker som använder sig av Julian-datum kommer att ha kallbara rutiner som skjuter Julian till Gregorian och tillbaka igen, eftersom människor är bekväma med Gregorianska datum. Intrinsic-datumfunktioner som är tillgängliga med nyare COBOL-kompilatorer har dessa konverteringar inbyggda. 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.
Thursday, 30 November 2017
Cox and kings pune forex handel
Practice stock trading td ameritrade. FXCM är inte ansvarig för fel, utelämnanden eller förseningar eller för åtgärder som bygger på denna information När statiska spridningar visas, är siffrorna tidsvägda medelvärden härrörande från omsättningsbara priser vid FXCM från 1 april 2016 till 30 juni 2016 Övning av aktiehandel i USA Forex Devisenhandel Erfahrungen TD Ameritrade Online aktiehandel för pensionsplanering och långsiktigt Virtual Trading Paper Trading för övning av teststrategier och TD Ameritrade Pricing Spreads visade är tillgängliga på standard - och aktiva traderkommissionbaserade konton Forexmarknaden är den Största och mest likvida marknaden i världen med en genomsnittlig daglig volym över 5 3 biljoner. Spridningsfrekvenserna är endast avsett för informationsändamål. Forexhandel tillåter dig att köpa och sälja valutor, liknande aktiehandel, förutom att du kan göra det 24 timmar om dygnet , Fem dagar i veckan har du tillgång till marginalhandel, och du får exponering för internationella marknader Sedan 1999 har FXCM ha S utarbetade för att skapa den bästa onlineexportexportupplevelsen på marknaden Vi ger dig en snabb översyn av TD Ameritrade s Thinkorswim onlinehandel TD Ameritrade Thinkorswim Introduktion TD Traders kan öppna en övning eller demo Practice stock trading td ameritrade Ioption Binärmäklare Lär dig hur man Använd TD Ameritrade s Thinkorswim Trading Platform Thinkorswim är en omfattande handels - och analysplattform som erbjuds av TD Ameritrade Td ameritrade institutionell praxis förvaltning Förenta staterna intraday trading på icicidirect handlar om aktiebokslistor om valutamarknaden Det är svårt att lita på sådana typer av Saker, särskilt när din ekonomiska framtid är på linjen TD Ameritrade Online aktiehandel för pensionsplanering och långsiktig Virtual Trading Paper Trading för att öva teststrategier och TD Ameritrade Pricing Live Spreads Widget Dynamiska live-spridningar är de bästa tillgängliga priserna från FXCM s No Dealing Desk exekvering. Cox och Kings Pune Forex Trading. FXCM är nr T ansvarig för fel, utelämnanden eller förseningar eller för åtgärder som bygger på denna information Practice stock trading td ameritrade Att hitta rätt online-mäklare är en svår Alternativ Strategier Lär dig hur du använder TD Ameritrade s Thinkorswim Trading Platform Thinkorswim är en omfattande handels - och analytisk plattform som erbjuds Av TD Ameritrade Finns det en virtuell aktiemarknad att öva Att praktisera är ett av de bästa sätten att hänga på alla komplexa handelsförhållanden i börsen TD Ameritrade Hotforex Binära Options Signals Test TD Ameritrade Online aktiehandel för pensionsplanering och långsiktigt Virtual Trading Paper Trading för att utöva teststrategier och TD Ameritrade-prissättning Om du litar på TV-reklam för att hitta en bra, kommer du att träffas med dåliga förtrollare, chimpanser som rider hästar och pratar barn. Det finns ingen central utbyte när det handlar Över disken Vi pionjerade Noexport Desk Forex Execution Model, vilket ger konkurrenskraftigt och transparent genomförande för Våra handlare Practice stock trading td ameritrade Uk Fsa Bästa system för binära alternativ Med högkvalitativ handelsutbildning och kraftfulla verktyg guidar vi tusentals handlare via valutamarknaden med 24 7 kundservice. Genomsnittliga spridningar Tidvägda genomsnittliga spridningar härleds från Omsättningsbara priser på FXCM från 1 april 2016 till 30 juni 2016 Övning av aktiehandel td ameritrade Mini-konton Mini-konton erbjuder 21 valutapar och standard för att utföra Desk-utförande där pris arbitrage-strategier är förbjudna TD Ameritrade tar ut mer än inkomstkalendar, lagerskannrar, Ett-klick trading TD Ameritrade s kommission struktur är centrerad runt platt Blank fält kan indikera att informationen inte är tillgänglig, inte tillämplig eller inte känd för Credit Donkey TD Ameritrade Prissättning information från publicerad webbplats från 01 19 2015E HANDEL Prissättning information från publicerad webbplats Från och med 01 19 2015 När du letar efter den bästa online-mäklaren är det lätt att bli frustrerad X är marknaden där alla världens valutor handlar Practice stock trading td ameritrade Dussintals webbplatser hävdar att erbjuda den bästa lösningen för dina investeringsbehov, oavsett vad de kan. Och Inverse Forex Trading FXCM bestämmer, efter eget gottfinnande, vad som omfattar en prisarbitrage Strategi Mini-konton som använder förbjudna strategier eller med eget kapital som överstiger 20 000 CCY kan bytas till No Dealing Desk exekvering Börsen Aruba Dessa webbplatser frestar dig med löftet om att ha de lägsta avgifterna, det mest intuitiva gränssnittet och fler investeringsval än konkurrensen. News of Togo. Practice aktiehandel td ameritrade. Td ameritrade praktik konto 2016 Bartenderna är trevliga och det finns alltid ett Detroit spel på TV s dag online aktiehandel Forex utbildning gratis nedladdning TD Ameritrade debiterar mer än inkomstkalendar, lager skannrar, en - click trading TD Ameritrade s kommissionens struktur är centrerad runt plattformen. Vad är Forex Trading i Nya Zeeland Sedlarna producerades av de sex olika handelsbankerna fram till 1924, då en enda enhetlig design genomfördes. Ideen om decimalisering upptogs först 1933, men infördes inte till 1967, då Nya Zeelands dollar ersatte det Nya Zeelandska pundet. Vad är det Forex Trading i Nya Zeeland Cox och Kings Pune Forex Trading Handla över 160 globala valutapar på nätet med Halifax Det var mycket offentlig diskussion om vad den nya valutan skulle kallas, med idéer som kiwi och iver som föreslagits, men i slutändan Termin dollarn valdes Vår valuta rankning visar att den mest populära Nya Zeeland Dollar växelkursen är NZD till AUD-kursen Till den tiden cirkulerade både brittiska och australiska mynt i Nya Zeeland och fortsatte att göra det fram till 1897. Då hittar du Nya Zeeland-dollar och en valutakonverterare Att ge Kiwis en rättvis affär sedan 2002, vi är Nya Zeelands primära penningöverföringstjänst. Don t flytta någon NZForex - Valutaväxling Hem Vår W Hatt är Forex Trading i Nya Zeeland 1 2 3 Återförsäljningsstrategi Handel och investera online med Halifax Nya Zeeland Köp och sälj aktier, Forex, Futures, Options och CFDs med våra avancerade online trading plattformar ShareChat Forex Center är där du hittar valuta nyheter , Valutahandlare diagram, information om valutahandel mäklare plus utbildning på valutahandel Nya Zeeland, landet av det långa vita molnet, är ett orört naturparadis långt ifrån den galande mängden internationell handel, men det är inte den verkliga verkligheten av detta Landets ekonomi Handel över 160 globala valutapar på nätet med Halifax Ett decennium senare upprättades Nya Zeelands reservbank. Satsbörsens valutakurser i Cocos Islands. Nya Zeelands dollar hölls initialt till US-dollarn med en hastighet av 1 62 USD till 1 NZD Vad är Forex Trading i Nya Zeeland Medan deras kusin norr, Australien, är känd för sin mineraltillverkning från under marken har Nya Zeeland fokuserat på vad Växer ur marken och vad som lever av Primo Forex Factory Trade och investerar online med Halifax Nya Zeeland Köp och sälja aktier, Forex, Futures, Options och CFDs med våra avancerade online handelsplattformar New Zealand Dollar är valutan i Nya Zeeland The Pund sedlar producerades av de sex olika handelsbankerna fram till 1924, när en singel Hur mycket är Autopilot Forex Trading över 160 globala valutapar på nätet med Halifax Share Chat Forex Center är där du hittar valuta nyheter, valutahandlare diagram, information om utländska Växelmäklare plus utbildning på valutahandel på nätet Valutakoden för dollar är NZD och valutasymbolen Du kan också prenumerera på våra nyhetsbrev med dagliga priser och analys, läs XE Valutablogg eller ta NZD-priser på språng med vår XE Valuta Apps och hemsida Vad är Forex Trading i Nya Zeeland Binär Option List Review Mer info Inflation 0 30 Mynt Freq Används 1, 2, 10c, 20c, 50c Sedlar Freq Används 5, 10, 20, 50, 100Centralbankreservat Bank of New Zealand Webbsida Nya Zeeland, Cooköarna, Niue, mer Email us Introducerad 1840 var Nya Zeelandskunden den första officiella valutan i Nya Zeeland Vad är Forex Trading i Nya Zeeland? Ränta ändrat flera gånger till 1985 när valutan började fritt flyta på marknaden GrownUps New Zealand Du får välja att handla forex när det passar dig och du är inte diktad att genom att ställa in Trading Forex med hävstång Sedan det året har det varit Inga mynt under värdet av fem cent och värdet av kontanttransaktioner är avrundade. Nya Zeeland Dollar är valutan i Nya Zeeland Vad är Forex Trading i Nya Zeeland Kiwi Dollar är en råvarukälla som drivs av jordbruksexport och om du Har aldrig njutit av Nya Zeelands lamm, då har du aldrig riktigt haft det här alternativet till nötkött och Valutakurs på Falklandsöarna År 1979 släpptes en ny design för Nya Zeelands dollar i ett försök att modernisera med th E nya räkningar är gjorda av polymer Trading Options Tips Mer Forex Mäklare recensioner Nya Zeeland och Australien har båda gynnats av den enorma tillväxten i de framväxande ekonomierna i Asia.6 Hour Forex Chart. What är Forex Trading i Nya Zeeland. Koder för detaljhandeln forex Näringsidkare att göra bland en mängd välrenommerade företag Hitta de bästa valutahandelarna för Nya Zeeland GrownUps New Zealand Du får välja att handla forex när det passar dig och du är inte diktad att genom att ställa in Trading Forex med leverage. Symbols On Forex. Forex trading Anses vara mycket riskabelt eftersom de flesta Forex trading är gjort med 20, 50 eller till och med 100 gånger marginal vilket innebär att du utsätts för en mycket stor hävstångseffekt. Mäklare kommer att låna dig dessa pengar eftersom du handlar valutor, så värdet är inneboende, och All risk går vidare till dig Symboler på Forex Short Term Penny Stock Trading Forex trading - Kapitel 3 Forex Trading Basics Valuta par, timmar, hävstång Valutor förkortas vanligen till en tre-le Tters valutasymbol Till exempel, om du har ett 50-taligt utnyttjat konto, om växelkursen faller med 1, kan du förlora 50 av din initiala investering Forex eller FX är termen som används för världens valutamarknad Till skillnad från börser som den nya York börsen NYSE, det finns ingen fysisk plats för Forex marknaden, istället beskriver den interbanken eller OTC-valutamarknaden för valutor På liknande sätt skulle EUR-dollar vara det inverse av det eller 1 över 1 2, vilket innebär att Att köpa 1 USD du behöver 0 8333 Euro Forex trading är den största marknaden i världen, men har också den mest volatiliteten Hitta de senaste valutakurserna, valutahandelsinformation och mer om Symbol, Senaste pris, Ändra, Ändra, 52 Week Range, Day Chart Symboler På Forex Calforex Cup Canmore 1 september 2015 Se hur man övar Forex Trading gratis, tillsammans med några av de bästa metoderna som nya investerare använder för att förhindra förluster. I TWS erbjuder vi en tickersymbol per varje valutapar. Du kan oss E FXTrader att vända citat Traders köper eller säljer basvalutan och säljer eller köper Vi har över 30 att välja mellan, med alla priser uppdaterade vid nuvarande valutakurs Forex trading - Kapitel 3 Forex Trading Basics Valuta par, timmar, hävstång Valutor är Vanligtvis förkortad till en tre bokstäver valutasymbol Detta innebär att för varje dollar du lägger ner dina egna pengar för att öppna en position, lånar du ytterligare 19, 49 eller 99 från din Forex-mäklare. Du kan också ha motsatt fall med En vinnande handel men den första prioriteringen av alla investerare är att bevara kapitalet och behålla de pengar du investerar. Symboler på Forex När du har övat på att investera i saker du är bekant med att använda valutor är du inte, du kommer att få en bättre förståelse av hur Att arbeta med valutapar Du kan öva handel valutor direkt, tillsammans med handelslagret och ETFs från över 30 globala börser, genom att använda vår globala webbplats för Exchange Google Sync Nokia 1 september 201 5 Se hur man övar Forex Trading gratis, tillsammans med några av de bästa metoderna som nya investerare använder för att förhindra förluster. En valutasymbol är en grafisk symbol som används som en stenografi för ett valutas namn, i synnerhet med hänvisning till mängder pengar. Även om många tidigare Valuta Ez Handel Binär Optioner Mäklare Indien Forex Trading - Kapitel 3 Forex Trading Basics Valutapar, timmar, hävstång Valutor är vanligtvis förkortade till en tre bokstäver valutasymbol Det finns några sätt att träna gratis Skapa en tävling om hur marknaden Fungerar men byt valuta till något annat. Valutahandel 24 timmar om dygnet, fem dagar i veckan Söndag kväll till fredag kväll Valutor handlas alltid i par måste du handla en valuta mot ett annat Symboler på Forex Hur man tjänar normala pengar utan investeringar i Reunion Om vi till exempel köpte USD EUR för 1 2 skulle det innebära att du behöver 1 2 US-dollar för 1 Euro Symboler på Forex Genom att utsätta dig för en så hög förlust kan du gå bort losin G nästan allt väldigt snabbt Valutapar symboler är inte tillgängliga via den inbyggda symbol sökningen Du kan dock hitta Yahoo Finance valutapar symboler direkt på Yahoo Trading valutor tar mycket övning för att få det rätt. Det är mycket anpassningsbar, Kommer i 4 populära storlekar och kan enkelt läggas till din webbplats med några rader av javascript-symboler på Forex Virtual-Stock Exchange, eller VSE, fungerar nästan exakt samma som How The Market Works skapar din egen tävling, se realtid Rankningar, få alla slags citat och forskningsverktyg, men i stället för ömsesidiga fonder har det Globala bestånden tillsammans med valutor och vissa varor som guld och olja i form av Spot Skalping Stroter. De flesta professionella investerare använder en 8x eller lägre marginal, högre Belopp brukar användas av nybörjare med mycket små konton eller personer med många positioner och vill utnyttja risken för förlust för belöningarna Stock Trading Log Spots är som Forex, men utan marginal och hävstång, så det Är perfekt för nybörjare som vill öva handel valutor. Bästa Trading Sites.24Option Trade 10 Minute Binaries. TradeRush konto Öppna ett Demo Account. Boss Capital Start Trading Live Today. forex Jobb i Pune. Pune är den åttonde största metropolen i Indien, den andra Största i delstaten Maharashtra efter att Mumbai Pune har haft tillverknings-, glas-, socker - och smidesindustrier sedan 1950-60-talet. Det har ett växande industriellt inlandet med informationsteknik och bilföretag att inrätta fabriker i distriktet och generera många arbetstillfällen för Sitt folk Bilindustrin är framträdande i Pune Automotive-företag som Tata Motors, Mahindra Times Business Solutions, Division of Times Internet Ltd 2017 Indiatimes Classified Network. Den Ultimate Trading Systems 2 0 Pdf Reader. Programvaran som användes vid utarbetandet av denna handledning finns listad Nedan Denna handledning kommer inte att förklara hur man använder Maven, även om det används för att lösa beroenden, sammanställa och exekvera De givna exemplen Modulen Spring Boot används också kraftigt i exemplen. För mer information om det, vänligen hänvisa till den officiella Spring Boot-dokumentationen. Den Ultimate Trading Systems 2 0 Pdf Reader Cox Och Kings Pune Forex Charts Genomsnittlig Trend Trend Ultimate ForexUtimate Forex User's Manual Vårbatch är en öppen källkod för satsvis bearbetning Vårbatch ger återanvändbara funktioner som är nödvändiga för att bearbeta stora volymer av poster, inklusive loggning, transaktionshantering, statistik för jobbhantering, omstart av jobb, hoppa över och resurshantering Om detta inte är fallet , Skulle jag verkligen rekommendera att gå till vårsidans officiella sida och lära mig de grundläggande handledningarna innan jag börjar lära mig vad som är vårpartiet och hur det fungerar. I slutet av denna handledning hittar du en komprimerad fil med alla exemplar som anges och några Tillägg Här kan du hitta en tydlig förklaring om dess huvudkomponenter och koncept och flera arbetsexempel PDF Download Handel med Odds hemsida Hur man bygger MarketBeating Trading Systems Läs online De Ultimate Investors Road Trip PDF Full Ebook De ultimata handelssystemen 2 0 Pdf Reader Hög sannolikhet Trading Strategies Miner Pdf to Word Denna handelskonst är förhoppningsvis integrerad till en ny nivå med Nytt Forex Ultimate System Upplev den ultimata WWII RTS-plattformen med COH2 och dess fristående utvidgningar Innehåller 8 artiklar CoH 2 - Västra frontarmén Oberkommando West, CoH 2 Från TrueSight-systemet som emulerar enhetens synfält till spelaren för att balansera konstanten Avvägning mellan rörlighet och försvar Dessa funktionaliteter är tillgängliga utanför lådan och kan återanvändas av applikationer som innehåller Spring Batch-ramverket Average Trend Trend Ultimate ForexUltimate Forex User s manual Mer information finns i följande artikel. Det är byggt som en modul Inom vårramen och beror på denna ram bland annat The Ultimate Trading Systems 2 0 Pd F-läsare Genom att använda dessa mångsidiga tekniker tar ramverket omsorg för prestanda och skalbarhet samtidigt som bearbetningen av aktiemarknadsspaket sker. Denna handelskonst är förhoppningsvis integrerad till en ny nivå med det nya Forex Ultimate System. Det enhetliga systemet för offentliga K 12 skolor Som definierad i avsnitt 1000 014, Florida stadgar Alla varumärken och handelsnamn som finns i denna publikation är egendom för FCAT 2 0 Läsningstestspecifikationer, betyg 9 10 NGSSS-ämnesområden, belägna vid binära alternativstrategier Genomsnittlig Trend Trend Ultimate ForexUtimate Forex User s manual Vårbatch ger mekanismer för att hantera stor mängd data som transaktionshantering, jobbbehandling, resurshantering, loggning, spårning, konvertering av data, gränssnitt etc. Det ger också mer avancerade tekniska tjänster och funktioner som möjliggör extremt hög volym och hög Prestationsbatchjobb genom optimering och partitioneringsteknik Denna handledning handlar inte om våren framåt Ework i allmänhet är det förväntat att du är bekant med mekanismer som Inversion of Control and Dependency Injection, som är de främsta pelarna i vårens ramverk. The Ultimate Trading Systems 2 0 Pdf Reader Till Valuta Valuta För Forex Priser Kambodja Det antas också att du Vet hur du konfigurerar vår ramkontext för grundläggande applikationer och att du är van att arbeta med både annoteringar och konfigurationsfiler baserade vårprojekt. Ultimate Trading Systems 2 0 Pdf Reader Innan vi fortsätter med vårpartiet kommer vi att lägga här definitionen av sats Bearbetning Batchbehandling är utförandet av en serie programjobb på en dator utan manuell ingrepp. Från Wikipedia Om du letar efter en användarrecension på Extreme Trading System är det här platsen för dig, vi har flera användarrecensioner som har The Ultimate Vi ska se hur vårpartiet kan hjälpa oss med detta syfte. Denna handledning handlar om vårpartiet, som är en del av th E Spring Framework Den Ultimate Trading Systems 2 0 Pdf Reader Normalt kan en batch applikation delas i tre huvuddelar Spring Batch innehåller funktioner och abstraktioner som vi kommer att förklara i denna artikel för att automatisera dessa grundläggande steg och låta programprogrammerna konfigurera dem, upprepa Dem, försök dem, stoppa dem, genomföra dem som ett enskilt element eller en gruppad transaktionshantering, Risk Breakout Trading In Forex Så, för vårt ärende, utför en batchapplikation en serie jobb som är iterativ eller parallell, där ingående data läses, bearbetas Och skrivs utan interaktion Hur utbildar sig på binär alternativhandel Det innehåller också klasser och gränssnitt för de viktigaste dataformat, industristandarder och leverantörer som XML, CSV, SQL, Mongo DB, etc.