In the Sweet By-and-By
"The Sweet By-and-By" is a Christian hymn with lyrics by S. Fillmore Bennett and music by Joseph P. Webster. It is recognizable by its chorus:

Background
Bennett described the composition of the hymn in his autobiography. Performance history
The hymn, immensely popular in the nineteenth century, became a Gospel standard and has appeared in hymnals ever since. A crowd of admirers in New Zealand sang the hymn in 1885 at the railway station to the departing American temperance evangelists Mary Greenleaf Clement Leavitt of the Woman's Christian Temperance Union and Blue Ribbon Army representative R.T. Booth. In the New Orleans jazz tradition, the song is a standard dirge played in so-called "jazz funerals". The American composer Charles Ives quoted the hymn in several works, most notably in the finale of his Orchestral Set No. 2, written between 1915 and 1919. Translations of the text exist in a number of world languages. It continues to be regularly performed. Noteworthy recordings over the years have been made by Elvis Presley, Louis Armstrong, Johnny Cash, Glen Campbell, Dolly Parton, Willie Nelson, Loretta Lynn and Kenny Rogers. The hymn is also heard in films, including The 39 Steps (1935), Sergeant York (1941), Benny and Joon, The Outlaw Josey Wales, A Prairie Home Companion, Supervixens, Django Unchained (2012) and Suburbicon (2017). "Placentero" text
The 1907 Spanish-language hymnal of the Church of Jesus Christ of Latter-day Saints (LDS Church) contained a similar song, "Hay un Mundo Feliz Más Allá", and set to the same tune modified by adding to all parts the notes of the traditional first response in the call-and-response division of the refrain. This hymn was copied with permission from the American Tract Society's Himnos evangélicos. During the era of the Mexican Revolution, Andrés C. Gonzalez, an early LDS Church missionary in Mexico, sang "Hay un mundo feliz más allá" in public and was arrested for "stealing" the Protestants' song. While incarcerated, he rewrote the lyrics as Despedida, which appeased the police. This revised version appears in place of the original in every iteration of the church's hymnal from 1912 on. It was titled "Despedida" until the 1992 version of the hymnal, when it changed to match the first line: "Placentero nos es trabajar". Parodies and satire
Mark Twain made fun of the song's ubiquitous popularity, along with the demographic groups in which it became popular. The melody is mentioned in The Loves of Alonzo Fitz Clarence and Rosannah Ethelton (1878) and The invalid's Story (1882); in both stories the melody is sung out of tune. Also in chapter 17 ("A Banquet") of his 1889 satirical novel A Connecticut Yankee In King Arthur's Court. The protagonist, Hank Morgan, a visitor from the future, attends a lavish court dinner given by Morgan Le Fay, King Arthur's sister, during which guests are regaled with music:

In a gallery a band with cymbals, horns, harps, and other horrors, opened the proceedings with what seemed to be the crude first-draft or original agony of the wail known to later centuries as "In the Sweet Bye and Bye." It was new, and ought to have been rehearsed a little more. For some reason or other the queen had the composer hanged, after dinner. The hymn was parodied by Joe Hill in 1911 as The Preacher and the Slave, in which the phrase "pie in the sky" was coined as a satirical comment on the Christian conception of heavenly reward. The parody In This Wheat By and By, written from the perspective of grasshoppers, was published in Beadle's Half-Dime Singer's Library in 1878. These singing grasshoppers became a common motif in advertising at the time. References

Bibliography
Bennett, S. Fillmore (w.); J.P. Webster (m.). "The Sweet By And By". Chicago: Lyon & Healy (1868). Sankey, Ira D. My Life and the Story of the Gospel Hymns and of Sacred Songs and Solos. Philadelphia: The Sunday School Times Company (1906). External links
"In The Sweet By And By", Artisan Band (2006-08-13: Artisan iMix 2.0 Bluegrass Week)(CC2.5)—Internet Archive. Words, sheet music & MIDI at the Cyber Hymnal
Sheet music (PriMus and .png) in german and english and midi score  at steamboat-electric
In the Sweet By and By - Free Piano MP3 at HymnPod

1868 songs
Glen Campbell songs
American Christian hymns
Songs written by Joseph Philbrick Webster
19th-century hymns