View previous topic :: View next topic
|
Author |
Message |
vampire
New User
Joined: 12 Oct 2009 Posts: 15 Location: Pune
|
|
|
|
Hi,
I have records of varying length and want to calculate length for each records.
Is there any way? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Which program / utility did you have in mind.
Why do you need to know individual record lengths ? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
You might also consider to show the contents of RDW using sort. |
|
Back to top |
|
|
vampire
New User
Joined: 12 Oct 2009 Posts: 15 Location: Pune
|
|
|
|
I have an JCL which accepts a set of records with a specified length.
I just want to remove any records which are not having that specific length. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
First, you may have a "JCL" but that JCL executes one or more programs. Because JCL does nothing but execute programs. It cannot slice, it cannot dice, it cannot accept a set of records -- all JCL can do is execute programs. So your first statement is false by definition. What program is your JCL executing that accepts these records? THAT is what you should have told us, instead of wasting our time trying to tell us that JCL accepts a set of records. Terminology is critical to IT since many similar terms have very different meanings, and so far your use of terminology does not indicate much good about your level of skills.
What program or utility are you planning on using to remove the records that are not the correct length? What is the source of these records? Why not change the data source to only allow records of the correct length to be passed to your program? Why not change the program your JCL is running to exclude the incorrect length records WHILE THE PROGRAM IS RUNNING?
Without explaining more about what you are doing, we cannot provide much assistance. |
|
Back to top |
|
|
vampire
New User
Joined: 12 Oct 2009 Posts: 15 Location: Pune
|
|
|
|
Got ur point , it will jus execute program.
The file will be passed to program.
I cant change the source,
Just Wanted to know, can we do that in jcl.
Quote: |
Skills get improved but words cant. |
|
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
vampire wrote: |
Quote: |
Skills get improved but words cant. |
|
A JCL contains one or more steps, each step executing one program.
There are 2 kinds of programs: utilities and application programs.
I believe you have a job (aka JCL) and you need to add a step somewhere, in order to perform your data selection.
You don't have the possibility to change the programs, I presume.
And you're asking now which utility can do the work.
"words" are just words. Using them is a skill.
The "Art of Asking Questions" is a skill too and it can and should be improved!
|
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
Just Wanted to know, can we do that in jcl. |
Absolutely not. As we said, all JCL does is execute programs.
Now if you had said you wanted to use SORT to select certain records, or write an application program to select the records, and add a step to your JCL to run the appropriate program to select the records -- yes, this can be done. But you cannot do it in JCL. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
I have records of varying length and want to calculate length for each records. |
Quote: |
I have an JCL which accepts a set of records with a specified length.
I just want to remove any records which are not having that specific length. |
Do you mean you have RECFM=VB records, or do you mean you have RECFM=FB records with different numbers of trailing blanks, or what?
Please give the RECFM and LRECL of your input file.
Show an example of the records in your input file (relevant fields only) and what you expect for output. Explain the "rules" for getting from input to output. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input files. |
|
Back to top |
|
|
|