MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

To remove additional spaces before continuation character

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
Lean
Beginner


Joined: 07 Aug 2012
Posts: 37
Topics: 11

PostPosted: Mon Sep 15, 2014 4:04 am    Post subject: To remove additional spaces before continuation character Reply with quote

Hi all,
we meet one issue that continuation character is out of 72 column for one prm member after doing macro replacement, can we have a way to leave just one space or remove all spaces before the continuation character for some members of one PDS.

Code:

EX '&PRMLIB.(IEFBATRX)'                                      -               
   '&DBSYSID. TESTPROG &CTRY.AAA&DBPFX1.'

the continuation character can appear in any position of ending space.
the desired result:
Code:

EX '&PRMLIB.(IEFBATRX)' -               
   '&DBSYSID. TESTPROG &CTRY.AAA&DBPFX1.'
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Mon Sep 15, 2014 11:04 am    Post subject: Reply with quote

Lean,

Use the following control cards which will give you the desired results

Code:

//SYSIN    DD *                                               
  OPTION COPY                                                 
  INREC IFTHEN=(WHEN=(72,1,CH,EQ,C'-'),                       
  OVERLAY=(1,71,JFY=(SHIFT=LEFT,TRAIL=C' -',LENGTH=72)))     
//*                                                           

_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Lean
Beginner


Joined: 07 Aug 2012
Posts: 37
Topics: 11

PostPosted: Tue Sep 16, 2014 7:51 am    Post subject: Reply with quote

Hi Kolusu,
I have coded it as per your suggestion, one more question, i would like to change some members from one PDS lib, if they have such issues. Can we use DFSORT to do it?

Code:

//SYSIN    DD *                                                       
  OPTION COPY                                                         
  INREC IFTHEN=(WHEN=(1,72,SS,EQ,C'IEFBATRX',AND,                     
                      1,72,SS,EQ,C'-'),                               
                FINDREP=(INOUT=(C'-',C' ')),HIT=NEXT),               
        IFTHEN=(WHEN=(1,72,SS,EQ,C'IEFBATRX'),                       
                OVERLAY=(1,71,JFY=(SHIFT=LEFT,TRAIL=C' -',LENGTH=72)))
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue Sep 16, 2014 9:44 am    Post subject: Reply with quote

Lean wrote:
I have coded it as per your suggestion, one more question,
Code:

//SYSIN    DD *                                                       
  OPTION COPY                                                         
  INREC IFTHEN=(WHEN=(1,72,SS,EQ,C'IEFBATRX',AND,                     
                      1,72,SS,EQ,C'-'),                               
                FINDREP=(INOUT=(C'-',C' ')),HIT=NEXT),               
        IFTHEN=(WHEN=(1,72,SS,EQ,C'IEFBATRX'),                       
                OVERLAY=(1,71,JFY=(SHIFT=LEFT,TRAIL=C' -',LENGTH=72)))


Lean,

You did NOT code what I suggested. Why do you need a FINDREP and JFY? A single JFY will do.

Lean wrote:

i would like to change some members from one PDS lib, if they have such issues. Can we use DFSORT to do it?


DFSORT works with 1 member at a time. So you need to pass the member names of all the members you want to change.
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Lean
Beginner


Joined: 07 Aug 2012
Posts: 37
Topics: 11

PostPosted: Tue Sep 16, 2014 8:21 pm    Post subject: Reply with quote

Hi Kolusu,
because the continuation character can appear in any position of ending spaces. like below:
Code:

EX '&PRMLIB.(IEFBATRX)'               -               
   '&DBSYSID. TESTPROG &CTRY.AAA&DBPFX1.'

i tried your sort card, it appears two character.
Code:

EX '&PRMLIB.(IEFBATRX)'               - -               
   '&DBSYSID. TESTPROG &CTRY.AAA&DBPFX1.'
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Wed Sep 17, 2014 10:48 am    Post subject: Reply with quote

Lean wrote:
Hi Kolusu,
because the continuation character can appear in any position of ending spaces. like below:


Lean,

Please tell us the complete requirement instead of adding on to something that you already have.

You just need parse to find the "-" and then JFY on the parsed field like shown below.

Code:

//STEP0100 EXEC PGM=SORT                                               
//SYSOUT   DD SYSOUT=*                                                 
//SORTIN   DD *                                                         
EX '&PRMLIB.(IEFBATRX)'                                                -
   '&DBSYSID. TESTPROG &CTRY.AAA&DBPFX1.'                               
EX '&PRMLIB.(IEFBATRX)'             -                                   
   '&DBSYSID. TESTPROG &CTRY.AAA&DBPFX2.'                               
EX '&PRMLIB.(IEFBATRX)'                         -                       
   '&DBSYSID. TESTPROG &CTRY.AAA&DBPFX3.'                               
//SORTOUT  DD SYSOUT=*                                                 
//SYSIN    DD *                                                         
  OPTION COPY                                                           
  INREC IFTHEN=(WHEN=(1,72,SS,EQ,C'-'),                                 
        PARSE=(%01=(ENDBEFR=C'-',FIXLEN=72)),                           
  OVERLAY=(%01,JFY=(SHIFT=LEFT,TRAIL=C' -')))                           
//*                                                                     


The output from this is
Code:

EX '&PRMLIB.(IEFBATRX)' -                       
   '&DBSYSID. TESTPROG &CTRY.AAA&DBPFX1.'       
EX '&PRMLIB.(IEFBATRX)' -                       
   '&DBSYSID. TESTPROG &CTRY.AAA&DBPFX2.'       
EX '&PRMLIB.(IEFBATRX)' -                       
   '&DBSYSID. TESTPROG &CTRY.AAA&DBPFX3.'       

_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Lean
Beginner


Joined: 07 Aug 2012
Posts: 37
Topics: 11

PostPosted: Thu Sep 18, 2014 12:42 am    Post subject: Reply with quote

Thanks Kolusu, i will try.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group