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
 

 

Idea for new statement PARMDATA

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

Active User


Joined: 29 Oct 2010
Posts: 183
Location: Toronto, ON, Canada

PostPosted: Tue Apr 24, 2012 7:00 pm    Post subject: Idea for new statement PARMDATA
Reply with quote

The below idea would make it easy to edit and maintain ICETOOL and SORT control statements within the same member. It also makes the code more self documenting since the two parts are together. Let me know what you think of this idea. If people like this idea then I could try and submit it to IBM directly. Not sure if they would listen.

New ICETOOL statement PARMDATA would allow the inclusion of SORT control cards within the same member that has the ICETOOL statements. These could then be used in subsequent statements.

Syntax:
PARMDATA USING(????) EOD('?') SYMBOL

USING(????) defines a dd name ????CNTL where the lines are written to. If the dd does not exist then it will be dynamically allocated as FB80

EOD(?) defines string of 1 to 40 characters to mark the end of data. When it is used the end-of-data string must begin in column 1.

SYMBOL (optional) defines that symbolic substitution will occur before the line is written. The default is no substitution - data is written as is.

Function:
All lines following the PARMDATA up to but not include the end-of-data marker are then written to the temporary dataset as FB 80. If the DD is not present then the dataset will be dynamically allocated. Subsequent ICETOOL statements can then refer to this dataset via the USING(????) parm.

Example:
The below will perform an icetool DATASORT
Code:

PARMDATA USING(SORT) EOD('<END-OF-DATA>')
INCLUDE COND=(20,2,CH,NE,C'  ')
SORT FIELDS=(1,10,CH,A)
<END-OF-DATA>
DATASORT FROM(ICEIN) TO(ICEOUT) USING(SORT)
Back to top
View user's profile Send private message

Skolusu

Senior Member


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

PostPosted: Wed Apr 25, 2012 4:41 am    Post subject:
Reply with quote

jerryte,

DFSORT already have DFSPARM which can override the control cards and apply the overrides globally and perform the task you want. The only exception to using DFSPARM is that the control cards needs to start in position 2.

for ex:

Code:

//STEP0100 EXEC PGM=ICETOOL             
//TOOLMSG  DD SYSOUT=*                 
//DFSMSG   DD SYSOUT=*                 
//DFSPARM  DD *                         
 INCLUDE COND=(20,2,CH,NE,C'  ')       
 SORT FIELDS=(1,10,CH,A)               
//IN       DD *                         
----+----1----+----2----+----3----+----4
2222222222         AA                   
1111111111         BB                   
4444444444         CC                   
0000000000         DD                   
9999999999                             
//OUT1     DD SYSOUT=*                 
//OUT2     DD SYSOUT=*                 
//TOOLIN   DD *                         
  SORT FROM(IN) TO(OUT1) USING(SORT)   
  SORT FROM(IN) TO(OUT2) USING(BLAH)   
//SORTCNTL DD *                         
//BLAHCNTL DD *                         
//*


The output from the both sorts is
Code:

0000000000         DD
1111111111         BB
2222222222         AA
4444444444         CC


Well you can even invoke Joinkeys using ICEGENER Via DFSPARM icon_wink.gif
Code:

//STEP0100 EXEC PGM=ICEGENER         
//SYSPRINT DD SYSOUT=*               
//INP1     DD *                     
Z                                   
D                                   
A                                   
C                                   
//INP2     DD *                     
C  MATCH VALUE2                     
A  MATCH VALUE1                     
//SYSUT2   DD SYSOUT=*               
//DFSPARM  DD *                     
  JOINKEYS F1=INP1,FIELDS=(1,1,A)   
  JOINKEYS F2=INP2,FIELDS=(1,1,A)   
  REFORMAT FIELDS=(F1:1,3,F2:4,15)   
//SYSIN    DD DUMMY                 
//*
Back to top
View user's profile Send private message
jerryte

Active User


Joined: 29 Oct 2010
Posts: 183
Location: Toronto, ON, Canada

PostPosted: Thu Apr 26, 2012 1:05 am    Post subject:
Reply with quote

Thanks for the tip. I had thought that DFSPARM was meant for sort OPTIONS only. Putting sort control statements on this dd seems like a trick that might fool the unsuspecting reader. It still puts statements into 2 or possibly 3 different places (DFSPARM, SYSIN, TOOLIN).

The point of my suggestion was to allow all statements to be in one location usually a pds member. If ICETOOL is run inside a JCL proc then instream dd is not allowed. This requires 2 or more pds parmlib members to be used. With my suggestion the ICETOOL statements and the SORT control statements can be in one pds member. Easier to read and analyze.
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 ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm
No new posts VALIDATE NULL VALUE IN DB2 CASE STATE... useit DB2 5 Thu Feb 09, 2017 4:34 pm
No new posts -913/-911 Deadlock during UPDATE stat... NoSleep319 DB2 5 Fri Nov 18, 2016 12:37 am
No new posts DB2 SQL help/idea/suggestion bshkris DB2 4 Thu Oct 06, 2016 3:04 pm
No new posts COBOL DB2 - CALL statement - high CPU... TS70363 DB2 15 Sun Sep 11, 2016 6:07 am


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