Converting .rpt file code into Perl code

Hi All,
I have some .rpt file which contains the following code to generate the report in Oracle
.declare booking_no a13
.declare line_code a10
.declare line_booking a12
.declare book_date a11
.declare taken_by a10
.declare ud a10
.declare ship_name a40
.declare ship_addr1 a40
.declare ship_addr2 a40
.declare ship_addr3 a40
.declare ship_cont a20
.declare ship_phone a20
.declare ship_ref a20
.declare fwdr_name a40
.declare po_no a20
.declare vessel_name a25
.declare voyage a10
.declare etd_origin a11
.declare sail_date a11
.declare origin_name a20
.declare load_name a20
.declare disch_name a20
set page_no 1
.set first "N"
.set no_more_clauses "N"
.declare dest_name a20
.declare disch_code a4
.declare dest_code a4
#dt 1 1 80 #
#dt 2 1 6 9 48 50 61 63 76 80 80 #
#dt 3 1 13 15 34 36 40 42 56 58 62 64 74 75 79 #
#dt 4 1 13 15 49 53 64 66 80 #
#dt 5 1 15 18 52 #
.define lock_tables
lock table booking_table, booking_hazmat, custdata2, edit_table,
booking_rates, printer_table in share update mode
.define get_input
select passkey, '//FAX(fax=' || passkey1, passkey2,
passkey3, passkey4, printer_name
into input_booking_seq, fax_header, file_no,
input_print_rates, myNoteId, printer_name
from edit_table
where edit_table.tag = 'BOOKING'
and edit_table.key = 'PRINT'
and edit_table.user_id = user
.define get_user_info
select user_location,user_name, user_company, &fax_header || ';style=' || letterhead,
fax_printer, nvl(fax_yn,'N')
into user_location, user_name, user_company, fax_header, fax_printer, fax_yn
from security_header
where user_id = lower(substr(user,5,10))
.define get_fax_printer
select &fax_header || ';print = Confirm;printer = ' || &fax_printer || ')'
into fax_header
from dual
.define printMsg
.execute formatMsg
.if "&myNote = 'N/A' " then skipMyNote
.print myNote
.&skipMyNote
.if "&myNoteExt = 'N/A' " then skipMyNoteExt
.print myNoteExt
.&skipMyNoteExt
.add line_count line_count 9
.execute lock_tables
.execute get_input
.execute printer_controls
.execute get_top
.execute get_user_info
.execute get_user_office
.rem --------- this section is added to print bookings by file -------
.ifnull file_no skip_by_file
.report get_lots file_loop
.goto skip_to_end
.&skip_by_file
.rem ------------------------------------------------------------------
.if "&fcl_lcl = 'F' " then ck_fcl
.execute adjust_letterhead_lcl
.goto skip_over_fcl
.&ck_fcl
.execute adjust_letterhead_fcl
.&skip_over_fcl
.if "&fax_yn = 'N' " then skip_confirm
.execute get_fax_printer
.goto skip_to_booking
.&skip_confirm
.execute set_no_confirm
.&skip_to_booking
.print_info
I need to code to create a generic parser which actually convert the above code in a .rpt file into perl code and then finally the perl code could generate the report ...
Please help me out for this to process and suggest me if there is any parser module available for that ....
Shelley

Is this topic is very new to all programmers????
Or is it a fake topic to ask???

