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
 

 

ICETOOL for a PDS

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

New User


Joined: 18 Dec 2008
Posts: 24
Location: Newyork

PostPosted: Thu Apr 16, 2009 3:28 am    Post subject: ICETOOL for a PDS
Reply with quote

I have a PDS file with 100 members. I want to replace some strings in each member of the PDS. Can I use ICETOOL to do this? Can I specify this without using multiple statments for each member? The below step throws an error asking to specify the member name.

//STEP02 EXEC PGM=ICETOOL
//SYSOUT DD SYSOUT=*
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN001 DD DSN=XXX.TEST,DISP=SHR
//OUT001 DD DSN=XXX.TEST.OUT,
// DISP=(NEW,CATLG,DELETE),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=3120),
// SPACE=(CYL,(50,10),RLSE)
//TOOLIN DD *
COPY FROM(IN001) TO(OUT001) USING(CTL1)
//CTL1CNTL DD *
Back to top
View user's profile Send private message

Escapa

Senior Member


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

PostPosted: Thu Apr 16, 2009 3:32 am    Post subject:
Reply with quote

I don't know if is easily achievable using sort but For such request REXX is always preferred...
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Thu Apr 16, 2009 4:29 am    Post subject:
Reply with quote

Hi,

DFSORT can operate on a PDS(member), but not on all the members of a PDS at once.


Gerry
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 Apr 16, 2009 4:32 am    Post subject:
Reply with quote

Quote:
Can I specify this without using multiple statments for each member?


No. DFSORT can use a PDS member for input and output, but it cannot use a PDS for input or output.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Apr 16, 2009 5:28 am    Post subject:
Reply with quote

itmanand,

If you insist on doing using batch utilities then the following JCL will give you the desired results.

STEP0200 Uses DFSORT's new FINDREP function available with z/OS DFSORT V1R5 PTF UK90013 (July, 2008) to replace the string 'sysprint' to 'DFSRTPRT'. You need to put your change strings there.


Code:

//*************************************************************
//*  PRINT THE PDS TO A FLAT FILE                             *
//*************************************************************
//STEP0100 EXEC PGM=IEBPTPCH                                   
//SYSUT1   DD DSN=YOUR.PDS.TO.BE.REPLACED,                     
//            DISP=SHR                                         
//SYSUT2   DD DSN=&&T,DISP=(,PASS),SPACE=(CYL,(10,10),RLSE)   
//SYSPRINT DD SYSOUT=*                                         
//SYSIN    DD *                                               
    PUNCH TYPORG=PO                                           
//*                                                           
//*************************************************************
//*  REPLACE THE DESIRED STRING TO YOUR STRING                *
//*************************************************************
//STEP0200 EXEC PGM=SORT                                       
//SYSOUT   DD SYSOUT=*                                         
//SORTIN   DD DSN=&&T,DISP=(OLD,PASS)                         
//SORTOUT  DD DSN=&&O,DISP=(,PASS),SPACE=(CYL,(10,10),RLSE),RECFM=FB   
//SYSIN    DD *                                               
  SORT FIELDS=COPY                                             
  INREC IFTHEN=(WHEN=INIT,BUILD=(2,80)),                       
  IFTHEN=(WHEN=INIT,FINDREP=(IN=C'SYSPRINT',OUT=C'DFSRTPRT')) 
                                                               
  OUTREC IFTHEN=(WHEN=(1,11,CH,EQ,C'MEMBER NAME'),             
  BUILD=(C'./ ADD    NAME=',14,8,80:X))                       
//*                                                           
//*************************************************************
//*  DELETE THE ORIGINAL PDS                                  *
//*************************************************************
//STEP0300 EXEC PGM=IEFBR14,COND=(0,NE,STEP0200)               
//DELPDS   DD DSN=YOUR.PDS.TO.BE.REPLACED,
//            DISP=(MOD,DELETE,DELETE),                       
//            SPACE=(TRK,(1,0),RLSE)                           
//*                                                           
//*************************************************************
//* THIS STEP CREATES PDS FROM A SEQUENTIAL FILE              *
//*************************************************************
//STEP0400 EXEC PGM=IEBUPDTE,PARM=NEW,COND=(0,NE,STEP0200)     
//SYSUT2   DD DSN=YOUR.PDS.TO.BE.REPLACED, 
//            DISP=(NEW,CATLG,DELETE),                         
//            UNIT=SYSDA,                                     
//            SPACE=(CYL,(10,10,100),RLSE)                     
//SYSPRINT DD SYSOUT=*                                         
//SYSIN    DD DSN=&O,DISP=(OLD,PASS)                           
//*                                                           


For complete details on the new FINDREP function and the other new functions available with PTF UK90013, see:

www.ibm.com/systems/support/storage/software/sort/mvs/ugpf/
Back to top
View user's profile Send private message
itmanand

New User


Joined: 18 Dec 2008
Posts: 24
Location: Newyork

PostPosted: Thu Apr 16, 2009 9:16 pm    Post subject:
Reply with quote

Thanks. However for the last step, when I try to create the PDS I get S013 with a RC of 20.
Can you let me know if this allocation parameter for the PDS is correct?

//SYSUT2 DD DSN=mypds,
// DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=3200),
// SPACE=(CYL,(10,10,100),RLSE)
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Apr 16, 2009 9:25 pm    Post subject:
Reply with quote

itmanand,

What are the DCB parameters of SORTOUT in step0200? Did you have the cond code check on step0300 and step0400?
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Thu Apr 16, 2009 9:27 pm    Post subject:
Reply with quote

itmanand wrote:
Thanks. However for the last step, when I try to create the PDS I get S013 with a RC of 20.
013
Explanation: The error occurred during processing of an OPEN macro instruction. This system completion code is accompanied by message IEC141I. Refer to the explanation of message IEC141I for complete information about the task that was ended and for an explanation of the return code in register 15 (which is provided in the IEC141I message text).
Application Programmer Response: Respond as indicated for message IEC141I.
System Programmer Response: If the error recurs and the program is not in error, look at the messages in the job log for more information. Search problem reporting data bases for a fix for the problem. If no fix exists, contact the IBM Support Center. Provide the JCL and the program listing for the job.
Back to top
View user's profile Send private message
itmanand

New User


Joined: 18 Dec 2008
Posts: 24
Location: Newyork

PostPosted: Fri Apr 17, 2009 12:26 am    Post subject:
Reply with quote

I had the DCB parameters as the same that you gave in your example.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Fri Apr 17, 2009 1:25 am    Post subject: Reply to: ICETOOL for a PDS
Reply with quote

itmanand wrote:
I had the DCB parameters as the same that you gave in your example.


itmanand,

Unless I am blind , I don't see a single DCB parameter coded in my example job. Where did you see them?
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 How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts ICETOOL/SYNCSORT - SYSPRINT output nartcr DFSORT/ICETOOL 17 Wed Oct 05, 2016 10:46 pm
No new posts Icetool or Joinkeys example to compar... ishant chauhan DFSORT/ICETOOL 21 Sat Aug 20, 2016 2:40 am
No new posts ICETOOL higher option Anshul Das DFSORT/ICETOOL 14 Thu Apr 14, 2016 8:00 am
No new posts Compare Files and extract matching re... vimalravi83 DFSORT/ICETOOL 3 Wed Jan 06, 2016 2:42 pm


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