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

Introducing Fillers in a copy book after every field


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Sameer Srivastava
Warnings : 1

New User


Joined: 28 Dec 2006
Posts: 4
Location: Chennai

PostPosted: Thu Dec 28, 2006 2:09 pm
Reply with quote

I have 400 fields copy book. According to my requirement, i want to insert fillers having semicolon value, after each field. If i do it manually, it will take much time. Is there any utility or any method, executing which I can introduce fillers after every field.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Thu Dec 28, 2006 3:13 pm
Reply with quote

I recall...... pds member with copybook numbered by increment of 10. pds member of one filler. replicate "r400" and number by increment of 10 starting at 15. insert 400 fillers member into copybook member.

Worked for me but that was 30+ years ago.
Back to top
View user's profile Send private message
Sameer Srivastava
Warnings : 1

New User


Joined: 28 Dec 2006
Posts: 4
Location: Chennai

PostPosted: Thu Dec 28, 2006 3:46 pm
Reply with quote

Can you explain in more detail....Your explaination is bit confusing...Please try to recall....... :D
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Thu Dec 28, 2006 3:48 pm
Reply with quote

Hi !

Depends on the layout of your CopyBook. If every field is defined in one
line, you can write a little programm or rexx or macro, that inserts the dsired semicolon picture clause after every line.

Perhaps you could import that book in excel and fill out the next column with semicolon, than transfere it back to the host.

Good luck & Regards, UmeySan
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Thu Dec 28, 2006 3:53 pm
Reply with quote

Sameer Srivastava wrote:
Can you explain in more detail....Your explaination is bit confusing...Please try to recall....... icon_biggrin.gif
I'll try....Some tso command that inserts data into a member by sequence number....Do you have a manual available that you can look through, I don't here....
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Thu Dec 28, 2006 11:05 pm
Reply with quote

Hello,

You might create a copy of your 400-field copybook numbering it from 10 by 10.

Create a new member of the "05 filler pic x value ';'." containg 400 of these lines. Renumber this member from 11 by 10.

Merge the 2 members. If you happen to have ROSCOE this can be done very quickly in your session. I'm not sure if TSO/ISPF has a merge within the editor, but a simple batch sort would combine them.

Place the merged/sorted output in the copylib and there's your new copybook.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Fri Dec 29, 2006 8:30 pm
Reply with quote

Sameer Srivastava wrote:
I have 400 fields copy book. According to my requirement, i want to insert fillers having semicolon value, after each field. If i do it manually, it will take much time. Is there any utility or any method, executing which I can introduce fillers after every field.

Well, this is not the way I remember it, but this is exactly what you want icon_exclaim.gif That is unless "insert" is a local brewed thingy (how could I find it if it were, chasing down a concatenation?)....
Edit your copybook (save an extra copy because after this, cancel does not reverse what comes next).
Code:
 Command ===>                                                  Scroll ===> CSR 
 ****** ***************************** Top of Data ******************************
 000100        05 dataname pic x(xx) value 'something'.                         
 000110        05 dataname pic x(xx) value 'something'.                         
 000120        05 dataname pic x(xx) value 'something'.                         
 000130        05 dataname pic x(xx) value 'something'.                         
 000140        05 dataname pic x(xx) value 'something'.                         
 000150        05 dataname pic x(xx) value 'something'.                         
 000160        05 dataname pic x(xx) value 'something'.                         
 000170        05 dataname pic x(xx) value 'something'.                         
 000180        05 dataname pic x(xx) value 'something'.                         
 000190        05 dataname pic x(xx) value 'something'.                         
 000191        05 dataname pic x(xx) value 'something'.                         
 ****** **************************** Bottom of Data ****************************
