applying unix command in EBCIDIC file


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers applying unix command in EBCIDIC file
Prev   Next
# 1  
Old 09-03-2012
applying unix command in EBCIDIC file

Hi,
I'm having a general query. If we do cat <file name> on a Ebcidic format file then many unknown characters are displayed in my screen.
Can we change the character set related to EBCIDIC in session level and apply the cat command on a EBCIDIC file? By doing so can we able to see the actual alphabets and digits in the monitor after the cat command?Smilie

Please let me know your comments about this.

Thanks,
Poova.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Applying the same awk over a directory of files with individual file output

I am trying to apply an awk action over multiple files in a directory. It is a simple action, I want to print out the 1st 2 columns (i.e. $1 and $2) in each tab-separated document and output the result in a new file *.pp This is the awk that I have come up with so far, which is not giving me a... (6 Replies)
Discussion started by: owwow14
6 Replies

2. Shell Programming and Scripting

Applying sed against a file from a list of values stored in a variable

Hi Forum. I have the following challenge at work that I need to write a script for. I have a file abc.txt with the following contents: 4560123456 4570987654 4580654321 I want to be able to search/replace in abc.txt - the first 4 characters anything starting with 4560 to 7777; 4570... (3 Replies)
Discussion started by: pchang
3 Replies

3. UNIX for Dummies Questions & Answers

Applying python on all the files in one folder --UNIX

Dear all, I know this might be a simple and silly question but I am struggling with it I have a long unix script and in a section of if I want to use a python script which should select all the files and run the script on it (as a whole) the loop I have is selecting file by file and I dont know... (2 Replies)
Discussion started by: A-V
2 Replies

4. Shell Programming and Scripting

Ebcidic to ASCII (Packed decimals are there)

I have a input file which is EBCIDIC and it has packed decimals. Can anyone help me to convert EBCIDIC file to ASCII(Need to convert even Packed decimal values also to normal format) (12 Replies)
Discussion started by: Anusha_Reddy
12 Replies

5. UNIX Desktop Questions & Answers

Can Unix access Windows' File through Command Prompt in Unix

Hi all, I wish to know whether Unix can access window's file in Unix's terminal? Apart from that, how to copy files or share files between Window and Unix? I get to know of secure copy, however, my company's Unix does not support the feature of secure copy? Any other method for me to share/... (5 Replies)
Discussion started by: jessy83
5 Replies

6. Shell Programming and Scripting

Applying lock on a file in Unix Ksh

Hi, How can we apply lock on a text file through Unix Ksh script. I did found a command flock (file descriptor) but am not very acquainted with the usage. Can anybody tell me if I need to use Flock command for applying locks to a file while writing on it. If the person can explain the usage... (3 Replies)
Discussion started by: kum5256
3 Replies

7. UNIX for Dummies Questions & Answers

Viewing Ebcidic files

I am having trouble viewing these files from my unix session. vi comes back with line too long. Also an m_dump with the relevant dml comes back with problems. How can I view this as a text file? Also is there an easy way to view specific records within. Eg I have a policy id (4 Replies)
Discussion started by: trek88
4 Replies

8. Shell Programming and Scripting

conversion of EBCIDIC to ASCII format