Similar Messages

  • How to transform this pascal code into java code!

    I want to transform this pascal code into java code . Please tel me how to do it because I really don't know how to do it!
    Thanks!
    {CALCULATE HOHN-LONDON FACTORS}
    var kk:tab4;
    PROCEDURE INTENS(var kk:tab4);
    begin
    for n:=0 to nr+2 do
    begin
    kk^[1,n]:=sqrt(lup*lup*yg*(yg-4)+4*sqr(n+1)) +lup*(yg-2);
    kk^[2,n]:= sqrt(lup*lup*yg*(yg-4)+4*sqr(n+1))-lup*(yg-2);
    kk^[3,n]:=0.5*(kk^[1,n]*kk^[1,n]+4*(sqr(n+1)-lup*lup));
    kk^[4,n]:= 0.5*(kk^[2,n]*kk^[2,n]+4*(sqr(n+1)-lup*lup));
    kk^[5,n]:= sqrt(ldown*ldown*yd*(yd-4)+4*sqr(n+1)) +ldown*(yd-2);
    end;
    end;
    BEGIN
    new (kk);
    intens(kk);
    writeln(f2,' ','N ','V','branch ','H-L');
    for n:=1 to np do
    begin
    fp1[n,v]:=(n-ldown)*(n+ldown+1)*sqr(kk^[2,n-1]*kk^[6,n]+4*(n+ldown)*(n-ldown+1));
    fp1[n,v]:=fp1[n,v]/(4*(n+0.5)*kk^[4,n-1]*kk^[8,n]) ;
    writeln(f2,' ',n,' ',v,' fp1 ',fp1[n,v]:10:2);
    end;
    for n:=1 to nq do
    begin
    fq1[n,v]:=sqr(kk^[2,n]*kk^[6,n]*(ldown+0.5)+4*(n-ldown+1)*(n+ldown+1)*(ldown-0.5)) ;
    fq1[n,v]:=fq1[n,v]/(2*(n+0.5)*kk^[4,n]*kk^[8,n]*(n+1.5));
    fq1[n,v]:=fq1[n,v]*(n+1);
    writeln(f2,' ',n,' ',v,' fq1 ',fq1[n,v]:10:2);
    end;
    for n:=1 to nr do
    begin
    fr1[n,v]:=sqr(kk^[2,n+1]*kk^[6,n]+4*(n-ldown+2)*(n+ldown+1));
    fr1[n,v]:=fr1[n,v]/(4*kk^[4,n+1]*kk^[8,n]*(n+1.5));
    fr1[n,v]:=fr1[n,v]*(n-ldown+1)*(n+ldown+2) ;
    writeln(f2,' ',n,' ',v,' fr1 ',fr1[n,v]:10:2);
    end;

    Basically it looks like this:
    public class KK{
         private your_type[][] kk = new your_type[length][length];
         private void intens(your_type[] kk){
              for(int n= 0; n<nr+2; n++){
                   kk[1][n] = Math.sqrt(lup*lup*yg*(yg-4)+4*Math.pow((n+1), 2)) +lup*(yg-2);
                   kk[2][n] = Math.sqrt(lup*lup*yg*(yg-4)+4*Math.pow((n+1), 2))-lup*(yg-2);
                   kk[3][n] = 0.5*(kk[1][n]*kk[1][n]+4*(Math.pow((n+1), 2)-lup*lup));
                   kk[4][n] = 0.5*(kk[2][n]*kk[2][n]+4*(Math.pow((n+1), 2)-lup*lup));
                   kk[5][n] = Math.sqrt(ldown*ldown*yd*(yd-4)+4*Math.pow((n+1), 2)) +ldown*(yd-2);
         public static void main(String args[]){
              KK k = new KK();
              k.intens(kk);
              System.out.println(f2  + ' ' + 'N ' + 'V' + 'branch ' + 'H-L');
              for(int n=1; n < np; n++){
                   fp1[n][v] = (n-ldown)*(n+ldown+1)*Math.pow((kk[2][n-1]*kk[6][n]+4*(n+ldown)*(n-ldown+1)), 2);
                   fp1[n][v] = fp1[n][v]/(4*(n+0.5)*kk[4][n-1]*kk[8][n]) ;
                   System.out.println(f2 + ' ' + n + ' ' + v + ' fp1 ' + fp1[n][v]:10:2);
              for(int n=1; n< nq;n++){
                   fq1[n][v] = Math.pow((kk[2][n]*kk[6][n]*(ldown+0.5)+4*(n-ldown+1)*(n+ldown+1)*(ldown-0.5)), 2);
                   fq1[n][v] = fq1[n][v]/(2*(n+0.5)*kk[4][n]*kk[8][n]*(n+1.5));
                   fq1[n][v] = fq1[n][v]*(n+1);
                   System.out.println(f2 + ' ' + n + ' ' + v + ' fq1 ' + fq1[n][v]:10:2);
              for(int n=1; n < nr; n++){
                   fr1[n][v] = Math.pow((kk[2][n+1]*kk[6][n]+4*(n-ldown+2)*(n+ldown+1)), 2);
                   fr1[n][v] = fr1[n][v]/(4*kk[4][n+1]*kk[8][n]*(n+1.5));
                   fr1[n][v] = fr1[n][v]*(n-ldown+1)*(n+ldown+2) ;
                   System.out.println(f2 + ' ' + n + ' ' + v + ' fr1 ' + fr1[n][v]:10:2); //fr1[n][v]:10:2 --> Here you must use the BigDecimal class
    }I'm not very sure because my pascal knowledge is extremely "dated".
    What about the converter I told you about?

  • Convert the signed message into base64 code in file receiver adapter

    Hi,
    I have 2 sequence steps in my scenario.
    Step1
    I want to convert the message with signed certifcates and send the file with  base 64 code format.
    Solu:
    1.I deployed the certificate in file adapter (The corresponding key/certificate pair must previously be saved in a keystore view of the J2EE server by using the Visual Administrator)
    2.for to change the File type content to base 64 code format .
    solu:
    File type in receiver communication channel is Binary.
    please suggest what value i need  to provide below
    anonymizer.encoding = ?(using the XMLAnonymizerBean in the module tab giving the value
    Step2.
    after that i wantt to pick up the file with base 64 code format (Which was created in step 1) and place the content to field with xsd type base64 Binary .
    for this we can pick up using file adapte or we need to use any module in the sender file module tab of the communication channel?
    Please suggest.

    HI Hyma,
    As Stefan specifyed already as per my knowledge we dont have any standard procedure for all the requirements you specified.....we need to go for module in the adapter.
    Cheers!!!
    Naveen.

  • Converting Flat File data into XML

    Hi Experts,
    Consider the message type of the SENDER system and flat file data
    <dt_sender>
    <root>
    <header1>   0..1
        <f1>
        <f2>
        <f3>
    <header2>   0..1
        <f4>
        <f5>
        <f6>
    <item>        1..unbounded
        <f7>
        <f8>
        <f9>
        <f10>
        <f11>
        <f12>
    </item>
    abc     def     ghi     jkl     mno     pqr
    123     123     123     123     123     123
    456     456      456     456     456     456
    how to convert the flat file data into following XML data. please note that each field value is separated by TAB delimeter...wht parameters shld b used
    <root>
        <Header1>
            <f1>abc</f1>
            <f2>def</f2>
            <f3>ghi</f3>
        </Header1>
        <Header2>
            <f4>jkl</f4>
            <f5>mno</f5>
            <f6>pqr</f6>
        </Header1>
        <item>
            <f7>123</f7>
            <f8>123</f8>
            <f9>123</f9>
            <f10>123</f10>
            <f11>123</f11>
            <f12>123</f12>
            <f7>456</f7>
            <f8>456</f8>
            <f9>456</f9>
            <f10>456</f10>
            <f11>456</f11>
            <f12>456</f12>
        </item>
    points will be given to the correct answers
    Thanks in advance.
    FAisal
    Edited by: Abdul Faisal on Feb 29, 2008 5:53 AM

    Faisal,
    When you read the multiple recordset strucutre file then each record in txt file should have an header from which you can identiy which segment it should go.. and you identiy it by using the keyfiledValue in file adapter
    <root>
    <header1> 0..1
    <f1>
    <f2>
    <f3>
    <header2> 0..1
    <f4>
    <f5>
    <f6>
    <item> 1..unbounded
    <f7>
    <f8>
    <f9>
    <f10>
    <f11>
    <f12>
    </item>
    for this input file
    abc def ghi jkl mno pqr
    123 123 123 123 123 123
    456 456 456 456 456 456
    abc def ghi can be read using the file adater to header 1 usinfg key field value, but using the same file adapter you cannt put GHI into header2.
    else you should read whole row abc def ghi jkl mno pqr in single filed and write an UDF to split data to header1 and Header 2
    similarly you have to take care for item records also
    if your inout file is something like this
    abc def ghi
    jkl mno pqr
    123 123 123 123 123 123
    456 456 456 456 456 456
    abc identifies to Header 1
    JKL for Header 2  so on...
    read the whole line in single field  and write UDF to Split to header 1 and header 2 similary for item.

  • Why does my converted PDF file show up as code and not in English?

    When I convert my PDF file to word, it shows up in code vs. English.  Parts are in English but most is not.  Any suggestions?

    Hi,
    I am moving your posting at Acrobat.com Forum to ExportPDF Forum.
    I will know more once I see the PDF file, but am assuming that your PDF file was scanned images(OCR could not recognize some images as correct characters) or some encoding issue how PDF was created.
    Please send me your PDF file at below site so that I can review your file.
    https://adobeformscentral.com/?f=qJiclooYWGGNFtWfj8g3wg
    thank you.
    Hisami

  • Convert full telephone No. into country code, phone, extension format...

    Is there way of converting a full telephone number down into a country codedialling codenumber+extension. For example, a number like +4478631234678 is shown in Account/contact screens in CRM in this very format, but when I extract the telephone number using the FM 'CRM_BUPA_CONTACT_ADDRESS' I get the telpehone number in the format of  4478631234678 instead of   country codedialling codenumberextensionn format.
    When I update the Contact details using FM 'BAPI_BUPA_ADDRESS_CHANGE' I ideally need to update multiple fields rather than one number field.
    It would therefore be handy to find some routine which converts a number like 4478631234678 into  country codedialling codenumberextension format.
    Jason

    Hi Jason,
    Go to SE80 -> Function Group and choose function Groups as PHOC.
    I think FM: CANONICAL_NO_BUILD should help. Just read the documentation in code. You can massage the data before passing to this FM. There are other FM's in this function group you might look for help.
    Hope it helps.
    Regards
    Apoorva

  • How to convert class file to Java source code ?

    Hi All ,
    Currently am working in Peoplesoft Demo project using java as Plug in.We have only the class files and jar files and we have planned to modify the code for future enhancements.We dont have any legal issues here as we are already working with our client for the original source code.
    Kindly help me out in doing this reverse engineering process.We have come to know the below steps would help us out.Can someone guide us in acheiving this process step by step.Please add your experience here and let us know what are the other steps required ..
    (1)Rename the file from .jar to .zip and extract the .zip file.
    (2)Decompile the desired .class file using 3rd party tool and get .java file.
    (3)Modify the .java file and compile it.
    (4)Now zip the extracted files and rename the it from .zip to .jar.
    We need to verify whether the modified .jar file will work
    Thanks & Regards
    Kar1983

    Thanks for your reply ....We have asked them so many times ..but they say they dont have it .Since we have planned to do some enhancements from our end we have planned to do reverse engineering process.

  • Converting CPP code into JAVA Code

    i have made a cpp file that is running fine... is ther a tool which can convert that cpp file into java file easily?

    No

  • How to convert workflow template number into transation code?

    Hi Experts,
    We are using WS20000081 Leave request workflow in SAP 4.7.I created one customized workflow according to the client requirement.How can i convert WS99900009 into Transaction?
    I created one absence type with workflow template WS99900009.While applying a leave it is showing the erroe as "WS99900009 is unknown" .
    Please help me to resolve this problem.
    Thanks,
    Hemalatha

    Hi Arun
    WS20000081  and WS04200009 are triggering  when i applied a leave.But i need to add some amore task in that.For that i created the Customized workflow.Then we tried to create Rule groups with custom workflow id number in ESS settiongs.It was saying that ws99900009 is unknown.And we tried to replace the WS20000081 by ws99900009.It was alos saying that ws99900009 transaction is unknown.
    So pls guide me how to convert ws99900009 into transaction?
    Thanks in advance
    Regards,
    Hemalatha

  • High Priority:-How to convert XMLSchema file (.xsd ) into .rtf file

    Hi...
    Hope you are doing well.
    I request you to help us with an issue encountered on 'generating reports using XML Publisher', which is described as followed.
    We have taken report from Oracle Apps and stored as XML file , then converted into XML Schema (.xsd) through Stylus Studio and uploaded that file into XML Publisher Desktop.
    Now, we want to convert .xsd into .rtf file for the requirement.
    Please revert back if the issue is not clear enough.
    Your help is needed and appreciated.
    Thanks&Regards,
    Suresh.

    Hi Suresh,
    XSD file is an XML Schema Definition file, it is used to validate and XML file in making sure elements are of the correct datatype, mandatory elements exist etc...
    It cannot be used to create an RTF file, as there is no layout definition within an XSD.
    You will need to create the RTF manually in this case using MS Word and Template Builder.
    I don't fully understand what you are trying to acheive, so maybe you could clarify further, and I may be able to help a little more.
    Many Thanks,
    Cj

  • Converting MS file folders into PDFs

    How can I convert large MS file folder's contents into individual PDF files?

    Hi;
    This would be a function of Acrobat.  I did a google search for "Batch create PDF" and found this article that goes over the process with screen shots:
    https://ithelp.muohio.edu/selfservice/rassp/KPListing/view2.jsp?k2dockey=040902616272515@k pol17&showbuttons=true&dontlog=false
    This forum is for FormsCentral, if you have any further questions about batch PDF creation in Acrobat here is the link to the Acrobat forums.
    http://forums.adobe.com/community/acrobat
    Thanks,
    Josh

  • Convert an file image into a PICT resource in a .r file

    Hi,
    I have a small image in a file (already converted to .pict format) and I would like to add this image as a PICT resource into an existing .r file in an xcode project. Is there a utility somewhere that will convert the image to the ascii hex format that's required for the .r file?
    Thanks,
    tom

    Thanks, but derez will not work in my case. The image in question is not in a resource fork. The image is in the data fork of a .pict file (originally converted from a .jpg file).
    The reason I need this is because I already have a complete application which makes a call to GetPicture() to obtain an image that is already located in a .r file as a resource 'PICT' { ... } . All I want to do is to replace existing image in the .r file with my new one. That's why I would like to convert my image into the ascii hex format required.
    I figure it must be something simple, but I haven't been able to find a tool to do this.
    Thanks,
    tom

  • How do I convert a wmv file format into an avi file format using quicktime 7 pro

    I have just purchased quicktime 7 pro under the advice that it can convert wmv. file formats into avi. file formats, my firat attempt to do this using export failed after I could not open the wmv. file format. can anyone help with the process? I have looked through the instructions and nothing in there suggests another alternative

    QuickTime cannot do this of iteslf: you need to add Flip4Mac:
    http://www.telestream.net/flip4mac-wmv/overview.htm

  • Copy HTML Code into DW?

    In CS6 I create a simple rectangle and increase the roundness of the rectangle. I then select the shape and choose edit > copy HTML code and I open Dreamweaver CS6 and paste the code into the code window. I thought it was supposed to write code to replicate the shape I created in FW, though instead it is just referencing a graphic of the shape I made in FW that was exported. What did I do wrong?
    Thanks.

    Use the CSS Properties panel, not Edit > Copy HTML Code.
    Create the rectangle
    Make sure it's selected
    Open the CSS propreties panel
    Click the Copy All button
    Go to Dreamweaver
    Create a Div and apply a class to the div
    Create a CSS class and within the rule, press Ctrl or Command + V to paste the CSS properties from Fireworks.
    Refresh the page (and switch to Live View) and you should see the rectangle, with all the supported visual properties, displayed using CSS.
    HTH

  • Where is the path of default.css the .rpt file

    I'm trying to use CSS in my report file, I in research on the internet see much talk of "set css class" I know I can assign this way the NAME of the css class, but I want to change the file CSS in itself, where it is? which the 'path' of him
    and where I find this way in the file?
    I'm using MVC C # to load the file and export in stream that converts PDF to display in the browser.
    To create the file I use Crystal Reports for VS2013 and within the own VS I create the rpt file
    Looking into this rpt the way for the much-talked 'default.css' you see in the internet research.
    wanted to change the path or know where it is to include classes on it.
    thank you

    Hi Ludvig,
    Thank you for posting in MSDN forum.
    Since this forum is to discuss: Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor. About you said the
    path of default.css for the .rpt file issue, I suggest you can ask your issue directly on SAP Crystal Reports:
    http://scn.sap.com/community/crystal-reports/content?filterID=content~objecttype~objecttype[thread] for
    better solution and support.
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • I can not take out the DVD RW disc from the drive PIONEER DVD-RW DVRTS09

    I have a iMac 2010. I can not take out the DVD RW disc from the drive PIONEER DVD-RWDVRTS09 Disk inside the computer. But there is no information about it on the desktop and server tools "Disk Utility" What should I do? Restart Computer literacy is a

  • Dreamweaver CS6 won't open anymore due to Java SE 6 runtime???

    I can't open my Dreamweaver anymore.  I get this error message:  To open Adobe CS6 "Dreamweaver" you need to install the legacy Java SE 6 runtime - What is this and where do I get it from?

  • Need to repair grub/update to grub2 on old standard disk.

    Yes, I've botched the recent update. But I'm prepairing to chroot from an arch live disk and follow all the steps. But firstly it seems that my hastily grub update went wrong and I can only boot into the grub prompt. Almost no commands work from ther

  • INVOICE NOT BLOCKED FOR PAYMENT QM CONTROL

    Dear All, I have a scenario where I don't want to process the payment if Quality lot is not cleared or rejected. I understand this can be done by using control key 0007 and ticking the QM in procurment in QM view of Material master. I have done this

  • Audibe-shuffle problems just don't quit

    I am using an iPod shuffle, Mac OSX 10.4.3, both Apple's shuffle updates,and the latest iTunes. I listen to Audible books for at least 2.5 hours daily. I have been waiting for my listening experience to impro ve but it is getting worse. Each night i