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
 

 

Use of pre-compiler type of variables in SORT

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

New User


Joined: 31 Oct 2006
Posts: 48
Location: Chennai

PostPosted: Mon Nov 06, 2006 8:32 pm    Post subject: Use of pre-compiler type of variables in SORT
Reply with quote

Hi,

I do have to perform two sorts.
The conditions in both the sorts are the same.

For example:

Code:

//  EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG   DD SYSOUT=*
//IN    DD  DSN=----- (INPUT FILE, fb, lrecl= 80)
//OUT1  DD  DSN=---- (OUTPUT FILE1, fb, lrecl=82)
//OUT2  DD  DSN=---- (OUTPUT FILE2, fb, lrecl=82)
//TOOLIN  DD *
 COPY FROM(IN) USING(CTL1)
 COPY FROM(IN) USING(CTL2)
//CTL1CNTL  DD *
   INREC IFTHEN=(WHEN=(COND1),BUILD=(C'01',1,80)),
             IFTHEN=(WHEN=(COND2),BUILD=(C'02',1,80)),
             IFTHEN=(WHEN=(COND3),BUILD=(C'03',1,80)),
             ................................................
             ................................................
             IFTHEN=(WHEN=(COND25),BUILD=(C'25',1,80))
   OUTFIL FNAMES=OUT1,BUILD=(1,82)
//CTL2CNTL  DD *
   INREC IFTHEN=(WHEN=(COND1),BUILD=(C'24',1,80)),
             IFTHEN=(WHEN=(COND2),BUILD=(C'29',1,80)),
             IFTHEN=(WHEN=(COND3),BUILD=(C'09',1,80)),
             ................................................
             ................................................
             IFTHEN=(WHEN=(COND25),BUILD=(C'12',1,80))
   OUTFIL FNAMES=OUT2,BUILD=(1,82)


The conditions in both the control statements are the same.
I want to declare these COND1, COND2, ... , COND25 commonly as they are prone to changes frequently.

I tried using SYMNAMES, but it didn't work as the conditions exceed a single line.

Can anyone help me with this.

Thanks much in advance.

Regards,
OP
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: Mon Nov 06, 2006 9:57 pm    Post subject: Re: Use of pre-compiler type of variables in SORT
Reply with quote

You can use DFSORT symbols for columns, fields and constants, but not for complete conditions.
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 Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm
No new posts SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Optimize sort inrec parse vishwakotin DFSORT/ICETOOL 6 Mon Jun 26, 2017 11:15 pm
No new posts pre-compiler for program in an HFS Pedro DB2 0 Fri Jun 23, 2017 11:13 pm


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