|
|
| Author |
Message |
CICS fan
New User
Joined: 03 Apr 2008 Posts: 8 Location: Gurgaon
|
|
|
|
Hi All.
This is the formatting I need to do through SYNCSORT.
Input file, variable block(max 180)
rec structure:(comma separated,length within brackets)
field1(2),field2(3),field3(3),field4(3) or
field1(2),field2(3),field3(3),field4(3),field5(3)
input rec can be either of the two(not both together).
if its type 2, output file structure will be(fixed bloc,180)
KUMA/R/field2field3/D/CPfield4field5-field1
if its type 1, output file structure will be(fixed bloc,180)
KUMA/R/field2field3/D/CPfield4-field1 |
|
| Back to top |
|
 |
References
|
|
 |
Moved: Tue May 20, 2008 1:02 pm by superk From DFSORT/ICETOOL to JCL |
sril.krishy
Active User
Joined: 30 Jul 2005 Posts: 162 Location: hyderabad
|
|
|
|
Hi,
Please provide the dummy info of the input and expected output to get the correct and complete solution for your problem.
Thanks
Krishy |
|
| Back to top |
|
 |
CICS fan
New User
Joined: 03 Apr 2008 Posts: 8 Location: Gurgaon
|
|
|
|
Hi.
Input VB file as I said:
Input file, variable block(max 180)
rec structure:(comma separated,length within brackets)
field1(2),field2(3),field3(3),field4(3) or
field1(2),field2(3),field3(3),field4(3),field5(3)
input rec can be either of the two(not both together).
Sample:
CO,AAE,AMS,MRS (type1)
Or
CO,AAA,ATL,PPT,QLA (type 2)
if its type 2, output file structure will be(fixed bloc,180)
KUMA/R/field2field3/D/CPfield4field5-field1
if its type 1, output file structure will be(fixed bloc,180)
KUMA/R/field2field3/D/CPfield4-field1
Output will be:
KUMA/R/AAAATL/D/CPPPTQLA-CO (IF TYPE2)
KUMA/R/AAEAMS/S/CPMRS-CO (IF TYPE 1)
KUMA/R, /D/,/S/,CP,-CO are to be hard coded from sort card
Please help!
[/b] |
|
| Back to top |
|
 |
sril.krishy
Active User
Joined: 30 Jul 2005 Posts: 162 Location: hyderabad
|
|
|
|
Please check the below code.
| Code: |
//PS020 EXEC PGM=SYNCSORT
//SYSOUT DD SYSOUT=*
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=XXXX.XXXX.XXXXX.S.TEMP,
// DISP=SHR
//OUT1 DD DSN=XXXX.XXXX.XXXXX.S.T1,
// DISP=(,CATLG,DELETE),
// UNIT=SCRPK,
// SPACE=(TRK,(25,25),RLSE),
// DCB=(RECFM=FB,LRECL=180)
//OUT2 DD DSN=XXXX.XXXX.XXXXX.S.T2,
// DISP=(,CATLG,DELETE),
// UNIT=SCRPK,
// SPACE=(TRK,(25,25),RLSE),
// DCB=(RECFM=FB,LRECL=180)
//TOOLIN DD *
COPY FROM(IN1) USING(CTL1)
//CTL1CNTL DD *
SORT FIELDS=COPY
OUTFIL FNAMES=OUT1,OMIT=(19,1,CH,NE,C' '),
OUTREC=(C'KUMA/R/',8,3,12,3,C'/S/CP',16,3,C'-',5,2,
180:X),CONVERT
OUTFIL FNAMES=OUT2,INCLUDE=(19,1,CH,NE,C' '),
OUTREC=(C'KUMA/R/',8,3,12,3,C'/D/CP',16,3,20,3,C'-',5,2,
180:X),CONVERT
|
OUT1 will contain the Type 1 records and OUT2 contain the TYPE2 records.
Thanks
Krishy
[/code] |
|
| Back to top |
|
 |
CICS fan
New User
Joined: 03 Apr 2008 Posts: 8 Location: Gurgaon
|
|
|
|
| Thanks a ton Krishy! |
|
| Back to top |
|
 |
|
|
|