Cobol Code Migration to USS



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

Cobol Code Migration to USS

Postby UnixNoob » Tue Sep 15, 2020 12:10 pm

We are trying to migrate Programs (Not Files) from Mainframe to USS, then ultimately to Github.

We have a Program that is having an issue during the migration. These program(s) contains hex character(s) and is being reformatted during the transfer from Mainframe PDS to Unix. is there a command i can insert so that Unix will not reformat the values during transfer from MF to PDS?

Program contains EBCDIC characters x'15' (newline) and x'0D' (carriage return) which introduces spaces x'40' to the file as it is transported from z/OS to USS. These padded x'40's pushes the rest of characters into the next line.

1. I am using the below command to transfer from Mainframe to Unix. This command is triggerred inside the Mainframe by a Batch Agent.
cp -U -S a=.CPY  -T -O c=IBM-1047  "//'Insert PDS Here'" /data/Github


2. The code snippet that is having an issue has a hex value below, Hex values start on 00 - 0F
hex code
444444444444444444444444444444444444470000000000000000744444444444
0000000000000000000000000000000000000D0123456789ABCDEFDB0000000000


actual code
01 AC-IN-ARRAY.
   05 FILLER                         PIC  X(16)  VALUE
                                    '                '.


3. When program is transferred to USS, reformatted as below
Actual viewable code, notice that the closing single quote has moved to the next line
      01 AC-IN-ARRAY.
          05 FILLER                         PIC  X(16)  VALUE
                                           '
  '
.


Code in Hex View, next line hex value '0E' is moved to the next line upon transfer to USS
         05 FILLER                         PIC  X(16)  VALUE
4444444444FF4CCDDCD4444444444444444444444444DCC44E4FF544ECDEC44444444444
00000000000506933590000000000000000000000000793007D16D005134500000000000
-----------------------------------------------------------------------
                                           '
444444444444444444444444444444444444444444470000000000000444444444444444
0000000000000000000000000000000000000000000D0123456789ABC000000000000000
-----------------------------------------------------------------------
  '
.
007444444444444444444444444444444444444444444444444444444444444444444444
EFDB00000000000000000000000000000000000000000000000000000000000000000000
UnixNoob
 
Posts: 1
Joined: Tue Sep 15, 2020 11:53 am
Has thanked: 0 time
Been thanked: 0 time

Re: Cobol Code Migration to USS

 

Re: Cobol Code Migration to USS

Postby NicC » Tue Sep 15, 2020 5:37 pm

You can avoid your hex being translated by transferring as binary but then your ebcdic does not get translated. Transferring as Text allows the ebcdic to be translated to ascii but your hex values will also be translated. Neither of these is what you want so do as suggested elsewhere - change your program code to use VALUE X'blah blah'.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3004
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post