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

Record size is 70 i want retrive first 50 characters


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
srinivas.u

New User


Joined: 07 Jun 2004
Posts: 19

PostPosted: Sun Jun 20, 2004 11:08 pm
Reply with quote

hi

in cobol file the record size is 70 i want retrive first 50 characters.
Back to top
View user's profile Send private message
imvs

New User


Joined: 12 May 2004
Posts: 33

PostPosted: Sun Jun 20, 2004 11:34 pm
Reply with quote

srinivas.u,
In order to discuss in the same topic you can use POST REPLY instead of
opening a new topic.

Comming to you question, there are couple of ways to do it.

1) 01 ws-rec.
02 ws-reqd-50-data pic x(50).
02 filler pic x(20).
display ws-reqd-50-data.

2) 01 ws-rec pic x(70).
01 ws-reqd-50-data.

move ws-rec(1:50) to ws-reqd-50-data.
display ws-reqd-50-data.
Back to top
View user's profile Send private message
jz1b0c

Active User


Joined: 25 Jan 2004
Posts: 160
Location: Toronto, Canada

PostPosted: Fri Nov 19, 2004 2:06 am
Reply with quote

Srinivas,

Actually you dont need to do any thing like above simply a move statement will solve this.

01 ws-rec-70 pic x(70).

01 ws-rec-50 pic x(50).

MOVE WS-REC-70 TO WS-REC-50.

This will retrieve only first 50 characters and rest will be truncated.
Back to top
View user's profile Send private message
muthukumarapandian

New User


Joined: 08 Oct 2004
Posts: 42
Location: chennai, india

PostPosted: Sun Feb 27, 2005 6:01 pm
Reply with quote

Hi imvs,

reference modifier is possible in cobo 85 and versions after that, simply moving 70 bytes variable to 50 bytes variable will truncate and gives the required result.
Back to top
View user's profile Send private message
ankyhunk

Moderator


Joined: 05 May 2005
Posts: 98
Location: Navi Mumbai, India

PostPosted: Fri May 06, 2005 1:44 pm
Reply with quote

You can also copy a 70 char dataset to 50 char dataset using IEBGENER utility
Back to top
View user's profile Send private message
MainframeHelp4_u

New User


Joined: 15 Aug 2006
Posts: 25

PostPosted: Sat Sep 02, 2006 3:26 pm
Reply with quote

1) Keep o/p file length 50 characters, and with SORTIN is 70 bytes file & SORTOUT is 50 bytes file.. try this option...

2) with the help ofSORT : Copy first/any 50 characters to output DSN..

Cheers
Mainframehelp4_u
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Sun Sep 03, 2006 2:01 am
Reply with quote

Or with REXX: "VAR1 = SUBSTR(VAR2,1,50)"

O.
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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts To find whether record count are true... DFSORT/ICETOOL 6
Search our Forums:

Back to Top