04-19-2011
No it cannot be the 1st occurrence, it should be based on the comboination of the unique number in GS* row and the account number if RMR*. Read my first post for the details. Hope that will explain you..
Thanks for your time on this
---------- Post updated at 05:36 AM ---------- Previous update was at 04:54 AM ----------
GS* will be an unique number and RMR*account number can be the same and that can occur in different GS-GE loop
HTML Code:
GS*12345
ST*121212
RMR*222222
SE*121212
GE*12345
GS*789012
ST*454545
RMR*222222
SE*454545
GE*789012
I am using /bin/ksh and HP-UX. I have posted the error in my previous post.
---------- Post updated at 07:00 AM ---------- Previous update was at 05:36 AM ----------
Can someone help me with this issue..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need a script for...
how to find a position of column data and print some string in the next line and same position
position should find based on *HEADER8* in text
for ex: ord123 abs 123 987HEADER89 test234
ord124 abc 124 987HEADER88 test235
... (1 Reply)
Discussion started by: naveenkcl
1 Replies
2. UNIX for Dummies Questions & Answers
I have a file and it contains some text and the length is 145. I need to add a string which is of length 8 at the 120th position. Is it possible to add???? Need help on this....:( (4 Replies)
Discussion started by: sivakumar.rj
4 Replies
3. UNIX for Dummies Questions & Answers
Hi All,
My requisite is to search for the string "0108"(which is the year and has come in the wrong year format) in a particular column say 4th column in a tab delimited file and then replace it with 2008(the correct year format) in the same position where 0108 was found in the same file..The... (27 Replies)
Discussion started by: ganesh_248
27 Replies
4. Shell Programming and Scripting
To trim 3rd field in for all the lines of a file and replace the modified string in that particular field.
For example i have a file called Temp.txt having content
Temp.txt
-----------------
100,234,M1234
400,234,K1734
300,345,T3456
----------------
So the modified file output should... (4 Replies)
Discussion started by: rpadhi
4 Replies
5. UNIX for Dummies Questions & Answers
Hi
I am looking for a particular string in a file.If the string exists, then I want to replace another string with some other text.Once replaced, search for the same text after that character position in the file. :wall:
E.g: Actual File content:
Hello
Name: Nitin Raj
Welcome to Unix... (4 Replies)
Discussion started by: dashing201
4 Replies
6. Shell Programming and Scripting
here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb
cat dump.sql
INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
Discussion started by: vivek d r
10 Replies
7. Shell Programming and Scripting
I am having a text file which is having more than 200 lines.
EX:
001010122 12000 BIB 12000 11200 1200003
001010122 2000 AND 12000 11200 1200003
001010122 12000 KVB 12000 11200 1200003
In the above file i want to search for string KVB and add/replace... (1 Reply)
Discussion started by: suryanarayana
1 Replies
8. Shell Programming and Scripting
Hi,
i have a text file as :
abc 0 1 Pass
hjk 1 1 Pass
bhk 0 0 Fail
jjh 8 2 Pass
nkji 0 1 Pass
Now I want to check that if 1st column is jjh , then , store the value of 3rd string of that line in a variable. Hence, 2... (8 Replies)
Discussion started by: Anamika08
8 Replies
9. Shell Programming and Scripting
Hi,
I have a file with multiple lines(fixed width dat file). I want to search for '02' in the positions 45-46 and if available, in that lines, I need to replace value in position 359 with blank. As I am new to unix, I am not able to figure out how to do this. Can you please help me to achieve... (9 Replies)
Discussion started by: Pradhikshan
9 Replies
10. UNIX for Dummies Questions & Answers
I am trying to replace the string in position 26 through 35 of the data file with 10 spaces and I want the remaining file to stay as is, the record length is over 900 characters? I am trying to use the AWK and substr but I am not getting it formatted correctly.
Before... (6 Replies)
Discussion started by: fnwine1500
6 Replies
LEARN ABOUT SUNOS
dat_ep_get_status
dat_ep_get_status(3DAT) Direct Access Transport Library Functions dat_ep_get_status(3DAT)
NAME
dat_ep_get_status - provide a quick snapshot of the Endpoint
SYNOPSIS
cc [ flag... ] file... -ldat [ library... ]
#include <dat/udat.h>
DAT_RETURN
dat_ep_get_status (
IN DAT_EP_HANDLE ep_handle,
OUT DAT_EP_STATE *ep_state,
OUT DAT_BOOLEAN *recv_idle,
OUT DAT_BOOLEAN *request_idle
)
PARAMETERS
ep_handle Handle for an instance of the Endpoint.
ep_state Current state of the Endpoint.
recv_idle Status of the incoming DTOs on the Endpoint.
request_idle Status of the outgoing DTOs and RMR Bind operations on the Endpoint.
DESCRIPTION
the dat_ep_get_status() function provides the Consumer a quick snapshot of the Endpoint. The snapshot consists of the Endpoint state and
whether there are outstanding or in-progress, incoming or outgoing DTOs. Incoming DTOs consist of Receives. Outgoing DTOs consist of the
Requests, Send, RDMA Read, RDMA Write, and RMR Bind.
The ep_state parameter returns the value of the current state of the Endpoint ep_handle. State value is one of the following:
DAT_EP_STATE_UNCONNECTED, DAT_EP_STATE_RESERVED, DAT_EP_STATE_PASSIVE_CONNECTION_PENDING, DAT_EP_STATE_ACTIVE_CONNECTION_PENDING,
DAT_EP_STATE_TENTATIVE_CONNECTION_PENDING, DAT_EP_STATE_CONNECTED, DAT_EP_STATE_DISCONNECT_PENDING, or DAT_EP_STATE_DISCONNECTED.
A recv_idle value of DAT_TRUE specifies that there are no outstanding or in-progress Receive DTOs at the Endpoint, and DAT_FALSE otherwise.
A request_idle value of DAT_TRUE specifies that there are no outstanding or in-progress Send, RDMA Read, and RDMA Write DTOs, and RMR Binds
at the Endpoint, and DAT_FALSE otherwise.
This call provides a snapshot of the Endpoint status only. No heroic synchronization with DTO queuing or processing is implied.
RETURN VALUES
DAT_SUCCESS The operation was successful.
DAT_INVALID_HANDLE The ep_handle parameter is invalid.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard: uDAPL, 1.1, 1.2 |
+-----------------------------+-----------------------------+
|MT-Level |Safe |
+-----------------------------+-----------------------------+
SEE ALSO
libdat(3LIB), attributes(5)
SunOS 5.10 16 Jul 2004 dat_ep_get_status(3DAT)