Sponsored Content
Top Forums Shell Programming and Scripting [Solved] Extracting information from DDL's Post 302892537 by srikanth38 on Thursday 13th of March 2014 10:45:24 AM
Old 03-13-2014
[Solved] Extracting information from DDL's

Dear Experts,

I need your help here. I have lot of teradata DDL's as follows, i want to extract field names , field attributes and NOT NULL information from DDL.Could you please help here.

Sample DDL:
Code:
CREATE MULTISET TABLE APS_CALL_IN_PICKUP_CANCELED ,NO FALLBACK ,
     NO BEFORE JOURNAL,
     NO AFTER JOURNAL,
     CHECKSUM = DEFAULT,
     DEFAULT MERGEBLOCKRATIO
     (
      cnfrm_nbr CHAR(20) CHARACTER SET LATIN NOT CASESPECIFIC NOT NULL,
      crte_dt DATE FORMAT 'YYYY-MM-DD' NOT NULL,
      shpr_nbr DECIMAL(11,0) COMPRESS 0. ,
      src_sys_nm VARCHAR(10) CHARACTER SET LATIN NOT CASESPECIFIC,
      crte_tm TIME(0),
      delt_flg CHAR(1) CHARACTER SET LATIN NOT CASESPECIFIC COMPRESS ('N','Y'),
      rec_last_updt_tmstp TIMESTAMP(0),
      callr_nm VARCHAR(20) CHARACTER SET LATIN NOT CASESPECIFIC,
      callr_ph_nbr VARCHAR(20) CHARACTER SET LATIN NOT CASESPECIFIC,
      cpcs_com_desc VARCHAR(255) CHARACTER SET LATIN NOT CASESPECIFIC,
      star_com_desc VARCHAR(150) CHARACTER SET LATIN NOT CASESPECIFIC,
      batch_id_nm CHAR(8) CHARACTER SET LATIN NOT CASESPECIFIC NOT NULL)
PRIMARY INDEX ( cnfrm_nbr ,crte_dt );

Expected output:
Code:
cnfrm_nbr|CHAR(20)|NOT NULL
crte_dt|DATE|
shpr_nbr|DECIMAL(11,0)
src_sys_nm|VARCHAR(10)
crte_tm|TIME(0)
delt_flg|CHAR(1)
rec_last_updt_tmstp|TIMESTAMP(0)
callr_nm|VARCHAR(20)
callr_ph_nbr|VARCHAR(20) 
cpcs_com_desc|VARCHAR(255)
star_com_desc|VARCHAR(150)
batch_id_nm|CHAR(8)|NOT NULL

Moderator's Comments:
Mod Comment Next time, use code tags for your code AND data, thanks

Last edited by vbe; 03-13-2014 at 11:50 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Extracting information from a template

I have a template that I usually use to generate stats on an hourly basis for a number of cell sites altogether. I would like to be able to write a script that would go to the template and extract the information for any single site at any time during the day. For example, let's say that my... (4 Replies)
Discussion started by: Ernst
4 Replies

2. UNIX for Dummies Questions & Answers

Extracting information from text fields.

Dear friends, I'm a novice Unix user and I'm trying to learn the ropes. I have a big task I have to accomplish and I'm convinced Unix can get the job done, I just haven't figured out how. I recently posted on the topic of cutting text between unique text patterns and somebody helped me a great... (24 Replies)
Discussion started by: spindoctor
24 Replies

3. Shell Programming and Scripting

Problems with extracting information

Hi all, <select name="comp" id="comp" style="width:130px;"> <?php $sqlcomp = mysql_query("SELECT * FROM comp"); while ($redcomp = mysql_fetch_array($sqlcomp)) { extract($redcomp); echo "<option value=\"$comp_id\">comp_name</option>"; } ?> ... (0 Replies)
Discussion started by: c0mrade
0 Replies

4. Shell Programming and Scripting

Matching two file contents and extracting associated information

Hi, I am new to shell programming and need help. I have File1 with some ID numbers and File2 with ID number and some associated information. I want to match the ID numbers from File1 to contents in File2 and output a third file which pulls out the ID numbers and the associated information with... (2 Replies)
Discussion started by: newpro
2 Replies

5. Programming

extracting information from lines, put them into arrays

