Approach on Header record


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Approach on Header record
# 1  
Old 07-11-2012
Approach on Header record

All,

I currently have a requirement to fetch a Date value from a table. And then insert a Header record into a file along with that date value.
ex:
Code:
echo "HDR"" "`date +%Y%j` `date +%Y%m%d`

In the above example I used julian date and standard date using Current Date. But the requirement here is to use a Date value fetched from a database table.

Kindly help me please.

Last edited by Franklin52; 07-11-2012 at 05:16 PM.. Reason: Please use code tags for data and code samples, thank you
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Help in printing records where there is a 'header' in the first record ???

Hi, I have a backup report that unfortunately has some kind of hanging indent thing where the first line contains one column more than the others I managed to get the output that I wanted using awk, but just wanting to know if there is short way of doing it using the same awk Below is what... (2 Replies)
Discussion started by: newbie_01
2 Replies

2. UNIX for Advanced & Expert Users

Removing Header and Trailer record of a EBCDIC file

I have a EBCDIC multi layout file which has a header record which is 21 bytes, The Detail records are 2427 bytes long and the trailer record is 9 bytes long. Is there a command to remove the header as well as trailer record and read only the detail records while at the same time not altering... (1 Reply)
Discussion started by: abhilashnair
1 Replies

3. Shell Programming and Scripting

Insert a header record (tab delimited) in multiple files

Hi Forum. I'm struggling to find a solution for the following issue. I have multiple files a1.txt, a2.txt, a3.txt, etc. and I would like to insert a tab-delimited header record at the beginning of each of the files. This is my code so far but it's not working as expected. for i in... (2 Replies)
Discussion started by: pchang
2 Replies

4. Shell Programming and Scripting

Generate a DML dynamically based off of header record

I have the following scenario where I need to use a header record from a file and generate a DML based off of it... E.g.: The header can change periodically with an additional column in between or remove a col.... Sample header : (head -1 sample.txt)... (17 Replies)
Discussion started by: anduzzi
17 Replies

5. Shell Programming and Scripting

Insertion of Header record

A header record is to be inserted in the begining of a flat file without using extra file or new file. It should be inserted into same file. Advace thanks for all help... (7 Replies)
Discussion started by: shreekrishnagd
7 Replies

6. Shell Programming and Scripting

Skip parsing the header record - Awk

Guys.... Got a scenario in which I need to skip parsing the header record while I do an awk. Does awk has the flexibility to accomplish this?. If so, how do we do this?. Thanks !!! -Anduzzi :) (2 Replies)
Discussion started by: anduzzi
2 Replies

7. UNIX for Dummies Questions & Answers

change order of fields in header record

Hello, after 9 months of archiving 1000 files, now, i need to change the order of fields in the header record. some very large, space padded files. HEADERCAS05212008D0210DOMEST01(spacepadded to record length 210) must now be 05212008HEADERCASD0210DOMEST01(spacepadded to record length 210) ... (1 Reply)
Discussion started by: JohnMario
1 Replies

8. Shell Programming and Scripting

awk script to update header record

I am using HP UX and think this may be done with awk but bot sure. I have a file with a several header records and undeneath many detail records I need to put in the header record the number of detail records above this header record and number of detail records below this header record Header... (5 Replies)
Discussion started by: klut
5 Replies

9. UNIX for Dummies Questions & Answers

How to extract duplicate records with associated header record

All, I have a task to search through several hundred files and extract duplicate detail records and keep them grouped with their header record. If no duplicate detail record exists, don't pull the header. For example, an input file could look like this: input.txt HA D1 D2 D2 D3 D4 D4... (17 Replies)
Discussion started by: run_eim
17 Replies

10. Shell Programming and Scripting

Need to Chop Header and Footer record from input file

Hi, I need to chope the header and footer record from an input file and make a new output file, please let me know how i can do it in unix.thanks. (4 Replies)
Discussion started by: coolbudy
4 Replies
Login or Register to Ask a Question
Net::DNS::Header(3)					User Contributed Perl Documentation				       Net::DNS::Header(3)

NAME
Net::DNS::Header - DNS packet header SYNOPSIS
use Net::DNS::Packet; $packet = new Net::DNS::Packet; $header = $packet->header; DESCRIPTION
A "Net::DNS::Header" object represents the header portion of a DNS packet. METHODS
new $header = new Net::DNS::Header; "new" creates a header object appropriate for making a DNS query. decode ($header, $offset) = decode Net::DNS::Header($data); Decodes the header record at the start of a DNS packet. The argument is a reference to the packet data. Returns a Net::DNS::Header object and the offset of the next location in the packet. Decoding is aborted if the header object cannot be created (e.g., corrupt or insufficient data). encode $data = $header->encode; Returns the header data in binary format, appropriate for use in a DNS query packet. print $header->print; Prints the header record on the standard output. string print $header->string; Returns a string representation of the header object. id print "query id = ", $header->id, " "; $header->id(1234); Gets or sets the query identification number. qr print "query response flag = ", $header->qr, " "; $header->qr(0); Gets or sets the query response flag. opcode print "query opcode = ", $header->opcode, " "; $header->opcode("UPDATE"); Gets or sets the query opcode (the purpose of the query). aa print "answer is ", $header->aa ? "" : "non-", "authoritative "; $header->aa(0); Gets or sets the authoritative answer flag. tc print "packet is ", $header->tc ? "" : "not ", "truncated "; $header->tc(0); Gets or sets the truncated packet flag. rd print "recursion was ", $header->rd ? "" : "not ", "desired "; $header->rd(0); Gets or sets the recursion desired flag. cd print "checking was ", $header->cd ? "not" : "", "desired "; $header->cd(0); Gets or sets the checking disabled flag. ra print "recursion is ", $header->ra ? "" : "not ", "available "; $header->ra(0); Gets or sets the recursion available flag. ad print "The result has ", $header->ad ? "" : "not", "been verified " Relevant in DNSSEC context. (The AD bit is only set on answers where signatures have been cryptographically verified or the server is authoritative for the data and is allowed to set the bit by policy.) rcode print "query response code = ", $header->rcode, " "; $header->rcode("SERVFAIL"); Gets or sets the query response code (the status of the query). qdcount, zocount print "# of question records: ", $header->qdcount, " "; $header->qdcount(2); Gets or sets the number of records in the question section of the packet. In dynamic update packets, this field is known as "zocount" and refers to the number of RRs in the zone section. ancount, prcount print "# of answer records: ", $header->ancount, " "; $header->ancount(5); Gets or sets the number of records in the answer section of the packet. In dynamic update packets, this field is known as "prcount" and refers to the number of RRs in the prerequisite section. nscount, upcount print "# of authority records: ", $header->nscount, " "; $header->nscount(2); Gets or sets the number of records in the authority section of the packet. In dynamic update packets, this field is known as "upcount" and refers to the number of RRs in the update section. arcount, adcount print "# of additional records: ", $header->arcount, " "; $header->arcount(3); Gets or sets the number of records in the additional section of the packet. In dynamic update packets, this field is known as "adcount". COPYRIGHT
Copyright (c)1997-2002 Michael Fuhr. Portions Copyright (c)2002-2004 Chris Reinhardt. Portions Copyright (c)2007 Dick Franks. All rights reserved. This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
perl, Net::DNS, Net::DNS::Packet, RFC 1035 Section 4.1.1 perl v5.16.2 2012-01-27 Net::DNS::Header(3)