Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

maintaing the fixed number of records in file using Syncsort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
rajatbagga

Active User


Joined: 11 Mar 2007
Posts: 193
Location: india

PostPosted: Fri Mar 28, 2008 4:01 pm    Post subject: maintaing the fixed number of records in file using Syncsort
Reply with quote

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

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Mar 28, 2008 9:15 pm    Post subject:
Reply with quote

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

Active User


Joined: 11 Mar 2007
Posts: 193
Location: india

PostPosted: Fri Mar 28, 2008 11:34 pm    Post subject:
Reply with quote

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

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Sat Mar 29, 2008 2:10 am    Post subject: Reply to: maintaing the fixed number of records in file usin
Reply with quote

Rajat,

Frank's solution will work with SyncSort for z/OS 1.2.1 and later.
Back to top
View user's profile Send private message
rajatbagga

Active User


Joined: 11 Mar 2007
Posts: 193
Location: india

PostPosted: Sat Mar 29, 2008 7:32 pm    Post subject:
Reply with quote

Yes, You are right I tried it now it is working fine... thanks...
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
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us