AS/400: Change the field length

620 pts.
Tags:
AS/400
I have a file in that I need to change the one field length to 14. In the program I'm using move command to move one field to another field (i.e it's depends on another fields) and call to different programs. How to identify the which field is depends on another filed? (is it field reference file?) Please help me.
0

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.

Discuss This Question: 5  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.
  • philpl1jb

    Changing one character type field to a wider one?

    If that's the case I wouldn't expect there to be a need for a program.

    The CHGPF or the Sql ALTER TABLE could change the field length and take care of populating the field.

    Must be more to it, please specify.

    Need program help .. insert code

    54,090 pointsBadges:
    report
  • philpl1jb
    Now, rereading your question I am more confused.
    54,090 pointsBadges:
    report
  • chowas400
    Sorry philpl1jb, Actually this is a interview question..i'm also confuse but below is correct one. sorry for the troubling you again.

    I have a customer file, in that file we are using different fields(order_num, cus_name, purchase...).
    At the time of creation of a file we metioned field length of the order-num is 10.
    in a program i'm using this file and screens as mentioned below
    FEMP       IF   E           K DISK                     
    FSCRN1     CF   E             WORKSTN SFILE(BUFFER:RRN)

    here i declare a variable(Var1 length is 10). i'm using MOVE order_num  Var1 and
    call to some other program, here(called program) aslo using Move var1 var2,and call some other program, here also using move var1 var2 and so on...

     Now i want to change filed length of order_num to 14.As you said CHGPF is good but i need to change variable length too
    (i mean which variable is used in order_num field). if this file using only one program it's easy to find which varible using a particular field
    but here different called programs there..how to achieve this one?
    620 pointsBadges:
    report
  • ToddN2000
    Are you using the same variable name where it needs the larger size? IT sounds like you are building field in a KLIST run a few jobs and now they key for the next job need the order_num defined as 14 instead of 10.
    135,525 pointsBadges:
    report
  • philpl1jb
    Sorry, chowas400 I'm not interested.
    54,090 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.

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

Following

Share this item with your network: