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

JCL - convert PD to ZD of VB files.


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
santhosh_kumar

New User


Joined: 31 May 2007
Posts: 4
Location: Chennai

PostPosted: Wed Nov 21, 2007 11:19 am
Reply with quote

Hi,
I need to extract 3 fields from a VB file into FB file. One of this 3 fields is a Comp-3 (PD) field. Here is the JCL I have used. I am getting SOC7 abend for this JCL.
Comp-3 field( S9(09)V99 ) is at position 3930. For the rest you can refer Sysin.

Code:

//STEP001 EXEC PGM=SORT                                             
//SORTIN DD DSN=VB.file,DISP=SHR         
//SORTOUT DD DSN=FB.file,                     
//         DISP=(,CATLG,DELETE),                                 
//         UNIT=3390,SPACE=(CYL,(600,600),RLSE)
//SYSOUT DD SYSOUT=*                                                 
//SYSIN DD *                                                         
  OPTION COPY                                                   
  OUTREC FIELDS=(72,2,C'     ',3934,12,ZD,M11,LENGTH=12,7,8,C'    '),
    CONVERT                                                           
/*


Please give some suggestions.

Your's,
Santhosh
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Wed Nov 21, 2007 12:16 pm
Reply with quote

Santosh,

Quote:
3934,12,ZD,M11,LENGTH=12

First thing, length of your comp-3 var is not 12. Change it to appropriate value.

Secondly, replace 'zd' with PD,TO=ZD.
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: Wed Nov 21, 2007 10:23 pm
Reply with quote

Santhosh,

An S9(09)V99 COMP-3 value is 6 bytes, e.g. X'12345678901C', not 12 bytes. For more information on DFSORT formats vs COBOL formats, see:

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA20/C.3?DT=20060615185603

You can use the following DFSORT control statements:

Code:

 OPTION COPY
 OUTFIL BUILD=(72,2,5X,3934,6,PD,TO=ZD,LENGTH=12,7,8,4X),
    VTOF
Back to top
View user's profile Send private message
GCruz

New User


Joined: 11 Feb 2010
Posts: 4
Location: Florida

PostPosted: Fri Aug 20, 2010 2:26 am
Reply with quote

PLS SOMEONE HELP. I AM GETTING AN ERROR WRITING FROM A VB TO VB FOR THIS SYSIN ( I ALSO WANT TO GOT FROM PD TO ZD) SYSIN IS AS FOLLOWS: SYSIN :
OPTION COPY
OUTFIL BUILD=(22:22,7,PD,TO=ZD,LENGTH=13,
29:29,6,PD,TO=ZD,LENGTH=11,
35:35,6,PD,TO=ZD,LENGTH=11,
41:41,6,PD,TO=ZD,LENGTH=11,
47:47,6,PD,TO=ZD,LENGTH=11)
WER276B SYSDIAG= 1903157, 5555012, 5555012, 8397225
WER164B 6,896K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED
WER164B 40K BYTES RESERVE REQUESTED, 1,004K BYTES USED
WER146B 20K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I SORTIN : RECFM=VB ; LRECL= 52; BLKSIZE= 27998
WER235A SORTOUT OUTREC RDW NOT INCLUDED
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: Fri Aug 20, 2010 2:49 am
Reply with quote

The WER messages indicate you're using Syncsort. This Forum is for DFSORT questions. Post Syncsort questions in JCL Forum.

Also, please start a new Subject for a different question than the original.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
No new posts Joinkeys - 5 output files DFSORT/ICETOOL 7
Search our Forums:

Back to Top