Illegal character in prototype Perl error in AIX server


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Illegal character in prototype Perl error in AIX server
# 1  
Old 05-30-2012
Illegal character in prototype Perl error in AIX server

HI All ,
I am using AIX version 6 . having issue with below perl code,

Code:
sub Article ($procudure, @params) {
    my ($procudure, @params) = @_;
    #Get handle TO Dataware House DATABASE
    try {
    my $dbHandle = &Cobol::DBAccess::getDBDwConnection();
    ,,,,,,,,,,,,,
    ,,,,,,,,,,,,
      $ex = "SPException: Unable to execute Stored Procedure \[Passed: $procudure\] "."$ex";
            throw Cobol::SPException($ex);
    };


Error received :

Illegal character in prototype for Cobol $procudure, @params at line 1
( Highlighted in red)
I am new to perl , please can someone help me understand as this script worked fine in Hp-Unix but throwing above error
in IBM-AIX -6 . Any help appreciated

Moderator's Comments:
Mod Comment edit by bakunin: please use [CODE]..[/CODE]-tags when posting code or terminal output. Thank you.

Last edited by bakunin; 05-30-2012 at 12:08 PM..
# 2  
Old 05-30-2012
Where did you edit this script? Might it have ended up with carriage returns in it?
# 3  
Old 05-30-2012
Hi.
I took below code from perl module.
The script is used to generate many files like filename.txt format
when ran through perl script,it refers perlmodule as I referred below.
Though all files are generated successfully,it shows up error at line one.
I also observe files having carrier as ^M characters at end of file.
Is that the issue ? But it worked fine in unix sever.
Only Aix is having issue and throwing error.please guide

thanks
# 4  
Old 05-30-2012
UNIX doesn't use \r\n to terminate lines, just \n, so the carriage return is being taken as part of the string and not as whitespace. I don't know why some systems didn't have a problem, but this is a very very common thing when blithely copying in text files edited with Microsoft Notepad and the like.

Code:
# Remove carriage returns from a file
tr -d '\r' < wingarbage > unixtext

This User Gave Thanks to Corona688 For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Use decimal value of array in bc ends with illegal character

hi all I have to read a long cvs file every 4 columns with decimal "3,45" numbers. The 9th row in this cvs is the first line I need, so it I tail -n+9. I use sed -e 's/,/./g' to get decimal values with . delimiter. So far no problem. Goal is to get two maximum negative forces in ranges... (5 Replies)
Discussion started by: Grille
5 Replies

2. AIX

How to ssh from an AIX OS server to a Fabric OS server without password?

Hi I'd like to ssh from an AIX OS server ( v5.3) to a Fabric OS server ( v6.1.2 ) without password. I tried using dsa or rsa keys but it didn't work, the aix server still asked for the password. Somebody help, please :(:(:( (8 Replies)
Discussion started by: bobochacha29
8 Replies

3. Solaris

Illegal Instruction error

I keep getting a Illegal instruction error when running my MCP file below is the dump error message followed by truss log, dose anyone have any ideas? /opt/builds/bin/core: ELF 32-bit MSB core file SPARC Version 1, from 'mcp' *** Select Close or Exit from the window menu to close this window... (12 Replies)
Discussion started by: Wpgn
12 Replies

4. AIX

Will it affect my AIX LPAR security, when i set up email alerts on AIX server.

Hello, I've set up email alerts on AIX Servers. so that i can get email notifications (via mail relay server) when ever there is abnormal behavior. for example 1) my script monitors CPU/disk/memory etc... when it reaches high water ark, it will send an email alert. 2) disk usage alerts 3)... (5 Replies)
Discussion started by: System Admin 77
5 Replies

5. UNIX for Dummies Questions & Answers

AIX and Linux difference (character set)

I'm having a problem regarding the encoding of my files in Linux and AIX. I have a file which can be viewed both in Linux and AIX (via NetApp mount). When I checked the encoding, they have difference. In Linux, the file is encoded as ISO-8859 text. (checked by using "file" command).... (1 Reply)
Discussion started by: Jin_
1 Replies

6. UNIX for Dummies Questions & Answers

Error: "logger: illegal option -- p"

Hi All, I am working on a Solaris 10 server. From this month start, it gives the error "logger: illegal option -- p" with each command. If I execute a script whose output shown on terminal, it comes many times.. Could you please help? It comes only for my login. And I dont remember any changes... (4 Replies)
Discussion started by: jaiseaugustine
4 Replies

7. Shell Programming and Scripting

Send email from sendmail on AIX using exchange server as SMTP server

i am new in AIX i am trying to write a script to take a backup for specific files on server to and check error log if backup success send email to administrator , script done except for sending mail , i try to configure sendmail on aix to use our exchange server to send emails but still get error... (0 Replies)
Discussion started by: ahmed_salah
0 Replies

8. AIX

Transferring files from one AIX server to another AIX server in binary mode

Hi, I am a newbie to AIX. We have 2 AIX5.3 servers in our environment, I need to transfer some files in Binary mode from one server to another and some files in ASCII mode from one server to another server. Could you please help me as to how I need to do that? Thanks, Rakesh (4 Replies)
Discussion started by: rakeshc.apps
4 Replies

9. AIX

NIM thread error in AIX 5.3 server !

Friends , In our production server , we are using oracle10g in IBM AIX 5.3 unix server. From last 7 days , I got the below error : ------------------------------ LABEL: TS_NIM_ERROR_STUCK_ IDENTIFIER: 864D2CE3 Date/Time: Mon Sep 7 19:34:38 NOVST 2009 Sequence Number:... (1 Reply)
Discussion started by: shipon_97
1 Replies

10. UNIX for Dummies Questions & Answers

What's the difference between Segmentation fault and Bus error and Illegal...?

What's the difference between Segmentation fault and Bus error and Illegal instruction? Sometimes I got the one, and sometimes i got another, what are their differences? Segmentation fault (core dump)? Bus error (core dump)? Illegal instruction (core dump) Thanks Daniel (2 Replies)
Discussion started by: lakeat
2 Replies
Login or Register to Ask a Question