hi I need a little help writing this small perl script. I'm trying to extract the values from each line in a file and find the average for example cat school Highschool 100, 123, 135 Middleschool 41, 67, 54 Elementary 76, 315, 384 ./average.pl highschool: 119.3 middleschool: 54... (2 Replies)
Discussion started by: gengar
2 Replies

6. Shell Programming and Scripting

extracting information from multiple files

Hello there, I am trying to extract (string) information ( a list words) from 4 files and then put the results into 1 file. Currently I am doing this using grep -f list.txt file1 . and repeat the process for the other 3 files. The reasons i am doing that (a) I do know how to code (b) each file... (4 Replies)
Discussion started by: houkto
4 Replies

7. Shell Programming and Scripting

Extracting relevant information from syslogs.

I need to analyse some syslogs and I want to print out all the lines containing SSH connections to the inside interface of the firewall and ignore lines where the originating port is 22. So basically I want to print all matches after "to inside:" that contains /22 and ignore lines where /22 occur... (2 Replies)
Discussion started by: lewk
2 Replies

8. Shell Programming and Scripting

Problems extracting some information

Hi there! Well, I'm writing a script to obtain certain information about files. Specifically, I want to get the information about those files which last access were in the last 24 hours, so I'm doing something like this: find <directory_name> -atime -1 -printf '%f %a\n' I would also... (4 Replies)
Discussion started by: Skirmish
4 Replies

9. Shell Programming and Scripting

Extracting information using awk

I want to write a script that extracts a value from a line of text. I know it can be done using awk but I've never used awk before so I don't know how to do it. The text is: Mem: 100M Active, 2150K Cache, 500M Buf, 10G Free I want to extract the free memory value to use as a variable. In... (5 Replies)
Discussion started by: millsy5
5 Replies

10. Shell Programming and Scripting

Extracting information from XML to excel

Hi, I am trying to extract information from a XML file and write it to a excel sheet. I am not sure where to start from. Here is the content from my input XML file. <com.cloudbees.hudson.plugins.folder.properties.FolderProxyGroupContainer plugin="nectar-rbac@4.5"> <groups> ... (4 Replies)
Discussion started by: Sajjadmehdi
4 Replies
Locale::RecodeData::EBCDIC_DK_NO_A(3)			User Contributed Perl Documentation		     Locale::RecodeData::EBCDIC_DK_NO_A(3)

