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
 

 

SPLICE for more than 50 records

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

Active User


Joined: 02 May 2005
Posts: 126
Location: UK

PostPosted: Tue Mar 16, 2010 1:40 pm    Post subject: SPLICE for more than 50 records
Reply with quote

Hello Guys ,

Given below code is to merge 100 records into a single row USING MULTIPLE SPLICE . I AM GETTING ERROR for temp file used

Input File is of FB RL=15
Output File FB=1500

E.g INput
XXXXXXXXXxxxxxx
aaa
bbbb

output should be
XXXXXXXXXxxxxxx,aaa,bbbb

I haven't include code to remove the spaces.so as per current code o/p will be
XXXXXXXXXxxxxxx,aaa ,bbbb

XXXXXXXXXxxxxxx,aaa



ICE043A 3 INVALID DATA SET ATTRIBUTES: T1 RECFM - REASON CODE IS 10

GIVEN BELOW IS THE CODE

//STEP001 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//INDD DD DSN=XXXXXXXXXXXXX.S1,DISP=SHR
//T1 DD DISP=(,PASS),DSN=&&T1,SPACE=(CYL,(500,50),RLSE)
//T3 DD DISP=(MOD,PASS),DSN=&&T3,SPACE=(CYL,(500,50),RLSE)
//OUTDD DD DSN=XXXXXX.M8,DISP=SHR
//CTL1OUT DD SYSOUT=*
//TOOLIN DD *
COPY FROM(INDD) USING(CTL1)
SPLICE FROM(T1) TO(T3) ON(1501,1,CH) KEEPNODUPS -
WITHEACH -
WITH(16,15) WITH(31,15) WITH(46,15) WITH(61,15) WITH(76,15)-
WITH(91,15) WITH(106,15) WITH(121,15) WITH(136,15) WITH(151,15)-
WITH(166,15) WITH(181,15) WITH(196,15) WITH(211,15) WITH(226,15)
WITH(241,15) WITH(256,15) WITH(271,15) WITH(286,15) WITH(301,15)-
WITH(316,15) WITH(331,15) WITH(346,15) WITH(361,15) WITH(376,15)-
WITH(391,15) WITH(406,15) WITH(421,15) WITH(436,15) WITH(451,15)- WITH(466,15) WITH(481,15) WITH(496,15) WITH(511,15) WITH(526,15)-
WITH(541,15) WITH(556,15) WITH(571,15) WITH(586,15) WITH(601,15)-
WITH(616,15) WITH(631,15) WITH(646,15) WITH(661,15) WITH(676,15)-WITH(691,15) WITH(706,15) WITH(721,15) WITH(736,15) WITH(751,15)
SPLICE FROM(T3) TO(OUTDD) ON(1501,1,CH) KEEPNODUPS-
WITHEACH -
WITH(766,15) WITH(781,15) WITH(796,15) WITH(811,15) WITH(826,15)-
WITH(841,15) WITH(856,15) WITH(871,15) WITH(886,15) WITH(901,15)-
WITH(916,15) WITH(931,15) WITH(946,15) WITH(961,15) WITH(976,15)-
WITH(991,15) WITH(1006,15) WITH(1021,15) WITH(1036,15) WITH(1051,15)-
WITH(1066,15) WITH(1081,15) WITH(1096,15) WITH(1111,15) WITH(1126,15)-
WITH(1141,15) WITH(1156,15) WITH(1171,15) WITH(1186,15) WITH(1201,15)-
WITH(1216,15) WITH(1231,15) WITH(1246,15) WITH(1261,15) WITH(1276,15)-
WITH(1291,15) WITH(1306,15) WITH(1321,15) WITH(1336,15) WITH(1351,15)-
WITH(1366,15) WITH(1381,15) WITH(1396,15) WITH(1411,15) WITH(1426,15)-
WITH(1441,15) WITH(1456,15) WITH(1471,15) WITH(1486,15)
/*
//CTL1CNTL DD *
OPTION COPY
INREC IFTHEN=(WHEN=INIT,OVERLAY=(1501:SEQNUM,4,ZD)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,2),OVERLAY=(16:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,3),OVERLAY=(31:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,4),OVERLAY=(46:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,5),OVERLAY=(61:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,6),OVERLAY=(76:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,7),OVERLAY=(91:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,8),OVERLAY=(106:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,9),OVERLAY=(121:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,10),OVERLAY=(136:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,11),OVERLAY=(151:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,12),OVERLAY=(166:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,13),OVERLAY=(181:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,14),OVERLAY=(196:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,15),OVERLAY=(211:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,16),OVERLAY=(226:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,17),OVERLAY=(241:C',',1,15)),
IFTHEN=(WHEN=1501,4,ZD,EQ,18),OVERLAY=256:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,19),OVERLAY=(271:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,20),OVERLAY=(286:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,21),OVERLAY=(301:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,22),OVERLAY=(316:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,23),OVERLAY=(331:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,24),OVERLAY=(346:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,25),OVERLAY=(361:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,26),OVERLAY=(376:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,27),OVERLAY=(391:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,28),OVERLAY=(406:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,29),OVERLAY=(421:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,30),OVERLAY=(436:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,31),OVERLAY=(451:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,32),OVERLAY=(466:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,33),OVERLAY=(481:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,34),OVERLAY=(496:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,35),OVERLAY=(511:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,36),OVERLAY=(526:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,37),OVERLAY=(541:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,38),OVERLAY=(556:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,39),OVERLAY=(571:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,40),OVERLAY=(586:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,41),OVERLAY=(601:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,42),OVERLAY=(616:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,43),OVERLAY=(631:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,44),OVERLAY=(646:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,45),OVERLAY=(661:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,46),OVERLAY=(676:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,47),OVERLAY=(691:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,48),OVERLAY=(706:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,49),OVERLAY=(721:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,50),OVERLAY=(736:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,51),OVERLAY=(751:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,52),OVERLAY=(766:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,53),OVERLAY=(781:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,54),OVERLAY=(796:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,55),OVERLAY=(811:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,56),OVERLAY=(826:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,57),OVERLAY=(841:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,58),OVERLAY=(856:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,59),OVERLAY=(871:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,60),OVERLAY=(886:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,61),OVERLAY=(901:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,62),OVERLAY=(916:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,63),OVERLAY=(931:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,64),OVERLAY=(946:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,65),OVERLAY=(961:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,66),OVERLAY=(976:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,67),OVERLAY=(991:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,68),OVERLAY=(1006:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,69),OVERLAY=(1021:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,70),OVERLAY=(1036:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,71),OVERLAY=(1051:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,72),OVERLAY=(1066:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,73),OVERLAY=(1081:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,74),OVERLAY=(1096:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,75),OVERLAY=(1111:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,76),OVERLAY=(1126:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,77),OVERLAY=(1141:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,78),OVERLAY=(1156:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,79),OVERLAY=(1171:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,80),OVERLAY=(1186:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,81),OVERLAY=(1501:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,82),OVERLAY=(1216:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,83),OVERLAY=(1231:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,84),OVERLAY=(1246:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,85),OVERLAY=(1261:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,86),OVERLAY=(1276:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,87),OVERLAY=(1291:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,88),OVERLAY=(1306:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,89),OVERLAY=(1321:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,90),OVERLAY=(1336:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,91),OVERLAY=(1351:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,92),OVERLAY=(1366:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,93),OVERLAY=(1381:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,94),OVERLAY=(1396:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,95),OVERLAY=(1411:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,96),OVERLAY=(1426:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,97),OVERLAY=(1441:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,98),OVERLAY=(1456:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,99),OVERLAY=(1471:C',',1,15)),
IFTHEN=(WHEN=(1501,4,ZD,EQ,100),OVERLAY=(1486:C',',1,15))
OUTFIL REMOVECC,BUILD=(1,1500)
//*
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: Tue Mar 16, 2010 10:56 pm    Post subject:
Reply with quote

I didn't analize your entire job, but the first problem I see is that you don't have a FNAMES operand on your OUTFIL statement, so the ddname would default to CTL1OUT, whereas I think you want to use T1 as the output for your COPY operator.

Try changing your OUTFIL statement in CTL1CNTL to:

Code:

  OUTFIL FNAMES=T1,REMOVECC,BUILD=(1,1500)
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Tue Mar 16, 2010 11:37 pm    Post subject: Reply to: SPLICE for more than 50 records
Reply with quote

Shr_amar,

The following DFSORT JCL will give you the desired results, which will combine every 100 records as a single record.

Code:

//STEP0100 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD DSN=your input 15 byte FB file,DISP=SHR
//SORTOUT  DD SYSOUT=*
//SYSIN    DD *
  SORT FIELDS=COPY
  INREC IFTHEN=(WHEN=INIT,BUILD=(1501:SEQNUM,8,ZD,START=0,8X,1,15)),
  IFTHEN=(WHEN=INIT,OVERLAY=(1509:1501,8,ZD,DIV,+100,M11,LENGTH=8)),
  IFTHEN=(WHEN=INIT,OVERLAY=(1532:SEQNUM,2,ZD,START=0)),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,00),PUSH=(0001:1517,15),
  RECORDS=100),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,01),PUSH=(0016:1517,15),
  RECORDS=099),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,02),PUSH=(0031:1517,15),
  RECORDS=098),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,03),PUSH=(0046:1517,15),
  RECORDS=097),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,04),PUSH=(0061:1517,15),
  RECORDS=096),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,05),PUSH=(0076:1517,15),
  RECORDS=095),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,06),PUSH=(0091:1517,15),
  RECORDS=094),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,07),PUSH=(0106:1517,15),
  RECORDS=093),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,08),PUSH=(0121:1517,15),
  RECORDS=092),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,09),PUSH=(0136:1517,15),
  RECORDS=091),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,10),PUSH=(0151:1517,15),
  RECORDS=090),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,11),PUSH=(0166:1517,15),
  RECORDS=089),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,12),PUSH=(0181:1517,15),
  RECORDS=088),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,13),PUSH=(0196:1517,15),
  RECORDS=087),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,14),PUSH=(0211:1517,15),
  RECORDS=086),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,15),PUSH=(0226:1517,15),
  RECORDS=085),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,16),PUSH=(0241:1517,15),
  RECORDS=084),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,17),PUSH=(0256:1517,15),
  RECORDS=083),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,18),PUSH=(0271:1517,15),
  RECORDS=082),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,19),PUSH=(0286:1517,15),
  RECORDS=081),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,20),PUSH=(0301:1517,15),
  RECORDS=080),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,21),PUSH=(0316:1517,15),
  RECORDS=079),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,22),PUSH=(0331:1517,15),
  RECORDS=078),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,23),PUSH=(0346:1517,15),
  RECORDS=077),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,24),PUSH=(0361:1517,15),
  RECORDS=076),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,25),PUSH=(0376:1517,15),
  RECORDS=075),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,26),PUSH=(0391:1517,15),
  RECORDS=074),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,27),PUSH=(0406:1517,15),
  RECORDS=073),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,28),PUSH=(0421:1517,15),
  RECORDS=072),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,29),PUSH=(0436:1517,15),
  RECORDS=071),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,30),PUSH=(0451:1517,15),
  RECORDS=070),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,31),PUSH=(0466:1517,15),
  RECORDS=069),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,32),PUSH=(0481:1517,15),
  RECORDS=068),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,33),PUSH=(0496:1517,15),
  RECORDS=067),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,34),PUSH=(0511:1517,15),
  RECORDS=066),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,35),PUSH=(0526:1517,15),
  RECORDS=065),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,36),PUSH=(0541:1517,15),
  RECORDS=064),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,37),PUSH=(0556:1517,15),
  RECORDS=063),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,38),PUSH=(0571:1517,15),
  RECORDS=062),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,39),PUSH=(0586:1517,15),
  RECORDS=061),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,40),PUSH=(0601:1517,15),
  RECORDS=060),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,41),PUSH=(0616:1517,15),
  RECORDS=059),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,42),PUSH=(0631:1517,15),
  RECORDS=058),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,43),PUSH=(0646:1517,15),
  RECORDS=057),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,44),PUSH=(0661:1517,15),
  RECORDS=056),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,45),PUSH=(0676:1517,15),
  RECORDS=055),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,46),PUSH=(0691:1517,15),
  RECORDS=054),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,47),PUSH=(0706:1517,15),
  RECORDS=053),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,48),PUSH=(0721:1517,15),
  RECORDS=052),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,49),PUSH=(0736:1517,15),
  RECORDS=051),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,50),PUSH=(0751:1517,15),
  RECORDS=050),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,51),PUSH=(0766:1517,15),
  RECORDS=049),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,52),PUSH=(0781:1517,15),
  RECORDS=048),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,53),PUSH=(0796:1517,15),
  RECORDS=047),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,54),PUSH=(0811:1517,15),
  RECORDS=046),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,55),PUSH=(0826:1517,15),
  RECORDS=045),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,56),PUSH=(0841:1517,15),
  RECORDS=044),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,57),PUSH=(0856:1517,15),
  RECORDS=043),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,58),PUSH=(0871:1517,15),
  RECORDS=042),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,59),PUSH=(0886:1517,15),
  RECORDS=041),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,60),PUSH=(0901:1517,15),
  RECORDS=040),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,61),PUSH=(0916:1517,15),
  RECORDS=039),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,62),PUSH=(0931:1517,15),
  RECORDS=038),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,63),PUSH=(0946:1517,15),
  RECORDS=037),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,64),PUSH=(0961:1517,15),
  RECORDS=036),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,65),PUSH=(0976:1517,15),
  RECORDS=035),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,66),PUSH=(0991:1517,15),
  RECORDS=034),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,67),PUSH=(1006:1517,15),
  RECORDS=033),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,68),PUSH=(1021:1517,15),
  RECORDS=032),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,69),PUSH=(1036:1517,15),
  RECORDS=031),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,70),PUSH=(1051:1517,15),
  RECORDS=030),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,71),PUSH=(1066:1517,15),
  RECORDS=029),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,72),PUSH=(1081:1517,15),
  RECORDS=028),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,73),PUSH=(1096:1517,15),
  RECORDS=027),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,74),PUSH=(1111:1517,15),
  RECORDS=026),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,75),PUSH=(1126:1517,15),
  RECORDS=025),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,76),PUSH=(1141:1517,15),
  RECORDS=024),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,77),PUSH=(1156:1517,15),
  RECORDS=023),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,78),PUSH=(1171:1517,15),
  RECORDS=022),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,79),PUSH=(1186:1517,15),
  RECORDS=021),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,80),PUSH=(1201:1517,15),
  RECORDS=020),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,81),PUSH=(1216:1517,15),
  RECORDS=019),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,82),PUSH=(1231:1517,15),
  RECORDS=018),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,83),PUSH=(1246:1517,15),
  RECORDS=017),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,84),PUSH=(1261:1517,15),
  RECORDS=016),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,85),PUSH=(1276:1517,15),
  RECORDS=015),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,86),PUSH=(1291:1517,15),
  RECORDS=014),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,87),PUSH=(1306:1517,15),
  RECORDS=013),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,88),PUSH=(1321:1517,15),
  RECORDS=012),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,89),PUSH=(1336:1517,15),
  RECORDS=011),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,90),PUSH=(1351:1517,15),
  RECORDS=010),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,91),PUSH=(1366:1517,15),
  RECORDS=009),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,92),PUSH=(1381:1517,15),
  RECORDS=008),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,93),PUSH=(1396:1517,15),
  RECORDS=007),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,94),PUSH=(1411:1517,15),
  RECORDS=006),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,95),PUSH=(1426:1517,15),
  RECORDS=005),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,96),PUSH=(1441:1517,15),
  RECORDS=004),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,97),PUSH=(1456:1517,15),
  RECORDS=003),
  IFTHEN=(WHEN=GROUP,BEGIN=(1532,2,ZD,EQ,98),PUSH=(1471:1517,15),
  RECORDS=002),
  IFTHEN=(WHEN=(1532,2,ZD,EQ,99),OVERLAY=(1486:1517,15))
  OUTFIL REMOVECC,NODETAIL,BUILD=(1500X),
  SECTIONS=(1509,8,
  TRAILER3=(0001,256,0257,256,0513,256,
            0769,256,1025,256,1281,220))
//*
Back to top
View user's profile Send private message
shr_amar
Warnings : 2

Active User


Joined: 02 May 2005
Posts: 126
Location: UK

PostPosted: Wed Mar 17, 2010 6:31 pm    Post subject:
Reply with quote

Kolusu,

Many thanks , This is quit easy as compared to SPLICE .This covers my first requiremnt to 100 records to 1 .Further enhancement is required which are as follows.

Insert Fixed value header XXXX
Merge input records with @ sepration .That means records seperated by @
and @ will come at 16,32,48 and so on

Insert Text Count:100
Insert Fixed value Trailer TTTTTT

So if i have 9 record in the input file
REC1AAAAAAAAAAA
REC2AAAAAAAAAA
REC3AAAAAAAAA

"
"
REC9AAAAAAAAAAA

SO the output becomes like this

XXXXXX ==> this is fixed value header
REC1AAAAAAAAAAA@REC1AAAAAAAAAA @REC1AAAAAAAAA @ and so on
COUNT:9 ==> 9 is a calculated values and does not contain any space or 0
TTTTTT ==> this is fixed value trailer

Currently i am doing this using multiple steps . My challenge is to cover this requirement in single step.

Rgrds
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Wed Mar 17, 2010 9:38 pm    Post subject:
Reply with quote

shr_amar wrote:
Kolusu,

Many thanks , This is quit easy as compared to SPLICE .This covers my first requiremnt to 100 records to 1 .Further enhancement is required which are as follows.


Shr_amar,

Are you sure you are done with your complete requirements? I am not going to spend time providing solutions to you with a moving target. If you really need us helping then you really need to define ALL of your requirements AT ONCE and not in bits and pieces.
Back to top
View user's profile Send private message
shr_amar
Warnings : 2

Active User


Joined: 02 May 2005
Posts: 126
Location: UK

PostPosted: Wed Mar 17, 2010 11:44 pm    Post subject:
Reply with quote

I do not want to trouble you more , In past i wish to customize the skeleton of the solution you provide to me .I apologise if this has created confusion.

Here is the clear and fixed requirement :-

Input File VB (RL=20),
I/P will contain maximum of 100 records,
Records may contain space at the begining or at the end

Example of I/P file

TESTDATANUMBER1
ESTDATANUMBER ==> First & last byte is space ,This might not visibile in forum
ESTDATANUMBE ==> First & last byte is space,This might not visibile in forum


Output file will be Fixed block (RL = 15*100 + 99 = 1599)
First record in the o/p file will have fixed value header=XXXXXX
Second record will be data merged and seperated by @. All spaces in the begining or at the end should be removed.
Example of Second record
TESTDATANUMBER1@ESTDATANUMBERE@STDATANUMBE
Third record will be a FIXED text with Count of total record present in the i/p file
Example of third record
TOTAL:3 ==> there should be any leading spaces or zeroes in from of count
Fourth record will be fixed trailer.

So in totality O/P should look like
XXXXXX
TESTDATANUMBER1@ESTDATANUMBERE@STDATANUMBE
TOTAL:3
TTTTTTT

This is the fixed requiremnt and will not change , I am doing this in multiple steps but wish to know if this can be acheive in single steps.

Please let me know in case any other info is required.
Rgrds
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Thu Mar 18, 2010 2:48 am    Post subject: Reply to: SPLICE for more than 50 records
Reply with quote

shr_amar,


Quote:
I do not want to trouble you more , In past i wish to customize the skeleton of the solution you provide to me .I apologise if this has created confusion.


The only trouble you create is when you "I have an error message and I can't get it to work" and you don't show what you changed or if the requirement has been totally modified.

we can help people as long they are clear on what they want. You seem to follow the path " I coded something on my own from your given job fix it for me and it doesn't work" . I neither have to access to your jobs or data , that I can fix it with just a Error message.

Try to understand the solutions posted and come back if you have any questions , we are more than willing to help.


Anyway here is the DFSORT JCL will give you the desired results.**(read below)

Couple of clarifications.

1. Your input is VB and LRECL is 20 , which means you could have a max of 16 bytes of data. If you DID have full 16 bytes data you will NOT see the delimiter '@' and you did NOT consider this scenario for calculating your output length

2. The sample data you have shown does not contain embedded spaces. for ex: if the input as follows

Code:

Frank Yaeger
S kolusu
dick scherrer
shr amar


it would be all strung together as
Code:

FRANKYAEGER@SKOLUSU@DICKSCHERRER@SHRAMAR


now if you DO need to preserve the embedded spaces , I will let you work on it since I already spend way too much time on this


Code:

//STEP0100 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD DSN=your input VB 20 byte file,DISP=SHR
//SORTOUT  DD SYSOUT=*
//SYSIN    DD *
  OPTION COPY
  INREC IFTHEN=(WHEN=INIT,
         BUILD=(1,4,5,16,JFY=(SHIFT=LEFT,TRAIL=C'@'),
                SEQNUM,8,ZD,START=0)),
  IFTHEN=(WHEN=INIT,OVERLAY=(29:21,8,ZD,DIV,+100,M11,LENGTH=8,
                             37:SEQNUM,2,ZD,START=0,C'1')),
  IFTHEN=(WHEN=INIT,FINDREP=(IN=C'@               ', 
                             OUT=C' ',SHIFT=NO)),     

  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,00),PUSH=(0040:5,16),
  RECORDS=100),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,01),PUSH=(0056:5,16),
  RECORDS=099),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,02),PUSH=(0072:5,16),
  RECORDS=098),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,03),PUSH=(0088:5,16),
  RECORDS=097),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,04),PUSH=(0104:5,16),
  RECORDS=096),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,05),PUSH=(0120:5,16),
  RECORDS=095),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,06),PUSH=(0136:5,16),
  RECORDS=094),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,07),PUSH=(0152:5,16),
  RECORDS=093),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,08),PUSH=(0168:5,16),
  RECORDS=092),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,09),PUSH=(0184:5,16),
  RECORDS=091),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,10),PUSH=(0200:5,16),
  RECORDS=090),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,11),PUSH=(0216:5,16),
  RECORDS=089),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,12),PUSH=(0232:5,16),
  RECORDS=088),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,13),PUSH=(0248:5,16),
  RECORDS=087),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,14),PUSH=(0264:5,16),
  RECORDS=086),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,15),PUSH=(0280:5,16),
  RECORDS=085),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,16),PUSH=(0296:5,16),
  RECORDS=084),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,17),PUSH=(0312:5,16),
  RECORDS=083),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,18),PUSH=(0328:5,16),
  RECORDS=082),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,19),PUSH=(0344:5,16),
  RECORDS=081),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,20),PUSH=(0360:5,16),
  RECORDS=080),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,21),PUSH=(0376:5,16),
  RECORDS=079),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,22),PUSH=(0392:5,16),
  RECORDS=078),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,23),PUSH=(0408:5,16),
  RECORDS=077),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,24),PUSH=(0424:5,16),
  RECORDS=076),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,25),PUSH=(0440:5,16),
  RECORDS=075),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,26),PUSH=(0456:5,16),
  RECORDS=074),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,27),PUSH=(0472:5,16),
  RECORDS=073),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,28),PUSH=(0488:5,16),
  RECORDS=072),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,29),PUSH=(0504:5,16),
  RECORDS=071),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,30),PUSH=(0520:5,16),
  RECORDS=070),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,31),PUSH=(0536:5,16),
  RECORDS=069),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,32),PUSH=(0552:5,16),
  RECORDS=068),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,33),PUSH=(0568:5,16),
  RECORDS=067),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,34),PUSH=(0584:5,16),
  RECORDS=066),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,35),PUSH=(0600:5,16),
  RECORDS=065),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,36),PUSH=(0616:5,16),
  RECORDS=064),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,37),PUSH=(0632:5,16),
  RECORDS=063),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,38),PUSH=(0648:5,16),
  RECORDS=062),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,39),PUSH=(0664:5,16),
  RECORDS=061),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,40),PUSH=(0680:5,16),
  RECORDS=060),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,41),PUSH=(0696:5,16),
  RECORDS=059),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,42),PUSH=(0712:5,16),
  RECORDS=058),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,43),PUSH=(0728:5,16),
  RECORDS=057),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,44),PUSH=(0744:5,16),
  RECORDS=056),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,45),PUSH=(0760:5,16),
  RECORDS=055),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,46),PUSH=(0776:5,16),
  RECORDS=054),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,47),PUSH=(0792:5,16),
  RECORDS=053),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,48),PUSH=(0808:5,16),
  RECORDS=052),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,49),PUSH=(0824:5,16),
  RECORDS=051),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,50),PUSH=(0840:5,16),
  RECORDS=050),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,51),PUSH=(0856:5,16),
  RECORDS=049),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,52),PUSH=(0872:5,16),
  RECORDS=048),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,53),PUSH=(0888:5,16),
  RECORDS=047),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,54),PUSH=(0904:5,16),
  RECORDS=046),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,55),PUSH=(0920:5,16),
  RECORDS=045),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,56),PUSH=(0936:5,16),
  RECORDS=044),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,57),PUSH=(0952:5,16),
  RECORDS=043),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,58),PUSH=(0968:5,16),
  RECORDS=042),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,59),PUSH=(0984:5,16),
  RECORDS=041),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,60),PUSH=(1000:5,16),
  RECORDS=040),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,61),PUSH=(1016:5,16),
  RECORDS=039),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,62),PUSH=(1032:5,16),
  RECORDS=038),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,63),PUSH=(1048:5,16),
  RECORDS=037),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,64),PUSH=(1064:5,16),
  RECORDS=036),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,65),PUSH=(1080:5,16),
  RECORDS=035),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,66),PUSH=(1096:5,16),
  RECORDS=034),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,67),PUSH=(1112:5,16),
  RECORDS=033),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,68),PUSH=(1128:5,16),
  RECORDS=032),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,69),PUSH=(1144:5,16),
  RECORDS=031),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,70),PUSH=(1160:5,16),
  RECORDS=030),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,71),PUSH=(1176:5,16),
  RECORDS=029),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,72),PUSH=(1192:5,16),
  RECORDS=028),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,73),PUSH=(1208:5,16),
  RECORDS=027),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,74),PUSH=(1224:5,16),
  RECORDS=026),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,75),PUSH=(1240:5,16),
  RECORDS=025),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,76),PUSH=(1256:5,16),
  RECORDS=024),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,77),PUSH=(1272:5,16),
  RECORDS=023),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,78),PUSH=(1288:5,16),
  RECORDS=022),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,79),PUSH=(1304:5,16),
  RECORDS=021),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,80),PUSH=(1320:5,16),
  RECORDS=020),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,81),PUSH=(1336:5,16),
  RECORDS=019),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,82),PUSH=(1352:5,16),
  RECORDS=018),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,83),PUSH=(1368:5,16),
  RECORDS=017),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,84),PUSH=(1384:5,16),
  RECORDS=016),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,85),PUSH=(1400:5,16),
  RECORDS=015),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,86),PUSH=(1416:5,16),
  RECORDS=014),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,87),PUSH=(1432:5,16),
  RECORDS=013),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,88),PUSH=(1448:5,16),
  RECORDS=012),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,89),PUSH=(1464:5,16),
  RECORDS=011),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,90),PUSH=(1480:5,16),
  RECORDS=010),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,91),PUSH=(1496:5,16),
  RECORDS=009),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,92),PUSH=(1512:5,16),
  RECORDS=008),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,93),PUSH=(1528:5,16),
  RECORDS=007),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,94),PUSH=(1544:5,16),
  RECORDS=006),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,95),PUSH=(1560:5,16),
  RECORDS=005),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,96),PUSH=(1576:5,16),
  RECORDS=004),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,97),PUSH=(1592:5,16),
  RECORDS=003),
  IFTHEN=(WHEN=GROUP,BEGIN=(37,2,ZD,EQ,98),PUSH=(1608:5,16),
  RECORDS=002),
  IFTHEN=(WHEN=(37,2,ZD,EQ,99),OVERLAY=(1624:5,15),HIT=NEXT),
  IFTHEN=(WHEN=(5,16,CH,EQ,C' '),OVERLAY=(39:C'0'))                   
                                                                   
  OUTREC IFTHEN=(WHEN=INIT,BUILD=(1,4,29,8,39,1600,SQZ=(SHIFT=LEFT))),
  IFTHEN=(WHEN=INIT,FINDREP=(IN=C'@ ',OUT=C'  '))           
                                                                   
  OUTFIL VTOF,REMOVECC,NODETAIL,BUILD=(1599X),
  HEADER1=('XXXXXX'),
  SECTIONS=(5,8,
  TRAILER3=(0014,256,0270,256,0526,256,
            0782,256,1038,256,1294,256,1550,63)),
  TRAILER1=('TOTAL : ',TOTAL=(13,1,ZD,M10,LENGTH=3),/,
            'TTTTTTT')
//*
Back to top
View user's profile Send private message
shr_amar
Warnings : 2

Active User


Joined: 02 May 2005
Posts: 126
Location: UK

PostPosted: Thu Mar 18, 2010 10:49 pm    Post subject:
Reply with quote

Kolusu,

I am getting desired results .Still on thing is outstanding which is space between text TOTAL : and count .
Currently o/p is coming as TOTAL : 10 , I want TOTAL :10
This is for 10 records in i/p file
Rgrds
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 645
Location: Pennsylvania

PostPosted: Thu Mar 18, 2010 10:53 pm    Post subject:
Reply with quote

Look at this line here:
Code:

 TRAILER1=('TOTAL : ',TOTAL=(13,1,ZD,M10,LENGTH=3),/,
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Thu Mar 18, 2010 10:54 pm    Post subject:
Reply with quote

shr_amar wrote:
Kolusu,

I am getting desired results .Still on thing is outstanding which is space between text TOTAL : and count .
Currently o/p is coming as TOTAL : 10 , I want TOTAL :10
This is for 10 records in i/p file
Rgrds


shr_amar,

Read the following statement and try to change it according to your needs.

Code:

TRAILER1=('TOTAL : ',


The count is a 3 byte field with leading zero suppressed. So if you have 2 digit count then you would have a space and 2 digit number.
Back to top
View user's profile Send private message
shr_amar
Warnings : 2

Active User


Joined: 02 May 2005
Posts: 126
Location: UK

PostPosted: Tue Mar 30, 2010 6:12 pm    Post subject:
Reply with quote

Kolusu ,

Just want to know what this peice of code do :-

Code:
  SECTIONS=(5,8,
  TRAILER3=(0014,256,0270,256,0526,256,
            0782,256,1038,256,1294,256,1550,63)),
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Tue Mar 30, 2010 10:16 pm    Post subject:
Reply with quote

shr_amar wrote:
Kolusu ,

Just want to know what this peice of code do :-

Code:
  SECTIONS=(5,8,
  TRAILER3=(0014,256,0270,256,0526,256,
            0782,256,1038,256,1294,256,1550,63)),


Here is a homework for you

1. go to

http://www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000080

2. Pick up the manual "z/OS DFSORT: Getting Started (September, 2009)" either a PDF version or bookmanager version.

3. Read chapter "2.6.8 Creating Reports with OUTFIL" which will answer all your questions
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 Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 1 Fri Dec 09, 2016 4:40 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm


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