ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

CPYFRMIMPF erroring out after V7R1 upgrade - Need help!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • CPYFRMIMPF erroring out after V7R1 upgrade - Need help!

    Hello Team,

    Here is what I am doing

    CRTPF FILE(QTEMP/&FILE) RCDLEN(1000) SIZE(*NOMAX)

    CPYFRMIMPF FROMSTMF('/ALLIANCE/QSH/SRPT1) TOFILE(QTEMP/SRPT1) MBROPT(*REPLACE) TOCCSID(37) RCDDLM(*LF) STRDLM(' ')

    It seems that in SRPT1 there are some null values because of this command is failing, is there is a way i can remove process the file without NULL values ?

    Thanks for your help in advance!

  • #2
    Re: CPYFRMIMPF erroring out after V7R1 upgrade - Need help!

    If that is an accurate copy/paste of the CPYFRMIMPF command, it looks to be incorrect. The FROMSTMF() parameter has an opening apostrophe, but no close.

    Why use a variable, &FILE, for CRTPF, but the literal name, SRPT1, for CPYFRMIMPF? And why use CPYFRMIMPF at all since this doesn't seem to be an actual "import" operation? Use CPYFRMSTMF instead.

    And can you show us any actual error condition (including message ID)?
    Last edited by tomliotta; August 22, 2013, 02:21 AM. Reason: Actual error request
    Tom

    There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

    Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

    Comment


    • #3
      Re: CPYFRMIMPF erroring out after V7R1 upgrade - Need help!

      Originally posted by naveen_hbtik
      It seems that in SRPT1 there are some null values because of this command is failing, is there is a way i can remove process the file without NULL values ?
      CPYFRMIMPF has a parameter of RPLNULLVAL(*FLDDFT) that can be used for this. Basically if a field in the import file is null, it will put the field default (usually blanks for character fields, or zeros for numeric fields) will be placed in the field if *FLDDFT is specified.

      Comment


      • #4
        Re: CPYFRMIMPF erroring out after V7R1 upgrade - Need help!

        Based upon the OP's title, it almost sounds like the command default for CPYFRMIMPF was probably changed at one time (like to Scott's suggestion above) and the V7.1 upgrade wiped that change out.
        Michael Catalani
        IS Director, eCommerce & Web Development
        Acceptance Insurance Corporation
        www.AcceptanceInsurance.com
        www.ProvatoSys.com

        Comment


        • #5
          Re: CPYFRMIMPF erroring out after V7R1 upgrade - Need help!

          Based on the CRTPF, I'm still not clear why CPYFRMIMPF is used... unless the two commands are unrelated and the CRTPF was included by accident. Null handling might be different in 7.1 from 6.1. I don't have 7.1 available, but I can't cause an error yet with nulls at 6.1 using the posted commands.
          Tom

          There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

          Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

          Comment

          Working...
          X