Question On CL400

20 pts.
Tags:
Control Language Programming
Through CL code or command how achieve the particular record of Physical File.In a 100 record I just  want to see only 54th record of PF through Cl how? In RPG or ILE we handle through the Chain or in Subfile we use  RRN but in CL i can't do?

Software/Hardware used:
Mocha 5250,in OS XP

Answer Wiki

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

CL is not great for file processing. If at all possible I would try do it in a HLL.

The OVRDBF command will allow you set the starting position of a file, the POSITION paramater. You could position the file with the OVRDBF to the record you want, then use a RCVF to retrieive that record. I’ve never tried this, but in theory it should work.

Discuss This Question: 4  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
  • ASWDEVELOPER
    assuming you're after data in the record, write a small RPG program that reads the record you want and places the data in the LDA.... your CL can call the program and retrieve the data from the LDA ...
    405 pointsBadges:
    report
  • Rpgrpgile
    In order to understand what CL means, you first need to understand what ISO is. ISO is short for International Organization of Standardization. This organization creates global standards for everything, from how many dead pixels are normal on a brand new LCD monitor to voltage requirements for electrically engineered wires and cables. Thanks. Regards, Texas auto insurance
    0 pointsBadges:
    report
  • Yorkshireman
    Why? CL / JCL is a control language. its purpose is to control the processing, not DO the processing. If you want to know the way to somewhere you use a map, not a newspaper. You mention RPG, so you know how to use it for a keyed access retrieve - just do so. Define the record as a structure to be passed back as parameters, In the CLP define the file to get an identical set of field names. call the RPG, pass back the record data, make a control decsion. The LDA (Local Data area) was mentioned. You could use it, but why do so. If you need the data from the xth record, just get it the most efficient way, and give the CL all or some of it that's needed. You could, in CLP read the file sequentially until you find the record you need. Just about possible for 100 records, but again, it will be quicker, more certain, and cost less to use the languages for their intended purpose.
    5,580 pointsBadges:
    report
  • TomLiotta
    Why? Three common reasons I can think of: 1. No compilers for HLLs -- systems run turn-key apps and no development is done. CL is "free" and requires no additional expense for simple things like "look at the 54th record". 2. No available skills -- learning RPG (or COBOL or C or whatever) can take a few days (weeks, months), which might not be quick enough if some simple data is needed very soon. 3. Curiosity -- sometimes you just want to learn the capabilities of a language; until someone comes out and says "You can't do it," it's hard to know that you aren't just missing an instruction or a parameter. Of course, the reason this thread is awake again is just the spam post that had no valid info at all. 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