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

Split Records based on length


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Sathwik Eppalapelli
Warnings : 2

New User


Joined: 19 Apr 2022
Posts: 0
Location: India

PostPosted: Tue Apr 19, 2022 12:47 am
Reply with quote

Hi!
I have a input with 4 records of different length(8 and 9) with garbage value 'b' as shown below:

INPUT:
22222222bbbbb apple
33333333bbbbb apple
444444444bbbb apple
555555555bbbb apple

My output should not contain any garbage value 'b' and the records with length 8 has to copy in one file and records with length 9 has to copy another file..I.e;

Output-1:
22222222bbbbb apple
33333333bbbbb apple

Output-2:
444444444bbbb apple
555555555bbbb apple

Can anyone please help me out with the code.. either jcl or cobol is ok...
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2023
Location: USA

PostPosted: Tue Apr 19, 2022 1:33 am
Reply with quote

0. Use the Code button to enter any data and/or code samples.

1. What did you try so far?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Tue Apr 19, 2022 6:43 pm
Reply with quote

Quote:
Can anyone please help me out with the code.. either jcl or cobol is ok...
First, this is a HELP forum, not a WRITE-THE-CODE-FOR-YOU forum. We're not going to just provide you code. Now, if you're willing to pay for the code, I'm sure you can find someone to write it for you (typical rates are around one thousand US dollars (or euros) per day and there's usually a one-day minimum.

Second, JCL establishes environments and executes programs -- it CANNOT be used to solve this problem for you. One of the SORT products probably could, and COBOL certainly can, but not JCL.

Third, your problem statement is not consistent with your desired results. You say "My output should not contain any garbage value 'b'" and yet your outputs both have 'b' values. So you have either misstated your problem or provided incorrect sample data -- both of which make it very difficult to continue.

I also gave you a warning for violating forum rules by posting the same question multiple times. Once is enough -- we'll see your post.
Back to top
View user's profile Send private message
Sathwik Eppalapelli
Warnings : 2

New User


Joined: 19 Apr 2022
Posts: 0
Location: India

PostPosted: Tue Apr 19, 2022 7:50 pm
Reply with quote

Sorry for the inconvenience...
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
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
Search our Forums:

Back to Top