IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

DFSORT - Dynamic position. Get the fixed data from VB file


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rvshetttigar

New User


Joined: 13 Oct 2009
Posts: 6
Location: US

PostPosted: Tue Oct 13, 2009 4:28 am
Reply with quote

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

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Tue Oct 13, 2009 5:39 am
Reply with quote

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

New User


Joined: 13 Oct 2009
Posts: 6
Location: US

PostPosted: Tue Oct 13, 2009 8:41 am
Reply with quote

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

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Tue Oct 13, 2009 10:08 am
Reply with quote

Hi,

why don't you try it ?


Just specify your input VB file.


Gerry
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Oct 13, 2009 12:53 pm
Reply with quote

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

New User


Joined: 13 Oct 2009
Posts: 6
Location: US

PostPosted: Tue Oct 13, 2009 7:23 pm
Reply with quote

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

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Oct 13, 2009 7:33 pm
Reply with quote

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

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Tue Oct 13, 2009 8:10 pm
Reply with quote

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

DFSORT Developer


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

PostPosted: Tue Oct 13, 2009 9:30 pm
Reply with quote

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. icon_lol.gif
Back to top
View user's profile Send private message
rvshetttigar

New User


Joined: 13 Oct 2009
Posts: 6
Location: US

PostPosted: Tue Oct 13, 2009 9:37 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
Search our Forums:

Back to Top