Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to add comments

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
scorp_rahul23

New User


Joined: 06 May 2008
Posts: 90
Location: Chennai

PostPosted: Thu Sep 24, 2009 3:16 pm    Post subject: How to add comments
Reply with quote

I have input file as

Code:

ABC.PDS


I want output like

Code:

This is the input
ABC.PDS
Please use this




How Can I include lines before and after that.

Can u suggest some way to do that
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Sep 24, 2009 3:19 pm    Post subject:
Reply with quote

What has this to do with JCL ?

Yes, lots of ways of doing it. Any particular method that appeals to you ?
Back to top
View user's profile Send private message
scorp_rahul23

New User


Joined: 06 May 2008
Posts: 90
Location: Chennai

PostPosted: Thu Sep 24, 2009 3:21 pm    Post subject: Reply to: How to add comments
Reply with quote

Using Simple SORT programming
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Sep 24, 2009 3:22 pm    Post subject:
Reply with quote

SYNCSORT, DFSORT or CA-SORT
Back to top
View user's profile Send private message
scorp_rahul23

New User


Joined: 06 May 2008
Posts: 90
Location: Chennai

PostPosted: Thu Sep 24, 2009 3:25 pm    Post subject: Reply to: How to add comments
Reply with quote

DFSORT
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Sep 24, 2009 4:17 pm    Post subject:
Reply with quote

Code:

