Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
SYNCSORT Sort card for formatting

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL
Author Message
CICS fan

New User


Joined: 03 Apr 2008
Posts: 8
Location: Gurgaon

PostPosted: Tue May 20, 2008 12:53 pm    Post subject: SYNCSORT Sort card for formatting
Reply with quote

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
View user's profile Send private message
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

PostPosted: Tue May 20, 2008 2:17 pm    Post subject:
Reply with quote

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
View user's profile Send private message
CICS fan

New User


Joined: 03 Apr 2008
Posts: 8
Location: Gurgaon

PostPosted: Tue May 20, 2008 3:15 pm    Post subject:
Reply with quote

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
View user's profile Send private message
sril.krishy

Active User


Joined: 30 Jul 2005
Posts: 162
Location: hyderabad

PostPosted: Tue May 20, 2008 3:56 pm    Post subject:
Reply with quote

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
View user's profile Send private message
CICS fan

New User


Joined: 03 Apr 2008
Posts: 8
Location: Gurgaon

PostPosted: Wed May 21, 2008 10:37 am    Post subject:
Reply with quote

Thanks a ton Krishy!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL All times are GMT + 6 Hours
Page 1 of 1