Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 & VSAM
View previous topic :: :: View next topic  
Author Message
CICS fan

New User


Joined: 03 Apr 2008
Posts: 82
Location: United States

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

sril.krishy

Active User


Joined: 30 Jul 2005
Posts: 183
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: 82
Location: United States

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: 183
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: 82
Location: United States

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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts OC4 in SORT Mohan Kothakota DFSORT/ICETOOL 2 Tue Sep 12, 2017 6:30 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us