|
View previous topic :: View next topic
|
| Author |
Message |
salil_shivhare
New User
Joined: 25 Nov 2003 Posts: 5 Location: mumbai
|
|
|
|
Hi,
I am trying to concatenate two data records of different file into a signle file.
file1 : LRECL :80
file2 : LRECL :50
Out-file : LRECL: 130,should contain file1 data in first 80 bytes then in next 50 bytes file2 data.
I don't have ICETOOL in my shop,so I can't use SPLICE operator.
I know a simple COBOL pgm can provide the solution for this.
My question is: Can it be done thru SYNCSORT/FILE-AID/ISPF?
Regards,
Salil |
|
| Back to top |
|
 |
salil_shivhare
New User
Joined: 25 Nov 2003 Posts: 5 Location: mumbai
|
|
|
|
Hi,
I got a work around for the same in ISPF.
But problem is we need this be done in batch mode with the schedule job.So, SYNCSORT/FILE-AID control card would work for me.
Any kind of help would be appriciated.
Regards,
Salil |
|
| Back to top |
|
 |
sril.krishy
Active User
Joined: 30 Jul 2005 Posts: 183 Location: hyderabad
|
|
|
|
Hi,
Which release of SYNCSORT you are haivng in your shop? ,If it is SYNCSORT FOR Z/OS 1.2.0.0RI,Please let me know.I will post the reply for you.
Thanks
Kirshy |
|
| Back to top |
|
 |
salil_shivhare
New User
Joined: 25 Nov 2003 Posts: 5 Location: mumbai
|
|
|
|
Kirshy,
Thanks for your response. In our shop we are using SYNCSORT FOR Z/OS 1.1.0.
Anyway I would like to know the solution for it in SYNCSORT 1.2.0 & relevant manual for it. As,its difficult to get SYNSORT refrence manual for mainframe even in GOOGLE.
Regards,
Salil |
|
| Back to top |
|
 |
