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

Require Answer for Outrec


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
balajipradeep

New User


Joined: 12 Mar 2009
Posts: 21
Location: chennai

PostPosted: Fri May 21, 2010 4:46 pm
Reply with quote

Hi,

In the Input file one column in the position 135 of length 9. Another column in the Position 170&length 4 bytes.
I need to get the 2 columns value in the Input file to the output file. But my Output file should be like this.(it should start at 13 position)

Output:

(COLM_TYPE_CDE='4byt' AND COLM_NBR='N00368967') OR

I need to do it in Sync Sort Outrec. Any one help me out.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Fri May 21, 2010 5:01 pm
Reply with quote

Hello Balaji,

Your Q is not clear please provide sample input and output
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Fri May 21, 2010 5:02 pm
Reply with quote

Quote:
to get the 2 columns value

They are fields not columns.
Quote:
.(it should start at 13 position)

What do you mean by this?
Quote:
Input file one column in the position 135 of length 9. Another column in the Position 170&length 4 bytes

If you only want these fields to output use

Code:
INREC BUILD=(135,9,170,4)


This will produce 13 byte output file with these two fields...

Quote:
(COLM_TYPE_CDE='4byt' AND COLM_NBR='N00368967') OR

what do you want to tell this?
Back to top
View user's profile Send private message
balajipradeep

New User


Joined: 12 Mar 2009
Posts: 21
Location: chennai

PostPosted: Fri May 21, 2010 5:13 pm
Reply with quote

Hi,

I want the Ouptu format same as below. With open bracket at 13 postion etc.

Input file:

Position 135 170

Field colm_type colm-type

Length 9 BYTE 4 BYTES

Output file:

(colm_TYPE_CDE='PDP ' AND colm_NBR='N00924841') OR
(colm_TYPE_CDE='PDP ' AND Colm_NBR='N00924842') OR
(colm_TYPE_CDE='PDP ' AND Colm_NBR='N00924843') OR

How o accomplish this same format output with open bracket at 13 postition and finishing with 'OR'. Please do it in sort.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Fri May 21, 2010 5:15 pm
Reply with quote

Balaji,
Balaji wrote:

Please do it in sort.

Then what YOU will do? icon_evil.gif
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Fri May 21, 2010 5:23 pm
Reply with quote

Hello Balaji,

Please try below sort card

Code:
SORT FIELDS=COPY                                                   
OUTREC BUILD=(12X,C'(COLM_TYPE_CDE=',X'7D',170,4,X'7D',C' AND COLM_NBR=',
  X'7D',135,9,X'7D',C') OR')   
Back to top
View user's profile Send private message
cvishu

Active User


Joined: 31 Jul 2007
Posts: 136
Location: india

PostPosted: Fri May 21, 2010 5:30 pm
Reply with quote

Guptae is correct , alternativey i think u can replace X'7D' with C''' also .

Just on the lighter side , did you even try once before posting icon_biggrin.gif
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Fri May 21, 2010 5:31 pm
Reply with quote

You can Use...
Code:

//SYSIN    DD    *                                     
 SORT FIELDS=COPY                                       
 INREC  BUILD=(13:C'(COLM_TYPE_CDE=''',135,9,           
                 C''' AND COLM_NBR=''',170,4,C''') OR')
/*                                                     
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts question on Outrec and sort #Digvijay DFSORT/ICETOOL 20
No new posts Interviewers are surprised with my an... Mainframe Interview Questions 6
No new posts Maintain LIVE data for many sysplexes... PL/I & Assembler 6
No new posts Sort w/OUTREC Question DFSORT/ICETOOL 2
No new posts Getting OUTREC - SHORT REC error for ... DFSORT/ICETOOL 12
Search our Forums:

Back to Top