put the semicolon line above the first line you want it to follow (don't ask me why?). Type in "insert" on the command line and hit enter.
Code:
Command ===> INSERT                                           Scroll ===> CSR 
****** ***************************** Top of Data ******************************
000010        05 filler   pic x     value ';'.                                 
000100        05 dataname pic x(xx) value 'something'.                         
000110        05 dataname pic x(xx) value 'something'.                         
000120        05 dataname pic x(xx) value 'something'.                         
000130        05 dataname pic x(xx) value 'something'.                         
000140        05 dataname pic x(xx) value 'something'.                         
000150        05 dataname pic x(xx) value 'something'.                         
000160        05 dataname pic x(xx) value 'something'.                         
000170        05 dataname pic x(xx) value 'something'.                         
000180        05 dataname pic x(xx) value 'something'.                         
000190        05 dataname pic x(xx) value 'something'.                         
000191        05 dataname pic x(xx) value 'something'.                         
****** **************************** Bottom of Data ****************************
Viola....
Code:
Command ===>                                                  Scroll ===> CSR 
****** ***************************** Top of Data ******************************
000100        05 dataname pic x(xx) value 'something'.                         
000101        05 filler   pic x     value ';'.                                 
000110        05 dataname pic x(xx) value 'something'.                         
000111        05 filler   pic x     value ';'.                                 
000120        05 dataname pic x(xx) value 'something'.                         
000121        05 filler   pic x     value ';'.                                 
000130        05 dataname pic x(xx) value 'something'.                         
000131        05 filler   pic x     value ';'.                                 
000140        05 dataname pic x(xx) value 'something'.                         
000141        05 filler   pic x     value ';'.                                 
000150        05 dataname pic x(xx) value 'something'.                         
000151        05 filler   pic x     value ';'.                                 
000160        05 dataname pic x(xx) value 'something'.                         
000161        05 filler   pic x     value ';'.                                 
000170        05 dataname pic x(xx) value 'something'.                         
000171        05 filler   pic x     value ';'.                                 
000180        05 dataname pic x(xx) value 'something'.                         
000181        05 filler   pic x     value ';'.                                 
000190        05 dataname pic x(xx) value 'something'.                         
000191        05 filler   pic x     value ';'.                                 
000192        05 dataname pic x(xx) value 'something'.                         
000193        05 filler   pic x     value ';'.                                 
****** **************************** Bottom of Data ****************************
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Dec 30, 2006 6:25 am
Reply with quote

It looks like WT's solution is an ISPF Edit Macro or some such. I tried it at my site and it didn't work.

An edit macro is the ideal solution here, some sites don't allow Apps Pgmrs to write them.

I've used the following for inserting lines in an ISPF member. 400 lines is a bit much, but I'll let you decide if you want to use it. It may be useful to others.

1) Create a member with the filler line in it (I call it fil).
2) Put this cmd string in a PF key (I used PF2):
f p'=' 1;:a;copy fil
3) Position the member at the 1st line; position the cursor in the cmd line
4) press PF2 repeatedly until the member is finished

It's not elegant, but it does the job
Back to top
View user's profile Send private message
Sahoo

New User


Joined: 08 Jun 2006
Posts: 53

PostPosted: Sat Dec 30, 2006 10:58 am
Reply with quote

Write a PCOMM macro
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Sat Dec 30, 2006 1:22 pm
Reply with quote

Quote:
It looks like WT's solution is an ISPF Edit Macro or some such.
I searched many pds's in the concatanation but couldn't even fine the standard "cut" & "paste" let alone this "insert".....Any ideas where/how to look and find them?
Back to top
View user's profile Send private message
Ken_Fraser

New User


Joined: 02 Jan 2007
Posts: 5
Location: UK

PostPosted: Wed Jan 03, 2007 12:18 am
Reply with quote

Here is an edit macro to do the INSERT function.

It copies the first line after every other.

Code:
 /* REXX  */                                                           
 isredit "macro"                                                       
 isredit "cursor = 1 1 "                /* cursor to the top         */
 isredit "(line)  = line    .zfirst"    /* grab the first line       */
 isredit "(last)  = linenum .zlast"     /* get the last line num     */
 x = 2                                                                 
 do until x > last                                                     
   isredit  "line_after " x " = (line)" /* insert line after         */
   x = x + 2                                                           
   last = last + 1     /* lastline num increases each time we insert */
 end   
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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts Need COBOL COPY Help in MVS Environment COBOL Programming 4
No new posts Join 2 files according to one key field. JCL & VSAM 3
No new posts Issue after ISPF copy to Linklist Lib... TSO/ISPF 1
Search our Forums:

Back to Top