sril.krishy
Active User
Joined: 30 Jul 2005 Posts: 183 Location: hyderabad
|
|
|
|
Hi,
Here is the solution with SYNCSORT FOR Z/OS 1.2.0.0RI.
| Code: |
//PS020 EXEC PGM=SYNCTOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=XXXX.A1,DISP=SHR
//IN2 DD DSN=XXXX.A2,DISP=SHR
//CTL1JNF1 DD DSN=XXXXXX.T1,
// DISP=(,CATLG,DELETE),
// UNIT=SCRPK,
// SPACE=(CYL,(55,55),RLSE)
//CTL1JNF2 DD DSN=XXXXXX.T2,
// DISP=(,CATLG,DELETE),
// UNIT=SCRPK,
// SPACE=(CYL,(55,55),RLSE)
//CTL1OF01 DD DSN=XXXXXXX.T3,
// DISP=(,CATLG,DELETE),
// UNIT=SCRPK,
// SPACE=(CYL,(55,55),RLSE)
//TOOLIN DD *
SORT FROM(IN1) TO(CTL1JNF1) USING(CTL0)
SORT FROM(IN2) TO(CTL1JNF2) USING(CTLA)
SORT FROM(CTL1JNF1) USING(CTL1)
//CTL0CNTL DD *
SORT FIELDS=COPY
OUTREC FIELDS=(1,80,SEQNUM,8,ZD)--->Create the sequence number from 81 position
//CTLACNTL DD *
SORT FIELDS=COPY
OUTREC FIELDS=(1,50,30X,SEQNUM,8,ZD)--->Create the sequence number from 81 position
//CTL1CNTL DD *
JOINKEYS FILES=F1,FIELDS=(81,08,A)
JOINKEYS FILES=F2,FIELDS=(81,08,A)
REFORMAT FIELDS=(F1:1,80,F2:1,50)
SORT FIELDS=COPY
OUTFIL FILES=01,OUTREC=(1,130)
/*
Here the file (IN1) is of 80 in length and in FB format.the file (IN2) is of 50 in length and in FB format.
|
If your input consits only the numerics,the below JCL might help you.
| Code: |
//PS020 EXEC PGM=ICETOOL
//*
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD *
24302003
12345678
//IN2 DD *
12122004
12345678
//T1 DD DSN=aaaa.T3,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SCRPK,
// SPACE=(TRK,(1,1),RLSE)
//T2 DD DSN=bbbb.T4,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SCRPK,
// SPACE=(TRK,(1,1),RLSE)
//CON DD DSN=aaaa.T3,DISP=SHR,VOL=REF=*.T1
// DD DSN=bbbb.T4,DISP=SHR,VOL=REF=*.T2
//OUT DD DSN=cccc.TEST.OT, *24302003 12122004
// DISP=(NEW,CATLG,DELETE),
// UNIT=SCRPK,
// SPACE=(TRK,(1,1),RLSE)
//TOOLIN DD *
COPY FROM(IN1) USING(CTL1)
COPY FROM(IN2) USING(CTL2)
SORT FROM(CON) USING(CTL3)
//CTL1CNTL DD *
OUTFIL FNAMES=T1,OUTREC=(1,8,C'00000000000',80:X,SEQNUM,8,ZD)
//CTL2CNTL DD *
OUTFIL FNAMES=T2,OUTREC=(C'00000000000',12,8,80:X,SEQNUM,8,ZD)
//CTL3CNTL DD *
OPTION EQUALS
SORT FIELDS=(81,8,ZD,A)
SUM FIELDS=(1,8,9,11),FORMAT=ZD
OUTFIL FNAMES=OUT,OUTREC=(1,8,3X,12,8,80:X)
/*
|
Thank you
Krishy |
|
| Back to top |
|
 |
salil_shivhare
New User
Joined: 25 Nov 2003 Posts: 5 Location: mumbai
|
|
|
|
Kirshy,
Thanks a lot. Could you plz provide me the URL from where I can download manual for SYNCTOOL.
Salil |
|
| Back to top |
|
 |
salil_shivhare
New User
Joined: 25 Nov 2003 Posts: 5 Location: mumbai
|
|
|
|
Kirshy,
I think you have to help me out for the error as well which I am getting while running the JCL.Its due to unavailability of good manual of SYNCTOOL.
Here is the JCL:
//VS90042T JOB (1,74117,REPORT),'TEST ',
// MSGCLASS=9,NOTIFY=&SYSUID
//PS020 EXEC PGM=SYNCTOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=VS90042.SYNCMRG.IN1,DISP=SHR
//IN2 DD DSN=VS90042.SYNCMRG.IN2,DISP=SHR
//CTL1JNF1 DD DSN=VS90042.T1,DISP=(OLD,CATLG,DELETE)
//CTL1JNF2 DD DSN=VS90042.T2,DISP=(OLD,CATLG,DELETE)
//CTL1OF01 DD DSN=VS90042.SYNCMRG.OUT,
// DISP=(OLD,CATLG,DELETE),
// SPACE=(CYL,(55,55),RLSE)
//TOOLIN DD *
SORT FROM(IN1) TO(CTL1JNF1) USING(CTL0)
SORT FROM(IN2) TO(CTL1JNF2) USING(CTLA)
SORT FROM(CTL1JNF1) USING(CTL1)
//CTL0CNTL DD *
SORT FIELDS=COPY
OUTREC FIELDS=(1,80,SEQNUM,8,ZD)
//CTLACNTL DD *
SORT FIELDS=COPY
OUTREC FIELDS=(1,50,SEQNUM,8,ZD)
//CTL1CNTL DD *
JOINKEYS FILES=CTL1JNF1,FIELDS=(81,08,A)
JOINKEYS FILES=CTL1JNF2,FIELDS=(81,08,A)
REFORMAT FIELDS=(CTL1JNF1:1,80,CTL1JNF2:1,50)
SORT FIELDS=COPY
OUTFIL FILES=01,OUTREC=(1,130)
/*
Here is the error msg:
CTL1CNTL : JOINKEYS,JOINKEYS,REFORMAT
*
SORT FIELDS=COPY
OUTFIL FILES=01,OUTREC=(1,130)
PARMLIST :
OPTION RESINV=0,ARESINV=0,MSGDDN=DFSMSG,SORTIN=CTL1JNF1,SORTDD=CTL1,DYNALLOC
WER428I CALLER-PROVIDED IDENTIFIER IS "0003"
WER131I PARM FIELD ERROR -
WER161B ALTERNATE PARM USED
I tired to search above error code in the google but unfortunately no luck. |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|