//DFSORT   EXEC PGM=SORT             
//SYSOUT   DD SYSOUT=*               
//SORTIN   DD *                       
Comment                               
//         DD DSN=WHATEVER,DISP=SHR   
//         DD *                       
Another comment
/*
//SORTOUT  DD DSN=WHATEVER.OUT,DISP= 
//SYSIN    DD *                       
  SORT     FIELDS=COPY               
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Thu Sep 24, 2009 4:20 pm    Post subject:
Reply with quote

Hi,

try this
Code:
//STEP0001 EXEC  PGM=SORT                 
//SYSOUT   DD SYSOUT=*                     
//SORTIN   DD *                           
ABC.PDS                                   
//SORTOUT  DD SYSOUT=*                     
//SYSIN    DD *                           
  OPTION COPY                             
  OUTFIL REMOVECC,                         
  HEADER1=('This is the input'),           
   TRAILER1=('Please use this')           
/*                                         


Gerry
Back to top
View user's profile Send private message
scorp_rahul23

New User


Joined: 06 May 2008
Posts: 90
Location: Chennai

PostPosted: Thu Sep 24, 2009 5:07 pm    Post subject: Reply to: How to add comments
Reply with quote

If I have some lines in PS

Code:

nandlnmdl
adlnmd
dnmaldlmABC.INDUSTRY.TAKE
dlnmdn


I want to capture PDS name (ABC.INDUSTRY.TAKE) and attach it with words
DSN DD= ABC.INDUSTRY.TAKE

And I want to add some lines before this DSN line and some lines after that line.





Code:

Hi hw r u
hii
DSN DD= ABC.INDUSTRY.TAKE
bye
take care




I have used this logic


Code:

    OPTION COPY                         
    INCLUDE COND=(52,6,CH,EQ,C'EMPLEE')
    OUTFIL REMOVECC,                   
    HEADER1=('THIS IS THE INPUT'),     
     TRAILER1=('PLEASE USE THIS')       
/*   
                                 


Can u plzz suggest
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Thu Sep 24, 2009 5:58 pm    Post subject:
Reply with quote

Your whole post is confusing..
You are saying you want to add some lines before and after but adding only one before and after.... icon_question.gif
Quote:

Hi hw r u
hii
DSN DD= ABC.INDUSTRY.TAKE
bye
take care

This is sample output you have shown you wanted.. but your code is writing something else... icon_question.gif
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Thu Sep 24, 2009 6:17 pm    Post subject:
Reply with quote

If you have only one record satisfying condition then you can use below also...
Code:

//STEP010 EXEC PGM=SORT                                       
//DFSMSG  DD SYSOUT=*                                         
//SYSPRINT DD SYSOUT=*                                         
//SYSOUT DD SYSOUT=*                                           
//SORTIN DD *                                                 
nandlnmdl                                                     
adlnmd                                                         
dnmaldlmABC.INDUSTRY.TAKE                          EMPLEE     
dlnmdn                                                         
/*                                                             
//SORTOUT DD SYSOUT=*                                         
//SYSIN DD *                                                   
  OPTION COPY                                                 
  INCLUDE COND=(52,6,CH,EQ,C'EMPLEE')                         
  OUTFIL REMOVECC,                                             
  BUILD=(C'THIS IS THE INPUT',/,1,80,/,C'PLEASE USE THIS')     
/*                                                             
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Sep 24, 2009 9:09 pm    Post subject:
Reply with quote

scorp,

You can use a DFSORT job something like the following to do what you asked for:

Code:

//S1    EXEC  PGM=SORT
//SYSOUT    DD  SYSOUT=*
//SORTIN DD *
nandlnmdl
adlnmd
dnmaldlmABC.INDUSTRY.TAKE                          EMPLEE
dlnmdn
//SORTOUT DD SYSOUT=*
//SYSIN    DD    *
  OPTION COPY
  INCLUDE COND=(52,6,CH,EQ,C'EMPLEE')
  OUTFIL REMOVECC,
   BUILD=(C'Hi hw r u',/,C'hii',/,
    C'DSN DD=',9,20,/,
    C'bye',/,C'take care')
/*


SORTOUT would have:

Code:

Hi hw r u                   
hii                         
DSN DD=ABC.INDUSTRY.TAKE     
bye                         
take care                   


If that doesn't do what you want, then you need to explain in more detail what you want to do with a better example of input and output.

In the future, please try to state your requirement more clearly with a good example of input and output.
Back to top
View user's profile Send private message
scorp_rahul23

New User


Joined: 06 May 2008
Posts: 90
Location: Chennai

PostPosted: Fri Sep 25, 2009 10:45 am    Post subject: Reply to: How to add comments
Reply with quote

I want to dynamicaly use file , So I have done processing and I am using sort condition to get that file name.
I wan to add some details before that like

Code:

//DSVQA JOB (META0014),'SORT COMNT',CLASS=A,         
//  MSGCLASS=H,NOTIFY=&SYSUID,MSGLEVEL=(1,1)             
//DFSORT   EXEC PGM=SORT                                 
//SYSOUT   DD SYSOUT=*                                   
//SORTIN   DD DSN=DSVQ.SAR.PULL.OUT,DISP=SHR         
//SORTOUT  DD DSN=DSVQ.SAR.PULL.OUT1,DISP=(OLD,CATLG),
//          SPACE=(CYL,(1,1),RLSE),UNIT=SYSDA,           
//          DCB=(RECFM=FB,LRECL=80,BLKSIZE=800)         
//SYSIN    DD *                                         
    OPTION COPY                                         
    INCLUDE COND=(52,6,CH,EQ,C'EMPLEE')                 


I want to add

Code:

//STEP01  EXEC PGM=VP8140                   
//STEPLIB DD  DSN=NDVR.STAGED.LOADBAT,DISP=SHR
//        DD  DSN=NDVR.PROD.LOADBAT,DISP=SHR 




So that output should be something like
Code:

//STEP01  EXEC PGM=VP8140                   
//STEPLIB DD  DSN=NDVR.STAGED.LOADBAT,DISP=SHR
//        DD  DSN=NDVR.PROD.LOADBAT,DISP=SHR 
//        DSN NAME FROM SORT CONDITION



Can u suggest
Back to top
View user's profile Send private message
scorp_rahul23

New User


Joined: 06 May 2008
Posts: 90
Location: Chennai

PostPosted: Fri Sep 25, 2009 4:08 pm    Post subject: Reply to: How to add comments
Reply with quote

Can anyone suggest
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Fri Sep 25, 2009 4:20 pm    Post subject:
Reply with quote

Quote:
Can anyone suggest

Have patience...

What you want to achieve can be done in rexx.

In rexx identify the dataset name from your input

Change the JCL member with desired steplib and submit it.
Back to top
View user's profile Send private message
scorp_rahul23

New User


Joined: 06 May 2008
Posts: 90
Location: Chennai

PostPosted: Fri Sep 25, 2009 5:31 pm    Post subject: Reply to: How to add comments
Reply with quote

Can u suggest how it can be done in REXX
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Fri Sep 25, 2009 10:12 pm    Post subject:
Reply with quote

Hello,

Does this translate that you want someone to write the code for you?

Suggest you put together code to do as Sambhaji suggests and post back here when there are questions/problems.

There are multiple rexx examples in the forum and you can get most of what you want with only a little bit of effort. . .
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Fri Sep 25, 2009 11:34 pm    Post subject:
Reply with quote

I am out of office now so cant post code. but below posts will certainly help you

Edit dataset
http://ibmmainframes.com/viewtopic.php?t=44029

Submit jcl in rexx
http://www.ibmmainframes.com/about9873.html
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Comments on the right of instructions... tgo60 IBM Tools 1 Wed Jul 02, 2014 1:12 am
No new posts Find Comments in cobol by user /system Biswajit D COBOL Programming 20 Wed May 22, 2013 4:47 pm
No new posts Tool for moving cobol comments to nex... tugga11 CLIST & REXX 6 Wed Apr 03, 2013 5:22 pm
No new posts Comments in Connect Direct Sysin Rick Stewart All Other Mainframe Topics 2 Fri Jul 13, 2012 6:25 pm
No new posts ChangeMan compiles the program after ... dick scherrer All Other Mainframe Topics 5 Tue Jun 22, 2010 7:59 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us