negative sign in physical file copy process

280 pts.
Tags:
AS 400
Physical File

this is regarding copy file.

I have a physical file P1 and physical file P2. Now in P1 i have a zoned decimal field and in P2 i have a packed decimal field.  let us assume i have the negative data in P1.

after performig the CPYF to copy the P1 to P2, i am getting some junk characters ( '}', 'M', 'S' and etc) in file P2.

These junk characters are appearing when used the DSPPFM option on P2. is this is the format to use indicating the negative sign?

 

 

 

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 8  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    The results are probably correct and should be expected. The packed decimal values will give various characters because the data is "packed". To be sure they are correct, we would need to know the hexadecimal values for each byte. DSPPFM cannot show the unconverted values for packed (nor for binary) data values. -- Tom
    125,585 pointsBadges:
    report
  • philpl1jb

    on your CPYF you set the Record format field mapping FMTOPT  to *MAP ???

     

    49,850 pointsBadges:
    report
  • sivakesava
    i used the *MAP and *DROP in CPYF
    280 pointsBadges:
    report
  • sivakesava

    in the above case, if the P1 is packed and P2 is Zone then is it true in that case also?

    280 pointsBadges:
    report
  • TomLiotta

    ...is it true in that case also?

    Is what true?

    Tom

    125,585 pointsBadges:
    report
  • philpl1jb

    If the data starts our valid, the CPYF with *MAP and *DROP will convert the data from Packed to Signed or from Signed to Packed. 

    If the data is invalid the copy will stop unless you use the Errors allowed keyword.

    49,850 pointsBadges:
    report
  • philpl1jb
    our shoud be out .. as 'if the data starts out valid'
    49,850 pointsBadges:
    report
  • TomLiotta
    Regardless of 'Errors allowed', the resulting data should be correctly formatted even if errors exist in the input. If FMTOPT(*NOCHK) is explicitly stated, the results might be trouble. -- Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following