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
 

 

Query on OUTREC Fields

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
ksk

Active User


Joined: 08 Jun 2006
Posts: 356
Location: New York

PostPosted: Mon May 05, 2008 3:29 pm    Post subject: Query on OUTREC Fields
Reply with quote

Hi All,

In our SORT cards, I found the following code. Can anybody let me know what the below statement means?

OUTREC FIELDS=(1C'INSA',X'0000000000000C')

As for as I know 1st four characters of the output file will contain INSA. I read in Google about X'0000000000000C' is a 7 character field pd7. This could also have been written as 6Z,X'00'C, where 6Z is 6 binary zeroes.
But I didn't understand what exactly it performs.

Similarly I found X'0000076C'.

Regards,
KSK
Back to top
View user's profile Send private message

guptae

Moderator


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

PostPosted: Mon May 05, 2008 3:37 pm    Post subject:
Reply with quote

Hello ksk,


It will insert X'0000000000000C' or X'0000076C' from 5th bytes .
Back to top
View user's profile Send private message
ksk

Active User


Joined: 08 Jun 2006
Posts: 356
Location: New York

PostPosted: Mon May 05, 2008 3:58 pm    Post subject:
Reply with quote

Hi Ekta,

Thanks for your prompt reply. X'0000000000000C' is a binary representation, so what value would be inserted.

In my case X'0000000000000C' was coded in OUTREC for a field which has been declared as s9(m)V9(n).

KSK
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Mon May 05, 2008 4:12 pm    Post subject:
Reply with quote

Quote:
In my case X'0000000000000C' was coded in OUTREC for a field which has been declared as s9(m)V9(n).


I guess you ment: s9(m)V9(n) COMP-3

x'0000000000000C' has a length of 7 ch.... match your Picture (m and n values) with that length?
Back to top
View user's profile Send private message
ksk

Active User


Joined: 08 Jun 2006
Posts: 356
Location: New York

PostPosted: Mon May 05, 2008 4:35 pm    Post subject:
Reply with quote

Hi

Yes it is a field of COMP-3. and it's declaration is S9(4)V9(9) COMP-3.

KSK
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Mon May 05, 2008 4:43 pm    Post subject:
Reply with quote

if you code x'0000000000000C' in the outrec and you read that file with a field with picture S9(4)V9(9) COMP-3... the value of that field will be 0.
Back to top
View user's profile Send private message
ksk

Active User


Joined: 08 Jun 2006
Posts: 356
Location: New York

PostPosted: Mon May 05, 2008 4:47 pm    Post subject:
Reply with quote

Our input file has record length 79 and output has 480. this outrec filed is coming at 196-202 position in the output file.

My question is whether any value will be assigned from 196-202 in the output file because of this representation in OUTREC card? If so, what value would be assigned?
Back to top
View user's profile Send private message
ksk

Active User


Joined: 08 Jun 2006
Posts: 356
Location: New York

PostPosted: Mon May 05, 2008 4:50 pm    Post subject:
Reply with quote

Hi acevedo,

If 0 would be assigned for x'0000000000000C', what value would be assigned for X'0000076' and x'0000000000001C'?
Back to top
View user's profile Send private message
ksk

Active User


Joined: 08 Jun 2006
Posts: 356
Location: New York

PostPosted: Mon May 05, 2008 4:51 pm    Post subject:
Reply with quote

Sory it's X'0000076C'.
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Mon May 05, 2008 4:53 pm    Post subject:
Reply with quote

In my humble opinion now it's your time to read the manuals and try yourself... ( I answered you becouse I didn't notice it was the DFSORT forum).

Good luck.
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: Mon May 05, 2008 8:54 pm    Post subject:
Reply with quote

KSK,

Code:

   OUTREC FIELDS=(1C'INSA',X'0000000000000C')


This will create an 11-byte record with 'INSA' in positions 1-4 and a PD 0 value in positions 5-11.

Quote:
Our input file has record length 79 and output has 480. this outrec filed is coming at 196-202 position in the output file.

My question is whether any value will be assigned from 196-202 in the output file because of this representation in OUTREC card? If so, what value would be assigned?


No, the output records will only be 11 bytes long. That's all the OUTREC statement creates. It's really not clear what you're trying to do here. If you wanted to create a 480 byte output record with 'INSA' in 1-4, a PD 0 in 196-202 and blanks in the rest of the record, the OUTREC statement for that would be:

Code:

   OUTREC BUILD=(C'INSA',196:X'0000000000000C',480:X)
Back to top
View user's profile Send private message
ksk

Active User


Joined: 08 Jun 2006
Posts: 356
Location: New York

PostPosted: Tue May 06, 2008 5:31 pm    Post subject:
Reply with quote

Frank,

Sorry for the confusion. We have many fields in between these 2 fiedls. As I explained in my query, INSA is in 1 to 4 position and we have some other information from 5 to 195 and from 196th colomn, x'0000000000000C' was starting.

We have some other field also in between as X'0000076'. I would like to know what value will be assigned for this representation in output file. Shall we do Hexadecimal conversion for this or how can we come to know the value that would be displayed in the output file for any other representation?

Regards,
KSK
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 May 06, 2008 9:06 pm    Post subject:
Reply with quote

X'0000076'? I think you mean X'0000076C'. That's a PD value equal to a decimal value of +76. If you want to "display" it as a readable decimal value, you need to convert it appropriately. How exactly you would do the conversion depends on what you want the output to look like. For example, if your field started in position 1 and you used:

Code:

   OPTION COPY
   INREC BUILD=(1,4,PD,TO=FS)


the output would be:

Code:

      76


If you need more specific help, be more specific about what you want do do.

See the following for some more information on converting and editing fields:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CG20/2.4.7?DT=20060615173822

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CG20/2.4.8?DT=20060615173822
Back to top
View user's profile Send private message
ksk

Active User


Joined: 08 Jun 2006
Posts: 356
Location: New York

PostPosted: Wed May 07, 2008 11:09 am    Post subject:
Reply with quote

Thanks Frank for your detailed explanation.
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 Join in SQL Query vickey_dw DB2 2 Tue Jan 17, 2017 12:15 am
This topic is locked: you cannot edit posts or make replies. MQ setup query mohitsaini Java & MQSeries 4 Sun Jan 08, 2017 1:53 am
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am


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