Editing a field using Sord Card



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Editing a field using Sord Card

Postby sethukutty » Fri Jun 20, 2014 6:41 pm

Hi,

I am looking for help on the following request:

I have the following 2 fields in the input file.
1. Application Code-[Length 1 Char]
2. Time (not in consistent format. Basically its hidden in 4 ways)-[Length 8 Char]

I/P file --> O/P file (B denotes Blank) (Let me show how the time is hiding)

W0173504B --> W17:35:04 (If the first Char is W then time starts from 3rd char with the length of 6 in the i/p file)

X1305BBBB --> X13:05:00 (If the first Char is X then time starts from 2nd char with the length of 4 in the i/p file).

Y20B08B57 --> Y20:08:57 (If the first Char is Y then time starts from 2nd char with the length of 8 but there is blank between HH , MM & SS in the i/p file).

Z11555500 --> Z11:55:55 (If the first Char is Z then time starts from 2nd char with the length of 6 in the i/p file)

I want all the O/P in the above format which is App CodeHH:MM:SS

Thanks
Sethu
sethukutty
 
Posts: 12
Joined: Fri Jun 20, 2014 6:21 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Editing a field using Sord Card

Postby Robert Sample » Fri Jun 20, 2014 6:49 pm

What is a "Sord Card"? If you meant "Sort Card", why did you post in the COBOL forum? If you did not mean "Sort Card", what DID you mean? You did mention COBOL, so what does "Sord Card" mean in the context of COBOL?

Furthermore, what help do you need? You did not indicate where you are having problems. Remember that this is a HELP forum, not a WRITE-THE-CODE-FOR-YOU forum. We will help with errors and problems but if you want anyone on this forum to write code for you, expect to pay the going rate (500 to 1500 US dollars per day, or the equivalent in other currencies).
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Editing a field using Sord Card

Postby sethukutty » Fri Jun 20, 2014 7:06 pm

Thanks for your effort Robert Sample.
sethukutty
 
Posts: 12
Joined: Fri Jun 20, 2014 6:21 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Editing a field using Sord Card

Postby sethukutty » Sat Jun 21, 2014 12:24 am

I found the solution myself using BUILD. Thanks.
sethukutty
 
Posts: 12
Joined: Fri Jun 20, 2014 6:21 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Editing a field using Sord Card

Postby Terry Heinze » Sat Jun 21, 2014 2:23 am

Care to share your solution for the benefit of others?
.... Terry
Terry Heinze
 
Posts: 239
Joined: Wed Dec 04, 2013 11:08 pm
Location: Richfield, MN, USA
Has thanked: 12 times
Been thanked: 11 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post