Hi all, I need help on above said subject. I have a flat file which is in EBCDIC format,i want to convert into ASCII fromat using 'MFSORT'. file contains COMP-3 value in some positions. Can you please provide the SCRIPT SYNTAX.(assume that file is of 80 byte length and it is having COMP-3... (2 Replies)
Discussion started by: vijayakumarg
2 Replies

9. Shell Programming and Scripting

EBCIDIC to ASCII

can anyone get a script for converting EBCIDIC data to Unix ina file.. in shell... thanks in advance! (3 Replies)
Discussion started by: bourne
3 Replies

10. Shell Programming and Scripting

ebcidic file coversion to ascii

I want to convert an ebcidic( variable length) file to ascii. Is it possible to do it using a unix scripting.if so, how (7 Replies)
Discussion started by: rintingtong
7 Replies
Login or Register to Ask a Question
DB2_FETCH_ROW(3)							 1							  DB2_FETCH_ROW(3)

db2_fetch_row - Sets the result set pointer to the next row or requested row

SYNOPSIS
bool db2_fetch_row (resource $stmt, [int $row_number]) DESCRIPTION
Use db2_fetch_row(3) to iterate through a result set, or to point to a specific row in a result set if you requested a scrollable cursor. To retrieve individual fields from the result set, call the db2_result(3) function. Rather than calling db2_fetch_row(3) and db2_result(3), most applications will call one of db2_fetch_assoc(3), db2_fetch_both(3), or db2_fetch_array(3) to advance the result set pointer and return a complete row as an array. PARAMETERS
o $stmt - A valid stmt resource. o $row_number - With scrollable cursors, you can request a specific row number in the result set. Row numbering is 1-indexed. RETURN VALUES
Returns TRUE if the requested row exists in the result set. Returns FALSE if the requested row does not exist in the result set. EXAMPLES
Example #1 Iterating through a result set The following example demonstrates how to iterate through a result set with db2_fetch_row(3) and retrieve columns from the result set with db2_result(3). <?php $sql = 'SELECT name, breed FROM animals WHERE weight < ?'; $stmt = db2_prepare($conn, $sql); db2_execute($stmt, array(10)); while (db2_fetch_row($stmt)) { $name = db2_result($stmt, 0); $breed = db2_result($stmt, 1); print "$name $breed"; } ?> The above example will output: cat Pook gold fish Bubbles budgerigar Gizmo goat Rickety Ride Example #2 i5/OS recommended alternatives to db2_fetch_row/db2_result On i5/OS it is recommended that you use db2_fetch_both(3), db2_fetch_array(3), or db2_fetch_object(3) over db2_fetch_row(3)/db2_result(3). In general db2_fetch_row(3)/db2_result(3) have more issues with various column types in EBCIDIC to ASCII translation, including possible truncation in DBCS applications. You may also find the performance of db2_fetch_both(3), db2_fetch_array(3), and db2_fetch_object(3) to be superior to db2_fetch_row(3)/db2_result(3). <?php $conn = db2_connect("","",""); $sql = 'SELECT SPECIFIC_SCHEMA, SPECIFIC_NAME, ROUTINE_SCHEMA, ROUTINE_NAME, ROUTINE_TYPE, ROUTINE_CREATED, ROUTINE_BODY, IN_PARMS, OUT_PARMS, INOUT_PARMS, PARAMETER_STYLE, EXTERNAL_NAME, EXTERNAL_LANGUAGE FROM QSYS2.SYSROUTINES FETCH FIRST 2 ROWS ONLY'; $stmt = db2_exec($conn, $sql, array('cursor' => DB2_SCROLLABLE)); while ($row = db2_fetch_both($stmt)){ echo "<br>db2_fetch_both {$row['SPECIFIC_NAME']} {$row['ROUTINE_CREATED']} {$row[5]}"; } $stmt = db2_exec($conn, $sql, array('cursor' => DB2_SCROLLABLE)); while ($row = db2_fetch_array($stmt)){ echo "<br>db2_fetch_array {$row[1]} {$row[5]}"; } $stmt = db2_exec($conn, $sql, array('cursor' => DB2_SCROLLABLE)); while ($row = db2_fetch_object($stmt)){ echo "<br>db2_fetch_object {$row->SPECIFIC_NAME} {$row->ROUTINE_CREATED}"; } db2_close($conn); ?> The above example will output: db2_fetch_both MATCH_ANIMAL 2006-08-25-17.10.23.775000 2006-08-25-17.10.23.775000 db2_fetch_both MULTIRESULTS 2006-10-17-10.11.05.308000 2006-10-17-10.11.05.308000 db2_fetch_array MATCH_ANIMAL 2006-08-25-17.10.23.775000 db2_fetch_array MULTIRESULTS 2006-10-17-10.11.05.308000 db2_fetch_object MATCH_ANIMAL 2006-08-25-17.10.23.775000 db2_fetch_object MULTIRESULTS 2006-10-17-10.11.05.308000 SEE ALSO
db2_fetch_array(3), db2_fetch_assoc(3), db2_fetch_both(3), db2_fetch_object(3), db2_result(3). PHP Documentation Group DB2_FETCH_ROW(3)