Plex 2E

 View Only
  • 1.  Determining the current Print File Record Format

    Posted Feb 18, 2011 09:30 AM
    Hi,

    May seem bizarre, but is there an easy way to determine, within the action diagram, what the record format name is, that is being processed within a PRTFIL?
    i.e. I am working in "USER: Process top of page" and need to determine what the VNM record format is. I can see from the DDS that it is ZAPAGHDR but cannot seem to get the data from any PGM Context field.

    Thanks,

    Sean.


  • 2.  RE: Determining the current Print File Record Format

    Posted Feb 18, 2011 12:04 PM
    Hi Sean,

    Indeed, this does seem like a bizarre request :)

    Looking through the generated code, for PAGHDR (mine is $PAGHDR), there is nothing that can be interrogated to determine what the current record format is.

    It's possible that the File Information Data Structure might have the last record format written, but that doesn't help until after the fact.

    I have to ask. What are you trying to do? Might have some suggestions if that was understood.

    Crispin.


  • 3.  Re: Determining the current Print File Record Format

    Posted Jul 31, 2015 04:59 AM

    Hi Crispin.

    Just realised I never replied to your response.

    I was looking for a solution to use existing print files, containing overly-complex logic, to push the same data to an XML file, instead of coding from scratch and copy and pasting code in.

    I ended up using a *Y spec entry to perform a scan of the source, so where each print line was being written I added in a MOVE to store the record format content, that would allow me to process, into XML, the data fields I needed using a file field definition table that holds the relevant tag information.

    So I did not need the record format name any more as I merely re-programmed the source to output what I wanted.

    A few anomalies occur using a print file though due some strange legacy code to try and control the data flow within, but these were overcome in time.

    Sean