[NEWSboard IBMi Forum]
  1. #1
    Registriert seit
    Nov 2006
    Beiträge
    38

    INFDS und Post?

    Hallo,

    ich habe da mal eine Frage: Wie funktioniert das mit dem Post bei INFDS? Ich habe folgenden Code geschrieben:

    PHP-Code:
    C Post PANRAKTD2 PDINFDS
    EVAL msg PGM_DEV_P 
    C msg DSPLY 
    PANRAKTD2 ist mein Display File.
    PDINFDS die DS.

    Nun habe ich das Problem, dass die meisten Felder einfach gar nicht gefüllt sind, oder irgendwelche Zeichen enthalten. Was mache ich da falsch? Bzw. hat jemand ein Beispiel für mich wie der Post auszuführen ist?

    Robert

  2. #2
    Registriert seit
    Feb 2001
    Beiträge
    20.236
    Die INFDS muss in den F-Bestimmungen angegeben werden !

    Ansonsten benötigst du den POST überhaupt nicht, da die INFDS automatisch nach jeder E/A-Operation aktualisiert wird.
    Dienstleistungen? Die gibt es hier: http://www.fuerchau.de
    Das Excel-AddIn: https://www.ftsolutions.de/index.php/downloads
    BI? Da war doch noch was: http://www.ftsolutions.de

  3. #3
    Registriert seit
    Nov 2006
    Beiträge
    38
    Zitat Zitat von Fuerchau
    Die INFDS muss in den F-Bestimmungen angegeben werden !

    Ansonsten benötigst du den POST überhaupt nicht, da die INFDS automatisch nach jeder E/A-Operation aktualisiert wird.
    Hi,

    F-Bestimmungen sieht wie folgt aus:

    PHP-Code:
    FPANRAKTD2 CF E WORKSTN INFDS(PDINFDS
    Das sollte doch funktionieren, oder?

    Robert

  4. #4
    Registriert seit
    Feb 2001
    Beiträge
    20.236
    So kenne ich es, aber:

    Verwendest du die Anweisung POST wird nicht automatisch aktualisiert sondern nur wenn POST ausgeführt wird.
    Lass einfach die Anweisung aus der Quelle raus.
    Dienstleistungen? Die gibt es hier: http://www.fuerchau.de
    Das Excel-AddIn: https://www.ftsolutions.de/index.php/downloads
    BI? Da war doch noch was: http://www.ftsolutions.de

  5. #5
    Registriert seit
    Nov 2006
    Beiträge
    38
    Zitat Zitat von Fuerchau
    So kenne ich es, aber:

    Verwendest du die Anweisung POST wird nicht automatisch aktualisiert sondern nur wenn POST ausgeführt wird.
    Lass einfach die Anweisung aus der Quelle raus.
    Wenn ich die Anweisung Post weglasse, dass passiert noch weniger!? In der Definition (http://www.code400.com/datastructures.php) steht extra dabei, dass vorher ein Post ausgeführt werden soll.

    Robert

  6. #6
    Registriert seit
    Feb 2001
    Beiträge
    20.236
    The POST operation puts information in an INFDS (file information data
    structure). This information contains the following:
    v File Feedback Information specific to RPG I/O for the file
    v Open Feedback Information for the file
    v Input/Output Feedback Information and Device Dependent Feedback
    Information for the file OR Get Attribute Information
    The program-device operand specifies a program device name to get information
    about that specific program device. If you specify a program device, the file must
    be defined as a WORKSTN file. If program-device is specified, then the INFDS will
    contain Get Attribute Information following the Open Feedback Information. Use
    either a character field of length 10 or less, a character literal, or a character named
    constant. If program-device is not specified, then the INFDS will contain
    Input/Output Feedback Information and Device Dependent Feedback Information
    following the Open Feedback Information.
    Specify the name of a file in the file-name operand. Information for this file is
    posted in the INFDS associated with this file.
    In free-form syntax, you must specify a file-name and cannot specify an INFDS
    name. In traditional syntax, you can specify a file-name, an INFDS name, or both.
    v If you do not specify an INFDS name, the INFDS associated with this file using
    the INFDS keyword in the file specification will be used.
    v If you do not specify an INFDS name in traditional syntax, you must specify the
    data structure name that has been used in the INFDS keyword for the file
    specification in the result field; information from the associated file in the file
    specification will be posted.
    To handle POST exceptions (file status codes greater than 1000), either the
    operation code extender ’E’ or an error indicator ER can be specified, but not both.
    For more information on error handling, see “File Exception/Errors” on page 65.
    Even when a POST operation code is not processed, its existence in your program
    can affect the way the RPG IV language operates. Usually, the INFDS is updated at
    each input and output operation or block of operations. However, if anywhere in
    your program, you have specified a POST operation with no program-device
    specified, then RPG IV updates the I/O Feedback Information area and the Device
    Dependent Feedback Information area in the INFDS of any file only when you
    process a POST operation for that file. The File Dependent Information in the
    INFDS is updated on all Input/Output operations. If you have opened a file for
    multiple-member processing, the Open Feedback Information in the INFDS will be
    updated when an input operation (READ, READP, READE READPE) causes a new
    member to be opened.

    Note that DUMP retrieves its information directly from the Open Data Path and
    not from the INFDS, so the file information sections of the DUMP do not depend
    on POST.
    If a program has no POST operation code, or if it has only POST operation codes
    with program-device specified, the Input/Output Feedback and Device Dependent
    Feedback section is updated with each input/output operation or block of
    operations. If RPG is blocking records, most of the information in the INFDS will
    be valid only for the last complete block of records processed. When doing blocked
    input, from a data base file, RPG will update the relative record number and key
    information in the INFDS for each read, not just the last block of records
    processed. If you require more accurate information, do not use record blocking.
    See “File Information Data Structure” on page 65 for more information on record
    blocking. If you do not require feedback information after every input/output
    operation, you may be able to improve performance by using the POST operation
    only when you require the feedback information.
    When a POST operation is processed, the associated file must be open. If you
    specify a program device on the POST operation, it does not have to be acquired
    by the file.

    Ich habe die POST-Anweisung noch nie verwendet und die INFDS ist immer korrekt gefüllt.
    Dienstleistungen? Die gibt es hier: http://www.fuerchau.de
    Das Excel-AddIn: https://www.ftsolutions.de/index.php/downloads
    BI? Da war doch noch was: http://www.ftsolutions.de

  7. #7
    Registriert seit
    Nov 2006
    Beiträge
    38
    Zitat Zitat von Fuerchau Beitrag anzeigen
    Ich habe die POST-Anweisung noch nie verwendet und die INFDS ist immer korrekt gefüllt.
    Hi Fuerchau,

    ich habe es ausprobiert. Leider benötige ich einen POST! Ohne POST ist der Dev. Typ nicht gefüllt - mit schon. Anscheinend werden nur bei einigen Felder ein POST benötigt.

    Robert

  8. #8
    Registriert seit
    Feb 2001
    Beiträge
    20.236
    OK, dann musst du den POST allerdings immer dann aufrufen, wenn du auf die aktuellen Daten zugreifen willst.
    Ansonsten ist nach READ/WRITE/EXFMT die INFDS ggf. nicht aktuell.
    Dienstleistungen? Die gibt es hier: http://www.fuerchau.de
    Das Excel-AddIn: https://www.ftsolutions.de/index.php/downloads
    BI? Da war doch noch was: http://www.ftsolutions.de

  9. #9
    Registriert seit
    Nov 2006
    Beiträge
    38
    Ja das stimmt. Für den device Typ ist dies nicht so wichtig, da er sich nicht während des Programmlaufs ändert. Also normalerweise ;-)

    Robert

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • You may not post attachments
  • You may not edit your posts
  •