View previous topic :: View next topic
Author
Message
rvshetttigar New User Joined: 13 Oct 2009Posts: 6 Location: US
I have a situation here.
I have below VB file
05 DATA-PART-VAR-LENGTH PIC 9(08)
05 DATA-PART-VAR OCCURS 1000 TIMES DEPENDING ON
DATA-PART-VAR-LENGTH
07 DATA-VAR PIC X(01)
05 DATA-PART-FIX PIC X(2000).
I want to only DATA-PART-FIX in my FIXED length output file using DFSORT. How to do that ?
Back to top
Skolusu Senior Member Joined: 07 Dec 2007Posts: 2205 Location: San Jose
rvshetttigar,
Use the following DFSORT JCL
Code:
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
DUMMY RECORD
//C1 DD DSN=&&C1,DISP=(,PASS),SPACE=(TRK,(1,0),RLSE)
//C2 DD DSN=&&C2,DISP=(,PASS),SPACE=(CYL,(1,1),RLSE)
//C3 DD DSN=&&C3,DISP=(,PASS),SPACE=(TRK,(1,0),RLSE)
//SYSIN DD *
OPTION COPY
OUTFIL FNAMES=C1,BUILD=(3:C'OPTION COPY',/,
3:C'INREC IFTHEN=(WHEN=INIT,BUILD=(1,4,5)),',80:X)
OUTFIL FNAMES=C2,REPEAT=999,IFOUTLEN=80,
IFTHEN=(WHEN=INIT,
BUILD=(3:C'IFTHEN=(WHEN=(5,8,ZD,EQ,',SEQNUM,4,ZD,C'),BUILD=(1,4,')),
IFTHEN=(WHEN=INIT,
OVERLAY=(44:+13,ADD,27,4,ZD,M11,LENGTH=4,C',2000)),'))
OUTFIL FNAMES=C3,BUILD=(3:C'IFTHEN=(WHEN=(5,8,ZD,EQ,1000),',
C'BUILD=(1,4,1013,2000))',/,3:C'OUTFIL VTOF,BUILD=(5,2000)',80:X)
//*
//STEP0200 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=your input vb file,DISP=SHR
//SORTOUT DD SYSOUT=*
//SYSIN DD DSN=&&C1,DISP=SHR
// DD DSN=&&C2,DISP=SHR
// DD DSN=&&C3,DISP=SHR
//*
Back to top
rvshetttigar New User Joined: 13 Oct 2009Posts: 6 Location: US
Thanks for reply,
I just want to make sure that my question understood correctly. Below I have mentioned input and output file format.
Pls let me know should I use the entire JCL provided OR Should I take the part of it.
Input is VB file with following format :
01 INPUT-REC.
05 DATA-PART-VAR-LENGTH PIC 9(08)
05 DATA-PART-VAR OCCURS 1000 TIMES DEPENDING ON
DATA-PART-VAR-LENGTH
07 DATA-VAR PIC X(01)
05 DATA-PART-FIX PIC X(2000).
Output file is
01 OUTPUT-REC.
05 DATA-PART-FIX PIC X(2000).
Back to top
gcicchet Senior Member Joined: 28 Jul 2006Posts: 1702 Location: Australia
Hi,
why don't you try it ?
Just specify your input VB file.
Gerry
Back to top
enrico-sorichetti Superior Member Joined: 14 Mar 2007Posts: 10872 Location: italy
Quote:
Pls let me know should I use the entire JCL provided OR Should I take the part of it.
is there any reason to think that Skolusu would post something expecting You to use only a piece of it??
since the record layout is so badly designed to put the fixed part after the variable part
the jcl stream provided consists of two steps
the first step to build the control cards in order to provide for each record length the proper offset for the <fixed> part
the second step to run the extraction process
Back to top
rvshetttigar New User Joined: 13 Oct 2009Posts: 6 Location: US
I see overlay functionalitiy. I don;t need to overlay the input file..
My VB is the input file... FB is the output file.. both are different files..
Back to top
Robert Sample Global Moderator Joined: 06 Jun 2008Posts: 8696 Location: Dubuque, Iowa, USA
Let's see ... you ask for help with a problem using a product. You are provided a solution by one of the developers for that product. Rather than testing the solution, you decide it doesn't do what you want -- even though you cannot apparently develop your OWN solution -- and so you complain about it?
I believe this applies:
Quote:
In Hebrew, chutzpah is used indignantly, to describe someone who has over-stepped the boundaries of accepted behavior with no shame.
Back to top
Skolusu Senior Member Joined: 07 Dec 2007Posts: 2205 Location: San Jose
rvshetttigar wrote:
I see overlay functionalitiy. I don;t need to overlay the input file..
My VB is the input file... FB is the output file.. both are different files..
rvshettigar,
Your understanding of the OVERLAY function is wrong. I understood your requirement correctly and provided a solution which would give you the desired results but you did not even bother to run/test the solution and see if it works.
If this is going to be your attitude towards the people who try to help you , good luck in finding someone to help you
Kolusu
Back to top
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
Quote:
In Hebrew, chutzpah is used indignantly, to describe someone who has over-stepped the boundaries of accepted behavior with no shame.
I always liked this definition of "chutzpah":
A child who killed his parents and asked for mercy from the court because he was an orphan.
Back to top
rvshetttigar New User Joined: 13 Oct 2009Posts: 6 Location: US
Kolusu,
Thanks for your help. Not intended to hurt you. I really didn't understand what is going on DFSORT CARD. I am just trying to understand it.
Back to top
Please enable JavaScript!