cl which command do we use to update a physical file in CL program?

10 pts.
Tags:
AS/400
CL
CL Program
which command we use to update a physical file in CL pgm?

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi,

There’s no command available in CL to update a physical file. You can however use various methods of running SQL statements from a CL program to update files (e.g. RUNSQLSTM or the qshell db2 utility). I normally prefer to write a small RPG program.

Regards,

Martin Gilbert.

Discuss This Question: 2  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
  • ASPSYS1
    You could update the file in CL using the STRQMQRY command: you can leave out the &APOST STRQMQRY QMQRY(TECHSPEC/CYCLESTEP) + SETVAR((CYCLE (&APOST *CAT &CYCLE *CAT &APOST)) + (JOBNAM (&APOST *CAT &JOBNAM *CAT &APOST)) + (JOBUSR (&APOST *CAT &JOBUSR *CAT &APOST)) + (JOBNBR (&APOST *CAT &JOBNBR *CAT &APOST)) + (JOBDAT (&APOST *CAT &JOBDAT *CAT &APOST)) + (JOBTIM (&APOST *CAT &JOBTIM *CAT &APOST)) + (JOBCDE (&APOST *CAT &JOBCDE *CAT &APOST))) then in the CYCLESTEP member in QQMQRYSRC INSERT INTO TECHSPEC/CYCLESTEP VALUES(&CYCLE, &JOBNAM, &JOBUSR, &JOBNBR, &JOBDAT, &JOBTIM, &JOBCDE)
    10 pointsBadges:
    report
  • bvining
    The CL for Files product, documented here, provides the Update Record using CLF (UPDRCDCLF) command which performs an update to a record within a file. The command is provided with the no-charge runtime option of CLF and is available starting with V5R4. A fee based precompiler option is also available (though not required) as a productivity tool. Bruce Vining (one of the CLF developers)
    6,495 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