MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

form output file

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
yadav2005
Intermediate


Joined: 10 Jan 2005
Posts: 348
Topics: 144

PostPosted: Fri Aug 06, 2010 9:41 am    Post subject: form output file Reply with quote

Hi All,

I have a requirement where in I have a file which will always conatin even number of records. I am forming the file by some means . The first half of the file contains some information which will be 45 bytes of each record and always start from 1 st byte and the second half also contains some other information which is 25 bytes of each record and always starts from 1 st byte.
Code:

YADAV.TEST.A
YADAV.TEST.B
YADAV.TEST.C
YADAV.TURN.J
YADAV.TURR.A
YADAV.TURR.B
YADAV.TURR.C
YADAV.TURR.D
SPACE-PRI-----5
SPACE-PRI-----6
SPACE-PRI-----9
SPACE-PRI-----1
SPACE-PRI----15
SPACE-PRI----55
SPACE-PRI----16
SPACE-PRI----22

I want the output as below which should be 80 bytes which should be combination of 45 + 10 spaces + 25 = 80.
Code:

----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
YADAV.TEST.A                                           SPACE-PRI-----5
YADAV.TEST.B                                           SPACE-PRI-----6
YADAV.TEST.C                                           SPACE-PRI-----9
YADAV.TURN.J                                           SPACE-PRI-----1
YADAV.TURR.A                                           SPACE-PRI----15
YADAV.TURR.B                                           SPACE-PRI----55
YADAV.TURR.C                                           SPACE-PRI----16
YADAV.TURR.D                                           SPACE-PRI----22
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Fri Aug 06, 2010 10:00 am    Post subject: Reply with quote

You can use a DFSORT/ICETOOL job like the following to do what you asked for:

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG   DD  SYSOUT=*
//DFSMSG   DD  SYSOUT=*
//IN DD *
YADAV.TEST.A
YADAV.TEST.B
YADAV.TEST.C
YADAV.TURN.J
YADAV.TURR.A
YADAV.TURR.B
YADAV.TURR.C
YADAV.TURR.D
SPACE-PRI-----5
SPACE-PRI-----6
SPACE-PRI-----9
SPACE-PRI-----1
SPACE-PRI----15
SPACE-PRI----55
SPACE-PRI----16
SPACE-PRI----22
/*
//OUT DD SYSOUT=*
//TOOLIN   DD    *
SPLICE FROM(IN) TO(OUT) ON(81,8,ZD) WITH(56,25) USING(CTL1)
/*
//CTL1CNTL DD *
  INREC IFTHEN=(WHEN=(1,6,CH,NE,C'SPACE-'),
    OVERLAY=(81:SEQNUM,8,ZD)),
   IFTHEN=(WHEN=NONE,OVERLAY=(56:1,25,81:SEQNUM,8,ZD))
  OUTFIL FNAMES=OUT,BUILD=(1,80)
/*

_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
yadav2005
Intermediate


Joined: 10 Jan 2005
Posts: 348
Topics: 144

PostPosted: Fri Aug 06, 2010 10:56 am    Post subject: Reply with quote

Frank,

Thanks a lot for your help , your code worked.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group