Operating System - HP-UX
1826420 Members
3386 Online
109692 Solutions
New Discussion

Re: Duplex printing from oracle forms fix needed using SED

 
system administrator_15
Frequent Advisor

Duplex printing from oracle forms fix needed using SED

I have a problem duplex printing from oracle forms 6.
i have fount what seems to be the answer but are having problems making the SED script work.
the report looks like the before example in the attachment and i need it to look like the after example in the attachment.
it is worth mentioning that there is one instance of the BeginSetup section but multiple of the BeginPageSetup and all the instances need Setting as in the after section of the attachment.
There are currently two scripts that i have to run the output file though to get the desired affect they are as follows i want to do it in one script. i thought i had but it doesn't work( see Duplex2) and i still have to run it though Duplex1 manually as well.
Duplex1
s/Duplex None/Duplex/g
s/Duplex false/Duplex true/g
/^%%BeginPageSetup/,$ {
/^%%BeginFeature/,/^%%EndFeature/d
}

Duplex2
s/Duplex None/Duplex/g
s/Duplex false/Duplex true/g
/^%%BeginPageSetup/,$ {
/^%%BeginFeature/,/^%%EndFeature/d
}
/^%%BeginSetup/,$ {
/^%%BeginFeature/,/^%%EndFeature/d
}

help this has been giong on to long.
andrew


8 REPLIES 8
Tore_1
Regular Advisor

Re: Duplex printing from oracle forms fix needed using SED

perhaps you can just use a bunch of -e's to grep. For instance grep -e '^ITEM1' -e '^ITEM2' etc.
Seth Parker
Trusted Contributor

Re: Duplex printing from oracle forms fix needed using SED

Andrew,

Your example didn't have the Duplex settings in it, so I'm not sure where those fall. If they're not in one of the "Feature" sections, then the following seems to do what you want:

sed '/^%%BeginFeature/,/^%%EndFeature/d;s/Duplex None/Duplex/g;s/Duplex false/Duplex True/g'

If the Duplex settings are in the Feature sections, you'll have to play around with the hold space so you can put the change to the hold space, then copy it back out. It might be ugly, though.

Good luck!
Seth
system administrator_15
Frequent Advisor

Re: Duplex printing from oracle forms fix needed using SED

Thanks seth
this seems to work fine if i run it manually, but i need it to run from a batch job using forms 6.
i have been trying to use the TK_PRINT variable set up in the .KSHRC file in the users home directory.
but it doesn't seem to like the command when applied to a sed script and then read in at the appropriate time using TK_PRINT and sugestions as to what i should include in the sed script to get this to work.
regards
Andrew
Steve Steel
Honored Contributor

Re: Duplex printing from oracle forms fix needed using SED

Hi


Is this a network printer.

If so set up a copy of the printer only for the ORACLE and change the script for the copy printer to do duplex by default.

Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Steve Steel
Honored Contributor

Re: Duplex printing from oracle forms fix needed using SED

Hi

If you are usig a network printer then make a new printer in your spooler which is only for ORACLE and chenge the script in
/etc/lp/interface/model.orig to do duplex by default.

Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
system administrator_15
Frequent Advisor

Re: Duplex printing from oracle forms fix needed using SED

Thanks for the thought steve but already tried that and it doesn't work due to the fact that the begin feature/end feature section is overriding the default setting.
it seems to see this section and think that it is a new page each time.
system administrator_15
Frequent Advisor

Re: Duplex printing from oracle forms fix needed using SED

Thanks for the thought steve but already tried that and it doesn't work due to the fact that the begin feature/end feature section is overriding the default setting.
it seems to see this section and think that it is a new page each time.
regards
andy
Seth Parker
Trusted Contributor

Re: Duplex printing from oracle forms fix needed using SED

Unfortunately, I'm not familiar with Oracle Forms 6. How does it submit the jobs? If there's no spot for calling in an external process, I think you're out of luck.

Here's to good luck..!
Seth