View previous topic :: View next topic
|
Author |
Message |
Sameer Srivastava Warnings : 1 New User
Joined: 28 Dec 2006 Posts: 4 Location: Chennai
|
|
|
|
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 |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
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 |
|
|
Sameer Srivastava Warnings : 1 New User
Joined: 28 Dec 2006 Posts: 4 Location: Chennai
|
|
|
|
Can you explain in more detail....Your explaination is bit confusing...Please try to recall....... :D |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
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 |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Sameer Srivastava wrote: |
Can you explain in more detail....Your explaination is bit confusing...Please try to recall....... |
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
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 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 |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
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 |
|
|
Sahoo
New User
Joined: 08 Jun 2006 Posts: 53
|
|
|
|
Write a PCOMM macro |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
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 |
|
|
Ken_Fraser
New User
Joined: 02 Jan 2007 Posts: 5 Location: UK
|
|
|
|
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 |
|
|
|