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
 

 

File for varying data length

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Ambili S

Active User


Joined: 06 Sep 2007
Posts: 112
Location: India

PostPosted: Tue Sep 14, 2010 9:28 am    Post subject: File for varying data length
Reply with quote

I have an input file FILE1 of FB format and record length 80 . But the data in this file keeps varying. I want to use another file FILE2 whose length should be of the data present in FILE1 . Each day the length of data in FILE1 would change. So according to that FILE2 should have the length. Is there any way to achieve this using a DFSORT or JCL .
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Sep 14, 2010 9:38 am    Post subject:
Reply with quote

Hello,

Well, there is no way to do this "with JCL". Some utility would have to be invoked (sort or something else).

In order for anyone to help, you need to provide more complete info about what you want this to do. One way might be to show some sample input and what you want as output when that sample iknput is processed.

If the record length is 80, how does the data keep varying. . . Every record in that file is 80 bytes long. Why/how would the length change each day?
Back to top
View user's profile Send private message
Ambili S

Active User


Joined: 06 Sep 2007
Posts: 112
Location: India

PostPosted: Tue Sep 14, 2010 11:59 am    Post subject: Reply to: File for varying data length
Reply with quote

What i meant was , though the file declaration is FB , LRECL = 80 , the length of the content in the file might be 80 or less than 80 .

Say if i say the LRECL=10 , the data in the file could be as follows:

Hi John
Hello Sam
Hi Tina

Now i want to use another file in JCL , which should take the maximum data length (9 - based on the above input) from the input file . HOw do we achive this using SORT ?
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Tue Sep 14, 2010 2:37 pm    Post subject:
Reply with quote

The way you have explained your question - an obvious answer seems to be, no it can not be done.

When you say this:
Quote:
though the file declaration is FB , LRECL = 80 , the length of the content in the file might be 80 or less than 80 .

Say if i say the LRECL=10 , the data in the file could be as follows:
The bold text in above quote is "record-length" -- that's not LRECL. As far as i understand your question, you've got two choices:

    1. Your program should be intelligent enough to deal with different record-lengths, if you are supposed to get data with different lengths. And your FD declaration should deal with VB file not FB.

    2. Edit your program such a way that it treat every record as if it is of length=80 and use RECFM=FB in JCL.

If you expect something beyond the above two, you need to do a better job in explaing your problem.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Tue Sep 14, 2010 4:01 pm    Post subject:
Reply with quote

sounds to me as if the TS wants to 'parse' the input file of 80 char,
which will be consistant,
and output only 'non space characters',
effectively creating an output file whose length is based on non-space char input.

Ambili S,

why do you want to do this?

creating dynamic record lengths
makes it difficult for the the down-stream processes.

explain why you want to do this.
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 how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 0 Mon Jan 02, 2017 11:16 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am


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