IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Dynamic Creation of Sort Cards


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
anoop_mf

New User


Joined: 27 Sep 2005
Posts: 6

PostPosted: Sun Oct 09, 2011 3:15 pm
Reply with quote

Hi Friends,
I have this job:
Code:
//STEP01   EXEC PGM=SORT                                     
//SYSOUT   DD SYSOUT=*                                                   
//SORTIN   DD *                                               
  ANNUAL101 01                                               
  ANNUAL102 02                                               
  ANNUAL103 03                                               
  ANNUAL104 04                                               
  ANNUAL105 05                                               
  ANNUAL106 06                                               
  ANNUAL107 07                                               
  ANNUAL108 08                                               
  ANNUAL109 09                                               
  ANNUAL110 10                                               
  ANNUAL111 11                                               
  ANNUAL112 12                                               
  ANNUAL201 13                                               
  ANNUAL202 14                                               
  ANNUAL203 15                                               
  ANNUAL204 16                                               
  ANNUAL205 17                                               
  ANNUAL206 18                                               
  ANNUAL207 19                                               
  ANNUAL208 20                                               
  ANNUAL209 21                                               
  ANNUAL210 22                                               
  ANNUAL211 23                                               
  ANNUAL212 24                                               
/*                                     
//SORTOUT  DD DSN=&&TEMP1,                                   
//            DISP=(,PASS,DELETE),
//            SPACE=(TRK,(1,1),RLSE)                         
//SYSIN    DD *                                               
   SORT FIELDS=COPY                                           
   OUTFIL IFTHEN=(WHEN=INIT,                                 
          BUILD=(001,12,                                     
                 C' 201105')),                               
       IFTHEN=(WHEN=INIT,                                   
        FINDREP=(INOUT=(C'ANNUAL1',C'2007'))),               
       IFTHEN=(WHEN=INIT,                                   
        FINDREP=(INOUT=(C'ANNUAL2',C'2006')))               
/*                                               
//STEP20   EXEC PGM=SORT                                     
//SYSOUT   DD SYSOUT=*                                                   
//SORTIN   DD DSN=&&TEMP1,DISP=(OLD,DELETE)                                                         
//SORTOUT  DD DSN=&&TEMP2,                                   
//            DISP=(,PASS,DELETE),
//            SPACE=(TRK,(1,1),RLSE)                                                         
//SYSIN    DD *                                             
   SORT FIELDS=(3,6,CH,D)                                   
   OMIT COND=(4,6,CH,GT,14,6,CH)                             
/*                                                           
//STEP30   EXEC PGM=SORT                                     
//SYSOUT   DD SYSOUT=*                                                       
//SORTIN   DD DSN=&&TEMP2,DISP=(OLD,DELETE)                                                       
//SORTOUT  DD SYSOUT=*                                                   
//SYSIN    DD *                                             
   SORT FIELDS=COPY,                                         
   STOPAFT=12                                               
/*                   

For Step01 and Step03, I need the sort cards to be generated dynamically rather than using hardcoded values.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Sun Oct 09, 2011 7:25 pm
Reply with quote

describe better the type of DYNAMISM You expect
show the output expected please ( and use the code tags )

psychics on
for the sample data provides is this the output expected ???

Code:
  200712  201105                                                               
  200711  201105                                                               
  200710  201105                                                               
  200709  201105                                                               
  200708  201105                                                               
  200707  201105                                                               
  200706  201105                                                               
  200705  201105                                                               
  200704  201105                                                               
  200703  201105                                                               
  200702  201105                                                               
  200701  201105     
0              1
12345678901234567890
                                           


remember after a findrep the record gets modified according to the new length
hat was in position 14 is now in position 11
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Sun Oct 09, 2011 7:43 pm
Reply with quote

I guessing, and it is only a guess, that what you want is something which gives you some sort of date (year/month and/or year) for two of your steps.

If you can confirm that, or let us know what otherwise should be dynamic, it will help.

If you have a browse/search through the DFSORT forum you should find some examples generating symnames for dates which might suit your requirement.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Mon Oct 10, 2011 11:13 pm
Reply with quote

Quote:
For Step01 and Step03, I need the sort cards to be generated dynamically rather than using hardcoded values.


What exactly do you mean by "the sort cards"? Which sort statements or fields/constants in the statements are you talking about exactly?

You need to do a much better job of explaining clearly what you're trying to do before anyone can help you.
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Tue Oct 11, 2011 12:36 pm
Reply with quote

Quote:
For Step01 and Step03, I need the sort cards to be generated dynamically rather than using hardcoded values.


.... and STEP03 is where?

Garry.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top