IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

how to calculate length of inputs to JCL


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vampire

New User


Joined: 12 Oct 2009
Posts: 15
Location: Pune

PostPosted: Fri Apr 23, 2010 4:13 pm
Reply with quote

Hi,

I have records of varying length and want to calculate length for each records.

Is there any way?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Apr 23, 2010 4:19 pm
Reply with quote

Which program / utility did you have in mind.
Why do you need to know individual record lengths ?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Apr 23, 2010 4:20 pm
Reply with quote

ICETOOL Example 6
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Apr 23, 2010 4:42 pm
Reply with quote

You might also consider to show the contents of RDW using sort.
Back to top
View user's profile Send private message
vampire

New User


Joined: 12 Oct 2009
Posts: 15
Location: Pune

PostPosted: Fri Apr 23, 2010 4:44 pm
Reply with 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.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Fri Apr 23, 2010 5:10 pm
Reply with quote

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
View user's profile Send private message
vampire

New User


Joined: 12 Oct 2009
Posts: 15
Location: Pune

PostPosted: Fri Apr 23, 2010 5:17 pm
Reply with quote

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
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Fri Apr 23, 2010 6:02 pm
Reply with quote

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!
icon_smile.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Fri Apr 23, 2010 7:10 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Apr 23, 2010 10:24 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Store the data for fixed length COBOL Programming 1
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
Search our Forums:

Back to Top