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

JCL - To repeat a string in same columns in subsequent lines


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

New User


Joined: 17 May 2022
Posts: 4
Location: India

PostPosted: Wed Jul 27, 2022 6:05 pm
Reply with quote

Hi All,

Can anyone please help me with JCL logic to -
- Repeat a given string in a specified column in all subsequent rows until a non-blank text is found in the same column.

Below is my input extract -
Code:

2022/04/11 07:35:36  TSO747C
           07:35:39  TSO747C
           07:41:09  TSO747C
           12:35:58  TSO264C
           12:36:01  TSO264C
2022/04/12 00:03:14  BDEFAULT
           00:03:45  BDEFAULT
           00:05:22  BDEFAULT

I want it to be like -
Code:

2022/04/11 07:35:36  TSO747C
2022/04/11 07:35:39  TSO747C
2022/04/11 07:41:09  TSO747C
2022/04/11 12:35:58  TSO264C
2022/04/11 12:36:01  TSO264C
2022/04/12 00:03:14  BDEFAULT
2022/04/12 00:03:45  BDEFAULT
2022/04/12 00:05:22  BDEFAULT

Can anyone please help me with this?
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2119
Location: USA

PostPosted: Wed Jul 27, 2022 6:46 pm
Reply with quote

You can use to achieve your goal:
- COBOL
- SORT
- FileAid
- REXX
- Assembler
- C/C++
- 100500 other tools - on you choice

You cannot use for this task, under any circumstances:
- JCL
- VSAM

Please, select any tool you are familiar with. Then - ask a moderator to move your topic to the corresponding sub-forum.
Without that - nobody can force you to use a tool you have no idea about.
Back to top
View user's profile Send private message
masoomraza

New User


Joined: 17 May 2022
Posts: 4
Location: India

PostPosted: Wed Jul 27, 2022 6:59 pm
Reply with quote

Thank You - sergeyken
I have opened a seperate thread under SORT
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 Repeat n times by substuting SEQNUM i... DFSORT/ICETOOL 1
No new posts ICETOOL to SUM String DFSORT/ICETOOL 1
No new posts Mark Previous & next lines when a... DFSORT/ICETOOL 9
No new posts sort to find out the char which repea... Mainframe Interview Questions 10
No new posts Help with C character vs C string All Other Mainframe Topics 3
Search our Forums:

Back to Top