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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: DFSORT - Dynamic position. Get the fixed data from VB file
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    Post subject: Reply to: DFSORT - Dynamic position. Get the fixed data from
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    Post subject: Reply to: DFSORT - Dynamic position. Get the fixed data from
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: 1703
Location: Australia

PostPosted: Tue Oct 13, 2009 10:08 am    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Tue Oct 13, 2009 12:53 pm    Post subject: Reply to: DFSORT - Dynamic position. Get the fixed data from
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    Post subject:
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: 8117
Location: East Dubuque, Illinois, USA

PostPosted: Tue Oct 13, 2009 7:33 pm    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Tue Oct 13, 2009 9:30 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts copying data without knowing location arunsoods DFSORT/ICETOOL 6 Thu Jul 20, 2017 1:03 pm
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 Loading data to table gives wrong for... Raghu navaikulam DB2 18 Thu Jul 13, 2017 2:11 pm
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm


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