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
 

 

Require Answer for Outrec

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Require Answer for Outrec
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: 1187
Location: Bangalore,India

PostPosted: Fri May 21, 2010 5:01 pm    Post subject:
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    Post subject:
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    Post subject: Reply to: Require Answer for Outrec
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    Post subject:
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: 1187
Location: Bangalore,India

PostPosted: Fri May 21, 2010 5:23 pm    Post subject:
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts outrec field outside range Danielle.Filteau SYNCSORT 10 Sat Mar 04, 2017 2:37 am
No new posts SORT- outrec ram_vizag DFSORT/ICETOOL 10 Tue Sep 27, 2016 12:50 am
No new posts Require help in DB2 Query Shruti Takkar DB2 3 Wed Aug 03, 2016 10:57 pm
No new posts OUTREC FILELDS FAILS WITH ICE126A 2 ... balaji81_k DFSORT/ICETOOL 8 Sat Jul 02, 2016 1:22 am
No new posts OUTREC RDW NOT INCLUDED krsenthil85 SYNCSORT 10 Fri May 06, 2016 3:22 am


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