| Author |
Message |
rajatbagga
Active User
Joined: 11 Mar 2007 Posts: 100 Location: india
|
|
|
|
Hi,
In my requirement I have a file say 'rajat.test.file' (FB/04) in which the number of records should always be made to 99. if the file 'rajat.test.file' is created with 24 records then above these 24 records there should hex. dec. count till 75 i.e (X'01' to X'4B') starting from col. postion 4 of length 1. Everytime the number of records in 'rajat.test.file' may vary. So dynmically the hex. dec. count values should be inserted above the records.
For example.
INPUT FILE i.e 'rajat.test.file'
| Code: |
=COLS> ----
****** ***
000001 CCX
000002 CC1
000003 CC2
000004 CC9
000005 EE1
000006 EE3
000007 EE8
000008 FFY
000009 FF2
000010 FF3
000011 FF9
000012 HH1
000013 HH2
000014 HH9
000015 KK8
000016 NNC
000017 NNY
000018 NN2
000019 NN4
000020 NN8
000021 SE6
000022 UU8
000023 YYE
000024 YYG |
Then this file should be modified to :
| Code: |
=COLS> ----
****** ****
000001 X'01'
000002 X'02'
.
.
.
.
.
.
000075 X'4B'
000076 CCX
000077 CC1
000078 CC2
000079 CC9
000080 EE1
000081 EE3
000082 EE8
000083 FFY
000084 FF2
000085 FF3
000086 FF9
000087 HH1
000088 HH2
000089 HH9
000090 KK8
000091 NNC
000092 NNY
000093 NN2
000094 NN4
000095 NN8
000096 SE6
000097 UU8
000098 YYE
000099 YYG |
Thanks in advance,
Rajat |
|
| Back to top |
|
 |
References
|
Posted: Fri Mar 28, 2008 4:01 pm Post subject: Re: maintaing the fixed number of records in file using Syncsort |
 |
|
|
 |
Frank Yaeger
DFSORT Moderator
Joined: 15 Feb 2005 Posts: 3774 Location: San Jose, CA
|
|
|
|
Here's a DFSORT/ICETOOL job that will do what you asked for:
| Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=... input file (FB/4)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//CTL3CNTL DD DSN=&&C3,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//IN4 DD *
DUMMY
//***> USE A MOD DATA SET FOR //OUT
//OUT DD DISP=MOD,DSN=... MOD output file (FB/4)
//TOOLIN DD *
COPY FROM(IN) USING(CTL1)
COPY FROM(T1) TO(CTL3CNTL) USING(CTL2)
COPY FROM(IN4) TO(OUT) USING(CTL3)
COPY FROM(IN) TO(OUT)
/*
//CTL1CNTL DD *
OUTFIL FNAMES=T1,REMOVECC,NODETAIL,
TRAILER1=(COUNT=(EDIT=(TT)))
/*
//CTL2CNTL DD *
INREC BUILD=(2X,
C'OUTFIL FNAMES=OUT,BUILD=(4:SEQNUM,1,BI),REPEAT=',
+99,SUB,1,2,ZD,EDIT=(TT),80:X)
/*
|
|
|
| Back to top |
|
 |
rajatbagga
Active User
Joined: 11 Mar 2007 Posts: 100 Location: india
|
|
|
|
Hi Frank,
Thank you very much...I know this will definatly work with DFSORT but I wanted the solution in SYNCSORT.. actually now i realised that i posted in wrong section of fourm can you please move my Post to JCL section...
Thanks in advance...
Rajat
Title edited and topic relocated to JCL.
d.sch. |
|
| Back to top |
|
 |
Moved: Fri Mar 28, 2008 11:42 pm by dick scherrer From DFSORT/ICETOOL to JCL |
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 144 Location: USA
|
|
|
|
Rajat,
Frank's solution will work with SyncSort for z/OS 1.2.1 and later. |
|
| Back to top |
|
 |
rajatbagga
Active User
Joined: 11 Mar 2007 Posts: 100 Location: india
|
|
|
|
| Yes, You are right I tried it now it is working fine... thanks... |
|
| Back to top |
|
 |
|
|
|