How can i migrate Power Builder 8.0 Function into oracle PL/SQL

Hi Oracle Experts...
How can i migrate Power Builder 8.0 Function into oracle PL/SQL.. I had migrate some of the coding from PB to PL/SQL. But i don't know how can i convert PB structure(here structure is a data type) into oracle PL/SQL.
Instead of structure what is the equivalent in oracle plsql
Below i pasted my POWER BUILDER FUNCTION:
Long ll_perd,ll_lnperd,ll_mon,ll_effmon,ll_instno,ll_odno
Decimal{5} ldl_actual,ldl_diff,ldl_inst
Datetime ldt_first,ldt_exp,ldt_oddt, ldt_lastprod
String ls_instmode,ls_inst
str_batch lstr_od //Structure to store odamt and oddate
Select pay_c_final,lon_d_expiry, lon_d_lastprod
Into     :ls_inst,:ldt_exp, :ldt_lastprod
From      loan_mast
Where branch_c_code = :gs_branch and
          act_c_type      = :as_actype and
          act_c_no           = :as_acno;
If Sqlca.Sqlcode = -1 Then
     f_message('FT-0189',Sqlca.Sqlerrtext)
     lstr_od.batchslno = -1
     Return lstr_od
End If
If adt_prodt > ldt_exp Then
     Select Ceil(months_between(:adt_prodt,:ldt_exp)) Into :lstr_od.batchslno From dual;
     lstr_od.cheqdt = ldt_exp
     lstr_od.batchslno = DaysAfter(Date(ldt_lastprod), Date(adt_prodt))
Else
     If ls_inst = 'N' Then
          If adt_prodt > ldt_exp Then
               Select Ceil(months_between(:adt_prodt,:ldt_exp)) Into :lstr_od.batchslno From dual;
               lstr_od.cheqdt = ldt_exp
          Else
               lstr_od.batchslno = 1
          End If
     ElseIf ls_inst = 'Y' Then
          Select first_d_due,lon_c_instperd,lon_n_perd
          Into     :ldt_first,:ls_instmode,:ll_lnperd
          From     loan_mast
          Where branch_c_code = :gs_branch and
                    act_c_type      = :as_actype and
                    act_c_no          = :as_acno;
          If Sqlca.Sqlcode = -1 Then
               f_message('FT-0189',Sqlca.Sqlerrtext)
               lstr_od.batchslno = -1
               Return lstr_od // Return Structure
          End If
          Select Ceil(months_between(:adt_prodt,:ldt_first)) Into :ll_mon from dual;
          If ll_mon > 0 Then
               Select Nvl(ln_n_balance,0),Nvl(ln_n_instlamt,0),Nvl(ln_n_instlno,0)
               Into     :ldl_actual,:ldl_inst,:ll_instno
               From     loan_inst_sch
               Where act_c_type = :as_actype and
                         act_c_no     = :as_acno and
                         ln_d_effdate = (Select Max(ln_d_effdate)
                                                       From     loan_inst_sch
                                                       Where act_c_type = :as_actype and
                                                                 act_c_no     = :as_acno and
                                                                 ln_d_effdate < :adt_prodt);
               If Sqlca.Sqlcode = -1 Then
                    f_message('FT-0224', Sqlca.Sqlerrtext)
                    lstr_od.batchslno = -1
                    Return lstr_od
               ElseIf Sqlca.Sqlcode = 100 Then
                    lstr_od.batchslno = 1
