View previous topic :: View next topic |
Author |
Message |
mf_user Intermediate
Joined: 01 Jun 2003 Posts: 372 Topics: 105
|
Posted: Mon Sep 01, 2008 6:33 am Post subject: adding string before and after file name. |
|
|
Hi,
I have a list of dataset names of different lengths. I want to add few characters before and after these file names. I am not able to do so because the files are of not same length.
Would you please suggest a solution?
TIA. _________________ MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
== |
|
Back to top |
|
|
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Mon Sep 01, 2008 7:00 am Post subject: |
|
|
not sure what you are trying to do, but remember, DSNs comprise of nodes that cannot exceed 8 characters, and a DSN cannot execeed 44 chars total. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
|
mf_user Intermediate
Joined: 01 Jun 2003 Posts: 372 Topics: 105
|
Posted: Mon Sep 01, 2008 7:14 am Post subject: |
|
|
Hi, Dick.
Let me explain.
I have about 1000 generation datasets of different lengths. I want to capture properties of these generation datasets by using LISTCAT command. Since they are more in number I wanted to use some mechanism to prefix the LISTCAT infront of them.
Thanks. _________________ MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
== |
|
Back to top |
|
|
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Mon Sep 01, 2008 10:30 am Post subject: |
|
|
Still not sure what you are describing or doing. Are you talking about a GDG base with over a 1000 datasets catalogued to it or over a 1000 GDG bases?
Are you actually trying to create the IDCAMS control records? If so which language are you using? If Rexx, use the Length() function to get the length of the GDG base name so that you can tack on the ')' at the correct position. Other languages have similar functions. _________________ Utility and Program control cards are NOT, repeat NOT, JCL. |
|
Back to top |
|
|
Mervyn Moderator
Joined: 02 Dec 2002 Posts: 415 Topics: 6 Location: Hove, England
|
Posted: Mon Sep 01, 2008 10:36 am Post subject: |
|
|
If I have a list of datasets in a file, like this:
Code: |
EDIT G774909.SDSF.REPORT
Command ===>
****** ******************************************************* Top of Data ****
=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
000001 G774909.HO.DATALIB
000002 G774909.HO.RUNDECKS
000003 G774909.HYPERION.TEXT
000004 G774909.IM054093.PROCLIB
000005 G774909.ISPF.ISPPROF
000006 G774909.ISPF.PANELS
000007 G774909.ISPF.SKELS
000008 G774909.ISP0432.BACKUP
000009 G774909.LOAN.RATES
000010 G774909.MAYBE.VPAY
000011 G774909.MSTR.INDEX
000012 G774909.NAMES.TEXT
000013 G774909.ND00.SPFTEMP0.CNTL
000014 G774909.OD.RATES
000015 G774909.RUN01.DX8230G1.PT226RPT.P
000016 G774909.SDSF.BACKUP
000017 G774909.SDSF.REPORT
000018 G774909.SDSFOLD.REPORT
000019 G774909.TABLE.EXMF05
000020 G774909.TABLE.EXMF05.DATA
****** ****************************************************** Bottom of Data **
|
I can add a line at the top, like this:
Code: |
EDIT G774909.SDSF.REPORT
Command ===>
****** ******************************************************* Top of Data *****************
=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+
000001 LISTC ENT('&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&') ALL
000002 G774909.HO.DATALIB
000003 G774909.HO.RUNDECKS
000004 G774909.HYPERION.TEXT
000005 G774909.IM054093.PROCLIB
000006 G774909.ISPF.ISPPROF
000007 G774909.ISPF.PANELS
|
then shift the other lines to the right, like this:
Code: |
EDIT G774909.SDSF.REPORT
Command ===>
****** ******************************************************* Top of Data ***
=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7-
000001 LISTC ENT('&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&') ALL
))12 2 G774909.HO.DATALIB
000003 G774909.HO.RUNDECKS
000004 G774909.HYPERION.TEXT
000005 G774909.IM054093.PROCLIB
000006 G774909.ISPF.ISPPROF
000007 G774909.ISPF.PANELS
000008 G774909.ISPF.SKELS
000009 G774909.ISP0432.BACKUP
000010 G774909.LOAN.RATES
000011 G774909.MAYBE.VPAY
000012 G774909.MSTR.INDEX
000013 G774909.NAMES.TEXT
000014 G774909.ND00.SPFTEMP0.CNTL
000015 G774909.OD.RATES
000016 G774909.RUN01.DX8230G1.PT226RPT.P
000017 G774909.SDSF.BACKUP
000018 G774909.SDSF.REPORT
000019 G774909.SDSFOLD.REPORT
000020 G774909.TABLE.EXMF05
)) 021 G774909.TABLE.EXMF05.DATA
****** ****************************************************** Bottom of Data *
|
then I can copy my new line over all of the other lines, like this:
Code: |
EDIT G774909.SDSF.REPORT
Command ===>
****** ******************************************************* Top of Data **********
=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+---
c LISTC ENT('&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&') ALL
o99999 G774909.HO.DATALIB
000003 G774909.HO.RUNDECKS
000004 G774909.HYPERION.TEXT
000005 G774909.IM054093.PROCLIB
000006 G774909.ISPF.ISPPROF
|
Finally, I can lose all the ampersands, with Code: |
EDIT G774909.SDSF.REPORT
Command ===> c all & ''
****** ******************************************************* Top of Data *************
=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8-
000001 LISTC ENT('&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&') ALL
000002 LISTC ENT('G774909.HO.DATALIB&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&') ALL
000003 LISTC ENT('G774909.HO.RUNDECKS&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&') ALL
000004 LISTC ENT('G774909.HYPERION.TEXT&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&') ALL
000005 LISTC ENT('G774909.IM054093.PROCLIB&&&&&&&&&&&&&&&&&&&&&&&&&&&') ALL
000006 LISTC ENT('G774909.ISPF.ISPPROF&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&') ALL
000007 LISTC ENT('G774909.ISPF.PANELS&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&') ALL
000008 LISTC ENT('G774909.ISPF.SKELS&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&') ALL
000009 LISTC ENT('G774909.ISP0432.BACKUP&&&&&&&&&&&&&&&&&&&&&&&&&&&&&') ALL
000010 LISTC ENT('G774909.LOAN.RATES&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&') ALL
000011 LISTC ENT('G774909.MAYBE.VPAY&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&') ALL
000012 LISTC ENT('G774909.MSTR.INDEX&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&') ALL
000013 LISTC ENT('G774909.NAMES.TEXT&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&') ALL
000014 LISTC ENT('G774909.ND00.SPFTEMP0.CNTL&&&&&&&&&&&&&&&&&&&&&&&&&') ALL
000015 LISTC ENT('G774909.OD.RATES&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&') ALL
000016 LISTC ENT('G774909.RUN01.DX8230G1.PT226RPT.P&&&&&&&&&&&&&&&&&&') ALL
000017 LISTC ENT('G774909.SDSF.BACKUP&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&') ALL
000018 LISTC ENT('G774909.SDSF.REPORT&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&') ALL
000019 LISTC ENT('G774909.SDSFOLD.REPORT&&&&&&&&&&&&&&&&&&&&&&&&&&&&&') ALL
000020 LISTC ENT('G774909.TABLE.EXMF05&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&') ALL
000021 LISTC ENT('G774909.TABLE.EXMF05.DATA&&&&&&&&&&&&&&&&&&&&&&&&&&') ALL
****** ****************************************************** Bottom of Data ***********
|
ending up with:
Code: |
EDIT G774909.SDSF.REPORT
Command ===>
****** ******************************************************* Top of Data ******
=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----
==CHG> LISTC ENT('') ALL
==CHG> LISTC ENT('G774909.HO.DATALIB') ALL
==CHG> LISTC ENT('G774909.HO.RUNDECKS') ALL
==CHG> LISTC ENT('G774909.HYPERION.TEXT') ALL
==CHG> LISTC ENT('G774909.IM054093.PROCLIB') ALL
==CHG> LISTC ENT('G774909.ISPF.ISPPROF') ALL
==CHG> LISTC ENT('G774909.ISPF.PANELS') ALL
==CHG> LISTC ENT('G774909.ISPF.SKELS') ALL
==CHG> LISTC ENT('G774909.ISP0432.BACKUP') ALL
==CHG> LISTC ENT('G774909.LOAN.RATES') ALL
==CHG> LISTC ENT('G774909.MAYBE.VPAY') ALL
==CHG> LISTC ENT('G774909.MSTR.INDEX') ALL
==CHG> LISTC ENT('G774909.NAMES.TEXT') ALL
==CHG> LISTC ENT('G774909.ND00.SPFTEMP0.CNTL') ALL
==CHG> LISTC ENT('G774909.OD.RATES') ALL
==CHG> LISTC ENT('G774909.RUN01.DX8230G1.PT226RPT.P') ALL
==CHG> LISTC ENT('G774909.SDSF.BACKUP') ALL
==CHG> LISTC ENT('G774909.SDSF.REPORT') ALL
==CHG> LISTC ENT('G774909.SDSFOLD.REPORT') ALL
==CHG> LISTC ENT('G774909.TABLE.EXMF05') ALL
==CHG> LISTC ENT('G774909.TABLE.EXMF05.DATA') ALL
****** ****************************************************** Bottom of Data ****
|
Does that help, or have I missed the point? _________________ The day you stop learning the dinosaur becomes extinct |
|
Back to top |
|
|
mf_user Intermediate
Joined: 01 Jun 2003 Posts: 372 Topics: 105
|
Posted: Mon Sep 01, 2008 10:56 am Post subject: Thanks Mervyn |
|
|
Hi, Mervyn.
I tried yours. It worked cool....
Thank you very much.
Bye. _________________ MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
== |
|
Back to top |
|
|
callanand Beginner
Joined: 12 Jun 2007 Posts: 23 Topics: 2
|
Posted: Mon Sep 01, 2008 11:05 am Post subject: |
|
|
Brilliant Mervyn. Impressive solution. |
|
Back to top |
|
|
Mervyn Moderator
Joined: 02 Dec 2002 Posts: 415 Topics: 6 Location: Hove, England
|
Posted: Mon Sep 01, 2008 4:38 pm Post subject: |
|
|
Not brilliant, just been around a while. 8) _________________ The day you stop learning the dinosaur becomes extinct |
|
Back to top |
|
|
|
|