View previous topic :: View next topic
|
Author |
Message |
anoop_mf
New User
Joined: 27 Sep 2005 Posts: 6
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
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 |
|
|
|
|