*                    Return lstr_od*
               End If
               If adl_bal > ldl_actual Then
                    If ldl_inst > 0 Then
                         lstr_od.batchslno = (adl_bal - ldl_actual) / ldl_inst
                    End If
               Else
                    lstr_od.batchslno = 1
               End If     
               If lstr_od.batchslno = 0 Then lstr_od.batchslno = 1
               //For full OD
               If ll_mon > ll_lnperd Then
                    lstr_od.batchslno = (ll_mon - ll_lnperd) + lstr_od.batchslno
               End If
               If ls_instmode = 'Q' Then
                    lstr_od.batchslno = lstr_od.batchslno * 3
               ElseIf ls_instmode = 'H' Then
                    lstr_od.batchslno = lstr_od.batchslno * 6
               ElseIf ls_instmode = 'Y' Then
                    lstr_od.batchslno = lstr_od.batchslno * 12
               End If
               Select :adt_prodt - :lstr_od.batchslno Into :lstr_od.cheqdt From dual;
               If ls_instmode = 'M' Then
                    ll_odno = ll_instno - lstr_od.batchslno // To get OD Date
                    Select ln_d_effdate
                    Into     :lstr_od.cheqdt
                    From     loan_inst_sch
                    Where act_c_type = :as_actype and
                              act_c_no     = :as_acno and
                              ln_n_instlno = :ll_odno;
                    If Sqlca.Sqlcode = -1 Then
                         f_message('FT-0224', + Sqlca.Sqlerrtext)
                         lstr_od.batchslno = -1
                         Return lstr_od
                    End If
               End If
          Else
               lstr_od.batchslno = 1
          End If
     End If
End if
Return lstr_od
Thanks in adance
Arun M M

