Running an external display from my powerbook
how do i run an external display from my notebook with the powerbook closed?
Here are the instructions for clamshell mode:
http://support.apple.com/kb/HT3131
Regards,
Captfred
Similar Messages
-
How can I run an external program from a PLSQL procedure?
Is there a package to run an external program from PLSQL? or is there another way to do that?
thanks.here there is an example about how a PL/SQL procedure can
work with an external C program.
http://download-east.oracle.com/docs/cd/A87860_01/doc/appdev.817/a76936/dbms_pi2.htm#1003384
Apart from that you have Java Stored Procedures option
to carry out your task.
Java Stored Procedures Developer's Guide Contents / Search / Index / PDF
http://download-east.oracle.com/docs/cd/B10501_01/java.920/a96659.pdf
Joel P�rez -
Can I run an external display off the new LaCie 2Big Thunderbolt.
I currently run FCP 7 on a brand new MacBook Pro. I use the Thunderbolt port into a Thunderbolt to VGA adapter (third party) to run an external Asis 27" display. It all works quite well. But...
Right now I use a LaCie d2 Firewire 800 external HD as my scratch but would like to upgrade to the new LaCie 2Big Thunderbolt. I want to then run my external display (still using the adapter) off the second Thunderbolt port on the 2Big. Is this possible? My local Apple authorized store was very sceptical although they had never tested it, in fact, they haven't even sold a 2Big yet.
Has anyone done this? Am I going in the right direction. I don't want to pop for the 2Big (+$500) and find out the setup can't be done.
ThanksYes, I've demo'd this a lot. Thunderbolt out of a computer, to the drive, looped to a monitor. AND!! Thunderbolt to an AJA IoXT for broadcast monitoring, back out to the drive, then the drive to a computer display.
Boggles the mind, but it works -
G555 help: enable external display from BIOS?
Fellow G555ians, HELP!
My G555 (model 0873) does not have a backlight problem, but an entire LCD problem. i.e. the LCD does not turn on at all! My laptop is fine. Once every blue moon, when I turn it on the screen works.
I was wondering if someone could tell me the keystrokes needed to enabe EXTERNAL DISPLAY from the BIOS!
Since I can't see when I turn on the comp, I can't get into Windows, and therefore can't use the unction keys. However, I know there is a BIOS option to enable output to an external monitor hooked to the VGA port.
Can you please turn on your G555 and tell me exactly what keys you hit and when to get into the configuration part of the bios, change the display option to something other than LCD ONLY or whatever the default is, save and exit?
This would mean the world to me!
Moderator note: moved post to its own thread. Edited subject to reflect content. Veiled profanity removed.hi KazeShin,
Welcome to the Lenovo Forums.
Here's a screenshot of the Lenovo G555 BIOS.
Spoiler (Highlight to read)
What you can try is to:
1. Press the power button and repeatedly tap F2 to get inside the BIOS.
2. From there, press the right arrow key once and press the down arrow key 9 times.
3. Power ON Display should now be highlighted. Press Enter key once and press the down arrow key once to select Auto-Selected display then press Enter.
4. Connect an external monitor via the VGA cable Press F10 to save and exit BIOS. Upon reboot, the display should automatically transfer to an external monitor.
5. If that doesn't work, press Fn+F3 to shift to an external display.
Hope this helps.
Did someone help you today? Press the star on the left to thank them with a Kudo!
If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help the rest of the Community with similar issues identify the verified solution and benefit from it.
Follow @LenovoForums on Twitter! -
Running an External Program from Batch on Windows Server 2008R2 Failing
Hi,
I am trying to run an external program from a batch job and it is failing with this error message:
Ext. prog.: ERROR: Input redirection is not supported, exiting the process immediately.
Ext. prog.: External program terminated with exit code 1
The program I am trying to run is: timeout
This command works on the OS: timeout -t 30
I have setup the step to look like this:
Under External Program:
-Name: timeout
-Parameter: -t 30
I have also tried:
-Name: timeout -t -30
-Parameter:
I am running ECC 6.04 on top of Windows Server 2008R2 with SQL Server 2008R2.
When we were running in Server 2003 on ECC 6.0 I was able to use the Sleep program just fine in the same manner. I have found out that sleep is not available in server 2008. It was replaced with timeout.
After an update to EHP4 and moving to Windows Server 2008R2, Is there any pre-work that needs to be done on the SAP or Windows side before we can run external programs?
Thank you,
Neil> SAPService<SID> and <SID>ADM both have Administrator rights for the server.
> That means they should have full access.
No - this is no more true like that since Windows 2008, it's a bit more complex:
http://en.wikipedia.org/wiki/User_Account_Control
> Where would you setup the permission/policy to "interact with the desktop"?
Add the policy using group policy editor (gpedit.msc)
Markus -
I can't seem to run 3 external displays of off my MacBook Pro 13inc with Retina.
I can't seem to run 3 external displays of off my MacBook Pro 13inc with Retina (2.8GHz Intel Core i7, 16GB 1600 MHz DDR3, 512GB SD driven, OS X 10.9.3) It only picks ups 2 displays. I also have a 15inch Mac Book Pro with Retina that can run all 3 screens. Any suggestions, please?
The late 2013 MacBook Pro Retina 13 inch screen model can power three external displays in addition to its own.
Here is a video showing three external displays working; 1 HDMI, 1 MiniDisplay Port, and 1 thru USB using a Startech external video card to DVI adapter. All the external displays are old 23 inch Apple Cinema Displays hooked up thru each monitor's Apple Display Connector (ADC), then to Apple ADC to DVI adapters, then a third adapter (HDMI, USB, MiniDisplayport). So ADC/ADC to DVI/DVI to whatever/MacBook. The monitors are probably older than some of the users on this board. The USB to DVI external card/adapter is what makes it work, and it's less than $70 online.
http://youtu.be/ys_Glzkh0aE -
Can I run two external displays off a MacBook?
Hi there.
I would like to run two external 20" Acer (VGA) displays off of my MacBook. I already use one 20" in addition to my MacBook screen but would like to have two full sized screens to work off and would not need the 13" from the MacBook.
The MacBook literature says that only a second monitor is supported but I was hoping there is a way to override the MacBook screen in a two monitor setup and port the display to the third monitor.
Any ideas ??You can have two independent external displays on the workstation macs such as G4, G5 and Mac Pros but not on apple laptops to the best of my knowledge. If you look on that page it shows the Mac Pro then underneath it is the image of two montiors side by side with the shark image going across it. Lower down is a Macbook Pro with one additional monitor next to it.
This is the text which accompanies the image:
"With an all PCI Express architecture, Mac Pro supports a lineup of state-of-the-art graphics cards to ensure a spectacular visual experience. Every Mac Pro supports two displays — including one 30-inch Apple Cinema HD Display — and can be expanded to drive an array of up to eight displays."
Im assuming the up to eight displays refers to the fact that you can add extra graphics cards to the Mac Pro. -
How to run a Windows app from a PowerBook G4 using Tiger OS 10.4.11
HELP !!!! i have a training session tomorrow, and I need to run a Windows Application from my mac.
is it possible?
I need to do it only once (initially, then I can purchase something).
I use a PowerBook G4
I'm running Tiger OS 10.4.11 (not Leopard)
I don't need to run OS and Windows at the same time, just the Windows application
Any help would be greatly appreciated.
I signed up for and downloaded Parallels for Mac and got the message "this app can't be installed on your machine, please check the requirements for your machine." But I couldn't find requirements anwhere.
ANY IDEAS ???" I really appreciate it!If you have an Intel Mac and Leopard you can use various programs (like Parallels) that will let you do what you want.
With Tiger and a G4 PPC I think the only option is to get hold of a copy of Virtual PC and a copy of Windows that will work with it. Virtual PC is no longer produced so you'll have to look on the used stuff websites. I have never used VPC myself but I hear it is really slow, and of course since it is out of production it will probably only run some older version of Windows (not sure, maybe 98 or before?) -
Fan running when external display is connected
I have a MacBook Air 13in, mid 2011, 4GB memory, 1.7 GHz (iCore 5), running OS X 18.3.
With the laptop on, every time I connect an external display (HP LA2205wg) through a miniDisplay to VGA adapter, the fan starts running wild and it is so loud to disturb my work. Yet, I check the activity monitor (All processes) and there does not seem to be any process taking a lot of CPU.
However, if I swich the MBA off, wait a few seconds for the fan to stop, and then restart the MBA, there is no fan noise. I have to do this every day I get to the office and connect the external display. It's annoying, as I have to reopen the same files etc.
I have browsed the apple support forums and I have seen similar posts, some dated 2009. Yet no actual fix is suggested in the posts. I am still giving it a shot, hoping I don't need to waste even more time to go to an Apple store. Any help would be greatly appreciated.
MarioI was experiencing this 100% of the time at work with projectors. I found that once I forced the GPU to NVIDIA in the BIOS... the issue was resolved.
I'd rather have stability than battery life.
W530: i7-3720QM, K1000M, 32GB RAM, 512GB SSD, FHD -
Need to run 3 DVI Displays from my Mac Pro
Hello,
I have a 30 inch Display (the first gen, with the DVI connector), an old 23 inch Cinema Display (easel stand), and a 17 inch flat screen display (easel stand). I'd like to hook up all 3 to a Mac Pro. Does anyone have an idea of what graphic cards I might need to do this? I'm currently running all 3 displays on my G5, but I assume those graphic cards won't work in a Mac Pro. Thanks very much.Well, I guess, you’re talking about one of the the 2009 Quad-Core Mac Pro’s...?
This one comes with the NVIDIA GT 120... (One Mini Display Port / One DVI Port...)
The same applies to the ATI Radeon HD 4870... BTO option...
To connect a 17-, 20- or 23-inch Display to one of the Mini Display Ports you might need the
“Mini Display Port to DVI Adapter”:
http://store.apple.com/us/product/MB570Z/A?fnode=MTY1NDA5OQ&mco=MTA4MzU1NTE
To connect a 30-inch Display to one of the Mini Display Ports you might need the
“Mini Display Port to Dual-Link DVI Adapter”:
http://store.apple.com/us/product/MB571Z/A?fnode=MTY1NDA5OQ&mco=MTA4MzU1ODY
Otherwise use the EVGA GTX 285 Mac Edition...
This one comes with “Two Dual-Link DVI Ports...
In any case, one needs Two Graphic Cards to connect Three or Four Displays...
Be aware, one can install either the HD 4870 or GTX 285, both have Two auxiliary power cables...
The GT 120 doesn't have those cables...
Regards
Nolan -
Using iMac as external display from Macbook Pro flickers static and crackles.
I'm trying to use my iMac as an external display.
When I plug in my early 2011 Macbook Pro into my Mid 2010 iMac via a Belkin Mini DisplayPort to Mini DisplayPort, the iMac screen flickers with static and there's random crackling noises.
Weird thing is, when I try the same thing with a new Macbook Air, everything works perfectly!
Here's a quick video demonstrating what I'm talking about - http://youtu.be/xxTXVRffWwE
Are the two not compatible or do I just have a defective Macbook Pro? The Macbook Pro works fine with the Cinema Display I have in the office...Huh, It should work like this:
Target Display Mode: Frequently Asked Questions (FAQ) - Apple Support
iMac Model
Cable Supported
Port on Source Computer
iMac (27-inch Late 2009)
Mini DisplayPort to Mini DisplayPort
Mini DisplayPort or Thunderbolt
Actually that table seems illogical. The cable supported is mini to mini display but the port says "or Thunderbolt"
Does that seem contradictory to you? -
How To Run Dual External Displays
Hello,
I have a MacBook Pro 13". I am wondering if it is possible to run dual external monitors? I have the MiniDisplayPort To DVI adapter, works great with one monitor, but can I run dual? Thanks.You could try plugging in this USB adapter, it says you can plug in up to six per computer. If you want two externals, you should only need one of those USB adapters because the first monitor should be plugged into your superior onboard DisplayPort.
Just bear in mind that when you use these USB adapters, the top resolution supported will be lower than the DisplayPort and also it will be a lot slower. Playing games or editing video/animation might not work well on the adapters as cheap as you want. -
Running the external programs from SM69 t-code and RSBDCOS0 report
Hi All,
I am trying to execute the external commands from SM69 and RSBDCOS0. It's throwing the below error:
26.10.2009 17:26:49 Job started 00 516
26.10.2009 17:26:50 Step 001 started BT 611
26.10.2009 17:26:50 External command: ZARCHIVELOG_COPY BT 630
26.10.2009 17:26:50 Related parameter: BT 613
26.10.2009 17:26:50 Ext. prog.: > Function: BtcXpgPanicCan't exec external program (No such file or directory) BT 606
26.10.2009 17:26:50 Ext. prog.: External program terminated with exit code 1 BT 606
26.10.2009 17:26:50 Ext. prog.: SAPXPG started on <hostname>_<SID>_00, Process ID 1632, Process Number 12 BT 606
26.10.2009 17:26:50 External program was cancelled BT 614
26.10.2009 17:26:50 Job cancelled 00 518
<SID>adm has full authorization on sapxpg.
Please let me know what might be the wrong.
Regards,
SridharDear Markus,
The dev_xpg file contains the below information
Trace file of external program (trace level 3)
< Function: BtcTrcInit> Function: BtcXpgStart External program: mv
Process id: 29450
Parent process id: 29449
Rearrange StdErr to be collected in memory
Rearrange StdOut to be collected in memory
In t-code sm21 dont have any thing.
Regards,
sridhar -
I seem to kill HD's every two years...the last two i've installed were WD Caviar Black 1TB 7200rpm 3.5" drives. The speed gains over stock drives have been remarkable. I don't blame the drives for the failures, my machines are up and running 16 hours a day, every day, year round. They die from 'mileage' so to speak...i assume...there's no viral acvtivity or questionable downloads to gunk things up...just lots of work.
I have my third new drive ready to install in my intel based iMac...but i've had a thought...I want to install a SSD in my iMac for the speed gain (and recent price drops)...for standard storage i want to use this new WD Caviar Black 1TB in an external drive bay and connect via firewire 800 for storing everything except the OS and my most commonly used software...am i crazy? will the firewire 800 external drive negate the speed gained with an internal SSD??
I have four iMacs in my office, and one at home. I buy second hand and install new drives and boost memory. I'm going to do this on my 'home' machine...if it works out well i want to upgrade the other three this way...but first i need to know if i'm just dreaming, or will it really make a difference? or even possible??
Thanks!
2.66 intell core2duo
2009 iMac
8gig ram
1 gig hd
OSX ver. 10.8The SSD gives great bootup and Application launch speed. I think it also speeds up the video rendering a bit, I do all that on the SSD and then move the finished project to the external drives. As far as the speed for the external drives they are quick enough for viewing video and the file transfer rate is good. I had initially put the SSD into an external cradle (FW800) and the system was faster than on the internal drive. I only got a 1.5GBs SATA drive, perhaps yours could benefit from the 3GBs. I know the 6GBs would be too fast and costs a lot more, even the MacPros need special hookups to make use of the 6GBs.
-
How to run an external application from PL/SQL code?
Hi,
I want to call an application like "Notepad" from PL/SQL code in a Windows2000 server. Is there any way to do that?
Thanks, best regards.
Paulo.declare
r varchar(4000);
begin
dbms_java.set_output(10000);
system_util.runshell('sh /ora9/runBackup.sh', r);
dbms_output.put_line(r);
end;
System_util package is
CREATE OR REPLACE PACKAGE System_Util IS
*System: Generic
*Package Name: System_util
*Description: This is an open source package which holds regular used
* methods by developers and dba's.
*Created by: Rae Smith
*Created Date: 27/06/2001
*Notes: This ia an free open source package that holds no warranty and
* therefore no-one connected to the development of this package
* can be made reasponsible for any outcomes by it's use.
MODIFICATION LOG**************************************************************
*DETAILS DATE VERS CHANGED BY
*===============================================================================
*Created 27-06-2001 1.0 Rae Smith
/********************************* Public Methhods ***************************************/
--- getDir returns the first directory value held in the init.ora file
FUNCTION getDir RETURN VARCHAR2;
--- getPrev.. returns the prevoise day from a gievn date
FUNCTION getPrevSat(pDate IN DATE) RETURN DATE;
FUNCTION getPrevSun(pDate IN DATE) RETURN DATE;
FUNCTION getPrevMon(pDate IN DATE) RETURN DATE;
FUNCTION getPrevTue(pDate IN DATE) RETURN DATE;
FUNCTION getPrevWed(pDate IN DATE) RETURN DATE;
FUNCTION getPrevThu(pDate IN DATE) RETURN DATE;
FUNCTION getPrevFri(pDate IN DATE) RETURN DATE;
--- isNumber returns TRUE or FALSE depending on a datatype passed
FUNCTION isNumber(pnumber IN VARCHAR2) RETURN BOOLEAN;
FUNCTION isNumber(pnumber IN NUMBER) RETURN BOOLEAN;
FUNCTION isNumber(pnumber IN DATE) RETURN BOOLEAN;
--- The writeFile allow you to write data to a file
--- writeFile has 2 Versions
--- v1 pass in the file name and the text to write to a file.
--- v2 pass in the file name, dbms_sql.varhar2s object
--- and the amount of rows to procces at a time
--- This enables you to write to afile in batch mode
PROCEDURE writeFile(pName IN VARCHAR2, pText IN VARCHAR2);
PROCEDURE writeFile(pName IN VARCHAR2, pText IN DBMS_SQL.VARCHAR2S, pRows IN PLS_INTEGER);
--- The appendFile methods allow you to append data to a file
--- This also has the inteligents to create the file if ts does not exist.
--- appendFile has 2 Versions
--- v1 pass in the file name and the text to write to a file.
--- v2 pass in the file name, dbms_sql.varhar2s object
--- and the amount of rows to procces at a time
--- This enables you to write to afile in batch mode
PROCEDURE appendFile(pName IN VARCHAR2, pText IN DBMS_SQL.VARCHAR2S, pRows IN PLS_INTEGER);
PROCEDURE appendFile(pName IN VARCHAR2, pText IN VARCHAR2);
--- The clearFile clears the data from a file.
PROCEDURE clearFile(pName IN VARCHAR2);
--- checkSyntax is a quick syntax checker for sql statements the is a limit to
--- the size used in the statement. If you have a error with
--- a statement then pass in the statement watch as it displays
--- the point where the error arose.
PROCEDURE checkSyntax(pSql IN VARCHAR2);
--- isEmpty this returns TRUE or FALSE
FUNCTION isEmpty(pValue IN VARCHAR2) RETURN BOOLEAN;
--- getTimeInMins returns the time in minutes for a specified date
FUNCTION getTimeInMins (pDate IN DATE) RETURN NUMBER;
--PROCEDURE get_time_in_mins (pDate IN DATE);
--- incDate returns a specified date incremented by value
FUNCTION incDate(pInc IN NUMBER DEFAULT .999999, pDate IN DATE DEFAULT SYSDATE) RETURN DATE;
--- decDate returns a specified date decremented by value
FUNCTION decDate(pInc IN NUMBER DEFAULT .999999, pDate IN DATE DEFAULT SYSDATE) RETURN DATE;
--- getTime returns the time in milliseconds
FUNCTION getTime RETURN NUMBER;
--- daysDiff returns the amount of days between two values
FUNCTION daysDiff(pHigh IN DATE, pLow IN DATE) RETURN NUMBER;
--- difference returns the diffeence between two numbers always
--- taking the lowest away from the highest
FUNCTION difference(pAnum IN NUMBER,pBnum IN NUMBER)RETURN NUMBER;
--- total returns the value of two numbers added together
FUNCTION total(pAnum IN NUMBER, pBnum IN NUMBER)RETURN NUMBER;
--- numberToWords returns the string for a number passed in
FUNCTION numberToWords(pNumb IN NUMBER) RETURN VARCHAR2;
--- runShell allows you to run operating commands from pl/sql
--- Only available with 8i
--- PROCEDURE runShell(pCmnd IN VARCHAR2, pErrMsg IN OUT VARCHAR2);
/**************************** Public Vaiables *******************************/
--- Public variable that holds the operating system directory
--- that the can be written to from withing the database.
vDir VARCHAR2(50);
END;
CREATE OR REPLACE PACKAGE BODY System_Util IS
FUNCTION getDir RETURN VARCHAR2
IS
BEGIN
RETURN vDir;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('ERROR...ERROR...System_Util.getDir');
RAISE;
END getDir;
/**** Private module to get the first directory for utl_file to use ****/
PROCEDURE getDir
IS
CURSOR cDir(p1 IN VARCHAR2)
IS
SELECT DECODE(INSTR(value, ','), 0, value, SUBSTR(value, 1, INSTR(value, ',')-1)) dir
FROM v$parameter
WHERE name = p1;
BEGIN
FOR rDir IN cDir('utl_file_dir') LOOP
vDir := rDir.dir;
END LOOP;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('ERROR...ERROR...System_Util.getDir');
RAISE;
END getDir;
FUNCTION getPrevDate(pDate IN DATE, pDay IN VARCHAR2) RETURN DATE
IS
BEGIN
RETURN NEXT_DAY(pDate - 7, pDay);
EXCEPTION
WHEN OTHERS THEN
RAISE;
END getPrevDate;
FUNCTION getPrevSat(pDate IN DATE) RETURN DATE
IS
BEGIN
RETURN getPrevDate(pDate, 'saturday');
EXCEPTION
WHEN OTHERS THEN
RAISE;
END getPrevSat;
FUNCTION getPrevSun(pDate IN DATE) RETURN DATE
IS
BEGIN
RETURN getPrevDate(pDate, 'sunday');
EXCEPTION
WHEN OTHERS THEN
RAISE;
END getPrevSun;
FUNCTION getPrevMon(pDate IN DATE) RETURN DATE
IS
BEGIN
RETURN getPrevDate(pDate, 'monday');
EXCEPTION
WHEN OTHERS THEN
RAISE;
END getPrevMon;
FUNCTION getPrevTue(pDate IN DATE) RETURN DATE
IS
BEGIN
RETURN getPrevDate(pDate, 'tuesday');
EXCEPTION
WHEN OTHERS THEN
RAISE;
END getPrevTue;
FUNCTION getPrevWed(pDate IN DATE) RETURN DATE
IS
BEGIN
RETURN getPrevDate(pDate, 'wednesday');
EXCEPTION
WHEN OTHERS THEN
RAISE;
END getPrevWed;
FUNCTION getPrevThu(pDate IN DATE) RETURN DATE
IS
BEGIN
RETURN getPrevDate(pDate, 'thursday');
EXCEPTION
WHEN OTHERS THEN
RAISE;
END getPrevThu;
FUNCTION getPrevFri(pDate IN DATE) RETURN DATE
IS
BEGIN
RETURN getPrevDate(pDate, 'friday');
EXCEPTION
WHEN OTHERS THEN
RAISE;
END getPrevFri;
FUNCTION isNumber(pNumber IN VARCHAR2) RETURN BOOLEAN
IS
BEGIN
IF TO_NUMBER(pNumber)> 0 THEN
RETURN TRUE;
ELSE
RETURN FALSE;
END IF;
EXCEPTION
WHEN OTHERS THEN
RETURN FALSE;
END isNumber;
FUNCTION isNumber(pNumber IN NUMBER) RETURN BOOLEAN
IS
BEGIN
IF TO_NUMBER(pNumber) > 0 THEN
RETURN TRUE;
ELSE
RETURN FALSE;
END IF;
EXCEPTION
WHEN OTHERS THEN
RETURN FALSE;
END isNumber;
FUNCTION isNumber(pNumber IN DATE) RETURN BOOLEAN
IS
BEGIN
IF TO_NUMBER(TO_CHAR(pNumber, 'YYYYMMDD')) > 0 THEN
RETURN TRUE;
ELSE
RETURN FALSE;
END IF;
EXCEPTION
WHEN OTHERS THEN
RETURN FALSE;
END isNumber;
PROCEDURE writeFile(pName IN VARCHAR2, pText IN VARCHAR2)
IS
vFtype utl_file.file_type;
BEGIN
vFtype := UTL_FILE.FOPEN(vDir, pName,'w');
UTL_FILE.PUT_LINE(vFtype,pText);
UTL_FILE.FCLOSE(vFtype);
EXCEPTION
WHEN OTHERS THEN
UTL_FILE.FCLOSE(vFtype);
RAISE;
END writeFile;
PROCEDURE writeFile(pName IN VARCHAR2, pText IN VARCHAR2, pFtyp IN OUT utl_file.file_type)
IS
vFtype utl_file.file_type;
BEGIN
vFtype := UTL_FILE.FOPEN(vDir, pName,'w');
UTL_FILE.PUT_LINE(vFtype,pText);
UTL_FILE.FCLOSE(vFtype);
EXCEPTION
WHEN OTHERS THEN
UTL_FILE.FCLOSE(vFtype);
RAISE;
END writeFile;
PROCEDURE writeFile(pName IN VARCHAR2, pText IN DBMS_SQL.VARCHAR2S, pRows IN PLS_INTEGER)
IS
vFtype utl_file.file_type;
vText VARCHAR2(2000);
vCnt BINARY_INTEGER;
vRem BINARY_INTEGER;
vRowcnt PLS_INTEGER := 0;
BEGIN
vRem := MOD(pText.COUNT, pRows);
vFtype := UTL_FILE.FOPEN(vDir, pName, 'w');
vCnt := pText.FIRST;
LOOP
EXIT WHEN vCnt IS NULL;
vRowcnt := vRowcnt + 1;
IF vCnt = pText.LAST THEN
vText := vText||pText(vCnt);
UTL_FILE.PUTF(vFtype,vText);
UTL_FILE.FFLUSH(vFtype);
vText := '';
ELSIF MOD(vCnt, pRows) = 0 THEN
vText := vText||pText(vCnt)||'\n';
UTL_FILE.PUTF(vFtype,vText);
UTL_FILE.FFLUSH(vFtype);
vText := '';
ELSIF vRowcnt = vRem THEN
vText := vText||pText(vCnt)||'\n';
UTL_FILE.PUTF(vFtype,vText);
UTL_FILE.FFLUSH(vFtype);
ELSE
vText := vText||pText(vCnt)||'\n';
END IF;
vCnt := pText.NEXT(vCnt);
END LOOP;
UTL_FILE.FCLOSE(vFtype);
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('ERROR...ERROR...SYSTEM_UTIL.WRITE_FILE');
UTL_FILE.FCLOSE(vFtype);
RAISE;
END writeFile;
PROCEDURE appendFile(pName IN VARCHAR2, pText IN DBMS_SQL.VARCHAR2S, pRows IN PLS_INTEGER)
IS
vFtype utl_file.file_type;
vText VARCHAR2(2000);
vCnt BINARY_INTEGER;
vRem BINARY_INTEGER;
vMode VARCHAR2(2) := 'a';
vRowcnt PLS_INTEGER := 0;
BEGIN
vRem := MOD(pText.COUNT, pRows);
vFtype := UTL_FILE.FOPEN(vDir, pName, vMode);
vCnt := pText.FIRST;
LOOP
EXIT WHEN vCnt IS NULL;
vRowcnt := vRowcnt + 1;
IF vCnt = pText.LAST THEN
vText := vText||pText(vCnt);
UTL_FILE.PUTF(vFtype,vText);
UTL_FILE.FFLUSH(vFtype);
vText := '';
ELSIF MOD(vCnt, pRows) = 0 THEN
vText := vText||pText(vCnt)||'\n';
UTL_FILE.PUTF(vFtype,vText);
UTL_FILE.FFLUSH(vFtype);
vText := '';
ELSIF vRowcnt = vRem THEN
vText := vText||pText(vCnt)||'\n';
UTL_FILE.PUTF(vFtype,vText);
UTL_FILE.FFLUSH(vFtype);
ELSE
vText := vText||pText(vCnt)||'\n';
END IF;
vCnt := pText.NEXT(vCnt);
END LOOP;
UTL_FILE.FCLOSE(vFtype);
EXCEPTION
WHEN UTL_FILE.INVALID_OPERATION THEN
IF vMode = 'a' THEN
writeFile(pName, pText, pRows);
ELSE
RAISE;
END IF;
WHEN OTHERS THEN
dbms_output.put_line('ERROR...ERROR...SYSTEM_UTIL.APPENDFILE');
UTL_FILE.FCLOSE(vFtype);
RAISE;
END appendFile;
PROCEDURE appendFile(pName IN VARCHAR2, pText IN VARCHAR2)
IS
vFtype utl_file.file_type;
vMode VARCHAR2(2) := 'a';
BEGIN
vFtype := UTL_FILE.FOPEN(vDir, pName, vMode);
UTL_FILE.PUTF(vFtype, pText);
UTL_FILE.FFLUSH(vFtype);
UTL_FILE.FCLOSE(vFtype);
EXCEPTION
WHEN UTL_FILE.INVALID_OPERATION THEN
IF vMode = 'a' THEN
writeFile(pName, pText);
ELSE
RAISE;
END IF;
WHEN OTHERS THEN
dbms_output.put_line('ERROR...ERROR...SYSTEM_UTIL.APPENDFILE');
UTL_FILE.FCLOSE(vftype);
RAISE;
END appendFile;
PROCEDURE clearFile(pName IN VARCHAR2)
IS
vFtype utl_file.file_type;
vText VARCHAR2(2000);
vCnt BINARY_INTEGER;
vRem BINARY_INTEGER;
vRowcnt PLS_INTEGER := 0;
BEGIN
vFtype := UTL_FILE.FOPEN(vDir, pName, 'w');
UTL_FILE.PUTF(vFtype,'');
UTL_FILE.FFLUSH(vFtype);
UTL_FILE.FCLOSE(vFtype);
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('ERROR...ERROR...System_Util.CLEARFILE');
UTL_FILE.FCLOSE(vFtype);
RAISE;
END clearFile;
PROCEDURE checkSyntax(pSql IN VARCHAR2)
IS
sqlCur PLS_INTEGER := DBMS_SQL.OPEN_CURSOR;
errPos PLS_INTEGER;
sqlStmt VARCHAR2(2000);
BEGIN
sqlStmt := pSql;
DBMS_SQL.PARSE(sqlCur, sqlStmt, DBMS_SQL.NATIVE);
EXCEPTION
WHEN OTHERS THEN
errPos := DBMS_SQL.LAST_ERROR_POSITION;
DBMS_OUTPUT.PUT_LINE(SQLERRM);
DBMS_OUTPUT.PUT_LINE(sqlStmt);
DBMS_OUTPUT.PUT_LINE(' ');
DBMS_OUTPUT.PUT_LINE(LPAD('^', errPos, '-'));
DBMS_SQL.CLOSE_CURSOR(sqlCur);
END checkSyntax;
FUNCTION isEmpty(pValue IN VARCHAR2) RETURN BOOLEAN
IS
BEGIN
IF pValue IS NULL OR pValue = '' OR pValue = ' ' THEN
RETURN TRUE;
ELSE
RETURN FALSE;
END IF;
END isEmpty;
FUNCTION getTimeInMins (pDate IN DATE) RETURN NUMBER
IS
vHours NUMBER;
vMins NUMBER;
vRetval PLS_INTEGER;
BEGIN
vHours := TO_NUMBER(TO_CHAR(pDate,'HH24'));
vMins := TO_NUMBER(TO_CHAR(pDate,'MI'));
vRetval := ((60 * vHours) + vMins);
RETURN vRetval;
EXCEPTION
WHEN OTHERS THEN
RAISE;
END getTimeInMins;
PROCEDURE getTimeInMins (pDate IN DATE)
IS
vHours NUMBER;
vMins NUMBER;
vRetval PLS_INTEGER;
BEGIN
vHours := TO_NUMBER(TO_CHAR(pDate,'HH24'));
vMins := TO_NUMBER(TO_CHAR(pDate,'MI'));
vRetval := ((60 * vHours) + vMins);
DBMS_OUTPUT.PUT_LINE('The time IN minutes IS: '||vRetval);
EXCEPTION
WHEN OTHERS THEN
RAISE;
END getTimeInMins;
FUNCTION incDate(pInc IN NUMBER DEFAULT .999999, pDate IN DATE DEFAULT SYSDATE) RETURN DATE
IS
BEGIN
RETURN (TO_DATE(TO_CHAR(pDate + pInc, 'DD/MM/YYYY HH24:MI:SS'), 'DD/MM/YYYY HH24:MI:SS'));
EXCEPTION
WHEN OTHERS THEN
RAISE;
END incDate;
FUNCTION decDate(pInc IN NUMBER DEFAULT .999999, pDate IN DATE DEFAULT SYSDATE) RETURN DATE
IS
BEGIN
RETURN (TO_DATE(TO_CHAR(pDate - pInc, 'DD/MM/YYYY HH24:MI:SS'), 'DD/MM/YYYY HH24:MI:SS'));
EXCEPTION
WHEN OTHERS THEN
RAISE;
END decDate;
FUNCTION getTime RETURN NUMBER
IS
BEGIN
RETURN dbms_utility.get_time;
END getTime;
FUNCTION daysDiff(pHigh IN DATE, pLow IN DATE) RETURN NUMBER
IS
vHighdate DATE;
vLowdate DATE;
BEGIN
IF pHigh > pLow THEN
vHighdate := TO_DATE(TO_CHAR(pHigh, 'YYYYMMDD'), 'YYYYMMDD');
vLowdate := TO_DATE(TO_CHAR(pLow, 'YYYYMMDD'), 'YYYYMMDD');
ELSIF pLow > pHigh THEN
vHighdate := TO_DATE(TO_CHAR(pLow, 'YYYYMMDD'), 'YYYYMMDD');
vLowdate := TO_DATE(TO_CHAR(pHigh, 'YYYYMMDD'), 'YYYYMMDD');
END IF;
RETURN (vHighdate - vLowdate);
EXCEPTION
WHEN OTHERS THEN
RAISE;
END daysDiff;
PROCEDURE dateCheck(pDateFrom IN OUT DATE, pDateTo IN OUT DATE)
IS
/* Declare the variable to hold the "from" date */
vDateFrom DATE;
BEGIN
/* If either date_from or date_to is null then set to todays date **
** using the sysdate **
** today's DATE AND IN the correct format */
pDateFrom := NVL(pDateFrom, SYSDATE);
pDateTo := NVL(pDateTo, SYSDATE);
/* Check that the from date is not greater than the to date if so **
** use the system_util.incDate to Increment the date by 1 day */
IF (pDateFrom > pDateTo) THEN
vDateFrom := pDateFrom;
pDateTo := System_Util.incDate(1, vDateFrom);
END IF;
EXCEPTION
WHEN OTHERS THEN
RAISE;
END;
/* calculates the difference of two numbers always taken the high from the low*/
FUNCTION difference(pAnum IN NUMBER, pBnum IN NUMBER)RETURN NUMBER
IS
vTotal NUMBER;
BEGIN
IF (pAnum > pBnum )OR (pAnum = pBnum)THEN
vTotal := (pAnum - pBnum);
ELSIF (pAnum < pBnum) THEN
vTotal := (pBnum - pAnum);
END IF;
RETURN (vTotal);
EXCEPTION
WHEN OTHERS THEN
RAISE;
END difference;
/* calculates the Total of two numbers*/
FUNCTION total(pAnum IN NUMBER, pBnum IN NUMBER)RETURN NUMBER
IS
vTotal NUMBER;
BEGIN
vTotal := (pAnum + pBnum);
RETURN (vTotal);
EXCEPTION
WHEN OTHERS THEN
RAISE;
END total;
FUNCTION numberToWords(pNumb IN NUMBER) RETURN VARCHAR2
IS
vRetval VARCHAR2(255);
vNumb PLS_INTEGER;
BEGIN
vNumb := pNumb;
vRetval := REPLACE(TO_CHAR(TO_DATE(vNumb,'j'),'jsp'),'-',' ');
RETURN (vRetval);
EXCEPTION
WHEN OTHERS THEN
RAISE;
END;
/*************** Only Available on 8i ********************************\
FUNCTION Catcherr(pStr IN VARCHAR2) RETURN VARCHAR2
IS
LANGUAGE JAVA
NAME 'catchErr.run(java.lang.String) return String';
PROCEDURE runShell(pCmnd IN VARCHAR2, pErrMsg IN OUT VARCHAR2)
IS
BEGIN
pErrMsg := Catcherr(pCmnd);
EXCEPTION
WHEN OTHERS THEN
RAISE;
END runShell;
BEGIN
getDir;
END;
Maybe you are looking for
-
Plot a chart dynamically based on the values selected
Hi All, I have some requirement like this i want to plot a chart . The chart should change dynamically based on target_name and date. What type of UI should I use ? I tried using multiselect or shuttle for choosing the target_name and date picker too
-
Hi It is required to create office document (can be word, Excel, PowerPoint etc) from predefined template with security markings programmatically within SharePoint Document libraries.. help with example source and references appreciated. Best
-
Screen problems after Mountain Lion Update
I am getting the Kernal Panic after waking from sleep mode. Also, I am getting this strange screen after logging in and right before the screen comes up (see attached image). Any thoughts or help would be appreciated. Thanks, Chris
-
I was experimenting with using workspace manager (via DBMS_WM) to version a set of tables. Does everything I want, easily and quickly. However, when I update versioned objects in APEX, and then look at the HIST table, the user name is APEXPUBLIC_USER
-
Ordering Repeating All-Day Events on the calendar
Is it possible to order a list of all-day events that are repeating on multiple days of a calendar?