Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

how to calculate length of inputs to JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: how to calculate length of inputs to JCL
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: 8593
Location: Back in jolly old England

PostPosted: Fri Apr 23, 2010 4:19 pm    Post subject:
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    Post subject:
Reply with quote

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

Senior Member


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

PostPosted: Fri Apr 23, 2010 4:42 pm    Post subject:
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    Post subject:
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: 7932
Location: Bellevue, IA

PostPosted: Fri Apr 23, 2010 5:10 pm    Post subject:
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    Post subject:
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: 1224
Location: Israel

PostPosted: Fri Apr 23, 2010 6:02 pm    Post subject:
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: 7932
Location: Bellevue, IA

PostPosted: Fri Apr 23, 2010 7:10 pm    Post subject:
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 Moderator


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

PostPosted: Fri Apr 23, 2010 10:24 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SQZ pipe delimited file with 1 column... Rick Silvers DFSORT/ICETOOL 2 Sun Nov 06, 2016 8:11 pm
No new posts Joinkeys operation when key1 and key2... Susanta DFSORT/ICETOOL 5 Wed Nov 02, 2016 5:35 pm
No new posts Format to pipe delimited with variabl... pshongal SYNCSORT 6 Wed Sep 14, 2016 2:48 pm
No new posts How to calculate an specific transact... lind sh CICS 2 Tue Sep 13, 2016 9:20 pm
This topic is locked: you cannot edit posts or make replies. Providing inputs to a panel of anothe... Raghur CLIST & REXX 2 Tue Apr 05, 2016 12:01 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us