NAME
Locale::RecodeData::EBCDIC_DK_NO_A - Conversion routines for EBCDIC_DK_NO_A SYNOPSIS
This module is internal to libintl. Do not use directly! DESCRIPTION
This module is generated and contains the conversion tables and routines for EBCDIC-DK-NO-A. COMMENTS
The following comments have been extracted from the original charmap: version: 1.0 source: IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987 Please note that aliases listed above are not necessarily valid! CHARACTER TABLE
The following table is sorted in the same order as the original charmap. All character codes are in hexadecimal. Please read 'ISO-10646' as 'ISO-10646-UCS4'. Local | ISO-10646 | Description -------+-----------+------------------------------------------------- 00 | 00000000 | NULL (NUL) 01 | 00000001 | START OF HEADING (SOH) 02 | 00000002 | START OF TEXT (STX) 03 | 00000003 | END OF TEXT (ETX) 04 | 0000009C | STRING TERMINATOR (ST) 05 | 00000009 | CHARACTER TABULATION (HT) 06 | 00000086 | START OF SELECTED AREA (SSA) 07 | 0000007F | DELETE (DEL) 08 | 00000097 | END OF GUARDED AREA (EPA) 09 | 0000008D | REVERSE LINE FEED (RI) 0A | 0000008E | SINGLE-SHIFT TWO (SS2) 0B | 0000000B | LINE TABULATION (VT) 0C | 0000000C | FORM FEED (FF) 0D | 0000000D | CARRIAGE RETURN (CR) 0E | 0000000E | SHIFT OUT (SO) 0F | 0000000F | SHIFT IN (SI) 10 | 00000010 | DATALINK ESCAPE (DLE) 11 | 00000011 | DEVICE CONTROL ONE (DC1) 12 | 00000012 | DEVICE CONTROL TWO (DC2) 13 | 00000013 | DEVICE CONTROL THREE (DC3) 14 | 0000009D | OPERATING SYSTEM COMMAND (OSC) 15 | 00000085 | NEXT LINE (NEL) 16 | 00000008 | BACKSPACE (BS) 17 | 00000087 | END OF SELECTED AREA (ESA) 18 | 00000018 | CANCEL (CAN) 19 | 00000019 | END OF MEDIUM (EM) 1A | 00000092 | PRIVATE USE TWO (PU2) 1B | 0000008F | SINGLE-SHIFT THREE (SS3) 1C | 0000001C | FILE SEPARATOR (IS4) 1D | 0000001D | GROUP SEPARATOR (IS3) 1E | 0000001E | RECORD SEPARATOR (IS2) 1F | 0000001F | UNIT SEPARATOR (IS1) 20 | 00000080 | PADDING CHARACTER (PAD) 21 | 00000081 | HIGH OCTET PRESET (HOP) 22 | 00000082 | BREAK PERMITTED HERE (BPH) 23 | 00000083 | NO BREAK HERE (NBH) 24 | 00000084 | INDEX (IND) 25 | 0000000A | LINE FEED (LF) 26 | 00000017 | END OF TRANSMISSION BLOCK (ETB) 27 | 0000001B | ESCAPE (ESC) 28 | 00000088 | CHARACTER TABULATION SET (HTS) 29 | 00000089 | CHARACTER TABULATION WITH JUSTIFICATION (HTJ) 2A | 0000008A | LINE TABULATION SET (VTS) 2B | 0000008B | PARTIAL LINE FORWARD (PLD) 2C | 0000008C | PARTIAL LINE BACKWARD (PLU) 2D | 00000005 | ENQUIRY (ENQ) 2E | 00000006 | ACKNOWLEDGE (ACK) 2F | 00000007 | BELL (BEL) 30 | 00000090 | DEVICE CONTROL STRING (DCS) 31 | 00000091 | PRIVATE USE ONE (PU1) 32 | 00000016 | SYNCHRONOUS IDLE (SYN) 33 | 00000093 | SET TRANSMIT STATE (STS) 34 | 00000094 | CANCEL CHARACTER (CCH) 35 | 00000095 | MESSAGE WAITING (MW) 36 | 00000096 | START OF GUARDED AREA (SPA) 37 | 00000004 | END OF TRANSMISSION (EOT) 38 | 00000098 | START OF STRING (SOS) 39 | 00000099 | SINGLE GRAPHIC CHARACTER INTRODUCER (SGCI) 3A | 0000009A | SINGLE CHARACTER INTRODUCER (SCI) 3B | 0000009B | CONTROL SEQUENCE INTRODUCER (CSI) 3C | 00000014 | DEVICE CONTROL FOUR (DC4) 3D | 00000015 | NEGATIVE ACKNOWLEDGE (NAK) 3E | 0000009E | PRIVACY MESSAGE (PM) 3F | 0000001A | SUBSTITUTE (SUB) 40 | 00000020 | SPACE 4A | 000000F8 | LATIN SMALL LETTER O WITH STROKE 4B | 0000002E | FULL STOP 4C | 0000003C | LESS-THAN SIGN 4D | 00000028 | LEFT PARENTHESIS 4E | 0000002B | PLUS SIGN 4F | 0000007C | VERTICAL LINE 50 | 00000026 | AMPERSAND 5A | 000000E5 | LATIN SMALL LETTER A WITH RING ABOVE 5B | 000000C5 | LATIN CAPITAL LETTER A WITH RING ABOVE 5C | 0000002A | ASTERISK 5D | 00000029 | RIGHT PARENTHESIS 5E | 0000003B | SEMICOLON 5F | 000000AC | NOT SIGN 60 | 0000002D | HYPHEN-MINUS 61 | 0000002F | SOLIDUS 6A | 000000A6 | BROKEN BAR 6B | 0000002C | COMMA 6C | 00000025 | PERCENT SIGN 6D | 0000005F | LOW LINE 6E | 0000003E | GREATER-THAN SIGN 6F | 0000003F | QUESTION MARK 7A | 0000003A | COLON 7B | 000000C6 | LATIN CAPITAL LETTER AE 7C | 000000D8 | LATIN CAPITAL LETTER O WITH STROKE 7D | 00000027 | APOSTROPHE 7E | 0000003D | EQUALS SIGN 7F | 000000E6 | LATIN SMALL LETTER AE 81 | 00000061 | LATIN SMALL LETTER A 82 | 00000062 | LATIN SMALL LETTER B 83 | 00000063 | LATIN SMALL LETTER C 84 | 00000064 | LATIN SMALL LETTER D 85 | 00000065 | LATIN SMALL LETTER E 86 | 00000066 | LATIN SMALL LETTER F 87 | 00000067 | LATIN SMALL LETTER G 88 | 00000068 | LATIN SMALL LETTER H 89 | 00000069 | LATIN SMALL LETTER I 91 | 0000006A | LATIN SMALL LETTER J 92 | 0000006B | LATIN SMALL LETTER K 93 | 0000006C | LATIN SMALL LETTER L 94 | 0000006D | LATIN SMALL LETTER M 95 | 0000006E | LATIN SMALL LETTER N 96 | 0000006F | LATIN SMALL LETTER O 97 | 00000070 | LATIN SMALL LETTER P 98 | 00000071 | LATIN SMALL LETTER Q 99 | 00000072 | LATIN SMALL LETTER R A2 | 00000073 | LATIN SMALL LETTER S A3 | 00000074 | LATIN SMALL LETTER T A4 | 00000075 | LATIN SMALL LETTER U A5 | 00000076 | LATIN SMALL LETTER V A6 | 00000077 | LATIN SMALL LETTER W A7 | 00000078 | LATIN SMALL LETTER X A8 | 00000079 | LATIN SMALL LETTER Y A9 | 0000007A | LATIN SMALL LETTER Z C1 | 00000041 | LATIN CAPITAL LETTER A C2 | 00000042 | LATIN CAPITAL LETTER B C3 | 00000043 | LATIN CAPITAL LETTER C C4 | 00000044 | LATIN CAPITAL LETTER D C5 | 00000045 | LATIN CAPITAL LETTER E C6 | 00000046 | LATIN CAPITAL LETTER F C7 | 00000047 | LATIN CAPITAL LETTER G C8 | 00000048 | LATIN CAPITAL LETTER H C9 | 00000049 | LATIN CAPITAL LETTER I D1 | 0000004A | LATIN CAPITAL LETTER J D2 | 0000004B | LATIN CAPITAL LETTER K D3 | 0000004C | LATIN CAPITAL LETTER L D4 | 0000004D | LATIN CAPITAL LETTER M D5 | 0000004E | LATIN CAPITAL LETTER N D6 | 0000004F | LATIN CAPITAL LETTER O D7 | 00000050 | LATIN CAPITAL LETTER P D8 | 00000051 | LATIN CAPITAL LETTER Q D9 | 00000052 | LATIN CAPITAL LETTER R E2 | 00000053 | LATIN CAPITAL LETTER S E3 | 00000054 | LATIN CAPITAL LETTER T E4 | 00000055 | LATIN CAPITAL LETTER U E5 | 00000056 | LATIN CAPITAL LETTER V E6 | 00000057 | LATIN CAPITAL LETTER W E7 | 00000058 | LATIN CAPITAL LETTER X E8 | 00000059 | LATIN CAPITAL LETTER Y E9 | 0000005A | LATIN CAPITAL LETTER Z F0 | 00000030 | DIGIT ZERO F1 | 00000031 | DIGIT ONE F2 | 00000032 | DIGIT TWO F3 | 00000033 | DIGIT THREE F4 | 00000034 | DIGIT FOUR F5 | 00000035 | DIGIT FIVE F6 | 00000036 | DIGIT SIX F7 | 00000037 | DIGIT SEVEN F8 | 00000038 | DIGIT EIGHT F9 | 00000039 | DIGIT NINE FF | 0000009F | APPLICATION PROGRAM COMMAND (APC) AUTHOR
Copyright (C) 2002-2009, Guido Flohr <guido@imperia.net>, all rights reserved. See the source code for details. This software is contributed to the Perl community by Imperia (<http://www.imperia.net/>). SEE ALSO
Locale::RecodeData(3), Locale::Recode(3), perl(1) POD ERRORS
Hey! The above document had some coding errors, which are explained below: Around line 942: =cut found outside a pod block. Skipping to next block. perl v5.16.3 2014-06-10 Locale::RecodeData::EBCDIC_DK_NO_A(3)
All times are GMT -4. The time now is 02:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy