20 pts.
 Question On CL400
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
ASKED: January 6, 2010  3:17 PM
UPDATED: March 2, 2012  10:18 PM

Answer Wiki:
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.
Last Wiki Answer Submitted:  March 2, 2012  3:59 pm  by  bvining   6,055 pts.
All Answer Wiki Contributors:  bvining   6,055 pts. , ElTerrifico   605 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

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 pts.

 

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 pts.

 

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,505 pts.

 

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

 107,905 pts.