What are you going to return the structure to? What I would normally use here if the code was going to be used by other PL/SQL would be a PL/SQL object type.
However, if PowerBuilder is still in the equation (you're moving the logic to PL/SQL but keeping PowerBuilder for the GUI ), then you'll have to return something else, because PowerBuilder doesn't understand PL/SQL object types. Perhaps passing a REF CURSOR as a OUT argument and populating it from the procedure. PowerBuilder could then retrieve the result of the procedure using a stored procedure based DataWindow.

Similar Messages

  • How can I migrate my photos from iCloud Drive into iCloud Photos?

    So in the midst of a local backup issue I decided to take the plunge and purchase some 200GB of storage from our friends at Cupertino to store cherished family memories in the view that they would never be lost as I can trust Tim and Co. to look after them. (No issues in that dept by the way).
    However, after taking said plunge and uploading my entire back catalogue of photos/videos into an iCloud Drive "Photos backup" (original name I know) folder - i realised that iCloud Photos was becoming available - but I saw no option at the time to import such a vast amount.
    My question therefore... how can I now migrate these historic moments in time from my iCloud Drive into the iCloud Photos app?
    It's still using the same storage plan... just a 'move folder'.. right? well unless I'm being stupid (and I'm not ruling this out) - I can't see a way to do this.
    Has anyone else fallen into the same issue?
    Help me Apple-Fans, you're my only hope
    James

    You access them with the App responsible for the type of file.
    Read through this: iCloud Drive FAQ - Apple Support

  • How can I export my database created in Oracle8 into Oracle 8i/9i..

    I am running my database in Oracle8 and want to switch to Oracle8i. What procedure should I take to export my database into Oracle 8i/9i. Please help me .....
    my email is [email protected]
    Thanks in anticipation.
    Nadeem Iqbal Bhatti

    Please see the Oracle8i Migration Guide for 8i migrations.
    http://download.oracle.com/docs/cd/A87860_01/doc/server.817/a86632/toc.htm

  • How can I migrate everything from one account to another on same computer?

    How can I migrate everything from one account to another on same computer?

    Transferring files from one User Account to another

  • How can I migrate an Aperture library from an external HDD with Mac OS Extended (Journaled, Encrypted) format?

    How can I migrate an Aperture library from an external HDD with Mac OS Extended (Journaled, Encrypted) format?
    I used to store my pictures on an external hard drive using the latest version of Aperture. Now I tried migrating my Aperture library to Photos. However, after a short moment an error message popped up telling me that "Photos was unable to make a copy of your library before preparing it. Photos does not have the necessary permissions...".
    My external HDD doesn't need any permission repairs nor is the system prohibited to read from or write to it.
    Thanks for any advice in advance!
    Gohtac

    My guess is that the encryption is the problem for the new app.

  • How can I migrate data from an old MBA to a new one without having access to the screen of the old one? The screen of the old MBA is damaged !

    How can I migrate data from an old MBA to a new one without having access to the screen of the old one? The screen of the old MBA is damaged !

    If your "older" MBA has a Thunderbolt port then it isn't that old. See Target Disk Mode about how it's used. Note that without a monitor you won't be able to tell from the screen when it has fully started, and if it succeeded in starting in TDM. If it did, then the hard drive should appear on the Desktop of your new computer. You can then access it to transfer your files. You can even use Migration Assistant or any backup utility to transfer data. Just don't try to transfer system files.

  • How can i Migrate from EJB Application to Hibernate

    Hi ,
    i have developed web services using EJBs. can i create web services for my hybernate application. can anybody please help me for that??
    please advice me how can i Migrate from my EJB Apps to Hibernate.
    thanks & Regards,
    nagalaxmi

    Hi
    Check this link
    http://www.devx.com/Java/Article/27954
    Sameer

  • I'm trying to migrate from mobileMe to iCloud but I have Snow Leopard (the latest version). It looks like Lion is no longer available because Mountain Lion comes out next month (July). The problem is mobileMe ends on June 30th. How can I migrate?

    I'm trying to migrate from mobileMe to iCloud but I have Snow Leopard (the latest version). It looks like Lion is no longer available because Mountain Lion comes out next month (July). The problem is mobileMe ends on June 30th. How can I migrate?
    My iphone and my ipad are compatible but when I try to go to icloud on my phone it says to do it on my computer.
    I would like to have my calendar, contacts, etc.. all sync like they do now. Is there a way to upgrade before June 30th? If not, will the gap be an issue or will I just be able to buy mountain lion and sync everything?
    Any suggestions?
    Thank you!

    You can buy Lion in the App Store now, but move to iCloud now. If you wait to Mountain Lion, you will only have Mail in Snow Leopard, so you will lose syncing unless you use Lion or Mountain Lion. It's up to you

  • Firefox 27.0.1 crashes and slow dow, useless for me.I want to change IE, how can I migrating my bookmarks to IE?

    I used Firefox for more than 10 years (actual version 27.0.1). Since2-3 days Firefox crashes and slows down. I have already blocked all the additions, without any results. I have completely uninstalled and reinstalled Firefox, the situation remained the same. I can’t really use Firefox support, because I had to wait more than 5 minutes to open the page. I made 2 virus research (MS Security Essential, and MS anti malware) I did not have virus.
    I returned to the base state of Firefox, It fonctioned, but after the restart of Windows, it started again slow down.
    I tried IE it function well without any problem, but it’s slightly strange for me, but I have to work, so I must use another one if Firefox is dying on my computer.
    Unfortunately I have more than hundred important bookmarks in Firefox which are necessary for my daily work, so I can’t simply uninstall Firefox and use IE.
    My question: If Firefox is not reparable how can I migrating all my bookmarks to IE?
    Thank you in advance for your help and instructions

    First of all thank you for your response
    I saved all my bookmarks to a library (I have created a library) and I used the importation function of IE, but it was partially successful, more than 70 % of the bookmark has disappeared. I suppose it was a mistake of the conversion made by IE. So I uninstalled and reinstalled again Firefox, thereafter I reinstated the bookmarks.
    I suppose, that I found a reason for the crashes and the freezing, probably it was a consequence of the adobe flash player 12. It seems Firefox has a conflict with adobe flash player.
    So as conclusion I have trapped between Firefox and IE, Firefox does not work well on my computer, IE work, but without my bookmark and without my usual comfort and customization of my Firefox…
    Just a note: during this letter writing, Firefox has slowed down 2 times.
    Thank you in advance for your help.

  • HT201250 When migrating from time machine to my new hard drive, it migrates the first back-up I made several years ago. How can I migrate the latest back-up ?

    When migrating from time machine to my new hard drive, it migrates the first back-up I made several years ago. How can I migrate the latest back-up ? I need time machine to migrate the latest back-up. Should I delete the older back-ups ?

    As noondaywitch says, it should use the latest backup.
    Where are your backups (external HD, Time Capsule, etc.)?
    It sounds like there are two separate sets, and you're not connected to the right set.

  • How can we migrate bill presentment templates from DEV to PROD?

    Hi,
    E-business suite 11.5.10.2
    Once we have designed a bill presentment template in the development environment, how can we migrate it in other environments? (TEST, PROD).
    Thanks.

    Welcome to the forums !
    Pl see if MOS Doc 357797.1 (BPA - Is It Possible To Migrate BPA Content Items & Templates From One Instance To Another?) can help
    HTH
    Srini

  • How can I migrate data from SQL Server 6,5 to Oracle 8?

    We have a web site based on Microsoft SQL Server 6.5.Now we plan
    to migrate the database to Oracle 8.
    We have redesigned the tables structure and created tables under
    Oracle 8, so we only need to migrate data from SQL Server.
    We've exported data from SQL Server to text files.
    How can we import data from files and restore to Oracle tables.
    Is there a solution which let us to import data for particular
    table columns,not all columns?
    We'll be appreciated if somene can give suggestions.
    Regards
    Michael
    null

    Thank you for your reply.
    I'll try the Oracle sqlloader utility first.
    Regards
    Micahel
    Oracle Migration Workbench Team wrote:
    : Michael,
    : Oracle sqlloader is user for this sort of operation, see
    : Oracle8i Utilities
    : Release 8.1.5
    : A67792-01
    : available online through Oracle Technology Network.
    : The Oracle Migration Workbench can be used to create bcp and
    : sqlloader scripts, though since you have altered the schema
    these
    : scripts would need to be altered by hand after generation.
    : Some thought has been put into redesigning table structures in
    : the Oracle Migration Workbench, but currently it looks like
    this
    : reengineering will be left to be done by other tools, eg
    Oracle
    : Designer, once the SQLServer database has been duplicated with
    as
    : little change as possible onto Oracle.
    : Hope that helps,
    : Turloch
    : Oracle Migration Workbench Team
    : Michael (guest) wrote:
    : : We have a web site based on Microsoft SQL Server 6.5.Now we
    : plan
    : : to migrate the database to Oracle 8.
    : : We have redesigned the tables structure and created tables
    : under
    : : Oracle 8, so we only need to migrate data from SQL Server.
    : : We've exported data from SQL Server to text files.
    : : How can we import data from files and restore to Oracle
    tables.
    : : Is there a solution which let us to import data for
    particular
    : : table columns,not all columns?
    : : We'll be appreciated if somene can give suggestions.
    : : Regards
    : : Michael
    : Oracle Technology Network
    : http://technet.oracle.com
    null

  • I'm gonna to change machine. how can I migrate license between old to new PC? (creative cloud)

    how to switch license if I buy a new computer?
    sorry for my english

    thanks
    2014-11-14 0:23 GMT+01:00 Jeff A Wright <[email protected]>:
        I'm gonna to change machine. how can I migrate license between old to
    new PC? (creative cloud)
    Jeff A Wright
    <https://forums.adobe.com/people/JeffAWright?et=watches.email.outcome>
    marked John T Smith
    <https://forums.adobe.com/people/JohnTSmith?et=watches.email.outcome>'s
    reply on I'm gonna to change machine. how can I migrate license between
    old to new PC? (creative cloud)
    <https://forums.adobe.com/thread/1633443?et=watches.email.outcome> as
    helpful. View the full reply
    <https://forums.adobe.com/message/6923056?et=watches.email.outcome#6923056>

  • How can i migrate oracle database  data to DB2 database

    Hi
    how can i migrate oracle database data to db2 database.
    can anyone provide me solution.

    BTW why do you want to migrate oracle database data to db2 database? Any specific project requirement like Parallel run with Oracle database (e.g data replication)? Or any other issues - Cost? Manageability? Availability? Business requirements?
    Do you need to do a day-to-day data transfer or it is for permanent migration?

  • How Can I Migrate My Time Machine Backups To A New External Hard Drive?

    I have a external hard drive that has 500 GBs left, but I want to buy a larger drive.

    ivan wrote:
    How Can I Migrate My Time Machine Backups To A New External Hard Drive?
    I have a external hard drive that has 500 GBs left, but I want to buy a larger drive.
    Hi iVain
    Fire up *Disk Utility*, click the Restore tab, then drag your old and new TM drives into the Source and Destination fields. Click Restore, and a complete copy of your old TM files will be made on the new drive. Go to TM preferences and select the new drive, and it will continue backing up just as it left off.
    Hope this answers your question. See:
    http://discussions.apple.com/thread.jspa?threadID=2595485&tstart=0

Maybe you are looking for